=============================================================================== 0010fe68 : #define MAXSYMLINK 5 int IMFS_Set_handlers( rtems_filesystem_location_info_t *loc ) { 10fe68: 55 push %ebp 10fe69: 89 e5 mov %esp,%ebp 10fe6b: 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; 10fe6e: 8b 50 10 mov 0x10(%eax),%edx 10fe71: 8b 4a 34 mov 0x34(%edx),%ecx switch( node->type ) { 10fe74: 8b 10 mov (%eax),%edx 10fe76: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 10fe7a: 77 12 ja 10fe8e <== NEVER TAKEN 10fe7c: 8b 52 4c mov 0x4c(%edx),%edx 10fe7f: ff 24 95 94 2d 12 00 jmp *0x122d94(,%edx,4) 10fe86: 66 90 xchg %ax,%ax case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 10fe88: 8b 51 0c mov 0xc(%ecx),%edx 10fe8b: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fe8e: 31 c0 xor %eax,%eax 10fe90: c9 leave 10fe91: c3 ret 10fe92: 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; 10fe94: 8b 51 08 mov 0x8(%ecx),%edx 10fe97: 89 50 08 mov %edx,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fe9a: 31 c0 xor %eax,%eax 10fe9c: c9 leave 10fe9d: c3 ret 10fe9e: 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; 10fea0: c7 40 08 60 2f 12 00 movl $0x122f60,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10fea7: 31 c0 xor %eax,%eax 10fea9: c9 leave 10feaa: c3 ret 10feab: 90 nop break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 10feac: c7 40 08 20 2e 12 00 movl $0x122e20,0x8(%eax) break; } return 0; } 10feb3: 31 c0 xor %eax,%eax 10feb5: c9 leave 10feb6: c3 ret 10feb7: 90 nop switch( node->type ) { case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 10feb8: c7 40 08 e0 2e 12 00 movl $0x122ee0,0x8(%eax) loc->handlers = &IMFS_fifo_handlers; break; } return 0; } 10febf: 31 c0 xor %eax,%eax 10fec1: c9 leave 10fec2: c3 ret =============================================================================== 0010fcb8 : IMFS_jnode_t *IMFS_allocate_node( IMFS_jnode_types_t type, const char *name, mode_t mode ) { 10fcb8: 55 push %ebp 10fcb9: 89 e5 mov %esp,%ebp 10fcbb: 53 push %ebx 10fcbc: 83 ec 1c sub $0x1c,%esp struct timeval tv; /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 10fcbf: 6a 64 push $0x64 10fcc1: 6a 01 push $0x1 10fcc3: e8 a4 86 ff ff call 10836c 10fcc8: 89 c3 mov %eax,%ebx if ( !node ) 10fcca: 83 c4 10 add $0x10,%esp 10fccd: 85 c0 test %eax,%eax 10fccf: 74 4f je 10fd20 <== NEVER TAKEN return NULL; /* * Fill in the basic information */ node->st_nlink = 1; 10fcd1: 66 c7 40 34 01 00 movw $0x1,0x34(%eax) node->type = type; 10fcd7: 8b 45 08 mov 0x8(%ebp),%eax 10fcda: 89 43 4c mov %eax,0x4c(%ebx) strncpy( node->name, name, IMFS_NAME_MAX ); 10fcdd: 51 push %ecx 10fcde: 6a 20 push $0x20 10fce0: ff 75 0c pushl 0xc(%ebp) 10fce3: 8d 43 0c lea 0xc(%ebx),%eax 10fce6: 50 push %eax 10fce7: e8 c0 5f 00 00 call 115cac /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode; 10fcec: 8b 45 10 mov 0x10(%ebp),%eax 10fcef: 89 43 30 mov %eax,0x30(%ebx) #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 10fcf2: e8 c9 0f 00 00 call 110cc0 10fcf7: 66 89 43 3c mov %ax,0x3c(%ebx) node->st_gid = getegid(); 10fcfb: e8 b0 0f 00 00 call 110cb0 10fd00: 66 89 43 3e mov %ax,0x3e(%ebx) #endif /* * Now set all the times. */ gettimeofday( &tv, 0 ); 10fd04: 58 pop %eax 10fd05: 5a pop %edx 10fd06: 6a 00 push $0x0 10fd08: 8d 45 f0 lea -0x10(%ebp),%eax 10fd0b: 50 push %eax 10fd0c: e8 ef 88 ff ff call 108600 node->stat_atime = (time_t) tv.tv_sec; 10fd11: 8b 45 f0 mov -0x10(%ebp),%eax 10fd14: 89 43 40 mov %eax,0x40(%ebx) node->stat_mtime = (time_t) tv.tv_sec; 10fd17: 89 43 44 mov %eax,0x44(%ebx) node->stat_ctime = (time_t) tv.tv_sec; 10fd1a: 89 43 48 mov %eax,0x48(%ebx) return node; 10fd1d: 83 c4 10 add $0x10,%esp } 10fd20: 89 d8 mov %ebx,%eax 10fd22: 8b 5d fc mov -0x4(%ebp),%ebx 10fd25: c9 leave 10fd26: c3 ret =============================================================================== 0010fc54 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 10fc54: 55 push %ebp 10fc55: 89 e5 mov %esp,%ebp 10fc57: 57 push %edi 10fc58: 56 push %esi 10fc59: 53 push %ebx 10fc5a: 83 ec 1c sub $0x1c,%esp 10fc5d: 8b 7d 0c mov 0xc(%ebp),%edi 10fc60: 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; 10fc63: 8b 45 08 mov 0x8(%ebp),%eax 10fc66: 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(); 10fc68: e8 53 10 00 00 call 110cc0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 10fc6d: 66 3b 43 3c cmp 0x3c(%ebx),%ax 10fc71: 74 05 je 10fc78 <== ALWAYS TAKEN 10fc73: 66 85 c0 test %ax,%ax <== NOT EXECUTED 10fc76: 75 2c jne 10fca4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 10fc78: 66 89 7b 3c mov %di,0x3c(%ebx) jnode->st_gid = group; 10fc7c: 66 89 73 3e mov %si,0x3e(%ebx) IMFS_update_ctime( jnode ); 10fc80: 83 ec 08 sub $0x8,%esp 10fc83: 6a 00 push $0x0 10fc85: 8d 45 e0 lea -0x20(%ebp),%eax 10fc88: 50 push %eax 10fc89: e8 72 89 ff ff call 108600 10fc8e: 8b 45 e0 mov -0x20(%ebp),%eax 10fc91: 89 43 48 mov %eax,0x48(%ebx) 10fc94: 31 c0 xor %eax,%eax return 0; 10fc96: 83 c4 10 add $0x10,%esp } 10fc99: 8d 65 f4 lea -0xc(%ebp),%esp 10fc9c: 5b pop %ebx 10fc9d: 5e pop %esi 10fc9e: 5f pop %edi 10fc9f: c9 leave 10fca0: c3 ret 10fca1: 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 ); 10fca4: e8 bf 53 00 00 call 115068 <__errno> 10fca9: c7 00 01 00 00 00 movl $0x1,(%eax) 10fcaf: b8 ff ff ff ff mov $0xffffffff,%eax 10fcb4: eb e3 jmp 10fc99 =============================================================================== 0010fd5c : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 10fd5c: 55 push %ebp 10fd5d: 89 e5 mov %esp,%ebp 10fd5f: 57 push %edi 10fd60: 56 push %esi 10fd61: 53 push %ebx 10fd62: 83 ec 1c sub $0x1c,%esp 10fd65: 8b 5d 08 mov 0x8(%ebp),%ebx 10fd68: 8b 75 0c mov 0xc(%ebp),%esi 10fd6b: 8b 7d 18 mov 0x18(%ebp),%edi IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 10fd6e: 85 db test %ebx,%ebx 10fd70: 75 0a jne 10fd7c <== ALWAYS TAKEN 10fd72: 31 c0 xor %eax,%eax node->st_ino = ++fs_info->ino_count; rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 10fd74: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10fd77: 5b pop %ebx <== NOT EXECUTED 10fd78: 5e pop %esi <== NOT EXECUTED 10fd79: 5f pop %edi <== NOT EXECUTED 10fd7a: c9 leave <== NOT EXECUTED 10fd7b: c3 ret <== NOT EXECUTED return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 10fd7c: 50 push %eax 10fd7d: a1 e4 70 12 00 mov 0x1270e4,%eax 10fd82: 8b 40 2c mov 0x2c(%eax),%eax 10fd85: f7 d0 not %eax 10fd87: 23 45 14 and 0x14(%ebp),%eax 10fd8a: 50 push %eax 10fd8b: ff 75 10 pushl 0x10(%ebp) 10fd8e: 56 push %esi 10fd8f: e8 24 ff ff ff call 10fcb8 if ( !node ) 10fd94: 83 c4 10 add $0x10,%esp 10fd97: 85 c0 test %eax,%eax 10fd99: 74 d9 je 10fd74 <== NEVER TAKEN return NULL; /* * Set the type specific information */ switch (type) { 10fd9b: 83 fe 07 cmp $0x7,%esi 10fd9e: 76 18 jbe 10fdb8 <== ALWAYS TAKEN case IMFS_FIFO: node->info.fifo.pipe = NULL; break; default: assert(0); 10fda0: 68 da 26 12 00 push $0x1226da <== NOT EXECUTED 10fda5: 68 80 2d 12 00 push $0x122d80 <== NOT EXECUTED 10fdaa: 6a 5c push $0x5c <== NOT EXECUTED 10fdac: 68 10 2d 12 00 push $0x122d10 <== NOT EXECUTED 10fdb1: e8 8e 84 ff ff call 108244 <__assert_func> <== NOT EXECUTED 10fdb6: 66 90 xchg %ax,%ax <== NOT EXECUTED return NULL; /* * Set the type specific information */ switch (type) { 10fdb8: ff 24 b5 60 2d 12 00 jmp *0x122d60(,%esi,4) 10fdbf: 90 nop case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 10fdc0: 8b 17 mov (%edi),%edx 10fdc2: 89 50 50 mov %edx,0x50(%eax) } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; 10fdc5: 8b 13 mov (%ebx),%edx fs_info = parent_loc->mt_entry->fs_info; 10fdc7: 8b 4b 10 mov 0x10(%ebx),%ecx 10fdca: 8b 59 34 mov 0x34(%ecx),%ebx node->Parent = parent; 10fdcd: 89 50 08 mov %edx,0x8(%eax) node->st_ino = ++fs_info->ino_count; 10fdd0: 8b 4b 04 mov 0x4(%ebx),%ecx 10fdd3: 41 inc %ecx 10fdd4: 89 4b 04 mov %ecx,0x4(%ebx) 10fdd7: 89 48 38 mov %ecx,0x38(%eax) 10fdda: 83 ec 08 sub $0x8,%esp 10fddd: 50 push %eax 10fdde: 83 c2 50 add $0x50,%edx 10fde1: 52 push %edx 10fde2: 89 45 e4 mov %eax,-0x1c(%ebp) 10fde5: e8 d6 c7 ff ff call 10c5c0 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; 10fdea: 83 c4 10 add $0x10,%esp 10fded: 8b 45 e4 mov -0x1c(%ebp),%eax } 10fdf0: 8d 65 f4 lea -0xc(%ebp),%esp 10fdf3: 5b pop %ebx 10fdf4: 5e pop %esi 10fdf5: 5f pop %edi 10fdf6: c9 leave 10fdf7: c3 ret node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 10fdf8: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) <== NOT EXECUTED 10fdff: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) <== NOT EXECUTED node->info.linearfile.direct = 0; 10fe06: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 10fe0d: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) 10fe14: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) node->info.file.indirect = 0; 10fe1b: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) node->info.file.doubly_indirect = 0; 10fe22: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) node->info.file.triply_indirect = 0; 10fe29: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) break; 10fe30: eb 93 jmp 10fdc5 10fe32: 66 90 xchg %ax,%ax case IMFS_FIFO: node->info.fifo.pipe = NULL; 10fe34: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) break; 10fe3b: eb 88 jmp 10fdc5 10fe3d: 8d 76 00 lea 0x0(%esi),%esi case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 10fe40: 8b 17 mov (%edi),%edx 10fe42: 89 50 50 mov %edx,0x50(%eax) node->info.device.minor = info->device.minor; 10fe45: 8b 57 04 mov 0x4(%edi),%edx 10fe48: 89 50 54 mov %edx,0x54(%eax) break; 10fe4b: e9 75 ff ff ff jmp 10fdc5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fe50: 8d 50 54 lea 0x54(%eax),%edx 10fe53: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10fe56: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10fe5d: 8d 50 50 lea 0x50(%eax),%edx 10fe60: 89 50 58 mov %edx,0x58(%eax) 10fe63: e9 5d ff ff ff jmp 10fdc5 =============================================================================== 0010fd28 : IMFS_jnode_t *IMFS_create_root_node(void) { 10fd28: 55 push %ebp 10fd29: 89 e5 mov %esp,%ebp 10fd2b: 83 ec 0c sub $0xc,%esp IMFS_jnode_t *node; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) ); 10fd2e: 68 ed 41 00 00 push $0x41ed 10fd33: 68 95 29 12 00 push $0x122995 10fd38: 6a 01 push $0x1 10fd3a: e8 79 ff ff ff call 10fcb8 if ( !node ) 10fd3f: 83 c4 10 add $0x10,%esp 10fd42: 85 c0 test %eax,%eax 10fd44: 74 13 je 10fd59 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10fd46: 8d 50 54 lea 0x54(%eax),%edx 10fd49: 89 50 50 mov %edx,0x50(%eax) the_chain->permanent_null = NULL; 10fd4c: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_chain->last = _Chain_Head(the_chain); 10fd53: 8d 50 50 lea 0x50(%eax),%edx 10fd56: 89 50 58 mov %edx,0x58(%eax) * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries); return node; } 10fd59: c9 leave 10fd5a: c3 ret =============================================================================== 00109d54 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 109d54: 55 push %ebp 109d55: 89 e5 mov %esp,%ebp 109d57: 57 push %edi 109d58: 56 push %esi 109d59: 53 push %ebx 109d5a: 83 ec 1c sub $0x1c,%esp 109d5d: 8b 45 08 mov 0x8(%ebp),%eax 109d60: 8b 75 0c mov 0xc(%ebp),%esi rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109d63: 85 c0 test %eax,%eax 109d65: 74 7a je 109de1 <== NEVER TAKEN assert( level >= 0 ); 109d67: 85 f6 test %esi,%esi 109d69: 0f 88 a4 00 00 00 js 109e13 <== NEVER TAKEN assert( the_directory->type == IMFS_DIRECTORY ); 109d6f: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 109d73: 0f 85 81 00 00 00 jne 109dfa <== NEVER TAKEN the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109d79: 8b 78 50 mov 0x50(%eax),%edi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 109d7c: 83 c0 54 add $0x54,%eax 109d7f: 89 45 e4 mov %eax,-0x1c(%ebp) 109d82: 39 c7 cmp %eax,%edi 109d84: 74 41 je 109dc7 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 ); 109d86: 8d 46 01 lea 0x1(%esi),%eax 109d89: 89 45 e0 mov %eax,-0x20(%ebp) for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 109d8c: 31 db xor %ebx,%ebx 109d8e: 66 90 xchg %ax,%ax for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 109d90: a1 80 c1 12 00 mov 0x12c180,%eax 109d95: ff 70 08 pushl 0x8(%eax) 109d98: 6a 04 push $0x4 109d9a: 6a 01 push $0x1 109d9c: 68 35 7c 12 00 push $0x127c35 109da1: e8 e2 f9 00 00 call 119788 !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++ ) 109da6: 43 inc %ebx 109da7: 83 c4 10 add $0x10,%esp 109daa: 39 de cmp %ebx,%esi 109dac: 7d e2 jge 109d90 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 109dae: 83 ec 0c sub $0xc,%esp 109db1: 57 push %edi 109db2: e8 f5 fd ff ff call 109bac if ( the_jnode->type == IMFS_DIRECTORY ) 109db7: 83 c4 10 add $0x10,%esp 109dba: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 109dbe: 74 10 je 109dd0 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 109dc0: 8b 3f mov (%edi),%edi assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 109dc2: 3b 7d e4 cmp -0x1c(%ebp),%edi 109dc5: 75 c5 jne 109d8c fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 109dc7: 8d 65 f4 lea -0xc(%ebp),%esp 109dca: 5b pop %ebx 109dcb: 5e pop %esi 109dcc: 5f pop %edi 109dcd: c9 leave 109dce: c3 ret 109dcf: 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 ); 109dd0: 83 ec 08 sub $0x8,%esp 109dd3: ff 75 e0 pushl -0x20(%ebp) 109dd6: 57 push %edi 109dd7: e8 78 ff ff ff call 109d54 109ddc: 83 c4 10 add $0x10,%esp 109ddf: eb df jmp 109dc0 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 109de1: 68 1c 7c 12 00 push $0x127c1c <== NOT EXECUTED 109de6: 68 64 7d 12 00 push $0x127d64 <== NOT EXECUTED 109deb: 68 84 00 00 00 push $0x84 <== NOT EXECUTED 109df0: 68 58 7c 12 00 push $0x127c58 <== NOT EXECUTED 109df5: e8 8a 07 00 00 call 10a584 <__assert_func> <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 109dfa: 68 a8 7c 12 00 push $0x127ca8 <== NOT EXECUTED 109dff: 68 64 7d 12 00 push $0x127d64 <== NOT EXECUTED 109e04: 68 88 00 00 00 push $0x88 <== NOT EXECUTED 109e09: 68 58 7c 12 00 push $0x127c58 <== NOT EXECUTED 109e0e: e8 71 07 00 00 call 10a584 <__assert_func> <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 109e13: 68 2a 7c 12 00 push $0x127c2a <== NOT EXECUTED 109e18: 68 64 7d 12 00 push $0x127d64 <== NOT EXECUTED 109e1d: 68 86 00 00 00 push $0x86 <== NOT EXECUTED 109e22: 68 58 7c 12 00 push $0x127c58 <== NOT EXECUTED 109e27: e8 58 07 00 00 call 10a584 <__assert_func> <== NOT EXECUTED =============================================================================== 00110028 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 110028: 55 push %ebp 110029: 89 e5 mov %esp,%ebp 11002b: 57 push %edi 11002c: 56 push %esi 11002d: 53 push %ebx 11002e: 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 ) ) { 110031: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 110038: 0f 85 20 02 00 00 jne 11025e <== NEVER TAKEN /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 11003e: 8b 45 14 mov 0x14(%ebp),%eax 110041: 8b 38 mov (%eax),%edi 110043: c7 45 a4 00 00 00 00 movl $0x0,-0x5c(%ebp) 11004a: 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 ); 11004d: 8d 55 e4 lea -0x1c(%ebp),%edx 110050: 52 push %edx 110051: 56 push %esi 110052: ff 75 0c pushl 0xc(%ebp) 110055: 8b 45 08 mov 0x8(%ebp),%eax 110058: 03 45 a4 add -0x5c(%ebp),%eax 11005b: 50 push %eax 11005c: e8 cb 08 00 00 call 11092c 110061: 89 c3 mov %eax,%ebx pathnamelen -= len; 110063: 8b 55 e4 mov -0x1c(%ebp),%edx i += len; if ( !pathloc->node_access ) 110066: 8b 4d 14 mov 0x14(%ebp),%ecx 110069: 8b 01 mov (%ecx),%eax 11006b: 83 c4 10 add $0x10,%esp 11006e: 85 c0 test %eax,%eax 110070: 0f 84 e6 00 00 00 je 11015c <== NEVER TAKEN */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 110076: 29 55 0c sub %edx,0xc(%ebp) i += len; 110079: 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 ) 11007c: 85 db test %ebx,%ebx 11007e: 75 44 jne 1100c4 * 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 ) { 110080: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 110084: 0f 84 26 01 00 00 je 1101b0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 11008a: 83 ec 0c sub $0xc,%esp 11008d: ff 75 14 pushl 0x14(%ebp) 110090: e8 d3 fd ff ff call 10fe68 110095: 89 c3 mov %eax,%ebx 110097: 59 pop %ecx 110098: 5e pop %esi /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 110099: ff 75 10 pushl 0x10(%ebp) 11009c: ff 75 14 pushl 0x14(%ebp) 11009f: e8 20 fe ff ff call 10fec4 1100a4: 83 c4 10 add $0x10,%esp 1100a7: 85 c0 test %eax,%eax 1100a9: 0f 85 d1 00 00 00 jne 110180 rtems_set_errno_and_return_minus_one( EACCES ); 1100af: e8 b4 4f 00 00 call 115068 <__errno> 1100b4: c7 00 0d 00 00 00 movl $0xd,(%eax) 1100ba: bb ff ff ff ff mov $0xffffffff,%ebx 1100bf: e9 bc 00 00 00 jmp 110180 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 1100c4: 83 7f 4c 01 cmpl $0x1,0x4c(%edi) 1100c8: 0f 84 be 00 00 00 je 11018c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 1100ce: 89 c7 mov %eax,%edi switch( type ) { 1100d0: 83 fb 03 cmp $0x3,%ebx 1100d3: 74 1b je 1100f0 1100d5: 83 fb 04 cmp $0x4,%ebx 1100d8: 0f 84 92 00 00 00 je 110170 1100de: 83 fb 02 cmp $0x2,%ebx 1100e1: 74 51 je 110134 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 1100e3: 83 fb 04 cmp $0x4,%ebx 1100e6: 0f 85 61 ff ff ff jne 11004d <== ALWAYS TAKEN 1100ec: eb 92 jmp 110080 <== NOT EXECUTED 1100ee: 66 90 xchg %ax,%ax <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 1100f0: 8b 40 4c mov 0x4c(%eax),%eax 1100f3: 83 f8 03 cmp $0x3,%eax 1100f6: 0f 84 00 01 00 00 je 1101fc node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 1100fc: 83 f8 04 cmp $0x4,%eax 1100ff: 0f 84 2d 01 00 00 je 110232 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 110105: 48 dec %eax 110106: 0f 85 11 01 00 00 jne 11021d /* * 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 ) { 11010c: 8b 47 5c mov 0x5c(%edi),%eax 11010f: 85 c0 test %eax,%eax 110111: 0f 85 a4 00 00 00 jne 1101bb /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 110117: 83 ec 08 sub $0x8,%esp 11011a: 56 push %esi 11011b: 57 push %edi 11011c: e8 7b 07 00 00 call 11089c 110121: 89 c7 mov %eax,%edi if ( !node ) 110123: 83 c4 10 add $0x10,%esp 110126: 85 c0 test %eax,%eax 110128: 74 32 je 11015c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 11012a: 8b 45 14 mov 0x14(%ebp),%eax 11012d: 89 38 mov %edi,(%eax) break; 11012f: e9 19 ff ff ff jmp 11004d case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 110134: 8b 15 e4 70 12 00 mov 0x1270e4,%edx 11013a: 39 42 18 cmp %eax,0x18(%edx) 11013d: 0f 84 0a ff ff ff je 11004d /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 110143: 8b 4d 14 mov 0x14(%ebp),%ecx 110146: 8b 51 10 mov 0x10(%ecx),%edx /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 110149: 39 42 1c cmp %eax,0x1c(%edx) 11014c: 0f 84 01 01 00 00 je 110253 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 110152: 8b 78 08 mov 0x8(%eax),%edi 110155: 85 ff test %edi,%edi 110157: 75 d1 jne 11012a 110159: 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 ); 11015c: e8 07 4f 00 00 call 115068 <__errno> 110161: c7 00 02 00 00 00 movl $0x2,(%eax) 110167: bb ff ff ff ff mov $0xffffffff,%ebx 11016c: eb 12 jmp 110180 11016e: 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 ); 110170: e8 f3 4e 00 00 call 115068 <__errno> 110175: c7 00 5b 00 00 00 movl $0x5b,(%eax) 11017b: bb ff ff ff ff mov $0xffffffff,%ebx if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); return result; } 110180: 89 d8 mov %ebx,%eax 110182: 8d 65 f4 lea -0xc(%ebp),%esp 110185: 5b pop %ebx 110186: 5e pop %esi 110187: 5f pop %edi 110188: c9 leave 110189: c3 ret 11018a: 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 ) ) 11018c: 83 ec 08 sub $0x8,%esp 11018f: 6a 01 push $0x1 110191: ff 75 14 pushl 0x14(%ebp) 110194: e8 2b fd ff ff call 10fec4 110199: 83 c4 10 add $0x10,%esp 11019c: 85 c0 test %eax,%eax 11019e: 0f 84 0b ff ff ff je 1100af 1101a4: 8b 55 14 mov 0x14(%ebp),%edx 1101a7: 8b 02 mov (%edx),%eax 1101a9: e9 20 ff ff ff jmp 1100ce 1101ae: 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 ) { 1101b0: 8b 40 5c mov 0x5c(%eax),%eax 1101b3: 85 c0 test %eax,%eax 1101b5: 0f 84 cf fe ff ff je 11008a newloc = node->info.directory.mt_fs->mt_fs_root; 1101bb: 8d 7d d0 lea -0x30(%ebp),%edi 1101be: 8d 70 1c lea 0x1c(%eax),%esi 1101c1: b9 05 00 00 00 mov $0x5,%ecx 1101c6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 1101c8: 8d 75 d0 lea -0x30(%ebp),%esi 1101cb: b1 05 mov $0x5,%cl 1101cd: 8b 7d 14 mov 0x14(%ebp),%edi 1101d0: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalpath_h)( &pathname[i-len], 1101d2: 8b 55 e4 mov -0x1c(%ebp),%edx 1101d5: 8b 4d 14 mov 0x14(%ebp),%ecx 1101d8: 8b 41 0c mov 0xc(%ecx),%eax 1101db: 51 push %ecx 1101dc: ff 75 10 pushl 0x10(%ebp) 1101df: 8b 4d 0c mov 0xc(%ebp),%ecx 1101e2: 01 d1 add %edx,%ecx 1101e4: 51 push %ecx 1101e5: 8b 4d a4 mov -0x5c(%ebp),%ecx 1101e8: 29 d1 sub %edx,%ecx 1101ea: 8b 55 08 mov 0x8(%ebp),%edx 1101ed: 01 ca add %ecx,%edx 1101ef: 52 push %edx 1101f0: ff 10 call *(%eax) 1101f2: 89 c3 mov %eax,%ebx 1101f4: 83 c4 10 add $0x10,%esp 1101f7: eb 87 jmp 110180 1101f9: 8d 76 00 lea 0x0(%esi),%esi * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 1101fc: 83 ec 08 sub $0x8,%esp 1101ff: 6a 00 push $0x0 110201: ff 75 14 pushl 0x14(%ebp) 110204: e8 27 fd ff ff call 10ff30 node = pathloc->node_access; 110209: 8b 55 14 mov 0x14(%ebp),%edx 11020c: 8b 3a mov (%edx),%edi if ( !node ) 11020e: 83 c4 10 add $0x10,%esp 110211: 85 ff test %edi,%edi 110213: 74 08 je 11021d <== NEVER TAKEN } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 110215: 8b 47 4c mov 0x4c(%edi),%eax 110218: e9 e8 fe ff ff jmp 110105 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 11021d: e8 46 4e 00 00 call 115068 <__errno> 110222: c7 00 14 00 00 00 movl $0x14,(%eax) 110228: bb ff ff ff ff mov $0xffffffff,%ebx 11022d: e9 4e ff ff ff jmp 110180 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 110232: 83 ec 08 sub $0x8,%esp 110235: 6a 00 push $0x0 110237: ff 75 14 pushl 0x14(%ebp) 11023a: e8 4d fd ff ff call 10ff8c 11023f: 89 c3 mov %eax,%ebx node = pathloc->node_access; 110241: 8b 4d 14 mov 0x14(%ebp),%ecx 110244: 8b 39 mov (%ecx),%edi if ( result == -1 ) 110246: 83 c4 10 add $0x10,%esp 110249: 83 f8 ff cmp $0xffffffff,%eax 11024c: 75 c7 jne 110215 <== ALWAYS TAKEN 11024e: e9 2d ff ff ff jmp 110180 <== NOT EXECUTED */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 110253: 8d 7d d0 lea -0x30(%ebp),%edi 110256: 8d 72 08 lea 0x8(%edx),%esi 110259: e9 63 ff ff ff jmp 1101c1 rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { assert( 0 ); 11025e: 68 da 26 12 00 push $0x1226da <== NOT EXECUTED 110263: 68 b4 2d 12 00 push $0x122db4 <== NOT EXECUTED 110268: 68 f6 01 00 00 push $0x1f6 <== NOT EXECUTED 11026d: 68 c4 2d 12 00 push $0x122dc4 <== NOT EXECUTED 110272: e8 cd 7f ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00110324 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 110324: 55 push %ebp 110325: 89 e5 mov %esp,%ebp 110327: 57 push %edi 110328: 56 push %esi 110329: 53 push %ebx 11032a: 83 ec 5c sub $0x5c,%esp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 11032d: 8b 45 0c mov 0xc(%ebp),%eax 110330: 8b 18 mov (%eax),%ebx /* * Get the path length. */ pathlen = strlen( path ); 110332: 31 c0 xor %eax,%eax 110334: b9 ff ff ff ff mov $0xffffffff,%ecx 110339: 8b 7d 08 mov 0x8(%ebp),%edi 11033c: f2 ae repnz scas %es:(%edi),%al 11033e: f7 d1 not %ecx 110340: 8d 71 ff lea -0x1(%ecx),%esi 110343: 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 ); 11034a: 8d 55 e4 lea -0x1c(%ebp),%edx 11034d: 52 push %edx 11034e: 8d 4d af lea -0x51(%ebp),%ecx 110351: 51 push %ecx 110352: 56 push %esi 110353: 8b 45 08 mov 0x8(%ebp),%eax 110356: 03 45 a4 add -0x5c(%ebp),%eax 110359: 50 push %eax 11035a: e8 cd 05 00 00 call 11092c 11035f: 89 c7 mov %eax,%edi pathlen -= len; 110361: 8b 55 e4 mov -0x1c(%ebp),%edx 110364: 29 d6 sub %edx,%esi i += len; if ( !pathloc->node_access ) 110366: 8b 4d 0c mov 0xc(%ebp),%ecx 110369: 8b 01 mov (%ecx),%eax 11036b: 83 c4 10 add $0x10,%esp 11036e: 85 c0 test %eax,%eax 110370: 0f 84 35 01 00 00 je 1104ab <== NEVER TAKEN /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 110376: 85 ff test %edi,%edi 110378: 75 1a jne 110394 pathloc->node_access = node; break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 11037a: e8 e9 4c 00 00 call 115068 <__errno> 11037f: c7 00 11 00 00 00 movl $0x11,(%eax) 110385: 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; } 11038a: 89 d8 mov %ebx,%eax 11038c: 8d 65 f4 lea -0xc(%ebp),%esp 11038f: 5b pop %ebx 110390: 5e pop %esi 110391: 5f pop %edi 110392: c9 leave 110393: c3 ret /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 110394: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110398: 0f 84 ca 00 00 00 je 110468 while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 11039e: 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; 1103a1: 89 c3 mov %eax,%ebx switch( type ) { 1103a3: 83 ff 02 cmp $0x2,%edi 1103a6: 0f 84 8c 00 00 00 je 110438 1103ac: 76 26 jbe 1103d4 1103ae: 83 ff 03 cmp $0x3,%edi 1103b1: 74 2d je 1103e0 1103b3: 83 ff 04 cmp $0x4,%edi 1103b6: 75 92 jne 11034a <== 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 ); 1103b8: e8 ab 4c 00 00 call 115068 <__errno> 1103bd: c7 00 5b 00 00 00 movl $0x5b,(%eax) 1103c3: 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; } 1103c8: 89 d8 mov %ebx,%eax 1103ca: 8d 65 f4 lea -0xc(%ebp),%esp 1103cd: 5b pop %ebx 1103ce: 5e pop %esi 1103cf: 5f pop %edi 1103d0: c9 leave 1103d1: c3 ret 1103d2: 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 ) { 1103d4: 85 ff test %edi,%edi 1103d6: 74 a2 je 11037a <== NEVER TAKEN 1103d8: e9 6d ff ff ff jmp 11034a 1103dd: 8d 76 00 lea 0x0(%esi),%esi pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 1103e0: 8b 40 4c mov 0x4c(%eax),%eax 1103e3: 83 f8 03 cmp $0x3,%eax 1103e6: 0f 84 8e 01 00 00 je 11057a result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 1103ec: 83 f8 04 cmp $0x4,%eax 1103ef: 0f 84 a4 01 00 00 je 110599 <== NEVER TAKEN if ( result == -1 ) return -1; } node = pathloc->node_access; if ( !node ) 1103f5: 85 db test %ebx,%ebx 1103f7: 0f 84 2f 01 00 00 je 11052c <== NEVER TAKEN /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 1103fd: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110401: 0f 85 25 01 00 00 jne 11052c /* * 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 ) { 110407: 8b 43 5c mov 0x5c(%ebx),%eax 11040a: 85 c0 test %eax,%eax 11040c: 0f 85 2f 01 00 00 jne 110541 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 110412: 83 ec 08 sub $0x8,%esp 110415: 8d 45 af lea -0x51(%ebp),%eax 110418: 50 push %eax 110419: 53 push %ebx 11041a: e8 7d 04 00 00 call 11089c 11041f: 89 c3 mov %eax,%ebx /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 110421: 83 c4 10 add $0x10,%esp 110424: 85 c0 test %eax,%eax 110426: 0f 84 94 00 00 00 je 1104c0 done = true; else pathloc->node_access = node; 11042c: 8b 55 0c mov 0xc(%ebp),%edx 11042f: 89 02 mov %eax,(%edx) 110431: e9 14 ff ff ff jmp 11034a 110436: 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 ) 110438: 8b 15 e4 70 12 00 mov 0x1270e4,%edx 11043e: 39 42 18 cmp %eax,0x18(%edx) 110441: 0f 84 03 ff ff ff je 11034a /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 110447: 8b 4d 0c mov 0xc(%ebp),%ecx 11044a: 8b 51 10 mov 0x10(%ecx),%edx 11044d: 39 42 1c cmp %eax,0x1c(%edx) 110450: 0f 84 62 01 00 00 je 1105b8 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 110456: 8b 58 08 mov 0x8(%eax),%ebx 110459: 85 db test %ebx,%ebx 11045b: 74 4e je 1104ab rtems_set_errno_and_return_minus_one( ENOENT ); node = node->Parent; } pathloc->node_access = node; 11045d: 8b 4d 0c mov 0xc(%ebp),%ecx 110460: 89 19 mov %ebx,(%ecx) break; 110462: e9 e3 fe ff ff jmp 11034a 110467: 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 ) ) 110468: 83 ec 08 sub $0x8,%esp 11046b: 6a 01 push $0x1 11046d: ff 75 0c pushl 0xc(%ebp) 110470: 89 55 a0 mov %edx,-0x60(%ebp) 110473: e8 4c fa ff ff call 10fec4 110478: 83 c4 10 add $0x10,%esp 11047b: 85 c0 test %eax,%eax 11047d: 8b 55 a0 mov -0x60(%ebp),%edx 110480: 0f 84 91 00 00 00 je 110517 110486: 8b 4d 0c mov 0xc(%ebp),%ecx 110489: 8b 01 mov (%ecx),%eax 11048b: e9 0e ff ff ff jmp 11039e /* * 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++) { 110490: 8a 43 01 mov 0x1(%ebx),%al 110493: 43 inc %ebx 110494: 84 c0 test %al,%al 110496: 74 4c je 1104e4 if ( !IMFS_is_separator( path[ i ] ) ) 110498: 83 ec 0c sub $0xc,%esp 11049b: 0f be c0 movsbl %al,%eax 11049e: 50 push %eax 11049f: e8 90 8f ff ff call 109434 1104a4: 83 c4 10 add $0x10,%esp 1104a7: 85 c0 test %eax,%eax 1104a9: 75 e5 jne 110490 rtems_set_errno_and_return_minus_one( ENOENT ); 1104ab: e8 b8 4b 00 00 call 115068 <__errno> 1104b0: c7 00 02 00 00 00 movl $0x2,(%eax) 1104b6: bb ff ff ff ff mov $0xffffffff,%ebx 1104bb: e9 ca fe ff ff jmp 11038a case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 1104c0: 8b 45 a4 mov -0x5c(%ebp),%eax 1104c3: 2b 45 e4 sub -0x1c(%ebp),%eax 1104c6: 03 45 08 add 0x8(%ebp),%eax 1104c9: 8b 4d 10 mov 0x10(%ebp),%ecx 1104cc: 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++) { 1104ce: 8b 4d 08 mov 0x8(%ebp),%ecx 1104d1: 8b 55 a4 mov -0x5c(%ebp),%edx 1104d4: 8a 04 11 mov (%ecx,%edx,1),%al 1104d7: 84 c0 test %al,%al 1104d9: 74 09 je 1104e4 1104db: 89 cb mov %ecx,%ebx 1104dd: 01 d3 add %edx,%ebx 1104df: eb b7 jmp 110498 1104e1: 8d 76 00 lea 0x0(%esi),%esi /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 1104e4: 83 ec 0c sub $0xc,%esp 1104e7: ff 75 0c pushl 0xc(%ebp) 1104ea: e8 79 f9 ff ff call 10fe68 1104ef: 89 c3 mov %eax,%ebx /* * The returned node must be a directory */ node = pathloc->node_access; 1104f1: 8b 55 0c mov 0xc(%ebp),%edx 1104f4: 8b 02 mov (%edx),%eax 1104f6: 83 c4 10 add $0x10,%esp 1104f9: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 1104fd: 75 2d jne 11052c <== NEVER TAKEN /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 1104ff: 83 ec 08 sub $0x8,%esp 110502: 6a 03 push $0x3 110504: ff 75 0c pushl 0xc(%ebp) 110507: e8 b8 f9 ff ff call 10fec4 11050c: 83 c4 10 add $0x10,%esp 11050f: 85 c0 test %eax,%eax 110511: 0f 85 73 fe ff ff jne 11038a rtems_set_errno_and_return_minus_one( EACCES ); 110517: e8 4c 4b 00 00 call 115068 <__errno> 11051c: c7 00 0d 00 00 00 movl $0xd,(%eax) 110522: bb ff ff ff ff mov $0xffffffff,%ebx 110527: e9 5e fe ff ff jmp 11038a /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 11052c: e8 37 4b 00 00 call 115068 <__errno> 110531: c7 00 14 00 00 00 movl $0x14,(%eax) 110537: bb ff ff ff ff mov $0xffffffff,%ebx 11053c: e9 49 fe ff ff jmp 11038a * 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; 110541: 8d 7d d0 lea -0x30(%ebp),%edi 110544: 8d 70 1c lea 0x1c(%eax),%esi 110547: b9 05 00 00 00 mov $0x5,%ecx 11054c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 11054e: 8d 75 d0 lea -0x30(%ebp),%esi 110551: b1 05 mov $0x5,%cl 110553: 8b 7d 0c mov 0xc(%ebp),%edi 110556: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 110558: 57 push %edi 110559: 8b 4d 0c mov 0xc(%ebp),%ecx 11055c: 8b 41 0c mov 0xc(%ecx),%eax 11055f: ff 75 10 pushl 0x10(%ebp) 110562: 51 push %ecx 110563: 8b 55 a4 mov -0x5c(%ebp),%edx 110566: 2b 55 e4 sub -0x1c(%ebp),%edx 110569: 03 55 08 add 0x8(%ebp),%edx 11056c: 52 push %edx 11056d: ff 50 04 call *0x4(%eax) 110570: 89 c3 mov %eax,%ebx 110572: 83 c4 10 add $0x10,%esp 110575: e9 10 fe ff ff jmp 11038a case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 11057a: 83 ec 08 sub $0x8,%esp 11057d: 6a 00 push $0x0 11057f: ff 75 0c pushl 0xc(%ebp) 110582: e8 f1 fc ff ff call 110278 if ( result == -1 ) 110587: 83 c4 10 add $0x10,%esp 11058a: 83 f8 ff cmp $0xffffffff,%eax 11058d: 74 4d je 1105dc <== NEVER TAKEN 11058f: 8b 45 0c mov 0xc(%ebp),%eax 110592: 8b 18 mov (%eax),%ebx 110594: e9 5c fe ff ff jmp 1103f5 return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 110599: 83 ec 08 sub $0x8,%esp 11059c: 6a 00 push $0x0 11059e: ff 75 0c pushl 0xc(%ebp) 1105a1: e8 d2 fc ff ff call 110278 if ( result == -1 ) 1105a6: 83 c4 10 add $0x10,%esp 1105a9: 83 f8 ff cmp $0xffffffff,%eax 1105ac: 74 2e je 1105dc <== NEVER TAKEN 1105ae: 8b 55 0c mov 0xc(%ebp),%edx 1105b1: 8b 1a mov (%edx),%ebx 1105b3: e9 3d fe ff ff jmp 1103f5 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 1105b8: 8d 7d d0 lea -0x30(%ebp),%edi 1105bb: 8d 72 08 lea 0x8(%edx),%esi 1105be: b9 05 00 00 00 mov $0x5,%ecx 1105c3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *pathloc = newloc; 1105c5: 8d 75 d0 lea -0x30(%ebp),%esi 1105c8: b1 05 mov $0x5,%cl 1105ca: 8b 7d 0c mov 0xc(%ebp),%edi 1105cd: f3 a5 rep movsl %ds:(%esi),%es:(%edi) return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 1105cf: 50 push %eax 1105d0: 8b 55 0c mov 0xc(%ebp),%edx 1105d3: 8b 42 0c mov 0xc(%edx),%eax 1105d6: ff 75 10 pushl 0x10(%ebp) 1105d9: 52 push %edx 1105da: eb 87 jmp 110563 1105dc: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1105de: e9 a7 fd ff ff jmp 11038a <== NOT EXECUTED =============================================================================== 0010ff30 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ff30: 55 push %ebp 10ff31: 89 e5 mov %esp,%ebp 10ff33: 53 push %ebx 10ff34: 83 ec 04 sub $0x4,%esp 10ff37: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *jnode = node->node_access; 10ff3a: 8b 03 mov (%ebx),%eax /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 10ff3c: 83 78 4c 03 cmpl $0x3,0x4c(%eax) 10ff40: 75 3c jne 10ff7e <== NEVER TAKEN /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 10ff42: 8b 40 50 mov 0x50(%eax),%eax 10ff45: 89 03 mov %eax,(%ebx) IMFS_Set_handlers( node ); 10ff47: 83 ec 0c sub $0xc,%esp 10ff4a: 53 push %ebx 10ff4b: e8 18 ff ff ff call 10fe68 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ff50: 58 pop %eax 10ff51: 5a pop %edx 10ff52: ff 75 0c pushl 0xc(%ebp) 10ff55: 53 push %ebx 10ff56: e8 69 ff ff ff call 10fec4 10ff5b: 83 c4 10 add $0x10,%esp 10ff5e: 85 c0 test %eax,%eax 10ff60: 74 0a je 10ff6c <== NEVER TAKEN 10ff62: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10ff64: 8b 5d fc mov -0x4(%ebp),%ebx 10ff67: c9 leave 10ff68: c3 ret 10ff69: 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 ); 10ff6c: e8 f7 50 00 00 call 115068 <__errno> <== NOT EXECUTED 10ff71: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 10ff77: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ff7c: eb e6 jmp 10ff64 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 10ff7e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ff81: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 10ff86: e8 59 c3 ff ff call 10c2e4 <== NOT EXECUTED =============================================================================== 00110278 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 110278: 55 push %ebp 110279: 89 e5 mov %esp,%ebp 11027b: 57 push %edi 11027c: 56 push %esi 11027d: 53 push %ebx 11027e: 83 ec 0c sub $0xc,%esp 110281: 8b 75 08 mov 0x8(%ebp),%esi 110284: 8b 7d 0c mov 0xc(%ebp),%edi 110287: 8b 15 e4 70 12 00 mov 0x1270e4,%edx 11028d: eb 0e jmp 11029d 11028f: 90 nop */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 110290: 83 f8 04 cmp $0x4,%eax 110293: 74 53 je 1102e8 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 110295: 83 e8 03 sub $0x3,%eax 110298: 83 f8 01 cmp $0x1,%eax 11029b: 77 3a ja 1102d7 <== ALWAYS TAKEN { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 11029d: 8b 1e mov (%esi),%ebx /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 11029f: 8b 42 30 mov 0x30(%edx),%eax 1102a2: 40 inc %eax 1102a3: 66 89 42 30 mov %ax,0x30(%edx) if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 1102a7: 66 83 f8 05 cmp $0x5,%ax 1102ab: 77 57 ja 110304 /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 1102ad: 8b 43 4c mov 0x4c(%ebx),%eax 1102b0: 83 f8 03 cmp $0x3,%eax 1102b3: 75 db jne 110290 result = IMFS_evaluate_hard_link( node, flags ); 1102b5: 83 ec 08 sub $0x8,%esp 1102b8: 57 push %edi 1102b9: 56 push %esi 1102ba: e8 71 fc ff ff call 10ff30 1102bf: 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 ) ) ); 1102c2: 85 c0 test %eax,%eax 1102c4: 75 33 jne 1102f9 <== NEVER TAKEN 1102c6: 8b 43 4c mov 0x4c(%ebx),%eax 1102c9: 8b 15 e4 70 12 00 mov 0x1270e4,%edx 1102cf: 83 e8 03 sub $0x3,%eax 1102d2: 83 f8 01 cmp $0x1,%eax 1102d5: 76 c6 jbe 11029d <== ALWAYS TAKEN 1102d7: 31 c0 xor %eax,%eax /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 1102d9: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) return result; } 1102df: 8d 65 f4 lea -0xc(%ebp),%esp 1102e2: 5b pop %ebx 1102e3: 5e pop %esi 1102e4: 5f pop %edi 1102e5: c9 leave 1102e6: c3 ret 1102e7: 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 ); 1102e8: 83 ec 08 sub $0x8,%esp 1102eb: 57 push %edi 1102ec: 56 push %esi 1102ed: e8 9a fc ff ff call 10ff8c 1102f2: 83 c4 10 add $0x10,%esp } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 1102f5: 85 c0 test %eax,%eax 1102f7: 74 cd je 1102c6 1102f9: 8b 15 e4 70 12 00 mov 0x1270e4,%edx 1102ff: eb d8 jmp 1102d9 110301: 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; 110304: 66 c7 42 30 00 00 movw $0x0,0x30(%edx) rtems_set_errno_and_return_minus_one( ELOOP ); 11030a: e8 59 4d 00 00 call 115068 <__errno> 11030f: c7 00 5c 00 00 00 movl $0x5c,(%eax) 110315: b8 ff ff ff ff mov $0xffffffff,%eax */ rtems_filesystem_link_counts = 0; return result; } 11031a: 8d 65 f4 lea -0xc(%ebp),%esp 11031d: 5b pop %ebx 11031e: 5e pop %esi 11031f: 5f pop %edi 110320: c9 leave 110321: c3 ret =============================================================================== 0010fec4 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 10fec4: 55 push %ebp 10fec5: 89 e5 mov %esp,%ebp 10fec7: 57 push %edi 10fec8: 56 push %esi 10fec9: 53 push %ebx 10feca: 83 ec 0c sub $0xc,%esp 10fecd: 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 ) ) 10fed0: f7 c6 f8 ff ff ff test $0xfffffff8,%esi 10fed6: 75 44 jne 10ff1c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EPERM ); jnode = node->node_access; 10fed8: 8b 45 08 mov 0x8(%ebp),%eax 10fedb: 8b 18 mov (%eax),%ebx #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 10fedd: e8 de 0d 00 00 call 110cc0 10fee2: 89 c7 mov %eax,%edi st_gid = getegid(); 10fee4: e8 c7 0d 00 00 call 110cb0 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 10fee9: 66 3b 7b 3c cmp 0x3c(%ebx),%di 10feed: 74 1d je 10ff0c flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 10feef: 66 3b 43 3e cmp 0x3e(%ebx),%ax 10fef3: 74 1f je 10ff14 <== 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 ) 10fef5: 8b 43 30 mov 0x30(%ebx),%eax 10fef8: 21 f0 and %esi,%eax 10fefa: 39 c6 cmp %eax,%esi 10fefc: 0f 94 c0 sete %al 10feff: 0f b6 c0 movzbl %al,%eax return 1; return 0; } 10ff02: 83 c4 0c add $0xc,%esp 10ff05: 5b pop %ebx 10ff06: 5e pop %esi 10ff07: 5f pop %edi 10ff08: c9 leave 10ff09: c3 ret 10ff0a: 66 90 xchg %ax,%ax */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 10ff0c: c1 e6 06 shl $0x6,%esi 10ff0f: eb e4 jmp 10fef5 10ff11: 8d 76 00 lea 0x0(%esi),%esi else if ( st_gid == jnode->st_gid ) flags_to_test <<= 3; 10ff14: c1 e6 03 shl $0x3,%esi 10ff17: eb dc jmp 10fef5 10ff19: 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 ); 10ff1c: e8 47 51 00 00 call 115068 <__errno> <== NOT EXECUTED 10ff21: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10ff27: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10ff2c: eb d4 jmp 10ff02 <== NOT EXECUTED =============================================================================== 0010ff8c : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 10ff8c: 55 push %ebp 10ff8d: 89 e5 mov %esp,%ebp 10ff8f: 57 push %edi 10ff90: 56 push %esi 10ff91: 53 push %ebx 10ff92: 83 ec 1c sub $0x1c,%esp 10ff95: 8b 5d 08 mov 0x8(%ebp),%ebx 10ff98: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *jnode = node->node_access; 10ff9b: 8b 3b mov (%ebx),%edi /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 10ff9d: 83 7f 4c 04 cmpl $0x4,0x4c(%edi) 10ffa1: 75 78 jne 11001b <== NEVER TAKEN rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 10ffa3: 8b 47 08 mov 0x8(%edi),%eax 10ffa6: 85 c0 test %eax,%eax 10ffa8: 74 64 je 11000e <== NEVER TAKEN /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 10ffaa: 89 03 mov %eax,(%ebx) rtems_filesystem_get_sym_start_loc( 10ffac: 52 push %edx 10ffad: 53 push %ebx 10ffae: 8d 45 e4 lea -0x1c(%ebp),%eax 10ffb1: 50 push %eax 10ffb2: ff 77 50 pushl 0x50(%edi) 10ffb5: e8 ea 11 00 00 call 1111a4 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 10ffba: 8b 57 50 mov 0x50(%edi),%edx 10ffbd: 03 55 e4 add -0x1c(%ebp),%edx 10ffc0: 31 c0 xor %eax,%eax 10ffc2: b9 ff ff ff ff mov $0xffffffff,%ecx 10ffc7: 89 d7 mov %edx,%edi 10ffc9: f2 ae repnz scas %es:(%edi),%al 10ffcb: f7 d1 not %ecx 10ffcd: 49 dec %ecx 10ffce: 53 push %ebx 10ffcf: 56 push %esi 10ffd0: 51 push %ecx 10ffd1: 52 push %edx 10ffd2: e8 51 00 00 00 call 110028 10ffd7: 89 c7 mov %eax,%edi strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 10ffd9: 83 c4 14 add $0x14,%esp 10ffdc: 53 push %ebx 10ffdd: e8 86 fe ff ff call 10fe68 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 10ffe2: 59 pop %ecx 10ffe3: 58 pop %eax 10ffe4: 56 push %esi 10ffe5: 53 push %ebx 10ffe6: e8 d9 fe ff ff call 10fec4 10ffeb: 83 c4 10 add $0x10,%esp 10ffee: 85 c0 test %eax,%eax 10fff0: 74 0a je 10fffc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EACCES ); return result; } 10fff2: 89 f8 mov %edi,%eax 10fff4: 8d 65 f4 lea -0xc(%ebp),%esp 10fff7: 5b pop %ebx 10fff8: 5e pop %esi 10fff9: 5f pop %edi 10fffa: c9 leave 10fffb: c3 ret /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 10fffc: e8 67 50 00 00 call 115068 <__errno> <== NOT EXECUTED 110001: c7 00 0d 00 00 00 movl $0xd,(%eax) <== NOT EXECUTED 110007: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED 11000c: eb e4 jmp 10fff2 <== NOT EXECUTED if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 11000e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110011: 68 00 00 d0 ba push $0xbad00000 <== NOT EXECUTED 110016: e8 c9 c2 ff ff call 10c2e4 <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 11001b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11001e: 68 00 00 cd ab push $0xabcd0000 <== NOT EXECUTED 110023: e8 bc c2 ff ff call 10c2e4 <== NOT EXECUTED =============================================================================== 00114004 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 114004: 55 push %ebp 114005: 89 e5 mov %esp,%ebp 114007: 53 push %ebx 114008: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 11400b: 8b 45 08 mov 0x8(%ebp),%eax 11400e: 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(); 114010: e8 ab cc ff ff call 110cc0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 114015: 66 3b 43 3c cmp 0x3c(%ebx),%ax 114019: 74 05 je 114020 <== ALWAYS TAKEN 11401b: 66 85 c0 test %ax,%ax 11401e: 75 34 jne 114054 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 114020: 8b 45 0c mov 0xc(%ebp),%eax 114023: 25 ff 0f 00 00 and $0xfff,%eax 114028: 8b 53 30 mov 0x30(%ebx),%edx 11402b: 81 e2 00 f0 ff ff and $0xfffff000,%edx 114031: 09 d0 or %edx,%eax 114033: 89 43 30 mov %eax,0x30(%ebx) IMFS_update_ctime( jnode ); 114036: 83 ec 08 sub $0x8,%esp 114039: 6a 00 push $0x0 11403b: 8d 45 f0 lea -0x10(%ebp),%eax 11403e: 50 push %eax 11403f: e8 bc 45 ff ff call 108600 114044: 8b 45 f0 mov -0x10(%ebp),%eax 114047: 89 43 48 mov %eax,0x48(%ebx) 11404a: 31 c0 xor %eax,%eax return 0; 11404c: 83 c4 10 add $0x10,%esp } 11404f: 8b 5d fc mov -0x4(%ebp),%ebx 114052: c9 leave 114053: 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 ); 114054: e8 0f 10 00 00 call 115068 <__errno> 114059: c7 00 01 00 00 00 movl $0x1,(%eax) 11405f: b8 ff ff ff ff mov $0xffffffff,%eax 114064: eb e9 jmp 11404f =============================================================================== 00110758 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 110758: 55 push %ebp <== NOT EXECUTED 110759: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11075b: 57 push %edi <== NOT EXECUTED 11075c: 56 push %esi <== NOT EXECUTED 11075d: 53 push %ebx <== NOT EXECUTED 11075e: 83 ec 14 sub $0x14,%esp <== NOT EXECUTED 110761: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 110764: 8b 7b 38 mov 0x38(%ebx),%edi <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 110767: 53 push %ebx <== NOT EXECUTED 110768: 8d 47 50 lea 0x50(%edi),%eax <== NOT EXECUTED 11076b: 50 push %eax <== NOT EXECUTED 11076c: e8 af ef ff ff call 10f720 <== NOT EXECUTED 110771: 89 c6 mov %eax,%esi <== NOT EXECUTED if (! err) { 110773: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110776: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 110779: 74 0d je 110788 <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) free(jnode); } IMFS_FIFO_RETURN(err); 11077b: 7c 37 jl 1107b4 <== NOT EXECUTED } 11077d: 89 f0 mov %esi,%eax <== NOT EXECUTED 11077f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 110782: 5b pop %ebx <== NOT EXECUTED 110783: 5e pop %esi <== NOT EXECUTED 110784: 5f pop %edi <== NOT EXECUTED 110785: c9 leave <== NOT EXECUTED 110786: c3 ret <== NOT EXECUTED 110787: 90 nop <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (! err) { iop->flags &= ~LIBIO_FLAGS_OPEN; 110788: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) <== NOT EXECUTED /* Free jnode if file is already unlinked and no one opens it */ if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1) 11078f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110792: 57 push %edi <== NOT EXECUTED 110793: e8 90 05 00 00 call 110d28 <== NOT EXECUTED 110798: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11079b: 85 c0 test %eax,%eax <== NOT EXECUTED 11079d: 75 de jne 11077d <== NOT EXECUTED 11079f: 66 83 7f 34 00 cmpw $0x0,0x34(%edi) <== NOT EXECUTED 1107a4: 75 d7 jne 11077d <== NOT EXECUTED free(jnode); 1107a6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1107a9: 57 push %edi <== NOT EXECUTED 1107aa: e8 d5 7d ff ff call 108584 <== NOT EXECUTED 1107af: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1107b2: eb c9 jmp 11077d <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 1107b4: e8 af 48 00 00 call 115068 <__errno> <== NOT EXECUTED 1107b9: f7 de neg %esi <== NOT EXECUTED 1107bb: 89 30 mov %esi,(%eax) <== NOT EXECUTED 1107bd: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1107c2: eb b9 jmp 11077d <== NOT EXECUTED =============================================================================== 00110628 : int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 110628: 55 push %ebp <== NOT EXECUTED 110629: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11062b: 53 push %ebx <== NOT EXECUTED 11062c: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 11062f: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 110632: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 110635: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED int err; if (command == FIONBIO) { 110638: 81 fa 7e 66 04 80 cmp $0x8004667e,%edx <== NOT EXECUTED 11063e: 74 1c je 11065c <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 110640: 50 push %eax <== NOT EXECUTED 110641: 51 push %ecx <== NOT EXECUTED 110642: 52 push %edx <== NOT EXECUTED 110643: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 110646: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 110649: e8 b2 ec ff ff call 10f300 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 11064e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110651: 85 c0 test %eax,%eax <== NOT EXECUTED 110653: 78 3e js 110693 <== NOT EXECUTED } 110655: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110658: c9 leave <== NOT EXECUTED 110659: c3 ret <== NOT EXECUTED 11065a: 66 90 xchg %ax,%ax <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 11065c: 85 c9 test %ecx,%ecx <== NOT EXECUTED 11065e: 74 20 je 110680 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 110660: 8b 11 mov (%ecx),%edx <== NOT EXECUTED 110662: 85 d2 test %edx,%edx <== NOT EXECUTED 110664: 74 0e je 110674 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 110666: 83 48 14 01 orl $0x1,0x14(%eax) <== NOT EXECUTED 11066a: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 11066c: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11066f: c9 leave <== NOT EXECUTED 110670: c3 ret <== NOT EXECUTED 110671: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) iop->flags |= LIBIO_FLAGS_NO_DELAY; else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 110674: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED 110678: 31 c0 xor %eax,%eax <== NOT EXECUTED } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); } 11067a: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 11067d: c9 leave <== NOT EXECUTED 11067e: c3 ret <== NOT EXECUTED 11067f: 90 nop <== NOT EXECUTED ) { int err; if (command == FIONBIO) { if (buffer == NULL) 110680: bb 0e 00 00 00 mov $0xe,%ebx <== NOT EXECUTED } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); IMFS_FIFO_RETURN(err); 110685: e8 de 49 00 00 call 115068 <__errno> <== NOT EXECUTED 11068a: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 11068c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110691: eb c2 jmp 110655 <== NOT EXECUTED 110693: 89 c3 mov %eax,%ebx <== NOT EXECUTED 110695: f7 db neg %ebx <== NOT EXECUTED 110697: eb ec jmp 110685 <== NOT EXECUTED =============================================================================== 001105e4 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 1105e4: 55 push %ebp <== NOT EXECUTED 1105e5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1105e7: 53 push %ebx <== NOT EXECUTED 1105e8: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 1105eb: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 1105ee: 50 push %eax <== NOT EXECUTED 1105ef: ff 75 14 pushl 0x14(%ebp) <== NOT EXECUTED 1105f2: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1105f5: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1105f8: 8b 40 38 mov 0x38(%eax),%eax <== NOT EXECUTED 1105fb: ff 70 50 pushl 0x50(%eax) <== NOT EXECUTED 1105fe: e8 9d ec ff ff call 10f2a0 <== NOT EXECUTED 110603: 89 c3 mov %eax,%ebx <== NOT EXECUTED 110605: 99 cltd <== NOT EXECUTED IMFS_FIFO_RETURN(err); 110606: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 110609: 85 d2 test %edx,%edx <== NOT EXECUTED 11060b: 78 05 js 110612 <== NOT EXECUTED } 11060d: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 110610: c9 leave <== NOT EXECUTED 110611: c3 ret <== NOT EXECUTED rtems_off64_t offset, int whence ) { off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); IMFS_FIFO_RETURN(err); 110612: e8 51 4a 00 00 call 115068 <__errno> <== NOT EXECUTED 110617: f7 db neg %ebx <== NOT EXECUTED 110619: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 11061b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110620: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 110625: eb e6 jmp 11060d <== NOT EXECUTED =============================================================================== 001107c4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 1107c4: 55 push %ebp 1107c5: 89 e5 mov %esp,%ebp 1107c7: 53 push %ebx 1107c8: 83 ec 0c sub $0xc,%esp 1107cb: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); 1107ce: 50 push %eax 1107cf: 8b 40 38 mov 0x38(%eax),%eax 1107d2: 83 c0 50 add $0x50,%eax 1107d5: 50 push %eax 1107d6: e8 59 f0 ff ff call 10f834 1107db: 89 c3 mov %eax,%ebx IMFS_FIFO_RETURN(err); 1107dd: 83 c4 10 add $0x10,%esp 1107e0: 85 c0 test %eax,%eax 1107e2: 78 07 js 1107eb <== ALWAYS TAKEN } 1107e4: 89 d8 mov %ebx,%eax 1107e6: 8b 5d fc mov -0x4(%ebp),%ebx 1107e9: c9 leave 1107ea: c3 ret ) { IMFS_jnode_t *jnode = iop->file_info; int err = fifo_open(&JNODE2PIPE(jnode), iop); IMFS_FIFO_RETURN(err); 1107eb: e8 78 48 00 00 call 115068 <__errno> 1107f0: f7 db neg %ebx 1107f2: 89 18 mov %ebx,(%eax) 1107f4: bb ff ff ff ff mov $0xffffffff,%ebx 1107f9: eb e9 jmp 1107e4 =============================================================================== 001106fc : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 1106fc: 55 push %ebp <== NOT EXECUTED 1106fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1106ff: 56 push %esi <== NOT EXECUTED 110700: 53 push %ebx <== NOT EXECUTED 110701: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 110704: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 110707: 8b 70 38 mov 0x38(%eax),%esi <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 11070a: 50 push %eax <== NOT EXECUTED 11070b: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 11070e: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 110711: ff 76 50 pushl 0x50(%esi) <== NOT EXECUTED 110714: e8 47 ec ff ff call 10f360 <== NOT EXECUTED 110719: 89 c3 mov %eax,%ebx <== NOT EXECUTED if (err > 0) 11071b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11071e: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 110721: 7e 21 jle 110744 <== NOT EXECUTED IMFS_update_atime(jnode); 110723: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 110726: 6a 00 push $0x0 <== NOT EXECUTED 110728: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 11072b: 50 push %eax <== NOT EXECUTED 11072c: e8 cf 7e ff ff call 108600 <== NOT EXECUTED 110731: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 110734: 89 46 40 mov %eax,0x40(%esi) <== NOT EXECUTED 110737: 83 c4 10 add $0x10,%esp <== NOT EXECUTED IMFS_FIFO_RETURN(err); } 11073a: 89 d8 mov %ebx,%eax <== NOT EXECUTED 11073c: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 11073f: 5b pop %ebx <== NOT EXECUTED 110740: 5e pop %esi <== NOT EXECUTED 110741: c9 leave <== NOT EXECUTED 110742: c3 ret <== NOT EXECUTED 110743: 90 nop <== NOT EXECUTED int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) IMFS_update_atime(jnode); IMFS_FIFO_RETURN(err); 110744: 74 f4 je 11073a <== NOT EXECUTED 110746: e8 1d 49 00 00 call 115068 <__errno> <== NOT EXECUTED 11074b: f7 db neg %ebx <== NOT EXECUTED 11074d: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 11074f: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 110754: eb e4 jmp 11073a <== NOT EXECUTED =============================================================================== 0011069c : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 11069c: 55 push %ebp <== NOT EXECUTED 11069d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 11069f: 56 push %esi <== NOT EXECUTED 1106a0: 53 push %ebx <== NOT EXECUTED 1106a1: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 1106a4: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 1106a7: 8b 58 38 mov 0x38(%eax),%ebx <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 1106aa: 50 push %eax <== NOT EXECUTED 1106ab: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1106ae: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 1106b1: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 1106b4: e8 67 ee ff ff call 10f520 <== NOT EXECUTED 1106b9: 89 c6 mov %eax,%esi <== NOT EXECUTED if (err > 0) { 1106bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1106be: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 1106c1: 7e 25 jle 1106e8 <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 1106c3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1106c6: 6a 00 push $0x0 <== NOT EXECUTED 1106c8: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 1106cb: 50 push %eax <== NOT EXECUTED 1106cc: e8 2f 7f ff ff call 108600 <== NOT EXECUTED 1106d1: 8b 45 f0 mov -0x10(%ebp),%eax <== NOT EXECUTED 1106d4: 89 43 44 mov %eax,0x44(%ebx) <== NOT EXECUTED 1106d7: 89 43 48 mov %eax,0x48(%ebx) <== NOT EXECUTED 1106da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_FIFO_RETURN(err); } 1106dd: 89 f0 mov %esi,%eax <== NOT EXECUTED 1106df: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 1106e2: 5b pop %ebx <== NOT EXECUTED 1106e3: 5e pop %esi <== NOT EXECUTED 1106e4: c9 leave <== NOT EXECUTED 1106e5: c3 ret <== NOT EXECUTED 1106e6: 66 90 xchg %ax,%ax <== NOT EXECUTED int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); if (err > 0) { IMFS_mtime_ctime_update(jnode); } IMFS_FIFO_RETURN(err); 1106e8: 74 f3 je 1106dd <== NOT EXECUTED 1106ea: e8 79 49 00 00 call 115068 <__errno> <== NOT EXECUTED 1106ef: f7 de neg %esi <== NOT EXECUTED 1106f1: 89 30 mov %esi,(%eax) <== NOT EXECUTED 1106f3: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1106f8: eb e3 jmp 1106dd <== NOT EXECUTED =============================================================================== 0011089c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 11089c: 55 push %ebp 11089d: 89 e5 mov %esp,%ebp 11089f: 57 push %edi 1108a0: 56 push %esi 1108a1: 53 push %ebx 1108a2: 83 ec 0c sub $0xc,%esp 1108a5: 8b 45 08 mov 0x8(%ebp),%eax 1108a8: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 1108ab: 85 c0 test %eax,%eax 1108ad: 74 67 je 110916 <== NEVER TAKEN if ( !name ) 1108af: 85 db test %ebx,%ebx 1108b1: 74 2d je 1108e0 <== NEVER TAKEN /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 1108b3: bf b4 2e 12 00 mov $0x122eb4,%edi 1108b8: b9 02 00 00 00 mov $0x2,%ecx 1108bd: 89 de mov %ebx,%esi 1108bf: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1108c1: 74 13 je 1108d6 <== NEVER TAKEN return directory; if ( !strcmp( name, dotdotname ) ) 1108c3: bf b6 2e 12 00 mov $0x122eb6,%edi 1108c8: b9 03 00 00 00 mov $0x3,%ecx 1108cd: 89 de mov %ebx,%esi 1108cf: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1108d1: 75 19 jne 1108ec <== ALWAYS TAKEN return directory->Parent; 1108d3: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 1108d6: 8d 65 f4 lea -0xc(%ebp),%esp 1108d9: 5b pop %ebx 1108da: 5e pop %esi 1108db: 5f pop %edi 1108dc: c9 leave 1108dd: c3 ret 1108de: 66 90 xchg %ax,%ax if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 1108e0: 31 c0 xor %eax,%eax if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 1108e2: 8d 65 f4 lea -0xc(%ebp),%esp 1108e5: 5b pop %ebx 1108e6: 5e pop %esi 1108e7: 5f pop %edi 1108e8: c9 leave 1108e9: c3 ret 1108ea: 66 90 xchg %ax,%ax if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 1108ec: 8b 70 50 mov 0x50(%eax),%esi 1108ef: 8d 78 54 lea 0x54(%eax),%edi 1108f2: 39 fe cmp %edi,%esi 1108f4: 75 08 jne 1108fe 1108f6: eb e8 jmp 1108e0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 1108f8: 8b 36 mov (%esi),%esi if ( !strcmp( name, dotdotname ) ) return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 1108fa: 39 fe cmp %edi,%esi 1108fc: 74 e2 je 1108e0 !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 ) ) 1108fe: 8d 46 0c lea 0xc(%esi),%eax 110901: 83 ec 08 sub $0x8,%esp 110904: 50 push %eax 110905: 53 push %ebx 110906: e8 25 52 00 00 call 115b30 11090b: 83 c4 10 add $0x10,%esp 11090e: 85 c0 test %eax,%eax 110910: 75 e6 jne 1108f8 110912: 89 f0 mov %esi,%eax 110914: eb c0 jmp 1108d6 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 110916: 68 58 2e 12 00 push $0x122e58 <== NOT EXECUTED 11091b: 68 b9 2e 12 00 push $0x122eb9 <== NOT EXECUTED 110920: 6a 2a push $0x2a <== NOT EXECUTED 110922: 68 64 2e 12 00 push $0x122e64 <== NOT EXECUTED 110927: e8 18 79 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00110804 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 110804: 55 push %ebp 110805: 89 e5 mov %esp,%ebp 110807: 57 push %edi 110808: 56 push %esi 110809: 53 push %ebx 11080a: 83 ec 3c sub $0x3c,%esp 11080d: 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; 110810: 8b 58 1c mov 0x1c(%eax),%ebx loc = temp_mt_entry->mt_fs_root; 110813: 8d 55 d4 lea -0x2c(%ebp),%edx 110816: 89 55 c4 mov %edx,-0x3c(%ebp) 110819: 8d 70 1c lea 0x1c(%eax),%esi 11081c: b9 05 00 00 00 mov $0x5,%ecx 110821: 89 d7 mov %edx,%edi 110823: 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; 110825: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) do { next = jnode->Parent; 11082c: 8b 73 08 mov 0x8(%ebx),%esi loc.node_access = (void *)jnode; 11082f: 89 5d d4 mov %ebx,-0x2c(%ebp) IMFS_Set_handlers( &loc ); 110832: 83 ec 0c sub $0xc,%esp 110835: 8d 45 d4 lea -0x2c(%ebp),%eax 110838: 50 push %eax 110839: e8 2a f6 ff ff call 10fe68 if ( jnode->type != IMFS_DIRECTORY ) { 11083e: 83 c4 10 add $0x10,%esp 110841: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110845: 75 2d jne 110874 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110847: 8d 43 54 lea 0x54(%ebx),%eax 11084a: 39 43 50 cmp %eax,0x50(%ebx) 11084d: 74 3e je 11088d result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 11084f: 85 db test %ebx,%ebx 110851: 74 15 je 110868 if ( jnode->type == IMFS_DIRECTORY ) { 110853: 83 7b 4c 01 cmpl $0x1,0x4c(%ebx) 110857: 75 d3 jne 11082c <== NEVER TAKEN 110859: 8d 43 54 lea 0x54(%ebx),%eax 11085c: 39 43 50 cmp %eax,0x50(%ebx) 11085f: 74 cb je 11082c if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 110861: 8b 5b 50 mov 0x50(%ebx),%ebx } } } while (jnode != NULL); 110864: 85 db test %ebx,%ebx 110866: 75 c4 jne 11082c <== ALWAYS TAKEN 110868: 31 c0 xor %eax,%eax return 0; } 11086a: 8d 65 f4 lea -0xc(%ebp),%esp 11086d: 5b pop %ebx 11086e: 5e pop %esi 11086f: 5f pop %edi 110870: c9 leave 110871: c3 ret 110872: 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 ); 110874: 83 ec 08 sub $0x8,%esp 110877: 8d 55 d4 lea -0x2c(%ebp),%edx 11087a: 52 push %edx if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 11087b: 6a 00 push $0x0 11087d: e8 72 77 ff ff call 107ff4 if (result != 0) 110882: 83 c4 10 add $0x10,%esp 110885: 85 c0 test %eax,%eax 110887: 75 0d jne 110896 <== NEVER TAKEN 110889: 89 f3 mov %esi,%ebx 11088b: eb c2 jmp 11084f result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); 11088d: 83 ec 08 sub $0x8,%esp 110890: 8d 45 d4 lea -0x2c(%ebp),%eax 110893: 50 push %eax 110894: eb e5 jmp 11087b if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 110896: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110899: eb cf jmp 11086a <== NOT EXECUTED =============================================================================== 0011092c : const char *path, int pathlen, char *token, int *token_len ) { 11092c: 55 push %ebp 11092d: 89 e5 mov %esp,%ebp 11092f: 57 push %edi 110930: 56 push %esi 110931: 53 push %ebx 110932: 83 ec 1c sub $0x1c,%esp 110935: 8b 7d 08 mov 0x8(%ebp),%edi 110938: 8b 5d 10 mov 0x10(%ebp),%ebx register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 11093b: 8a 17 mov (%edi),%dl 11093d: 31 f6 xor %esi,%esi 11093f: 89 7d e4 mov %edi,-0x1c(%ebp) 110942: 89 df mov %ebx,%edi 110944: 88 d3 mov %dl,%bl while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) { 110946: eb 07 jmp 11094f return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 110948: 46 inc %esi 110949: 8b 45 e4 mov -0x1c(%ebp),%eax 11094c: 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) ) { 11094f: 83 ec 0c sub $0xc,%esp 110952: 0f be c3 movsbl %bl,%eax 110955: 50 push %eax 110956: e8 d9 8a ff ff call 109434 11095b: 83 c4 10 add $0x10,%esp 11095e: 85 c0 test %eax,%eax 110960: 75 1a jne 11097c 110962: 3b 75 0c cmp 0xc(%ebp),%esi 110965: 7d 15 jge 11097c token[i] = c; 110967: 88 1c 37 mov %bl,(%edi,%esi,1) if ( i == IMFS_NAME_MAX ) 11096a: 83 fe 20 cmp $0x20,%esi 11096d: 75 d9 jne 110948 11096f: b8 04 00 00 00 mov $0x4,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 110974: 8d 65 f4 lea -0xc(%ebp),%esp 110977: 5b pop %ebx 110978: 5e pop %esi 110979: 5f pop %edi 11097a: c9 leave 11097b: c3 ret 11097c: 88 da mov %bl,%dl 11097e: 89 fb mov %edi,%ebx /* * Copy a seperator into token. */ if ( i == 0 ) { 110980: 85 f6 test %esi,%esi 110982: 75 14 jne 110998 token[i] = c; 110984: 88 17 mov %dl,(%edi) if ( (token[i] != '\0') && pathlen ) { 110986: 84 d2 test %dl,%dl 110988: 74 07 je 110991 11098a: 8b 45 0c mov 0xc(%ebp),%eax 11098d: 85 c0 test %eax,%eax 11098f: 75 63 jne 1109f4 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 110991: 31 c0 xor %eax,%eax 110993: eb 68 jmp 1109fd 110995: 8d 76 00 lea 0x0(%esi),%esi i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 110998: 80 7c 37 ff 00 cmpb $0x0,-0x1(%edi,%esi,1) 11099d: 74 04 je 1109a3 <== NEVER TAKEN token[i] = '\0'; 11099f: c6 04 37 00 movb $0x0,(%edi,%esi,1) /* * Set token_len to the number of characters copied. */ *token_len = i; 1109a3: 8b 45 14 mov 0x14(%ebp),%eax 1109a6: 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 ) 1109a8: bf d0 2e 12 00 mov $0x122ed0,%edi 1109ad: b9 03 00 00 00 mov $0x3,%ecx 1109b2: 89 de mov %ebx,%esi 1109b4: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1109b6: 75 10 jne 1109c8 1109b8: b8 02 00 00 00 mov $0x2,%eax else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 1109bd: 8d 65 f4 lea -0xc(%ebp),%esp 1109c0: 5b pop %ebx 1109c1: 5e pop %esi 1109c2: 5f pop %edi 1109c3: c9 leave 1109c4: c3 ret 1109c5: 8d 76 00 lea 0x0(%esi),%esi */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 1109c8: bf d1 2e 12 00 mov $0x122ed1,%edi 1109cd: b9 02 00 00 00 mov $0x2,%ecx 1109d2: 89 de mov %ebx,%esi 1109d4: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 1109d6: 0f 97 c0 seta %al 1109d9: 0f 92 c2 setb %dl 1109dc: 28 d0 sub %dl,%al 1109de: 0f be c0 movsbl %al,%eax 1109e1: 83 f8 01 cmp $0x1,%eax 1109e4: 19 c0 sbb %eax,%eax 1109e6: 83 e0 fe and $0xfffffffe,%eax 1109e9: 83 c0 03 add $0x3,%eax type = IMFS_CURRENT_DIR; } return type; } 1109ec: 8d 65 f4 lea -0xc(%ebp),%esp 1109ef: 5b pop %ebx 1109f0: 5e pop %esi 1109f1: 5f pop %edi 1109f2: c9 leave 1109f3: c3 ret */ if ( i == 0 ) { token[i] = c; if ( (token[i] != '\0') && pathlen ) { 1109f4: b8 01 00 00 00 mov $0x1,%eax 1109f9: 66 be 01 00 mov $0x1,%si /* * Set token_len to the number of characters copied. */ *token_len = i; 1109fd: 8b 55 14 mov 0x14(%ebp),%edx 110a00: 89 32 mov %esi,(%edx) 110a02: e9 6d ff ff ff jmp 110974 =============================================================================== 00107c1c : rtems_filesystem_mount_table_entry_t *temp_mt_entry, const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers ) { 107c1c: 55 push %ebp 107c1d: 89 e5 mov %esp,%ebp 107c1f: 57 push %edi 107c20: 56 push %esi 107c21: 53 push %ebx 107c22: 83 ec 0c sub $0xc,%esp 107c25: 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, 107c28: 8b 0d 10 52 12 00 mov 0x125210,%ecx int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 107c2e: 83 f9 10 cmp $0x10,%ecx 107c31: 74 18 je 107c4b <== NEVER TAKEN 107c33: 31 d2 xor %edx,%edx 107c35: b8 20 00 00 00 mov $0x20,%eax 107c3a: 39 c1 cmp %eax,%ecx 107c3c: 74 0d je 107c4b 107c3e: d1 e0 shl %eax 107c40: 42 inc %edx 107c41: 83 fa 05 cmp $0x5,%edx 107c44: 75 f4 jne 107c3a <== ALWAYS TAKEN 107c46: b9 80 00 00 00 mov $0x80,%ecx <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 107c4b: 89 0d f8 8f 12 00 mov %ecx,0x128ff8 /* * 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(); 107c51: e8 d2 80 00 00 call 10fd28 107c56: 89 43 1c mov %eax,0x1c(%ebx) temp_mt_entry->mt_fs_root.handlers = directory_handlers; 107c59: 8b 45 14 mov 0x14(%ebp),%eax 107c5c: 89 43 24 mov %eax,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = op_table; 107c5f: 8b 45 0c mov 0xc(%ebp),%eax 107c62: 89 43 28 mov %eax,0x28(%ebx) temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 107c65: 8d 7b 38 lea 0x38(%ebx),%edi 107c68: be e0 2c 12 00 mov $0x122ce0,%esi 107c6d: b9 0c 00 00 00 mov $0xc,%ecx 107c72: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 107c74: 83 ec 08 sub $0x8,%esp 107c77: 6a 10 push $0x10 107c79: 6a 01 push $0x1 107c7b: e8 ec 06 00 00 call 10836c if ( !fs_info ) { 107c80: 83 c4 10 add $0x10,%esp 107c83: 85 c0 test %eax,%eax 107c85: 74 3e je 107cc5 <== NEVER TAKEN free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 107c87: 89 43 34 mov %eax,0x34(%ebx) /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 107c8a: 8b 15 fc 8f 12 00 mov 0x128ffc,%edx 107c90: 89 10 mov %edx,(%eax) 107c92: 42 inc %edx 107c93: 89 15 fc 8f 12 00 mov %edx,0x128ffc fs_info->ino_count = 1; 107c99: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) fs_info->memfile_handlers = memfile_handlers; 107ca0: 8b 55 10 mov 0x10(%ebp),%edx 107ca3: 89 50 08 mov %edx,0x8(%eax) fs_info->directory_handlers = directory_handlers; 107ca6: 8b 55 14 mov 0x14(%ebp),%edx 107ca9: 89 50 0c mov %edx,0xc(%eax) jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 107cac: 8b 43 1c mov 0x1c(%ebx),%eax 107caf: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 107cb6: e8 f1 75 00 00 call 10f2ac 107cbb: 31 c0 xor %eax,%eax return 0; } 107cbd: 8d 65 f4 lea -0xc(%ebp),%esp 107cc0: 5b pop %ebx 107cc1: 5e pop %esi 107cc2: 5f pop %edi 107cc3: c9 leave 107cc4: 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); 107cc5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107cc8: ff 73 1c pushl 0x1c(%ebx) <== NOT EXECUTED 107ccb: e8 b4 08 00 00 call 108584 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107cd0: e8 93 d3 00 00 call 115068 <__errno> <== NOT EXECUTED 107cd5: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107cdb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107ce0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ce3: eb d8 jmp 107cbd <== NOT EXECUTED =============================================================================== 00107ce8 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 107ce8: 55 push %ebp 107ce9: 89 e5 mov %esp,%ebp 107ceb: 57 push %edi 107cec: 53 push %ebx 107ced: 83 ec 50 sub $0x50,%esp 107cf0: 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; 107cf3: 8b 45 08 mov 0x8(%ebp),%eax 107cf6: 8b 00 mov (%eax),%eax 107cf8: 89 45 d8 mov %eax,-0x28(%ebp) if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 107cfb: 66 83 78 34 07 cmpw $0x7,0x34(%eax) 107d00: 77 66 ja 107d68 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 ); 107d02: 31 c0 xor %eax,%eax 107d04: b9 ff ff ff ff mov $0xffffffff,%ecx 107d09: 89 d7 mov %edx,%edi 107d0b: f2 ae repnz scas %es:(%edi),%al 107d0d: f7 d1 not %ecx 107d0f: 49 dec %ecx 107d10: 8d 45 f4 lea -0xc(%ebp),%eax 107d13: 50 push %eax 107d14: 8d 5d b7 lea -0x49(%ebp),%ebx 107d17: 53 push %ebx 107d18: 51 push %ecx 107d19: 52 push %edx 107d1a: e8 0d 8c 00 00 call 11092c * 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( 107d1f: 8d 45 d8 lea -0x28(%ebp),%eax 107d22: 89 04 24 mov %eax,(%esp) 107d25: 68 ff a1 00 00 push $0xa1ff 107d2a: 53 push %ebx 107d2b: 6a 03 push $0x3 107d2d: ff 75 0c pushl 0xc(%ebp) 107d30: e8 27 80 00 00 call 10fd5c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 107d35: 83 c4 20 add $0x20,%esp 107d38: 85 c0 test %eax,%eax 107d3a: 74 3e je 107d7a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 107d3c: 8b 45 d8 mov -0x28(%ebp),%eax 107d3f: 66 ff 40 34 incw 0x34(%eax) IMFS_update_ctime( info.hard_link.link_node ); 107d43: 83 ec 08 sub $0x8,%esp 107d46: 6a 00 push $0x0 107d48: 8d 45 ec lea -0x14(%ebp),%eax 107d4b: 50 push %eax 107d4c: e8 af 08 00 00 call 108600 107d51: 8b 55 ec mov -0x14(%ebp),%edx 107d54: 8b 45 d8 mov -0x28(%ebp),%eax 107d57: 89 50 48 mov %edx,0x48(%eax) 107d5a: 31 c0 xor %eax,%eax return 0; 107d5c: 83 c4 10 add $0x10,%esp } 107d5f: 8d 65 f8 lea -0x8(%ebp),%esp 107d62: 5b pop %ebx 107d63: 5f pop %edi 107d64: c9 leave 107d65: c3 ret 107d66: 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 ); 107d68: e8 fb d2 00 00 call 115068 <__errno> 107d6d: c7 00 1f 00 00 00 movl $0x1f,(%eax) 107d73: b8 ff ff ff ff mov $0xffffffff,%eax 107d78: eb e5 jmp 107d5f ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107d7a: e8 e9 d2 00 00 call 115068 <__errno> <== NOT EXECUTED 107d7f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d85: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d8a: eb d3 jmp 107d5f <== NOT EXECUTED =============================================================================== 0011303c : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 11303c: 55 push %ebp 11303d: 89 e5 mov %esp,%ebp 11303f: 53 push %ebx 113040: 83 ec 04 sub $0x4,%esp 113043: 8b 45 08 mov 0x8(%ebp),%eax block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 113046: 85 c0 test %eax,%eax 113048: 74 50 je 11309a <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11304a: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 11304e: 75 31 jne 113081 <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 113050: 52 push %edx 113051: 6a 01 push $0x1 113053: ff 75 0c pushl 0xc(%ebp) 113056: 50 push %eax 113057: e8 b8 fa ff ff call 112b14 11305c: 89 c3 mov %eax,%ebx if ( *block_entry_ptr ) 11305e: 83 c4 10 add $0x10,%esp 113061: 8b 00 mov (%eax),%eax 113063: 85 c0 test %eax,%eax 113065: 74 09 je 113070 #endif memory = memfile_alloc_block(); if ( !memory ) return 1; *block_entry_ptr = memory; 113067: 31 c0 xor %eax,%eax return 0; } 113069: 8b 5d fc mov -0x4(%ebp),%ebx 11306c: c9 leave 11306d: c3 ret 11306e: 66 90 xchg %ax,%ax #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 113070: e8 7b fa ff ff call 112af0 if ( !memory ) 113075: 85 c0 test %eax,%eax 113077: 74 04 je 11307d <== NEVER TAKEN return 1; *block_entry_ptr = memory; 113079: 89 03 mov %eax,(%ebx) 11307b: eb ea jmp 113067 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) 11307d: b0 01 mov $0x1,%al <== NOT EXECUTED 11307f: eb e8 jmp 113069 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 113081: 68 e4 32 12 00 push $0x1232e4 <== NOT EXECUTED 113086: 68 e3 33 12 00 push $0x1233e3 <== NOT EXECUTED 11308b: 68 6d 01 00 00 push $0x16d <== NOT EXECUTED 113090: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 113095: e8 aa 51 ff ff call 108244 <__assert_func> <== NOT EXECUTED ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 11309a: 68 6c 32 12 00 push $0x12326c <== NOT EXECUTED 11309f: 68 e3 33 12 00 push $0x1233e3 <== NOT EXECUTED 1130a4: 68 69 01 00 00 push $0x169 <== NOT EXECUTED 1130a9: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 1130ae: e8 91 51 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 001130b4 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 1130b4: 55 push %ebp 1130b5: 89 e5 mov %esp,%ebp 1130b7: 57 push %edi 1130b8: 56 push %esi 1130b9: 53 push %ebx 1130ba: 83 ec 2c sub $0x2c,%esp 1130bd: 8b 5d 08 mov 0x8(%ebp),%ebx 1130c0: 8b 45 0c mov 0xc(%ebp),%eax 1130c3: 8b 55 10 mov 0x10(%ebp),%edx 1130c6: 89 45 d8 mov %eax,-0x28(%ebp) 1130c9: 89 55 dc mov %edx,-0x24(%ebp) /* * Perform internal consistency checks */ assert( the_jnode ); 1130cc: 85 db test %ebx,%ebx 1130ce: 0f 84 29 01 00 00 je 1131fd <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1130d4: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 1130d8: 0f 85 06 01 00 00 jne 1131e4 <== NEVER TAKEN if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 1130de: a1 f8 8f 12 00 mov 0x128ff8,%eax 1130e3: 89 c1 mov %eax,%ecx 1130e5: c1 e9 02 shr $0x2,%ecx 1130e8: 8d 51 01 lea 0x1(%ecx),%edx 1130eb: 0f af d1 imul %ecx,%edx 1130ee: 42 inc %edx 1130ef: 0f af d1 imul %ecx,%edx 1130f2: 4a dec %edx 1130f3: 0f af d0 imul %eax,%edx 1130f6: 31 c9 xor %ecx,%ecx 1130f8: 3b 4d dc cmp -0x24(%ebp),%ecx 1130fb: 7f 1c jg 113119 <== NEVER TAKEN 1130fd: 7d 15 jge 113114 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); 1130ff: e8 64 1f 00 00 call 115068 <__errno> <== NOT EXECUTED 113104: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 11310a: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 11310f: e9 9e 00 00 00 jmp 1131b2 <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 113114: 3b 55 d8 cmp -0x28(%ebp),%edx 113117: 76 e6 jbe 1130ff <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 113119: 8b 53 50 mov 0x50(%ebx),%edx 11311c: 8b 4b 54 mov 0x54(%ebx),%ecx 11311f: 89 55 e0 mov %edx,-0x20(%ebp) 113122: 89 4d e4 mov %ecx,-0x1c(%ebp) 113125: 39 4d dc cmp %ecx,-0x24(%ebp) 113128: 0f 8e 8e 00 00 00 jle 1131bc <== ALWAYS TAKEN /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 11312e: 89 45 d0 mov %eax,-0x30(%ebp) 113131: 89 c1 mov %eax,%ecx 113133: c1 f9 1f sar $0x1f,%ecx 113136: 89 4d d4 mov %ecx,-0x2c(%ebp) 113139: ff 75 d4 pushl -0x2c(%ebp) 11313c: ff 75 d0 pushl -0x30(%ebp) 11313f: ff 75 dc pushl -0x24(%ebp) 113142: ff 75 d8 pushl -0x28(%ebp) 113145: e8 52 cf 00 00 call 12009c <__divdi3> 11314a: 83 c4 10 add $0x10,%esp 11314d: 89 c6 mov %eax,%esi old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 11314f: ff 75 d4 pushl -0x2c(%ebp) 113152: ff 75 d0 pushl -0x30(%ebp) 113155: ff 75 e4 pushl -0x1c(%ebp) 113158: ff 75 e0 pushl -0x20(%ebp) 11315b: e8 3c cf 00 00 call 12009c <__divdi3> 113160: 83 c4 10 add $0x10,%esp 113163: 89 45 e0 mov %eax,-0x20(%ebp) /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 113166: 39 c6 cmp %eax,%esi 113168: 72 6a jb 1131d4 <== NEVER TAKEN 11316a: 89 c7 mov %eax,%edi 11316c: eb 07 jmp 113175 11316e: 66 90 xchg %ax,%ax 113170: 47 inc %edi 113171: 39 fe cmp %edi,%esi 113173: 72 5f jb 1131d4 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 113175: 83 ec 08 sub $0x8,%esp 113178: 57 push %edi 113179: 53 push %ebx 11317a: e8 bd fe ff ff call 11303c 11317f: 83 c4 10 add $0x10,%esp 113182: 85 c0 test %eax,%eax 113184: 74 ea je 113170 <== ALWAYS TAKEN for ( ; block>=old_blocks ; block-- ) { 113186: 39 7d e0 cmp %edi,-0x20(%ebp) <== NOT EXECUTED 113189: 77 17 ja 1131a2 <== NOT EXECUTED 11318b: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 11318e: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 113190: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 113193: 57 push %edi <== NOT EXECUTED 113194: 53 push %ebx <== NOT EXECUTED 113195: e8 d6 fb ff ff call 112d70 <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 11319a: 4f dec %edi <== NOT EXECUTED 11319b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 11319e: 39 fe cmp %edi,%esi <== NOT EXECUTED 1131a0: 76 ee jbe 113190 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 1131a2: e8 c1 1e 00 00 call 115068 <__errno> <== NOT EXECUTED 1131a7: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1131ad: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 1131b2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1131b5: 5b pop %ebx <== NOT EXECUTED 1131b6: 5e pop %esi <== NOT EXECUTED 1131b7: 5f pop %edi <== NOT EXECUTED 1131b8: c9 leave <== NOT EXECUTED 1131b9: c3 ret <== NOT EXECUTED 1131ba: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 1131bc: 7c 09 jl 1131c7 <== NEVER TAKEN 1131be: 39 55 d8 cmp %edx,-0x28(%ebp) 1131c1: 0f 87 67 ff ff ff ja 11312e /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1131c7: 31 c0 xor %eax,%eax return 0; } 1131c9: 8d 65 f4 lea -0xc(%ebp),%esp 1131cc: 5b pop %ebx 1131cd: 5e pop %esi 1131ce: 5f pop %edi 1131cf: c9 leave 1131d0: c3 ret 1131d1: 8d 76 00 lea 0x0(%esi),%esi /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 1131d4: 8b 45 d8 mov -0x28(%ebp),%eax 1131d7: 8b 55 dc mov -0x24(%ebp),%edx 1131da: 89 43 50 mov %eax,0x50(%ebx) 1131dd: 89 53 54 mov %edx,0x54(%ebx) 1131e0: 31 c0 xor %eax,%eax 1131e2: eb e5 jmp 1131c9 assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1131e4: 68 e4 32 12 00 push $0x1232e4 <== NOT EXECUTED 1131e9: 68 f9 33 12 00 push $0x1233f9 <== NOT EXECUTED 1131ee: 68 35 01 00 00 push $0x135 <== NOT EXECUTED 1131f3: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 1131f8: e8 47 50 ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 1131fd: 68 6c 32 12 00 push $0x12326c <== NOT EXECUTED 113202: 68 f9 33 12 00 push $0x1233f9 <== NOT EXECUTED 113207: 68 31 01 00 00 push $0x131 <== NOT EXECUTED 11320c: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 113211: e8 2e 50 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00112b14 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 112b14: 55 push %ebp 112b15: 89 e5 mov %esp,%ebp 112b17: 57 push %edi 112b18: 56 push %esi 112b19: 53 push %ebx 112b1a: 83 ec 1c sub $0x1c,%esp 112b1d: 8b 5d 08 mov 0x8(%ebp),%ebx 112b20: 8b 7d 0c mov 0xc(%ebp),%edi 112b23: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 112b26: 85 db test %ebx,%ebx 112b28: 0f 84 59 01 00 00 je 112c87 <== NEVER TAKEN if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 112b2e: 83 7b 4c 05 cmpl $0x5,0x4c(%ebx) 112b32: 0f 85 68 01 00 00 jne 112ca0 <== NEVER TAKEN /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 112b38: 8b 0d f8 8f 12 00 mov 0x128ff8,%ecx 112b3e: c1 e9 02 shr $0x2,%ecx 112b41: 8d 41 ff lea -0x1(%ecx),%eax 112b44: 39 c7 cmp %eax,%edi 112b46: 76 44 jbe 112b8c <== ALWAYS TAKEN /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 112b48: 8d 41 01 lea 0x1(%ecx),%eax <== NOT EXECUTED 112b4b: 0f af c1 imul %ecx,%eax <== NOT EXECUTED 112b4e: 8d 50 ff lea -0x1(%eax),%edx <== NOT EXECUTED 112b51: 39 d7 cmp %edx,%edi <== NOT EXECUTED 112b53: 77 57 ja 112bac <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 112b55: 89 f8 mov %edi,%eax <== NOT EXECUTED 112b57: 29 c8 sub %ecx,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 112b59: 31 d2 xor %edx,%edx <== NOT EXECUTED 112b5b: f7 f1 div %ecx <== NOT EXECUTED 112b5d: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; p = info->doubly_indirect; 112b5f: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 112b62: 85 f6 test %esi,%esi <== NOT EXECUTED 112b64: 0f 84 96 00 00 00 je 112c00 <== NOT EXECUTED if ( !p ) { 112b6a: 85 c0 test %eax,%eax <== NOT EXECUTED 112b6c: 0f 84 dd 00 00 00 je 112c4f <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 112b72: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 112b75: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 112b77: 85 c0 test %eax,%eax <== NOT EXECUTED 112b79: 0f 84 ba 00 00 00 je 112c39 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 112b7f: 8d 04 90 lea (%eax,%edx,4),%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 112b82: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112b85: 5b pop %ebx <== NOT EXECUTED 112b86: 5e pop %esi <== NOT EXECUTED 112b87: 5f pop %edi <== NOT EXECUTED 112b88: c9 leave <== NOT EXECUTED 112b89: c3 ret <== NOT EXECUTED 112b8a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; 112b8c: 8b 43 58 mov 0x58(%ebx),%eax if ( malloc_it ) { 112b8f: 85 f6 test %esi,%esi 112b91: 0f 84 85 00 00 00 je 112c1c if ( !p ) { 112b97: 85 c0 test %eax,%eax 112b99: 0f 84 89 00 00 00 je 112c28 p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 112b9f: 8d 04 b8 lea (%eax,%edi,4),%eax /* * This means the requested block number is out of range. */ return 0; } 112ba2: 8d 65 f4 lea -0xc(%ebp),%esp 112ba5: 5b pop %ebx 112ba6: 5e pop %esi 112ba7: 5f pop %edi 112ba8: c9 leave 112ba9: c3 ret 112baa: 66 90 xchg %ax,%ax #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 112bac: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 112baf: 0f af d1 imul %ecx,%edx <== NOT EXECUTED 112bb2: 4a dec %edx <== NOT EXECUTED 112bb3: 39 d7 cmp %edx,%edi <== NOT EXECUTED 112bb5: 77 59 ja 112c10 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; 112bb7: 29 c7 sub %eax,%edi <== NOT EXECUTED 112bb9: 89 f8 mov %edi,%eax <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 112bbb: 31 d2 xor %edx,%edx <== NOT EXECUTED 112bbd: f7 f1 div %ecx <== NOT EXECUTED 112bbf: 89 d7 mov %edx,%edi <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 112bc1: 31 d2 xor %edx,%edx <== NOT EXECUTED 112bc3: f7 f1 div %ecx <== NOT EXECUTED 112bc5: 89 c1 mov %eax,%ecx <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; p = info->triply_indirect; 112bc7: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED if ( malloc_it ) { 112bca: 85 f6 test %esi,%esi <== NOT EXECUTED 112bcc: 0f 84 9a 00 00 00 je 112c6c <== NOT EXECUTED if ( !p ) { 112bd2: 85 c0 test %eax,%eax <== NOT EXECUTED 112bd4: 0f 84 df 00 00 00 je 112cb9 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 112bda: 8d 1c 88 lea (%eax,%ecx,4),%ebx <== NOT EXECUTED 112bdd: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p1 ) { 112bdf: 85 c0 test %eax,%eax <== NOT EXECUTED 112be1: 0f 84 f3 00 00 00 je 112cda <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 112be7: 8d 1c 90 lea (%eax,%edx,4),%ebx <== NOT EXECUTED 112bea: 8b 03 mov (%ebx),%eax <== NOT EXECUTED if ( !p2 ) { 112bec: 85 c0 test %eax,%eax <== NOT EXECUTED 112bee: 75 af jne 112b9f <== NOT EXECUTED p2 = memfile_alloc_block(); 112bf0: e8 fb fe ff ff call 112af0 <== NOT EXECUTED if ( !p2 ) 112bf5: 85 c0 test %eax,%eax <== NOT EXECUTED 112bf7: 74 17 je 112c10 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 112bf9: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112bfb: eb a2 jmp 112b9f <== NOT EXECUTED 112bfd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 112c00: 85 c0 test %eax,%eax <== NOT EXECUTED 112c02: 74 0c je 112c10 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 112c04: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p ) 112c07: 85 c0 test %eax,%eax <== NOT EXECUTED 112c09: 0f 85 70 ff ff ff jne 112b7f <== NOT EXECUTED 112c0f: 90 nop <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112c10: 31 c0 xor %eax,%eax <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 112c12: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 112c15: 5b pop %ebx <== NOT EXECUTED 112c16: 5e pop %esi <== NOT EXECUTED 112c17: 5f pop %edi <== NOT EXECUTED 112c18: c9 leave <== NOT EXECUTED 112c19: c3 ret <== NOT EXECUTED 112c1a: 66 90 xchg %ax,%ax <== NOT EXECUTED info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 112c1c: 85 c0 test %eax,%eax 112c1e: 0f 85 7b ff ff ff jne 112b9f <== ALWAYS TAKEN p2 = (block_p *)p1[ doubly ]; if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112c24: 31 c0 xor %eax,%eax 112c26: eb ea jmp 112c12 <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112c28: e8 c3 fe ff ff call 112af0 if ( !p ) 112c2d: 85 c0 test %eax,%eax 112c2f: 74 df je 112c10 <== NEVER TAKEN return 0; info->indirect = p; 112c31: 89 43 58 mov %eax,0x58(%ebx) 112c34: e9 66 ff ff ff jmp 112b9f info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 112c39: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112c3c: e8 af fe ff ff call 112af0 <== NOT EXECUTED if ( !p1 ) 112c41: 85 c0 test %eax,%eax <== NOT EXECUTED 112c43: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112c46: 74 c8 je 112c10 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 112c48: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112c4a: e9 30 ff ff ff jmp 112b7f <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112c4f: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112c52: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 112c55: e8 96 fe ff ff call 112af0 <== NOT EXECUTED if ( !p ) 112c5a: 85 c0 test %eax,%eax <== NOT EXECUTED 112c5c: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112c5f: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112c62: 74 ac je 112c10 <== NOT EXECUTED return 0; info->doubly_indirect = p; 112c64: 89 43 5c mov %eax,0x5c(%ebx) <== NOT EXECUTED 112c67: e9 06 ff ff ff jmp 112b72 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 112c6c: 85 c0 test %eax,%eax <== NOT EXECUTED 112c6e: 74 a0 je 112c10 <== NOT EXECUTED #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 112c70: 8b 04 88 mov (%eax,%ecx,4),%eax <== NOT EXECUTED if ( !p1 ) 112c73: 85 c0 test %eax,%eax <== NOT EXECUTED 112c75: 74 99 je 112c10 <== NOT EXECUTED return 0; p2 = (block_p *)p1[ doubly ]; 112c77: 8b 14 90 mov (%eax,%edx,4),%edx <== NOT EXECUTED if ( !p2 ) return 0; return (block_p *)&p2[ singly ]; 112c7a: 8d 04 ba lea (%edx,%edi,4),%eax <== NOT EXECUTED p1 = (block_p *) p[ triply ]; if ( !p1 ) return 0; p2 = (block_p *)p1[ doubly ]; if ( !p2 ) 112c7d: 85 d2 test %edx,%edx <== NOT EXECUTED 112c7f: 0f 85 fd fe ff ff jne 112b82 <== NOT EXECUTED 112c85: eb 89 jmp 112c10 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 112c87: 68 6c 32 12 00 push $0x12326c <== NOT EXECUTED 112c8c: 68 54 33 12 00 push $0x123354 <== NOT EXECUTED 112c91: 68 88 03 00 00 push $0x388 <== NOT EXECUTED 112c96: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 112c9b: e8 a4 55 ff ff call 108244 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 112ca0: 68 e4 32 12 00 push $0x1232e4 <== NOT EXECUTED 112ca5: 68 54 33 12 00 push $0x123354 <== NOT EXECUTED 112caa: 68 8c 03 00 00 push $0x38c <== NOT EXECUTED 112caf: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 112cb4: e8 8b 55 ff ff call 108244 <__assert_func> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 112cb9: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112cbc: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 112cbf: e8 2c fe ff ff call 112af0 <== NOT EXECUTED if ( !p ) 112cc4: 85 c0 test %eax,%eax <== NOT EXECUTED 112cc6: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112cc9: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112ccc: 0f 84 3e ff ff ff je 112c10 <== NOT EXECUTED return 0; info->triply_indirect = p; 112cd2: 89 43 60 mov %eax,0x60(%ebx) <== NOT EXECUTED 112cd5: e9 00 ff ff ff jmp 112bda <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 112cda: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 112cdd: e8 0e fe ff ff call 112af0 <== NOT EXECUTED if ( !p1 ) 112ce2: 85 c0 test %eax,%eax <== NOT EXECUTED 112ce4: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112ce7: 0f 84 23 ff ff ff je 112c10 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 112ced: 89 03 mov %eax,(%ebx) <== NOT EXECUTED 112cef: e9 f3 fe ff ff jmp 112be7 <== NOT EXECUTED =============================================================================== 00113634 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 113634: 55 push %ebp 113635: 89 e5 mov %esp,%ebp 113637: 57 push %edi 113638: 56 push %esi 113639: 53 push %ebx 11363a: 83 ec 4c sub $0x4c,%esp 11363d: 8b 75 0c mov 0xc(%ebp),%esi 113640: 8b 7d 10 mov 0x10(%ebp),%edi 113643: 8b 45 18 mov 0x18(%ebp),%eax /* * Perform internal consistency checks */ assert( the_jnode ); 113646: 8b 55 08 mov 0x8(%ebp),%edx 113649: 85 d2 test %edx,%edx 11364b: 0f 84 8e 02 00 00 je 1138df <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 113651: 8b 4d 08 mov 0x8(%ebp),%ecx 113654: 8b 51 4c mov 0x4c(%ecx),%edx 113657: 8d 4a fb lea -0x5(%edx),%ecx 11365a: 83 f9 01 cmp $0x1,%ecx 11365d: 0f 87 63 02 00 00 ja 1138c6 <== NEVER TAKEN /* * Error checks on arguments */ assert( dest ); 113663: 8b 5d 14 mov 0x14(%ebp),%ebx 113666: 85 db test %ebx,%ebx 113668: 0f 84 26 02 00 00 je 113894 <== NEVER TAKEN /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 11366e: 85 c0 test %eax,%eax 113670: 0f 84 f0 01 00 00 je 113866 <== NEVER TAKEN /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 113676: 83 fa 06 cmp $0x6,%edx 113679: 0f 84 5d 01 00 00 je 1137dc <== NEVER TAKEN /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 11367f: 89 f2 mov %esi,%edx if ( last_byte > the_jnode->info.file.size ) 113681: 8b 4d 08 mov 0x8(%ebp),%ecx 113684: 8b 49 50 mov 0x50(%ecx),%ecx 113687: 89 4d cc mov %ecx,-0x34(%ebp) 11368a: 8d 1c 30 lea (%eax,%esi,1),%ebx 11368d: 89 5d d0 mov %ebx,-0x30(%ebp) 113690: 31 c9 xor %ecx,%ecx 113692: 8b 5d 08 mov 0x8(%ebp),%ebx 113695: 3b 4b 54 cmp 0x54(%ebx),%ecx 113698: 0f 8e e2 00 00 00 jle 113780 <== ALWAYS TAKEN my_length = the_jnode->info.file.size - start; 11369e: 8b 5d cc mov -0x34(%ebp),%ebx 1136a1: 29 d3 sub %edx,%ebx 1136a3: 89 5d cc mov %ebx,-0x34(%ebp) /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1136a6: a1 f8 8f 12 00 mov 0x128ff8,%eax 1136ab: 89 45 d0 mov %eax,-0x30(%ebp) 1136ae: 99 cltd 1136af: 89 d3 mov %edx,%ebx 1136b1: 52 push %edx 1136b2: 50 push %eax 1136b3: 57 push %edi 1136b4: 56 push %esi 1136b5: 89 45 c0 mov %eax,-0x40(%ebp) 1136b8: e8 2f cb 00 00 call 1201ec <__moddi3> 1136bd: 83 c4 10 add $0x10,%esp 1136c0: 89 45 c8 mov %eax,-0x38(%ebp) block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1136c3: 8b 4d c0 mov -0x40(%ebp),%ecx 1136c6: 53 push %ebx 1136c7: 51 push %ecx 1136c8: 57 push %edi 1136c9: 56 push %esi 1136ca: e8 cd c9 00 00 call 12009c <__divdi3> 1136cf: 83 c4 10 add $0x10,%esp 1136d2: 89 c3 mov %eax,%ebx if ( start_offset ) { 1136d4: 8b 4d c8 mov -0x38(%ebp),%ecx 1136d7: 85 c9 test %ecx,%ecx 1136d9: 0f 85 b1 00 00 00 jne 113790 1136df: 8b 55 14 mov 0x14(%ebp),%edx 1136e2: 89 55 c8 mov %edx,-0x38(%ebp) 1136e5: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1136ec: 8b 55 d0 mov -0x30(%ebp),%edx 1136ef: 39 55 cc cmp %edx,-0x34(%ebp) 1136f2: 72 39 jb 11372d block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1136f4: 50 push %eax 1136f5: 6a 00 push $0x0 1136f7: 53 push %ebx 1136f8: ff 75 08 pushl 0x8(%ebp) 1136fb: e8 14 f4 ff ff call 112b14 assert( block_ptr ); 113700: 83 c4 10 add $0x10,%esp 113703: 85 c0 test %eax,%eax 113705: 0f 84 70 01 00 00 je 11387b <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 11370b: 8b 30 mov (%eax),%esi 11370d: 8b 7d c8 mov -0x38(%ebp),%edi 113710: 8b 4d d0 mov -0x30(%ebp),%ecx 113713: f3 a4 rep movsb %ds:(%esi),%es:(%edi) dest += to_copy; 113715: 89 7d c8 mov %edi,-0x38(%ebp) block++; 113718: 43 inc %ebx my_length -= to_copy; 113719: 8b 4d d0 mov -0x30(%ebp),%ecx 11371c: 29 4d cc sub %ecx,-0x34(%ebp) copied += to_copy; 11371f: 01 4d c4 add %ecx,-0x3c(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 113722: 8b 7d cc mov -0x34(%ebp),%edi 113725: 39 3d f8 8f 12 00 cmp %edi,0x128ff8 11372b: 76 c7 jbe 1136f4 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 11372d: 8b 7d cc mov -0x34(%ebp),%edi 113730: 85 ff test %edi,%edi 113732: 74 27 je 11375b block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113734: 56 push %esi 113735: 6a 00 push $0x0 113737: 53 push %ebx 113738: ff 75 08 pushl 0x8(%ebp) 11373b: e8 d4 f3 ff ff call 112b14 assert( block_ptr ); 113740: 83 c4 10 add $0x10,%esp 113743: 85 c0 test %eax,%eax 113745: 0f 84 62 01 00 00 je 1138ad <== NEVER TAKEN if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 11374b: 8b 30 mov (%eax),%esi 11374d: 8b 7d c8 mov -0x38(%ebp),%edi 113750: 8b 4d cc mov -0x34(%ebp),%ecx 113753: f3 a4 rep movsb %ds:(%esi),%es:(%edi) copied += my_length; 113755: 8b 45 cc mov -0x34(%ebp),%eax 113758: 01 45 c4 add %eax,-0x3c(%ebp) } IMFS_update_atime( the_jnode ); 11375b: 83 ec 08 sub $0x8,%esp 11375e: 6a 00 push $0x0 113760: 8d 45 e0 lea -0x20(%ebp),%eax 113763: 50 push %eax 113764: e8 97 4e ff ff call 108600 113769: 8b 45 e0 mov -0x20(%ebp),%eax 11376c: 8b 55 08 mov 0x8(%ebp),%edx 11376f: 89 42 40 mov %eax,0x40(%edx) return copied; 113772: 8b 45 c4 mov -0x3c(%ebp),%eax 113775: 83 c4 10 add $0x10,%esp } 113778: 8d 65 f4 lea -0xc(%ebp),%esp 11377b: 5b pop %ebx 11377c: 5e pop %esi 11377d: 5f pop %edi 11377e: c9 leave 11377f: c3 ret * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 113780: 0f 8d ba 00 00 00 jge 113840 <== ALWAYS TAKEN 113786: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 113789: e9 18 ff ff ff jmp 1136a6 <== NOT EXECUTED 11378e: 66 90 xchg %ax,%ax <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113790: 52 push %edx 113791: 6a 00 push $0x0 113793: 53 push %ebx 113794: ff 75 08 pushl 0x8(%ebp) 113797: e8 78 f3 ff ff call 112b14 assert( block_ptr ); 11379c: 83 c4 10 add $0x10,%esp 11379f: 85 c0 test %eax,%eax 1137a1: 0f 84 51 01 00 00 je 1138f8 <== NEVER TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 1137a7: 8b 4d d0 mov -0x30(%ebp),%ecx 1137aa: 2b 4d c8 sub -0x38(%ebp),%ecx 1137ad: 8b 55 cc mov -0x34(%ebp),%edx 1137b0: 39 ca cmp %ecx,%edx 1137b2: 0f 87 9c 00 00 00 ja 113854 to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 1137b8: 8b 75 c8 mov -0x38(%ebp),%esi 1137bb: 03 30 add (%eax),%esi dest += to_copy; 1137bd: 8b 7d 14 mov 0x14(%ebp),%edi 1137c0: 89 d1 mov %edx,%ecx 1137c2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 1137c4: 89 7d c8 mov %edi,-0x38(%ebp) block++; 1137c7: 43 inc %ebx my_length -= to_copy; 1137c8: 29 55 cc sub %edx,-0x34(%ebp) 1137cb: a1 f8 8f 12 00 mov 0x128ff8,%eax 1137d0: 89 45 d0 mov %eax,-0x30(%ebp) 1137d3: 89 55 c4 mov %edx,-0x3c(%ebp) 1137d6: e9 11 ff ff ff jmp 1136ec 1137db: 90 nop * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 1137dc: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 1137df: 8b 5b 58 mov 0x58(%ebx),%ebx <== NOT EXECUTED 1137e2: 89 5d cc mov %ebx,-0x34(%ebp) <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 1137e5: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 1137e8: 8b 51 50 mov 0x50(%ecx),%edx <== NOT EXECUTED 1137eb: 8b 49 54 mov 0x54(%ecx),%ecx <== NOT EXECUTED 1137ee: 89 55 b0 mov %edx,-0x50(%ebp) <== NOT EXECUTED 1137f1: 89 4d b4 mov %ecx,-0x4c(%ebp) <== NOT EXECUTED 1137f4: 29 f2 sub %esi,%edx <== NOT EXECUTED 1137f6: 19 f9 sbb %edi,%ecx <== NOT EXECUTED 1137f8: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 1137fb: 89 4d d4 mov %ecx,-0x2c(%ebp) <== NOT EXECUTED 1137fe: 31 db xor %ebx,%ebx <== NOT EXECUTED 113800: 39 cb cmp %ecx,%ebx <== NOT EXECUTED 113802: 7e 58 jle 11385c <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 113804: 8b 55 b0 mov -0x50(%ebp),%edx <== NOT EXECUTED 113807: 29 f2 sub %esi,%edx <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 113809: 03 75 cc add -0x34(%ebp),%esi <== NOT EXECUTED 11380c: 8b 7d 14 mov 0x14(%ebp),%edi <== NOT EXECUTED 11380f: 89 d1 mov %edx,%ecx <== NOT EXECUTED 113811: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED IMFS_update_atime( the_jnode ); 113813: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 113816: 6a 00 push $0x0 <== NOT EXECUTED 113818: 8d 45 e0 lea -0x20(%ebp),%eax <== NOT EXECUTED 11381b: 50 push %eax <== NOT EXECUTED 11381c: 89 55 c0 mov %edx,-0x40(%ebp) <== NOT EXECUTED 11381f: e8 dc 4d ff ff call 108600 <== NOT EXECUTED 113824: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 113827: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 11382a: 89 43 40 mov %eax,0x40(%ebx) <== NOT EXECUTED return my_length; 11382d: 8b 55 c0 mov -0x40(%ebp),%edx <== NOT EXECUTED 113830: 89 d0 mov %edx,%eax <== NOT EXECUTED 113832: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 113835: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 113838: 5b pop %ebx <== NOT EXECUTED 113839: 5e pop %esi <== NOT EXECUTED 11383a: 5f pop %edi <== NOT EXECUTED 11383b: c9 leave <== NOT EXECUTED 11383c: c3 ret <== NOT EXECUTED 11383d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 113840: 8b 4d cc mov -0x34(%ebp),%ecx 113843: 39 4d d0 cmp %ecx,-0x30(%ebp) 113846: 0f 87 52 fe ff ff ja 11369e <== ALWAYS TAKEN 11384c: e9 35 ff ff ff jmp 113786 <== NOT EXECUTED 113851: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 113854: 89 ca mov %ecx,%edx 113856: e9 5d ff ff ff jmp 1137b8 11385b: 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)) 11385c: 7c 04 jl 113862 <== NOT EXECUTED 11385e: 39 d0 cmp %edx,%eax <== NOT EXECUTED 113860: 77 a2 ja 113804 <== NOT EXECUTED 113862: 89 c2 mov %eax,%edx <== NOT EXECUTED 113864: eb a3 jmp 113809 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 113866: e8 fd 17 00 00 call 115068 <__errno> <== NOT EXECUTED 11386b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 113871: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 113876: e9 fd fe ff ff jmp 113778 <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 11387b: 68 82 32 12 00 push $0x123282 <== NOT EXECUTED 113880: 68 86 33 12 00 push $0x123386 <== NOT EXECUTED 113885: 68 a7 02 00 00 push $0x2a7 <== NOT EXECUTED 11388a: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 11388f: e8 b0 49 ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 113894: 68 93 32 12 00 push $0x123293 <== NOT EXECUTED 113899: 68 86 33 12 00 push $0x123386 <== NOT EXECUTED 11389e: 68 5a 02 00 00 push $0x25a <== NOT EXECUTED 1138a3: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 1138a8: e8 97 49 ff ff call 108244 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 1138ad: 68 82 32 12 00 push $0x123282 <== NOT EXECUTED 1138b2: 68 86 33 12 00 push $0x123386 <== NOT EXECUTED 1138b7: 68 b9 02 00 00 push $0x2b9 <== NOT EXECUTED 1138bc: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 1138c1: e8 7e 49 ff ff call 108244 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 1138c6: 68 08 33 12 00 push $0x123308 <== NOT EXECUTED 1138cb: 68 86 33 12 00 push $0x123386 <== NOT EXECUTED 1138d0: 68 51 02 00 00 push $0x251 <== NOT EXECUTED 1138d5: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 1138da: e8 65 49 ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 1138df: 68 6c 32 12 00 push $0x12326c <== NOT EXECUTED 1138e4: 68 86 33 12 00 push $0x123386 <== NOT EXECUTED 1138e9: 68 4c 02 00 00 push $0x24c <== NOT EXECUTED 1138ee: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 1138f3: e8 4c 49 ff ff call 108244 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 1138f8: 68 82 32 12 00 push $0x123282 <== NOT EXECUTED 1138fd: 68 86 33 12 00 push $0x123386 <== NOT EXECUTED 113902: 68 96 02 00 00 push $0x296 <== NOT EXECUTED 113907: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 11390c: e8 33 49 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00112dbc : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 112dbc: 55 push %ebp 112dbd: 89 e5 mov %esp,%ebp 112dbf: 57 push %edi 112dc0: 56 push %esi 112dc1: 53 push %ebx 112dc2: 83 ec 1c sub $0x1c,%esp /* * Perform internal consistency checks */ assert( the_jnode ); 112dc5: 8b 55 08 mov 0x8(%ebp),%edx 112dc8: 85 d2 test %edx,%edx 112dca: 0f 84 61 01 00 00 je 112f31 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112dd0: 8b 45 08 mov 0x8(%ebp),%eax 112dd3: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 112dd7: 0f 85 6d 01 00 00 jne 112f4a <== NEVER TAKEN /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 112ddd: 8b 3d f8 8f 12 00 mov 0x128ff8,%edi 112de3: c1 ef 02 shr $0x2,%edi * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 112de6: 8b 55 08 mov 0x8(%ebp),%edx 112de9: 8b 42 58 mov 0x58(%edx),%eax 112dec: 85 c0 test %eax,%eax 112dee: 74 12 je 112e02 if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); 112df0: 83 ec 08 sub $0x8,%esp 112df3: 57 push %edi 112df4: 89 d0 mov %edx,%eax 112df6: 83 c0 58 add $0x58,%eax 112df9: 50 push %eax 112dfa: e8 f5 fe ff ff call 112cf4 112dff: 83 c4 10 add $0x10,%esp } if ( info->doubly_indirect ) { 112e02: 8b 4d 08 mov 0x8(%ebp),%ecx 112e05: 8b 51 5c mov 0x5c(%ecx),%edx 112e08: 85 d2 test %edx,%edx 112e0a: 74 57 je 112e63 <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED 112e18: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 112e1a: 31 db xor %ebx,%ebx <== NOT EXECUTED 112e1c: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 112e1f: eb 06 jmp 112e27 <== NOT EXECUTED 112e21: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 112e24: 8b 56 5c mov 0x5c(%esi),%edx <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 112e27: c1 e1 02 shl $0x2,%ecx <== NOT EXECUTED 112e2a: 83 3c 0a 00 cmpl $0x0,(%edx,%ecx,1) <== NOT EXECUTED 112e2e: 74 14 je 112e44 <== NOT EXECUTED memfile_free_blocks_in_table( 112e30: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112e33: 57 push %edi <== NOT EXECUTED 112e34: 01 ca add %ecx,%edx <== NOT EXECUTED 112e36: 52 push %edx <== NOT EXECUTED 112e37: e8 b8 fe ff ff call 112cf4 <== NOT EXECUTED 112e3c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112e3f: a1 f8 8f 12 00 mov 0x128ff8,%eax <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i<== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 112e50: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112e53: 57 push %edi <== NOT EXECUTED 112e54: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 112e57: 83 c0 5c add $0x5c,%eax <== NOT EXECUTED 112e5a: 50 push %eax <== NOT EXECUTED 112e5b: e8 94 fe ff ff call 112cf4 <== NOT EXECUTED 112e60: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } if ( info->triply_indirect ) { 112e63: 8b 45 08 mov 0x8(%ebp),%eax 112e66: 8b 50 60 mov 0x60(%eax),%edx 112e69: 85 d2 test %edx,%edx 112e6b: 0f 84 b6 00 00 00 je 112f27 <== ALWAYS TAKEN for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 112e81: 8b 32 mov (%edx),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 112e83: 85 f6 test %esi,%esi <== NOT EXECUTED 112e85: 0f 84 89 00 00 00 je 112f14 <== NOT EXECUTED 112e8b: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 112e92: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 112e99: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED break; for ( j=0 ; j<== NOT EXECUTED 112ea3: 31 d2 xor %edx,%edx <== NOT EXECUTED 112ea5: 31 db xor %ebx,%ebx <== NOT EXECUTED 112ea7: 90 nop <== NOT EXECUTED if ( p[j] ) { 112ea8: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 112eab: 8b 0c 16 mov (%esi,%edx,1),%ecx <== NOT EXECUTED 112eae: 85 c9 test %ecx,%ecx <== NOT EXECUTED 112eb0: 74 15 je 112ec7 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 112eb2: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112eb5: 57 push %edi <== NOT EXECUTED 112eb6: 8d 14 16 lea (%esi,%edx,1),%edx <== NOT EXECUTED 112eb9: 52 push %edx <== NOT EXECUTED 112eba: e8 35 fe ff ff call 112cf4 <== NOT EXECUTED 112ebf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112ec2: a1 f8 8f 12 00 mov 0x128ff8,%eax <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j<== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 112ed3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112ed6: 57 push %edi <== NOT EXECUTED 112ed7: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 112eda: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 112edd: 03 41 60 add 0x60(%ecx),%eax <== NOT EXECUTED 112ee0: 50 push %eax <== NOT EXECUTED 112ee1: e8 0e fe ff ff call 112cf4 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i<== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ 112efb: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 112efe: c1 e2 02 shl $0x2,%edx <== NOT EXECUTED 112f01: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 112f04: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 112f07: 8b 51 60 mov 0x60(%ecx),%edx <== NOT EXECUTED 112f0a: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 112f0d: 8b 34 0a mov (%edx,%ecx,1),%esi <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 112f10: 85 f6 test %esi,%esi <== NOT EXECUTED 112f12: 75 88 jne 112e9c <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 112f14: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 112f17: 57 push %edi <== NOT EXECUTED 112f18: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 112f1b: 83 c0 60 add $0x60,%eax <== NOT EXECUTED 112f1e: 50 push %eax <== NOT EXECUTED 112f1f: e8 d0 fd ff ff call 112cf4 <== NOT EXECUTED 112f24: 83 c4 10 add $0x10,%esp <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 112f27: 31 c0 xor %eax,%eax 112f29: 8d 65 f4 lea -0xc(%ebp),%esp 112f2c: 5b pop %ebx 112f2d: 5e pop %esi 112f2e: 5f pop %edi 112f2f: c9 leave 112f30: c3 ret /* * Perform internal consistency checks */ assert( the_jnode ); 112f31: 68 6c 32 12 00 push $0x12326c <== NOT EXECUTED 112f36: 68 98 33 12 00 push $0x123398 <== NOT EXECUTED 112f3b: 68 ee 01 00 00 push $0x1ee <== NOT EXECUTED 112f40: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 112f45: e8 fa 52 ff ff call 108244 <__assert_func> <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 112f4a: 68 e4 32 12 00 push $0x1232e4 <== NOT EXECUTED 112f4f: 68 98 33 12 00 push $0x123398 <== NOT EXECUTED 112f54: 68 f2 01 00 00 push $0x1f2 <== NOT EXECUTED 112f59: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 112f5e: e8 e1 52 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00112d70 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 112d70: 55 push %ebp <== NOT EXECUTED 112d71: 89 e5 mov %esp,%ebp <== NOT EXECUTED 112d73: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 112d76: 6a 00 push $0x0 <== NOT EXECUTED 112d78: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 112d7b: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 112d7e: e8 91 fd ff ff call 112b14 <== NOT EXECUTED assert( block_ptr ); 112d83: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 112d86: 85 c0 test %eax,%eax <== NOT EXECUTED 112d88: 74 18 je 112da2 <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; 112d8a: 8b 10 mov (%eax),%edx <== NOT EXECUTED *block_ptr = 0; 112d8c: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED memfile_free_block( ptr ); 112d92: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 112d95: 52 push %edx <== NOT EXECUTED 112d96: e8 39 fd ff ff call 112ad4 <== NOT EXECUTED } return 1; } 112d9b: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 112da0: c9 leave <== NOT EXECUTED 112da1: c3 ret <== NOT EXECUTED { block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 112da2: 68 82 32 12 00 push $0x123282 <== NOT EXECUTED 112da7: 68 c9 33 12 00 push $0x1233c9 <== NOT EXECUTED 112dac: 68 96 01 00 00 push $0x196 <== NOT EXECUTED 112db1: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 112db6: e8 89 54 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00113304 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 113304: 55 push %ebp 113305: 89 e5 mov %esp,%ebp 113307: 57 push %edi 113308: 56 push %esi 113309: 53 push %ebx 11330a: 83 ec 3c sub $0x3c,%esp 11330d: 8b 5d 0c mov 0xc(%ebp),%ebx 113310: 8b 75 10 mov 0x10(%ebp),%esi /* * Perform internal consistency checks */ assert( the_jnode ); 113313: 8b 4d 08 mov 0x8(%ebp),%ecx 113316: 85 c9 test %ecx,%ecx 113318: 0f 84 d8 01 00 00 je 1134f6 <== NEVER TAKEN if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 11331e: 8b 45 08 mov 0x8(%ebp),%eax 113321: 83 78 4c 05 cmpl $0x5,0x4c(%eax) 113325: 0f 85 b2 01 00 00 jne 1134dd <== NEVER TAKEN /* * Error check arguments */ assert( source ); 11332b: 8b 55 14 mov 0x14(%ebp),%edx 11332e: 85 d2 test %edx,%edx 113330: 0f 84 d9 01 00 00 je 11350f <== NEVER TAKEN /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 113336: 8b 45 18 mov 0x18(%ebp),%eax 113339: 85 c0 test %eax,%eax 11333b: 0f 84 6c 01 00 00 je 1134ad <== NEVER TAKEN * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 113341: 8b 45 18 mov 0x18(%ebp),%eax 113344: 01 d8 add %ebx,%eax 113346: 31 d2 xor %edx,%edx 113348: 8b 4d 08 mov 0x8(%ebp),%ecx 11334b: 3b 51 54 cmp 0x54(%ecx),%edx 11334e: 7c 10 jl 113360 <== NEVER TAKEN 113350: 0f 8f 26 01 00 00 jg 11347c <== NEVER TAKEN 113356: 3b 41 50 cmp 0x50(%ecx),%eax 113359: 0f 87 1d 01 00 00 ja 11347c <== ALWAYS TAKEN 11335f: 90 nop /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 113360: a1 f8 8f 12 00 mov 0x128ff8,%eax 113365: 89 45 d4 mov %eax,-0x2c(%ebp) 113368: 99 cltd 113369: 89 45 c8 mov %eax,-0x38(%ebp) 11336c: 89 55 cc mov %edx,-0x34(%ebp) 11336f: 52 push %edx 113370: 50 push %eax 113371: 56 push %esi 113372: 53 push %ebx 113373: e8 74 ce 00 00 call 1201ec <__moddi3> 113378: 83 c4 10 add $0x10,%esp 11337b: 89 c7 mov %eax,%edi block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 11337d: ff 75 cc pushl -0x34(%ebp) 113380: ff 75 c8 pushl -0x38(%ebp) 113383: 56 push %esi 113384: 53 push %ebx 113385: e8 12 cd 00 00 call 12009c <__divdi3> 11338a: 83 c4 10 add $0x10,%esp 11338d: 89 c3 mov %eax,%ebx if ( start_offset ) { 11338f: 85 ff test %edi,%edi 113391: 0f 85 a1 00 00 00 jne 113438 113397: 8b 75 14 mov 0x14(%ebp),%esi 11339a: 8b 55 18 mov 0x18(%ebp),%edx 11339d: 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 ) { 1133a4: 3b 55 d4 cmp -0x2c(%ebp),%edx 1133a7: 72 3b jb 1133e4 1133a9: 8d 76 00 lea 0x0(%esi),%esi block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1133ac: 51 push %ecx 1133ad: 6a 00 push $0x0 1133af: 53 push %ebx 1133b0: ff 75 08 pushl 0x8(%ebp) 1133b3: 89 55 c4 mov %edx,-0x3c(%ebp) 1133b6: e8 59 f7 ff ff call 112b14 assert( block_ptr ); 1133bb: 83 c4 10 add $0x10,%esp 1133be: 85 c0 test %eax,%eax 1133c0: 8b 55 c4 mov -0x3c(%ebp),%edx 1133c3: 0f 84 fb 00 00 00 je 1134c4 <== NEVER TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 1133c9: 8b 00 mov (%eax),%eax src += to_copy; 1133cb: 89 c7 mov %eax,%edi 1133cd: 8b 4d d4 mov -0x2c(%ebp),%ecx 1133d0: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 1133d2: 43 inc %ebx my_length -= to_copy; 1133d3: 2b 55 d4 sub -0x2c(%ebp),%edx * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 1133d6: 8b 4d d4 mov -0x2c(%ebp),%ecx 1133d9: 01 4d c8 add %ecx,-0x38(%ebp) /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1133dc: 39 15 f8 8f 12 00 cmp %edx,0x128ff8 1133e2: 76 c8 jbe 1133ac <== NEVER TAKEN */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 1133e4: 85 d2 test %edx,%edx 1133e6: 74 28 je 113410 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 1133e8: 50 push %eax 1133e9: 6a 00 push $0x0 1133eb: 53 push %ebx 1133ec: ff 75 08 pushl 0x8(%ebp) 1133ef: 89 55 c4 mov %edx,-0x3c(%ebp) 1133f2: e8 1d f7 ff ff call 112b14 assert( block_ptr ); 1133f7: 83 c4 10 add $0x10,%esp 1133fa: 85 c0 test %eax,%eax 1133fc: 8b 55 c4 mov -0x3c(%ebp),%edx 1133ff: 0f 84 23 01 00 00 je 113528 <== NEVER TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 113405: 8b 00 mov (%eax),%eax 113407: 89 c7 mov %eax,%edi 113409: 89 d1 mov %edx,%ecx 11340b: f3 a4 rep movsb %ds:(%esi),%es:(%edi) my_length = 0; copied += to_copy; 11340d: 01 55 c8 add %edx,-0x38(%ebp) } IMFS_mtime_ctime_update( the_jnode ); 113410: 83 ec 08 sub $0x8,%esp 113413: 6a 00 push $0x0 113415: 8d 45 e0 lea -0x20(%ebp),%eax 113418: 50 push %eax 113419: e8 e2 51 ff ff call 108600 11341e: 8b 45 e0 mov -0x20(%ebp),%eax 113421: 8b 55 08 mov 0x8(%ebp),%edx 113424: 89 42 44 mov %eax,0x44(%edx) 113427: 89 42 48 mov %eax,0x48(%edx) return copied; 11342a: 83 c4 10 add $0x10,%esp } 11342d: 8b 45 c8 mov -0x38(%ebp),%eax 113430: 8d 65 f4 lea -0xc(%ebp),%esp 113433: 5b pop %ebx 113434: 5e pop %esi 113435: 5f pop %edi 113436: c9 leave 113437: c3 ret block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 113438: 56 push %esi 113439: 6a 00 push $0x0 11343b: 50 push %eax 11343c: ff 75 08 pushl 0x8(%ebp) 11343f: e8 d0 f6 ff ff call 112b14 assert( block_ptr ); 113444: 83 c4 10 add $0x10,%esp 113447: 85 c0 test %eax,%eax 113449: 0f 84 f2 00 00 00 je 113541 <== NEVER TAKEN */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 11344f: 8b 55 d4 mov -0x2c(%ebp),%edx 113452: 29 fa sub %edi,%edx 113454: 89 55 c8 mov %edx,-0x38(%ebp) 113457: 8b 4d 18 mov 0x18(%ebp),%ecx 11345a: 39 ca cmp %ecx,%edx 11345c: 77 4a ja 1134a8 <== ALWAYS TAKEN if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 11345e: 03 38 add (%eax),%edi src += to_copy; 113460: 8b 75 14 mov 0x14(%ebp),%esi 113463: 8b 4d c8 mov -0x38(%ebp),%ecx 113466: f3 a4 rep movsb %ds:(%esi),%es:(%edi) block++; 113468: 43 inc %ebx my_length -= to_copy; 113469: 8b 55 18 mov 0x18(%ebp),%edx 11346c: 2b 55 c8 sub -0x38(%ebp),%edx copied += to_copy; 11346f: a1 f8 8f 12 00 mov 0x128ff8,%eax 113474: 89 45 d4 mov %eax,-0x2c(%ebp) 113477: e9 28 ff ff ff jmp 1133a4 * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 11347c: 57 push %edi 11347d: 52 push %edx 11347e: 50 push %eax 11347f: ff 75 08 pushl 0x8(%ebp) 113482: e8 2d fc ff ff call 1130b4 if ( status ) 113487: 83 c4 10 add $0x10,%esp 11348a: 85 c0 test %eax,%eax 11348c: 0f 84 ce fe ff ff je 113360 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); 113492: e8 d1 1b 00 00 call 115068 <__errno> <== NOT EXECUTED 113497: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 11349d: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 1134a4: eb 87 jmp 11342d <== NOT EXECUTED 1134a6: 66 90 xchg %ax,%ax <== NOT EXECUTED */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 1134a8: 89 4d c8 mov %ecx,-0x38(%ebp) 1134ab: eb b1 jmp 11345e * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 1134ad: e8 b6 1b 00 00 call 115068 <__errno> <== NOT EXECUTED 1134b2: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1134b8: c7 45 c8 ff ff ff ff movl $0xffffffff,-0x38(%ebp) <== NOT EXECUTED 1134bf: e9 69 ff ff ff jmp 11342d <== NOT EXECUTED */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 1134c4: 68 82 32 12 00 push $0x123282 <== NOT EXECUTED 1134c9: 68 73 33 12 00 push $0x123373 <== NOT EXECUTED 1134ce: 68 30 03 00 00 push $0x330 <== NOT EXECUTED 1134d3: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 1134d8: e8 67 4d ff ff call 108244 <__assert_func> <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 1134dd: 68 e4 32 12 00 push $0x1232e4 <== NOT EXECUTED 1134e2: 68 73 33 12 00 push $0x123373 <== NOT EXECUTED 1134e7: 68 e7 02 00 00 push $0x2e7 <== NOT EXECUTED 1134ec: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 1134f1: e8 4e 4d ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 1134f6: 68 6c 32 12 00 push $0x12326c <== NOT EXECUTED 1134fb: 68 73 33 12 00 push $0x123373 <== NOT EXECUTED 113500: 68 e3 02 00 00 push $0x2e3 <== NOT EXECUTED 113505: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 11350a: e8 35 4d ff ff call 108244 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); 11350f: 68 8c 32 12 00 push $0x12328c <== NOT EXECUTED 113514: 68 73 33 12 00 push $0x123373 <== NOT EXECUTED 113519: 68 ef 02 00 00 push $0x2ef <== NOT EXECUTED 11351e: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 113523: e8 1c 4d ff ff call 108244 <__assert_func> <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 113528: 68 82 32 12 00 push $0x123282 <== NOT EXECUTED 11352d: 68 73 33 12 00 push $0x123373 <== NOT EXECUTED 113532: 68 46 03 00 00 push $0x346 <== NOT EXECUTED 113537: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 11353c: e8 03 4d ff ff call 108244 <__assert_func> <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 113541: 68 82 32 12 00 push $0x123282 <== NOT EXECUTED 113546: 68 73 33 12 00 push $0x123373 <== NOT EXECUTED 11354b: 68 1c 03 00 00 push $0x31c <== NOT EXECUTED 113550: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 113555: e8 ea 4c ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00107d8c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 107d8c: 55 push %ebp 107d8d: 89 e5 mov %esp,%ebp 107d8f: 57 push %edi 107d90: 56 push %esi 107d91: 53 push %ebx 107d92: 83 ec 5c sub $0x5c,%esp 107d95: 8b 55 08 mov 0x8(%ebp),%edx 107d98: 8b 5d 0c mov 0xc(%ebp),%ebx 107d9b: 8b 75 10 mov 0x10(%ebp),%esi 107d9e: 8b 45 14 mov 0x14(%ebp),%eax 107da1: 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 ); 107da4: 31 c0 xor %eax,%eax 107da6: b9 ff ff ff ff mov $0xffffffff,%ecx 107dab: 89 d7 mov %edx,%edi 107dad: f2 ae repnz scas %es:(%edi),%al 107daf: f7 d1 not %ecx 107db1: 49 dec %ecx 107db2: 8d 45 e4 lea -0x1c(%ebp),%eax 107db5: 50 push %eax 107db6: 8d 7d af lea -0x51(%ebp),%edi 107db9: 57 push %edi 107dba: 51 push %ecx 107dbb: 52 push %edx 107dbc: e8 6b 8b 00 00 call 11092c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 107dc1: 89 d8 mov %ebx,%eax 107dc3: 25 00 f0 00 00 and $0xf000,%eax 107dc8: 83 c4 10 add $0x10,%esp 107dcb: 3d 00 40 00 00 cmp $0x4000,%eax 107dd0: 74 5e je 107e30 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 107dd2: 3d 00 80 00 00 cmp $0x8000,%eax 107dd7: 74 4f je 107e28 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107dd9: 3d 00 60 00 00 cmp $0x6000,%eax 107dde: 74 38 je 107e18 107de0: 3d 00 20 00 00 cmp $0x2000,%eax 107de5: 74 31 je 107e18 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 107de7: 3d 00 10 00 00 cmp $0x1000,%eax 107dec: 75 4a jne 107e38 <== NEVER TAKEN 107dee: ba 07 00 00 00 mov $0x7,%edx * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107df3: 83 ec 0c sub $0xc,%esp 107df6: 8d 45 d0 lea -0x30(%ebp),%eax 107df9: 50 push %eax 107dfa: 53 push %ebx 107dfb: 57 push %edi 107dfc: 52 push %edx 107dfd: ff 75 18 pushl 0x18(%ebp) 107e00: e8 57 7f 00 00 call 10fd5c new_name, mode, &info ); if ( !new_node ) 107e05: 83 c4 20 add $0x20,%esp 107e08: 85 c0 test %eax,%eax 107e0a: 74 3e je 107e4a <== NEVER TAKEN 107e0c: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 107e0e: 8d 65 f4 lea -0xc(%ebp),%esp 107e11: 5b pop %ebx 107e12: 5e pop %esi 107e13: 5f pop %edi 107e14: c9 leave 107e15: c3 ret 107e16: 66 90 xchg %ax,%ax 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 ); 107e18: 89 75 d0 mov %esi,-0x30(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107e1b: 8b 45 a4 mov -0x5c(%ebp),%eax 107e1e: 89 45 d4 mov %eax,-0x2c(%ebp) 107e21: ba 02 00 00 00 mov $0x2,%edx */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 107e26: eb cb jmp 107df3 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 107e28: ba 05 00 00 00 mov $0x5,%edx 107e2d: eb c4 jmp 107df3 107e2f: 90 nop rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 107e30: ba 01 00 00 00 mov $0x1,%edx 107e35: eb bc jmp 107df3 107e37: 90 nop 107e38: e8 2b d2 00 00 call 115068 <__errno> <== NOT EXECUTED 107e3d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107e43: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107e48: eb c4 jmp 107e0e <== NOT EXECUTED mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 107e4a: e8 19 d2 00 00 call 115068 <__errno> <== NOT EXECUTED 107e4f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107e55: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107e5a: eb b2 jmp 107e0e <== NOT EXECUTED =============================================================================== 00107e5c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 107e5c: 55 push %ebp 107e5d: 89 e5 mov %esp,%ebp 107e5f: 83 ec 08 sub $0x8,%esp 107e62: 8b 55 08 mov 0x8(%ebp),%edx IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 107e65: 8b 42 08 mov 0x8(%edx),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 107e68: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 107e6c: 75 0a jne 107e78 <== 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; 107e6e: 89 50 5c mov %edx,0x5c(%eax) 107e71: 31 c0 xor %eax,%eax return 0; } 107e73: c9 leave 107e74: c3 ret 107e75: 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 ); 107e78: e8 eb d1 00 00 call 115068 <__errno> <== NOT EXECUTED 107e7d: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 107e83: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 107e88: c9 leave <== NOT EXECUTED 107e89: c3 ret <== NOT EXECUTED =============================================================================== 00109bac : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 109bac: 55 push %ebp 109bad: 89 e5 mov %esp,%ebp 109baf: 53 push %ebx 109bb0: 83 ec 04 sub $0x4,%esp 109bb3: 8b 5d 08 mov 0x8(%ebp),%ebx assert( the_jnode ); 109bb6: 85 db test %ebx,%ebx 109bb8: 0f 84 7f 01 00 00 je 109d3d <== NEVER TAKEN fprintf(stdout, "%s", the_jnode->name ); 109bbe: 83 ec 08 sub $0x8,%esp 109bc1: a1 80 c1 12 00 mov 0x12c180,%eax 109bc6: ff 70 08 pushl 0x8(%eax) 109bc9: 8d 43 0c lea 0xc(%ebx),%eax 109bcc: 50 push %eax 109bcd: e8 7e ef 00 00 call 118b50 switch( the_jnode->type ) { 109bd2: 8b 43 4c mov 0x4c(%ebx),%eax 109bd5: 83 c4 10 add $0x10,%esp 109bd8: 83 f8 07 cmp $0x7,%eax 109bdb: 76 2b jbe 109c08 <== ALWAYS TAKEN fprintf(stdout, " FIFO not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 109bdd: 52 push %edx <== NOT EXECUTED 109bde: 50 push %eax <== NOT EXECUTED 109bdf: 68 0e 7c 12 00 push $0x127c0e <== NOT EXECUTED 109be4: a1 80 c1 12 00 mov 0x12c180,%eax <== NOT EXECUTED 109be9: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109bec: e8 37 ee 00 00 call 118a28 <== NOT EXECUTED assert(0); 109bf1: 68 1f 56 12 00 push $0x12561f <== NOT EXECUTED 109bf6: 68 78 7d 12 00 push $0x127d78 <== NOT EXECUTED 109bfb: 6a 6c push $0x6c <== NOT EXECUTED 109bfd: 68 58 7c 12 00 push $0x127c58 <== NOT EXECUTED 109c02: e8 7d 09 00 00 call 10a584 <__assert_func> <== NOT EXECUTED 109c07: 90 nop <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 109c08: ff 24 85 44 7d 12 00 jmp *0x127d44(,%eax,4) 109c0f: 90 nop fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 109c10: a1 80 c1 12 00 mov 0x12c180,%eax <== NOT EXECUTED 109c15: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c18: 6a 12 push $0x12 <== NOT EXECUTED 109c1a: 6a 01 push $0x1 <== NOT EXECUTED 109c1c: 68 fb 7b 12 00 push $0x127bfb <== NOT EXECUTED 109c21: e8 62 fb 00 00 call 119788 <== NOT EXECUTED assert(0); 109c26: 68 1f 56 12 00 push $0x12561f <== NOT EXECUTED 109c2b: 68 78 7d 12 00 push $0x127d78 <== NOT EXECUTED 109c30: 6a 67 push $0x67 <== NOT EXECUTED 109c32: 68 58 7c 12 00 push $0x127c58 <== NOT EXECUTED 109c37: e8 48 09 00 00 call 10a584 <__assert_func> <== NOT EXECUTED fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 109c3c: ff 73 58 pushl 0x58(%ebx) <== NOT EXECUTED 109c3f: ff 73 50 pushl 0x50(%ebx) <== NOT EXECUTED 109c42: 68 cc 7b 12 00 push $0x127bcc <== NOT EXECUTED 109c47: a1 80 c1 12 00 mov 0x12c180,%eax <== NOT EXECUTED 109c4c: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c4f: e8 d4 ed 00 00 call 118a28 <== NOT EXECUTED (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 109c54: 83 c4 10 add $0x10,%esp <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c57: c7 45 08 f5 7f 12 00 movl $0x127ff5,0x8(%ebp) <== NOT EXECUTED } 109c5e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109c61: c9 leave <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c62: e9 79 07 01 00 jmp 11a3e0 <== NOT EXECUTED 109c67: 90 nop <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 109c68: 51 push %ecx 109c69: ff 73 50 pushl 0x50(%ebx) 109c6c: 68 db 7b 12 00 push $0x127bdb 109c71: a1 80 c1 12 00 mov 0x12c180,%eax 109c76: ff 70 08 pushl 0x8(%eax) 109c79: e8 aa ed 00 00 call 118a28 (uint32_t)the_jnode->info.file.size ); #endif break; 109c7e: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c81: c7 45 08 f5 7f 12 00 movl $0x127ff5,0x8(%ebp) } 109c88: 8b 5d fc mov -0x4(%ebp),%ebx 109c8b: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109c8c: e9 4f 07 01 00 jmp 11a3e0 109c91: 8d 76 00 lea 0x0(%esi),%esi fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 109c94: a1 80 c1 12 00 mov 0x12c180,%eax <== NOT EXECUTED 109c99: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109c9c: 6a 13 push $0x13 <== NOT EXECUTED 109c9e: 6a 01 push $0x1 <== NOT EXECUTED 109ca0: 68 e7 7b 12 00 push $0x127be7 <== NOT EXECUTED 109ca5: e8 de fa 00 00 call 119788 <== NOT EXECUTED assert(0); 109caa: 68 1f 56 12 00 push $0x12561f <== NOT EXECUTED 109caf: 68 78 7d 12 00 push $0x127d78 <== NOT EXECUTED 109cb4: 6a 62 push $0x62 <== NOT EXECUTED 109cb6: 68 58 7c 12 00 push $0x127c58 <== NOT EXECUTED 109cbb: e8 c4 08 00 00 call 10a584 <__assert_func> <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 109cc0: a1 80 c1 12 00 mov 0x12c180,%eax <== NOT EXECUTED 109cc5: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 109cc8: 6a 13 push $0x13 <== NOT EXECUTED 109cca: 6a 01 push $0x1 <== NOT EXECUTED 109ccc: 68 e7 7b 12 00 push $0x127be7 <== NOT EXECUTED 109cd1: e8 b2 fa 00 00 call 119788 <== NOT EXECUTED assert(0); 109cd6: 68 1f 56 12 00 push $0x12561f <== NOT EXECUTED 109cdb: 68 78 7d 12 00 push $0x127d78 <== NOT EXECUTED 109ce0: 6a 5d push $0x5d <== NOT EXECUTED 109ce2: 68 58 7c 12 00 push $0x127c58 <== NOT EXECUTED 109ce7: e8 98 08 00 00 call 10a584 <__assert_func> <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 109cec: ff 73 54 pushl 0x54(%ebx) 109cef: ff 73 50 pushl 0x50(%ebx) 109cf2: 68 b9 7b 12 00 push $0x127bb9 109cf7: a1 80 c1 12 00 mov 0x12c180,%eax 109cfc: ff 70 08 pushl 0x8(%eax) 109cff: e8 24 ed 00 00 call 118a28 the_jnode->info.device.major, the_jnode->info.device.minor ); break; 109d04: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d07: c7 45 08 f5 7f 12 00 movl $0x127ff5,0x8(%ebp) } 109d0e: 8b 5d fc mov -0x4(%ebp),%ebx 109d11: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d12: e9 c9 06 01 00 jmp 11a3e0 109d17: 90 nop assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 109d18: 83 ec 08 sub $0x8,%esp 109d1b: a1 80 c1 12 00 mov 0x12c180,%eax 109d20: ff 70 08 pushl 0x8(%eax) 109d23: 6a 2f push $0x2f 109d25: e8 3a ed 00 00 call 118a64 break; 109d2a: 83 c4 10 add $0x10,%esp default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d2d: c7 45 08 f5 7f 12 00 movl $0x127ff5,0x8(%ebp) } 109d34: 8b 5d fc mov -0x4(%ebp),%ebx 109d37: c9 leave default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 109d38: e9 a3 06 01 00 jmp 11a3e0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 109d3d: 68 af 7b 12 00 push $0x127baf <== NOT EXECUTED 109d42: 68 78 7d 12 00 push $0x127d78 <== NOT EXECUTED 109d47: 6a 38 push $0x38 <== NOT EXECUTED 109d49: 68 58 7c 12 00 push $0x127c58 <== NOT EXECUTED 109d4e: e8 31 08 00 00 call 10a584 <__assert_func> <== NOT EXECUTED =============================================================================== 00107e9c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 107e9c: 55 push %ebp 107e9d: 89 e5 mov %esp,%ebp 107e9f: 57 push %edi 107ea0: 56 push %esi 107ea1: 53 push %ebx 107ea2: 83 ec 0c sub $0xc,%esp 107ea5: 8b 7d 0c mov 0xc(%ebp),%edi 107ea8: 8b 75 10 mov 0x10(%ebp),%esi IMFS_jnode_t *node; int i; node = loc->node_access; 107eab: 8b 45 08 mov 0x8(%ebp),%eax 107eae: 8b 18 mov (%eax),%ebx if ( node->type != IMFS_SYM_LINK ) 107eb0: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 107eb4: 75 36 jne 107eec <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107eb6: 85 f6 test %esi,%esi 107eb8: 74 2e je 107ee8 <== NEVER TAKEN 107eba: 8b 43 50 mov 0x50(%ebx),%eax 107ebd: 8a 10 mov (%eax),%dl 107ebf: 84 d2 test %dl,%dl 107ec1: 74 25 je 107ee8 <== NEVER TAKEN int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107ec3: 31 c9 xor %ecx,%ecx 107ec5: 31 c0 xor %eax,%eax 107ec7: eb 0d jmp 107ed6 107ec9: 8d 76 00 lea 0x0(%esi),%esi for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ecc: 8b 53 50 mov 0x50(%ebx),%edx 107ecf: 8a 14 02 mov (%edx,%eax,1),%dl 107ed2: 84 d2 test %dl,%dl 107ed4: 74 0a je 107ee0 buf[i] = node->info.sym_link.name[i]; 107ed6: 88 14 0f mov %dl,(%edi,%ecx,1) node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ed9: 40 inc %eax 107eda: 89 c1 mov %eax,%ecx 107edc: 39 c6 cmp %eax,%esi 107ede: 77 ec ja 107ecc buf[i] = node->info.sym_link.name[i]; return i; } 107ee0: 83 c4 0c add $0xc,%esp 107ee3: 5b pop %ebx 107ee4: 5e pop %esi 107ee5: 5f pop %edi 107ee6: c9 leave 107ee7: c3 ret node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 107ee8: 31 c0 xor %eax,%eax 107eea: eb f4 jmp 107ee0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 107eec: e8 77 d1 00 00 call 115068 <__errno> <== NOT EXECUTED 107ef1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107ef7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107efc: eb e2 jmp 107ee0 <== NOT EXECUTED =============================================================================== 00107f00 : 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 */ ) { 107f00: 55 push %ebp 107f01: 89 e5 mov %esp,%ebp 107f03: 53 push %ebx 107f04: 83 ec 18 sub $0x18,%esp IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 107f07: 8b 45 0c mov 0xc(%ebp),%eax 107f0a: 8b 18 mov (%eax),%ebx strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 107f0c: 6a 20 push $0x20 107f0e: ff 75 14 pushl 0x14(%ebp) 107f11: 8d 43 0c lea 0xc(%ebx),%eax 107f14: 50 push %eax 107f15: e8 92 dd 00 00 call 115cac if ( the_jnode->Parent != NULL ) 107f1a: 83 c4 10 add $0x10,%esp 107f1d: 8b 4b 08 mov 0x8(%ebx),%ecx 107f20: 85 c9 test %ecx,%ecx 107f22: 74 0c je 107f30 <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 107f24: 83 ec 0c sub $0xc,%esp 107f27: 53 push %ebx 107f28: e8 b7 46 00 00 call 10c5e4 <_Chain_Extract> 107f2d: 83 c4 10 add $0x10,%esp rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 107f30: 8b 45 10 mov 0x10(%ebp),%eax 107f33: 8b 00 mov (%eax),%eax the_jnode->Parent = new_parent; 107f35: 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 ); 107f38: 83 ec 08 sub $0x8,%esp 107f3b: 53 push %ebx 107f3c: 83 c0 50 add $0x50,%eax 107f3f: 50 push %eax 107f40: e8 7b 46 00 00 call 10c5c0 <_Chain_Append> rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 107f45: 58 pop %eax 107f46: 5a pop %edx 107f47: 6a 00 push $0x0 107f49: 8d 45 f0 lea -0x10(%ebp),%eax 107f4c: 50 push %eax 107f4d: e8 ae 06 00 00 call 108600 107f52: 8b 45 f0 mov -0x10(%ebp),%eax 107f55: 89 43 48 mov %eax,0x48(%ebx) return 0; } 107f58: 31 c0 xor %eax,%eax 107f5a: 8b 5d fc mov -0x4(%ebp),%ebx 107f5d: c9 leave 107f5e: c3 ret =============================================================================== 00110a08 : int IMFS_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 110a08: 55 push %ebp 110a09: 89 e5 mov %esp,%ebp 110a0b: 56 push %esi 110a0c: 53 push %ebx 110a0d: 83 ec 10 sub $0x10,%esp 110a10: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 110a13: 8b 1e mov (%esi),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 110a15: 8b 43 08 mov 0x8(%ebx),%eax 110a18: 85 c0 test %eax,%eax 110a1a: 74 13 je 110a2f <== NEVER TAKEN */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 110a1c: 83 ec 0c sub $0xc,%esp 110a1f: 53 push %ebx 110a20: e8 bf bb ff ff call 10c5e4 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 110a25: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 110a2c: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 110a2f: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 110a33: 83 ec 08 sub $0x8,%esp 110a36: 6a 00 push $0x0 110a38: 8d 45 f0 lea -0x10(%ebp),%eax 110a3b: 50 push %eax 110a3c: e8 bf 7b ff ff call 108600 110a41: 8b 45 f0 mov -0x10(%ebp),%eax 110a44: 89 43 48 mov %eax,0x48(%ebx) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 110a47: 89 1c 24 mov %ebx,(%esp) 110a4a: e8 d9 02 00 00 call 110d28 110a4f: 83 c4 10 add $0x10,%esp 110a52: 85 c0 test %eax,%eax 110a54: 75 25 jne 110a7b <== NEVER TAKEN 110a56: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 110a5b: 75 1e jne 110a7b <== NEVER TAKEN /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 110a5d: a1 e4 70 12 00 mov 0x1270e4,%eax 110a62: 8b 50 04 mov 0x4(%eax),%edx 110a65: 3b 16 cmp (%esi),%edx 110a67: 74 33 je 110a9c <== NEVER TAKEN /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 110a69: 83 7b 4c 04 cmpl $0x4,0x4c(%ebx) 110a6d: 74 15 je 110a84 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 110a6f: 83 ec 0c sub $0xc,%esp 110a72: 53 push %ebx 110a73: e8 0c 7b ff ff call 108584 110a78: 83 c4 10 add $0x10,%esp } return 0; } 110a7b: 31 c0 xor %eax,%eax 110a7d: 8d 65 f8 lea -0x8(%ebp),%esp 110a80: 5b pop %ebx 110a81: 5e pop %esi 110a82: c9 leave 110a83: c3 ret /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 110a84: 8b 43 50 mov 0x50(%ebx),%eax 110a87: 85 c0 test %eax,%eax 110a89: 74 e4 je 110a6f <== NEVER TAKEN free( (void*) the_jnode->info.sym_link.name ); 110a8b: 83 ec 0c sub $0xc,%esp 110a8e: 50 push %eax 110a8f: e8 f0 7a ff ff call 108584 110a94: 83 c4 10 add $0x10,%esp 110a97: eb d6 jmp 110a6f 110a99: 8d 76 00 lea 0x0(%esi),%esi /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 110a9c: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 110aa3: eb c4 jmp 110a69 <== NOT EXECUTED =============================================================================== 00110aa8 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 110aa8: 55 push %ebp 110aa9: 89 e5 mov %esp,%ebp 110aab: 56 push %esi 110aac: 53 push %ebx 110aad: 8b 4d 08 mov 0x8(%ebp),%ecx 110ab0: 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; 110ab3: 8b 11 mov (%ecx),%edx switch ( the_jnode->type ) { 110ab5: 83 7a 4c 07 cmpl $0x7,0x4c(%edx) 110ab9: 76 15 jbe 110ad0 <== ALWAYS TAKEN case IMFS_FIFO: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 110abb: e8 a8 45 00 00 call 115068 <__errno> <== NOT EXECUTED 110ac0: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110ac6: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; } 110acb: 5b pop %ebx <== NOT EXECUTED 110acc: 5e pop %esi <== NOT EXECUTED 110acd: c9 leave <== NOT EXECUTED 110ace: c3 ret <== NOT EXECUTED 110acf: 90 nop <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 110ad0: 8b 5a 4c mov 0x4c(%edx),%ebx 110ad3: ff 24 9d d8 2f 12 00 jmp *0x122fd8(,%ebx,4) 110ada: 66 90 xchg %ax,%ax case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 110adc: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED 110ae3: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) <== NOT EXECUTED * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 110aea: 8b 49 10 mov 0x10(%ecx),%ecx 110aed: 8b 49 34 mov 0x34(%ecx),%ecx 110af0: 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 = 110af2: c7 00 fe ff 00 00 movl $0xfffe,(%eax) 110af8: 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; 110afb: 8b 4a 30 mov 0x30(%edx),%ecx 110afe: 89 48 0c mov %ecx,0xc(%eax) buf->st_nlink = the_jnode->st_nlink; 110b01: 8b 4a 34 mov 0x34(%edx),%ecx 110b04: 66 89 48 10 mov %cx,0x10(%eax) buf->st_ino = the_jnode->st_ino; 110b08: 8b 4a 38 mov 0x38(%edx),%ecx 110b0b: 89 48 08 mov %ecx,0x8(%eax) buf->st_uid = the_jnode->st_uid; 110b0e: 8b 4a 3c mov 0x3c(%edx),%ecx 110b11: 66 89 48 12 mov %cx,0x12(%eax) buf->st_gid = the_jnode->st_gid; 110b15: 66 8b 4a 3e mov 0x3e(%edx),%cx 110b19: 66 89 48 14 mov %cx,0x14(%eax) buf->st_atime = the_jnode->stat_atime; 110b1d: 8b 4a 40 mov 0x40(%edx),%ecx 110b20: 89 48 28 mov %ecx,0x28(%eax) buf->st_mtime = the_jnode->stat_mtime; 110b23: 8b 4a 44 mov 0x44(%edx),%ecx 110b26: 89 48 30 mov %ecx,0x30(%eax) buf->st_ctime = the_jnode->stat_ctime; 110b29: 8b 52 48 mov 0x48(%edx),%edx 110b2c: 89 50 38 mov %edx,0x38(%eax) 110b2f: 31 c0 xor %eax,%eax return 0; } 110b31: 5b pop %ebx 110b32: 5e pop %esi 110b33: c9 leave 110b34: c3 ret 110b35: 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 ); 110b38: 8b 5a 54 mov 0x54(%edx),%ebx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 110b3b: 8b 72 50 mov 0x50(%edx),%esi 110b3e: 89 70 18 mov %esi,0x18(%eax) 110b41: 89 58 1c mov %ebx,0x1c(%eax) break; 110b44: eb a4 jmp 110aea 110b46: 66 90 xchg %ax,%ax case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 110b48: 8b 5a 50 mov 0x50(%edx),%ebx 110b4b: 8b 72 54 mov 0x54(%edx),%esi 110b4e: 89 58 20 mov %ebx,0x20(%eax) 110b51: 89 70 24 mov %esi,0x24(%eax) break; 110b54: eb 94 jmp 110aea =============================================================================== 00107f60 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 107f60: 55 push %ebp 107f61: 89 e5 mov %esp,%ebp 107f63: 57 push %edi 107f64: 53 push %ebx 107f65: 83 ec 40 sub $0x40,%esp 107f68: 8b 55 10 mov 0x10(%ebp),%edx int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 107f6b: 31 c0 xor %eax,%eax 107f6d: b9 ff ff ff ff mov $0xffffffff,%ecx 107f72: 89 d7 mov %edx,%edi 107f74: f2 ae repnz scas %es:(%edi),%al 107f76: f7 d1 not %ecx 107f78: 49 dec %ecx 107f79: 8d 45 f4 lea -0xc(%ebp),%eax 107f7c: 50 push %eax 107f7d: 8d 5d bf lea -0x41(%ebp),%ebx 107f80: 53 push %ebx 107f81: 51 push %ecx 107f82: 52 push %edx 107f83: e8 a4 89 00 00 call 11092c /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 107f88: 58 pop %eax 107f89: ff 75 0c pushl 0xc(%ebp) 107f8c: e8 47 dc 00 00 call 115bd8 107f91: 89 45 e0 mov %eax,-0x20(%ebp) if (info.sym_link.name == NULL) { 107f94: 83 c4 10 add $0x10,%esp 107f97: 85 c0 test %eax,%eax 107f99: 74 27 je 107fc2 <== NEVER TAKEN * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 107f9b: 83 ec 0c sub $0xc,%esp 107f9e: 8d 45 e0 lea -0x20(%ebp),%eax 107fa1: 50 push %eax 107fa2: 68 ff a1 00 00 push $0xa1ff 107fa7: 53 push %ebx 107fa8: 6a 04 push $0x4 107faa: ff 75 08 pushl 0x8(%ebp) 107fad: e8 aa 7d 00 00 call 10fd5c new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 107fb2: 83 c4 20 add $0x20,%esp 107fb5: 85 c0 test %eax,%eax 107fb7: 74 1b je 107fd4 <== NEVER TAKEN 107fb9: 31 c0 xor %eax,%eax free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; } 107fbb: 8d 65 f8 lea -0x8(%ebp),%esp 107fbe: 5b pop %ebx 107fbf: 5f pop %edi 107fc0: c9 leave 107fc1: c3 ret /* * Duplicate link name */ info.sym_link.name = strdup(link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one(ENOMEM); 107fc2: e8 a1 d0 00 00 call 115068 <__errno> <== NOT EXECUTED 107fc7: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107fcd: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107fd2: eb e7 jmp 107fbb <== NOT EXECUTED ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { free(info.sym_link.name); 107fd4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107fd7: ff 75 e0 pushl -0x20(%ebp) <== NOT EXECUTED 107fda: e8 a5 05 00 00 call 108584 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 107fdf: e8 84 d0 00 00 call 115068 <__errno> <== NOT EXECUTED 107fe4: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107fea: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107fef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ff2: eb c7 jmp 107fbb <== NOT EXECUTED =============================================================================== 00107ff4 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 107ff4: 55 push %ebp 107ff5: 89 e5 mov %esp,%ebp 107ff7: 57 push %edi 107ff8: 56 push %esi 107ff9: 53 push %ebx 107ffa: 83 ec 3c sub $0x3c,%esp 107ffd: 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; 108000: 8b 13 mov (%ebx),%edx /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 108002: 83 7a 4c 03 cmpl $0x3,0x4c(%edx) 108006: 74 18 je 108020 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 108008: 83 ec 08 sub $0x8,%esp 10800b: 8b 43 08 mov 0x8(%ebx),%eax 10800e: 53 push %ebx 10800f: ff 75 08 pushl 0x8(%ebp) 108012: ff 50 34 call *0x34(%eax) return result; 108015: 83 c4 10 add $0x10,%esp } 108018: 8d 65 f4 lea -0xc(%ebp),%esp 10801b: 5b pop %ebx 10801c: 5e pop %esi 10801d: 5f pop %edi 10801e: c9 leave 10801f: c3 ret * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 108020: 8b 42 50 mov 0x50(%edx),%eax 108023: 85 c0 test %eax,%eax 108025: 74 79 je 1080a0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 108027: 8d 7d cc lea -0x34(%ebp),%edi 10802a: b9 05 00 00 00 mov $0x5,%ecx 10802f: 89 de mov %ebx,%esi 108031: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_link.node_access = node->info.hard_link.link_node; 108033: 89 45 cc mov %eax,-0x34(%ebp) IMFS_Set_handlers( &the_link ); 108036: 83 ec 0c sub $0xc,%esp 108039: 8d 75 cc lea -0x34(%ebp),%esi 10803c: 56 push %esi 10803d: 89 55 c4 mov %edx,-0x3c(%ebp) 108040: e8 23 7e 00 00 call 10fe68 /* * 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) 108045: 8b 55 c4 mov -0x3c(%ebp),%edx 108048: 8b 42 50 mov 0x50(%edx),%eax 10804b: 8b 48 34 mov 0x34(%eax),%ecx 10804e: 83 c4 10 add $0x10,%esp 108051: 66 83 f9 01 cmp $0x1,%cx 108055: 74 27 je 10807e if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 108057: 49 dec %ecx 108058: 66 89 48 34 mov %cx,0x34(%eax) IMFS_update_ctime( node->info.hard_link.link_node ); 10805c: 83 ec 08 sub $0x8,%esp 10805f: 6a 00 push $0x0 108061: 8d 45 e0 lea -0x20(%ebp),%eax 108064: 50 push %eax 108065: 89 55 c4 mov %edx,-0x3c(%ebp) 108068: e8 93 05 00 00 call 108600 10806d: 8b 55 c4 mov -0x3c(%ebp),%edx 108070: 8b 42 50 mov 0x50(%edx),%eax 108073: 8b 55 e0 mov -0x20(%ebp),%edx 108076: 89 50 48 mov %edx,0x48(%eax) 108079: 83 c4 10 add $0x10,%esp 10807c: eb 8a jmp 108008 * 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 ); 10807e: 83 ec 08 sub $0x8,%esp 108081: 56 push %esi 108082: ff 75 08 pushl 0x8(%ebp) 108085: 8b 45 d4 mov -0x2c(%ebp),%eax 108088: ff 50 34 call *0x34(%eax) if ( result != 0 ) 10808b: 83 c4 10 add $0x10,%esp 10808e: 85 c0 test %eax,%eax 108090: 0f 84 72 ff ff ff je 108008 108096: b8 ff ff ff ff mov $0xffffffff,%eax 10809b: e9 78 ff ff ff jmp 108018 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 1080a0: e8 c3 cf 00 00 call 115068 <__errno> <== NOT EXECUTED 1080a5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1080ab: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1080b0: e9 63 ff ff ff jmp 108018 <== NOT EXECUTED =============================================================================== 001080b8 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1080b8: 55 push %ebp 1080b9: 89 e5 mov %esp,%ebp 1080bb: 83 ec 08 sub $0x8,%esp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1080be: 8b 45 08 mov 0x8(%ebp),%eax 1080c1: 8b 40 08 mov 0x8(%eax),%eax /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1080c4: 83 78 4c 01 cmpl $0x1,0x4c(%eax) 1080c8: 75 12 jne 1080dc <== NEVER TAKEN /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 1080ca: 8b 50 5c mov 0x5c(%eax),%edx 1080cd: 85 d2 test %edx,%edx 1080cf: 74 1d je 1080ee <== 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; 1080d1: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) 1080d8: 31 c0 xor %eax,%eax return 0; } 1080da: c9 leave 1080db: 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 ); 1080dc: e8 87 cf 00 00 call 115068 <__errno> <== NOT EXECUTED 1080e1: c7 00 14 00 00 00 movl $0x14,(%eax) <== NOT EXECUTED 1080e7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 1080ec: c9 leave <== NOT EXECUTED 1080ed: 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 */ 1080ee: e8 75 cf 00 00 call 115068 <__errno> <== NOT EXECUTED 1080f3: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1080f9: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 1080fe: c9 leave <== NOT EXECUTED 1080ff: c3 ret <== NOT EXECUTED =============================================================================== 001087b0 : void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1087b0: 55 push %ebp 1087b1: 89 e5 mov %esp,%ebp 1087b3: 57 push %edi 1087b4: 56 push %esi 1087b5: 53 push %ebx 1087b6: 83 ec 0c sub $0xc,%esp 1087b9: 8b 5d 08 mov 0x8(%ebp),%ebx 1087bc: 8b 75 0c mov 0xc(%ebp),%esi #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 1087bf: a1 08 77 12 00 mov 0x127708,%eax 1087c4: 85 c0 test %eax,%eax 1087c6: 74 02 je 1087ca <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->initialize)(); 1087c8: ff 10 call *(%eax) <== NOT EXECUTED } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1087ca: e8 79 ff ff ff call 108748 /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1087cf: a1 0c 77 12 00 mov 0x12770c,%eax 1087d4: 85 c0 test %eax,%eax 1087d6: 74 13 je 1087eb <== ALWAYS TAKEN void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1087d8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1087db: ff 75 10 pushl 0x10(%ebp) <== NOT EXECUTED 1087de: 53 push %ebx <== NOT EXECUTED 1087df: ff 10 call *(%eax) <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1087e1: 8d 34 33 lea (%ebx,%esi,1),%esi <== NOT EXECUTED 1087e4: 29 c6 sub %eax,%esi <== NOT EXECUTED 1087e6: 89 c3 mov %eax,%ebx <== NOT EXECUTED 1087e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED * of the time under UNIX because zero'ing memory when it is first * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( 1087eb: 80 3d 05 77 12 00 00 cmpb $0x0,0x127705 1087f2: 75 1f jne 108813 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1087f4: 80 3d 08 53 12 00 00 cmpb $0x0,0x125308 1087fb: 75 3f jne 10883c void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1087fd: 6a 04 push $0x4 1087ff: 56 push %esi 108800: 53 push %ebx 108801: ff 35 18 52 12 00 pushl 0x125218 108807: e8 80 43 00 00 call 10cb8c <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 10880c: 83 c4 10 add $0x10,%esp 10880f: 85 c0 test %eax,%eax 108811: 74 3c je 10884f <== NEVER TAKEN rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 108813: 8b 1d 60 93 12 00 mov 0x129360,%ebx 108819: 83 ec 0c sub $0xc,%esp 10881c: ff 35 18 52 12 00 pushl 0x125218 108822: e8 05 4f 00 00 call 10d72c <_Protected_heap_Get_size> 108827: 8d 1c 18 lea (%eax,%ebx,1),%ebx 10882a: 89 1d 60 93 12 00 mov %ebx,0x129360 108830: 83 c4 10 add $0x10,%esp printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 108833: 8d 65 f4 lea -0xc(%ebp),%esp 108836: 5b pop %ebx 108837: 5e pop %esi 108838: 5f pop %edi 108839: c9 leave 10883a: c3 ret 10883b: 90 nop if ( !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() ) { memset( heap_begin, 0, heap_size ); 10883c: 31 c0 xor %eax,%eax 10883e: 89 df mov %ebx,%edi 108840: 89 f1 mov %esi,%ecx 108842: 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 ) { 108844: 80 3d 05 77 12 00 00 cmpb $0x0,0x127705 10884b: 74 b0 je 1087fd <== ALWAYS TAKEN 10884d: eb c4 jmp 108813 <== NOT EXECUTED heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 10884f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108852: 6a 1a push $0x1a <== NOT EXECUTED 108854: e8 8b 3a 00 00 call 10c2e4 <== NOT EXECUTED =============================================================================== 00107c4c : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 107c4c: 55 push %ebp <== NOT EXECUTED 107c4d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107c4f: 57 push %edi <== NOT EXECUTED 107c50: 56 push %esi <== NOT EXECUTED 107c51: 53 push %ebx <== NOT EXECUTED 107c52: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED 107c55: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 107c58: 85 db test %ebx,%ebx <== NOT EXECUTED 107c5a: 0f 84 c5 00 00 00 je 107d25 <== NOT EXECUTED return; if ( !print_handler ) 107c60: a1 88 96 12 00 mov 0x129688,%eax <== NOT EXECUTED 107c65: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 107c68: 85 c0 test %eax,%eax <== NOT EXECUTED 107c6a: 0f 84 b5 00 00 00 je 107d25 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 107c70: 83 fb ff cmp $0xffffffff,%ebx <== NOT EXECUTED 107c73: 0f 84 d7 00 00 00 je 107d50 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 107c79: 8d b3 c4 00 00 00 lea 0xc4(%ebx),%esi <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 107c7f: 8b 93 d8 00 00 00 mov 0xd8(%ebx),%edx <== NOT EXECUTED 107c85: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 107c88: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 107c8b: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 107c8e: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 107c91: 8b 3e mov (%esi),%edi <== NOT EXECUTED 107c93: 83 ef 10 sub $0x10,%edi <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 107c96: 57 push %edi <== NOT EXECUTED 107c97: 50 push %eax <== NOT EXECUTED 107c98: e8 77 ff ff ff call 107c14 <== NOT EXECUTED if ( high_water_mark ) 107c9d: 59 pop %ecx <== NOT EXECUTED 107c9e: 5a pop %edx <== NOT EXECUTED 107c9f: 85 c0 test %eax,%eax <== NOT EXECUTED 107ca1: 0f 84 c9 00 00 00 je 107d70 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 107ca7: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 107caa: 01 fa add %edi,%edx <== NOT EXECUTED 107cac: 29 c2 sub %eax,%edx <== NOT EXECUTED 107cae: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED else used = 0; if ( the_thread ) { 107cb1: 85 db test %ebx,%ebx <== NOT EXECUTED 107cb3: 0f 84 c7 00 00 00 je 107d80 <== NOT EXECUTED (*print_handler)( 107cb9: 52 push %edx <== NOT EXECUTED 107cba: 8d 45 e3 lea -0x1d(%ebp),%eax <== NOT EXECUTED 107cbd: 50 push %eax <== NOT EXECUTED 107cbe: 6a 05 push $0x5 <== NOT EXECUTED 107cc0: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107cc3: e8 b0 41 00 00 call 10be78 <== NOT EXECUTED 107cc8: 50 push %eax <== NOT EXECUTED 107cc9: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107ccc: 68 37 2d 12 00 push $0x122d37 <== NOT EXECUTED 107cd1: ff 35 84 96 12 00 pushl 0x129684 <== NOT EXECUTED 107cd7: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 107cda: 83 c4 20 add $0x20,%esp <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 107cdd: 8b 46 04 mov 0x4(%esi),%eax <== NOT EXECUTED 107ce0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107ce3: 57 push %edi <== NOT EXECUTED 107ce4: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 107ce7: 8b 16 mov (%esi),%edx <== NOT EXECUTED 107ce9: 8d 54 10 ff lea -0x1(%eax,%edx,1),%edx <== NOT EXECUTED 107ced: 52 push %edx <== NOT EXECUTED 107cee: 50 push %eax <== NOT EXECUTED 107cef: 68 52 2d 12 00 push $0x122d52 <== NOT EXECUTED 107cf4: ff 35 84 96 12 00 pushl 0x129684 <== NOT EXECUTED 107cfa: ff 15 88 96 12 00 call *0x129688 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 107d00: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107d03: 8b 1d 80 96 12 00 mov 0x129680,%ebx <== NOT EXECUTED 107d09: 85 db test %ebx,%ebx <== NOT EXECUTED 107d0b: 74 23 je 107d30 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 107d0d: 51 push %ecx <== NOT EXECUTED 107d0e: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 107d11: 68 7d 2d 12 00 push $0x122d7d <== NOT EXECUTED 107d16: ff 35 84 96 12 00 pushl 0x129684 <== NOT EXECUTED 107d1c: ff 15 88 96 12 00 call *0x129688 <== NOT EXECUTED 107d22: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } 107d25: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107d28: 5b pop %ebx <== NOT EXECUTED 107d29: 5e pop %esi <== NOT EXECUTED 107d2a: 5f pop %edi <== NOT EXECUTED 107d2b: c9 leave <== NOT EXECUTED 107d2c: c3 ret <== NOT EXECUTED 107d2d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 107d30: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107d33: 68 70 2d 12 00 push $0x122d70 <== NOT EXECUTED 107d38: ff 35 84 96 12 00 pushl 0x129684 <== NOT EXECUTED 107d3e: ff 15 88 96 12 00 call *0x129688 <== NOT EXECUTED 107d44: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 107d47: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107d4a: 5b pop %ebx <== NOT EXECUTED 107d4b: 5e pop %esi <== NOT EXECUTED 107d4c: 5f pop %edi <== NOT EXECUTED 107d4d: c9 leave <== NOT EXECUTED 107d4e: c3 ret <== NOT EXECUTED 107d4f: 90 nop <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 107d50: 8b 0d f4 99 12 00 mov 0x1299f4,%ecx <== NOT EXECUTED 107d56: 85 c9 test %ecx,%ecx <== NOT EXECUTED 107d58: 74 cb je 107d25 <== NOT EXECUTED 107d5a: c7 45 cc 00 00 00 00 movl $0x0,-0x34(%ebp) <== NOT EXECUTED 107d61: 31 db xor %ebx,%ebx <== NOT EXECUTED 107d63: be f0 99 12 00 mov $0x1299f0,%esi <== NOT EXECUTED 107d68: e9 1b ff ff ff jmp 107c88 <== NOT EXECUTED 107d6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 107d70: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 107d77: 85 db test %ebx,%ebx <== NOT EXECUTED 107d79: 0f 85 3a ff ff ff jne 107cb9 <== NOT EXECUTED 107d7f: 90 nop <== NOT EXECUTED "0x%08" PRIx32 " %4s", the_thread->Object.id, rtems_object_get_name( the_thread->Object.id, sizeof(name), name ) ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); 107d80: 50 push %eax <== NOT EXECUTED 107d81: 6a ff push $0xffffffff <== NOT EXECUTED 107d83: 68 44 2d 12 00 push $0x122d44 <== NOT EXECUTED 107d88: ff 35 84 96 12 00 pushl 0x129684 <== NOT EXECUTED 107d8e: ff 55 d0 call *-0x30(%ebp) <== NOT EXECUTED 107d91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107d94: e9 44 ff ff ff jmp 107cdd <== NOT EXECUTED =============================================================================== 00107fa4 : /* * Stack_check_Initialize */ void Stack_check_Initialize( void ) { 107fa4: 55 push %ebp 107fa5: 89 e5 mov %esp,%ebp 107fa7: 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) 107fa8: 8b 3d 80 96 12 00 mov 0x129680,%edi 107fae: 85 ff test %edi,%edi 107fb0: 75 4d jne 107fff 107fb2: 31 c0 xor %eax,%eax /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { p[i] = pattern[ i%4 ]; 107fb4: 89 c2 mov %eax,%edx 107fb6: 83 e2 03 and $0x3,%edx 107fb9: 8b 14 95 bc 2e 12 00 mov 0x122ebc(,%edx,4),%edx 107fc0: 89 14 85 e0 99 12 00 mov %edx,0x1299e0(,%eax,4) /* * Dope the pattern and fill areas */ p = Stack_check_Pattern.pattern; for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) { 107fc7: 40 inc %eax 107fc8: 83 f8 04 cmp $0x4,%eax 107fcb: 75 e7 jne 107fb4 /* * 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) { 107fcd: 8b 15 88 9b 12 00 mov 0x129b88,%edx 107fd3: 85 d2 test %edx,%edx 107fd5: 74 1e je 107ff5 <== NEVER TAKEN 107fd7: 8b 0d 48 9b 12 00 mov 0x129b48,%ecx 107fdd: 85 c9 test %ecx,%ecx 107fdf: 74 14 je 107ff5 <== NEVER TAKEN Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low; 107fe1: 89 15 f4 99 12 00 mov %edx,0x1299f4 Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high - 107fe7: 29 d1 sub %edx,%ecx 107fe9: 89 0d f0 99 12 00 mov %ecx,0x1299f0 (char *) _CPU_Interrupt_stack_low; Stack_check_Dope_stack(&Stack_check_Interrupt_stack); 107fef: b0 a5 mov $0xa5,%al 107ff1: 89 d7 mov %edx,%edi 107ff3: f3 aa rep stos %al,%es:(%edi) } #endif Stack_check_Initialized = 1; 107ff5: c7 05 80 96 12 00 01 movl $0x1,0x129680 107ffc: 00 00 00 } 107fff: 5f pop %edi 108000: c9 leave 108001: c3 ret =============================================================================== 00107c14 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 107c14: 55 push %ebp <== NOT EXECUTED 107c15: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107c17: 8b 4d 08 mov 0x8(%ebp),%ecx <== NOT EXECUTED 107c1a: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 107c1d: 8d 41 10 lea 0x10(%ecx),%eax <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 107c20: 83 e2 fc and $0xfffffffc,%edx <== NOT EXECUTED 107c23: 8d 14 10 lea (%eax,%edx,1),%edx <== NOT EXECUTED 107c26: 39 d0 cmp %edx,%eax <== NOT EXECUTED 107c28: 73 1d jae 107c47 <== NOT EXECUTED if (*base != U32_PATTERN) 107c2a: 81 79 10 a5 a5 a5 a5 cmpl $0xa5a5a5a5,0x10(%ecx) <== NOT EXECUTED 107c31: 74 0d je 107c40 <== NOT EXECUTED 107c33: eb 14 jmp 107c49 <== NOT EXECUTED 107c35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 107c38: 81 38 a5 a5 a5 a5 cmpl $0xa5a5a5a5,(%eax) <== NOT EXECUTED 107c3e: 75 09 jne 107c49 <== 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++) 107c40: 83 c0 04 add $0x4,%eax <== NOT EXECUTED 107c43: 39 c2 cmp %eax,%edx <== NOT EXECUTED 107c45: 77 f1 ja 107c38 <== NOT EXECUTED 107c47: 31 c0 xor %eax,%eax <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 107c49: c9 leave <== NOT EXECUTED 107c4a: c3 ret <== NOT EXECUTED =============================================================================== 00107e18 : * * NOTE: The system is in a questionable state... we may not get * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 107e18: 55 push %ebp <== NOT EXECUTED 107e19: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e1b: 56 push %esi <== NOT EXECUTED 107e1c: 53 push %ebx <== NOT EXECUTED 107e1d: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 107e20: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 107e23: 8a 55 0c mov 0xc(%ebp),%dl <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 107e26: 8b b3 c8 00 00 00 mov 0xc8(%ebx),%esi <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 107e2c: 68 9a 2d 12 00 push $0x122d9a <== NOT EXECUTED 107e31: 88 55 d4 mov %dl,-0x2c(%ebp) <== NOT EXECUTED 107e34: e8 af 19 00 00 call 1097e8 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 107e39: 58 pop %eax <== NOT EXECUTED 107e3a: 5a pop %edx <== NOT EXECUTED 107e3b: 53 push %ebx <== NOT EXECUTED 107e3c: 68 aa 2d 12 00 push $0x122daa <== NOT EXECUTED 107e41: e8 a2 19 00 00 call 1097e8 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 107e46: 5a pop %edx <== NOT EXECUTED 107e47: 59 pop %ecx <== NOT EXECUTED 107e48: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107e4b: 68 c7 2d 12 00 push $0x122dc7 <== NOT EXECUTED 107e50: e8 93 19 00 00 call 1097e8 <== NOT EXECUTED printk( 107e55: 59 pop %ecx <== NOT EXECUTED 107e56: 58 pop %eax <== NOT EXECUTED 107e57: ff 73 0c pushl 0xc(%ebx) <== NOT EXECUTED 107e5a: 68 d9 2d 12 00 push $0x122dd9 <== NOT EXECUTED 107e5f: e8 84 19 00 00 call 1097e8 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 107e64: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 107e67: 8d 45 d8 lea -0x28(%ebp),%eax <== NOT EXECUTED 107e6a: 50 push %eax <== NOT EXECUTED 107e6b: 6a 20 push $0x20 <== NOT EXECUTED 107e6d: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 107e70: e8 03 40 00 00 call 10be78 <== NOT EXECUTED 107e75: 59 pop %ecx <== NOT EXECUTED 107e76: 5a pop %edx <== NOT EXECUTED 107e77: 50 push %eax <== NOT EXECUTED 107e78: 68 ed 2d 12 00 push $0x122ded <== NOT EXECUTED 107e7d: e8 66 19 00 00 call 1097e8 <== NOT EXECUTED "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 107e82: 8b 8b c8 00 00 00 mov 0xc8(%ebx),%ecx <== NOT EXECUTED 107e88: 8b 83 c4 00 00 00 mov 0xc4(%ebx),%eax <== NOT EXECUTED 107e8e: 8d 1c 01 lea (%ecx,%eax,1),%ebx <== NOT EXECUTED 107e91: 53 push %ebx <== NOT EXECUTED 107e92: 51 push %ecx <== NOT EXECUTED 107e93: 50 push %eax <== NOT EXECUTED 107e94: 68 50 2e 12 00 push $0x122e50 <== NOT EXECUTED 107e99: e8 4a 19 00 00 call 1097e8 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 107e9e: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 107ea1: 8a 55 d4 mov -0x2c(%ebp),%dl <== NOT EXECUTED 107ea4: 84 d2 test %dl,%dl <== NOT EXECUTED 107ea6: 74 10 je 107eb8 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 107ea8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107eab: 68 81 00 00 00 push $0x81 <== NOT EXECUTED 107eb0: e8 3f 48 00 00 call 10c6f4 <== NOT EXECUTED 107eb5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * the following message out. */ void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 107eb8: 8d 46 08 lea 0x8(%esi),%eax <== NOT EXECUTED (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { printk( 107ebb: 83 c6 18 add $0x18,%esi <== NOT EXECUTED 107ebe: 56 push %esi <== NOT EXECUTED 107ebf: 50 push %eax <== NOT EXECUTED 107ec0: 6a 10 push $0x10 <== NOT EXECUTED 107ec2: 68 84 2e 12 00 push $0x122e84 <== NOT EXECUTED 107ec7: e8 1c 19 00 00 call 1097e8 <== NOT EXECUTED 107ecc: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107ecf: eb d7 jmp 107ea8 <== NOT EXECUTED =============================================================================== 0010c474 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 10c474: 55 push %ebp 10c475: 89 e5 mov %esp,%ebp 10c477: 53 push %ebx 10c478: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c47b: 8b 1d 18 97 12 00 mov 0x129718,%ebx 10c481: 81 fb 1c 97 12 00 cmp $0x12971c,%ebx 10c487: 74 10 je 10c499 <_API_extensions_Run_postdriver+0x25><== NEVER TAKEN 10c489: 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)(); 10c48c: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10c48f: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c491: 81 fb 1c 97 12 00 cmp $0x12971c,%ebx 10c497: 75 f3 jne 10c48c <_API_extensions_Run_postdriver+0x18> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 10c499: 58 pop %eax 10c49a: 5b pop %ebx 10c49b: c9 leave 10c49c: c3 ret =============================================================================== 0010c4a0 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 10c4a0: 55 push %ebp 10c4a1: 89 e5 mov %esp,%ebp 10c4a3: 53 push %ebx 10c4a4: 83 ec 04 sub $0x4,%esp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c4a7: 8b 1d 18 97 12 00 mov 0x129718,%ebx 10c4ad: 81 fb 1c 97 12 00 cmp $0x12971c,%ebx 10c4b3: 74 1c je 10c4d1 <_API_extensions_Run_postswitch+0x31><== NEVER TAKEN 10c4b5: 8d 76 00 lea 0x0(%esi),%esi * provide this hook. */ #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); 10c4b8: 83 ec 0c sub $0xc,%esp 10c4bb: ff 35 78 95 12 00 pushl 0x129578 10c4c1: ff 53 0c call *0xc(%ebx) Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 10c4c4: 8b 1b mov (%ebx),%ebx void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 10c4c6: 83 c4 10 add $0x10,%esp 10c4c9: 81 fb 1c 97 12 00 cmp $0x12971c,%ebx 10c4cf: 75 e7 jne 10c4b8 <_API_extensions_Run_postswitch+0x18> #if defined(RTEMS_ITRON_API) if ( the_extension->postswitch_hook ) #endif (*the_extension->postswitch_hook)( _Thread_Executing ); } } 10c4d1: 8b 5d fc mov -0x4(%ebp),%ebx 10c4d4: c9 leave 10c4d5: c3 ret =============================================================================== 0010e760 <_CORE_RWLock_Obtain_for_reading>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e760: 55 push %ebp 10e761: 89 e5 mov %esp,%ebp 10e763: 57 push %edi 10e764: 56 push %esi 10e765: 53 push %ebx 10e766: 83 ec 1c sub $0x1c,%esp 10e769: 8b 5d 08 mov 0x8(%ebp),%ebx 10e76c: 8b 7d 0c mov 0xc(%ebp),%edi 10e76f: 8b 4d 14 mov 0x14(%ebp),%ecx 10e772: 8a 55 10 mov 0x10(%ebp),%dl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e775: 8b 35 b8 c1 12 00 mov 0x12c1b8,%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 ); 10e77b: 9c pushf 10e77c: fa cli 10e77d: 8f 45 e4 popl -0x1c(%ebp) switch ( the_rwlock->current_state ) { 10e780: 8b 43 44 mov 0x44(%ebx),%eax 10e783: 85 c0 test %eax,%eax 10e785: 75 1d jne 10e7a4 <_CORE_RWLock_Obtain_for_reading+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e787: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) the_rwlock->number_of_readers += 1; 10e78e: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e791: ff 75 e4 pushl -0x1c(%ebp) 10e794: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e795: 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 */ } 10e79c: 8d 65 f4 lea -0xc(%ebp),%esp 10e79f: 5b pop %ebx 10e7a0: 5e pop %esi 10e7a1: 5f pop %edi 10e7a2: c9 leave 10e7a3: 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 ) { 10e7a4: 48 dec %eax 10e7a5: 74 51 je 10e7f8 <_CORE_RWLock_Obtain_for_reading+0x98> /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e7a7: 84 d2 test %dl,%dl 10e7a9: 75 15 jne 10e7c0 <_CORE_RWLock_Obtain_for_reading+0x60> _ISR_Enable( level ); 10e7ab: ff 75 e4 pushl -0x1c(%ebp) 10e7ae: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e7af: 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 */ } 10e7b6: 8d 65 f4 lea -0xc(%ebp),%esp 10e7b9: 5b pop %ebx 10e7ba: 5e pop %esi 10e7bb: 5f pop %edi 10e7bc: c9 leave 10e7bd: c3 ret 10e7be: 66 90 xchg %ax,%ax 10e7c0: 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; 10e7c7: 89 5e 44 mov %ebx,0x44(%esi) executing->Wait.id = id; 10e7ca: 89 7e 20 mov %edi,0x20(%esi) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ; 10e7cd: c7 46 30 00 00 00 00 movl $0x0,0x30(%esi) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e7d4: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) _ISR_Enable( level ); 10e7db: ff 75 e4 pushl -0x1c(%ebp) 10e7de: 9d popf _Thread_queue_Enqueue_with_handler( 10e7df: c7 45 10 64 e9 10 00 movl $0x10e964,0x10(%ebp) 10e7e6: 89 4d 0c mov %ecx,0xc(%ebp) 10e7e9: 89 5d 08 mov %ebx,0x8(%ebp) timeout, _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e7ec: 8d 65 f4 lea -0xc(%ebp),%esp 10e7ef: 5b pop %ebx 10e7f0: 5e pop %esi 10e7f1: 5f pop %edi 10e7f2: 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( 10e7f3: e9 74 19 00 00 jmp 11016c <_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 ); 10e7f8: 83 ec 0c sub $0xc,%esp 10e7fb: 53 push %ebx 10e7fc: 88 55 e0 mov %dl,-0x20(%ebp) 10e7ff: 89 4d dc mov %ecx,-0x24(%ebp) 10e802: e8 85 1c 00 00 call 11048c <_Thread_queue_First> if ( !waiter ) { 10e807: 83 c4 10 add $0x10,%esp 10e80a: 85 c0 test %eax,%eax 10e80c: 8a 55 e0 mov -0x20(%ebp),%dl 10e80f: 8b 4d dc mov -0x24(%ebp),%ecx 10e812: 75 93 jne 10e7a7 <_CORE_RWLock_Obtain_for_reading+0x47><== NEVER TAKEN the_rwlock->number_of_readers += 1; 10e814: ff 43 48 incl 0x48(%ebx) _ISR_Enable( level ); 10e817: ff 75 e4 pushl -0x1c(%ebp) 10e81a: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e81b: c7 46 34 00 00 00 00 movl $0x0,0x34(%esi) return; 10e822: e9 75 ff ff ff jmp 10e79c <_CORE_RWLock_Obtain_for_reading+0x3c> =============================================================================== 0010e828 <_CORE_RWLock_Obtain_for_writing>: Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 10e828: 55 push %ebp 10e829: 89 e5 mov %esp,%ebp 10e82b: 57 push %edi 10e82c: 56 push %esi 10e82d: 53 push %ebx 10e82e: 83 ec 0c sub $0xc,%esp 10e831: 8b 45 08 mov 0x8(%ebp),%eax 10e834: 8b 7d 0c mov 0xc(%ebp),%edi 10e837: 8b 75 14 mov 0x14(%ebp),%esi 10e83a: 8a 5d 10 mov 0x10(%ebp),%bl ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e83d: 8b 15 b8 c1 12 00 mov 0x12c1b8,%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 ); 10e843: 9c pushf 10e844: fa cli 10e845: 59 pop %ecx switch ( the_rwlock->current_state ) { 10e846: 83 78 44 00 cmpl $0x0,0x44(%eax) 10e84a: 75 18 jne 10e864 <_CORE_RWLock_Obtain_for_writing+0x3c> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 10e84c: c7 40 44 02 00 00 00 movl $0x2,0x44(%eax) _ISR_Enable( level ); 10e853: 51 push %ecx 10e854: 9d popf executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e855: 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 */ } 10e85c: 83 c4 0c add $0xc,%esp 10e85f: 5b pop %ebx 10e860: 5e pop %esi 10e861: 5f pop %edi 10e862: c9 leave 10e863: c3 ret /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 10e864: 84 db test %bl,%bl 10e866: 75 14 jne 10e87c <_CORE_RWLock_Obtain_for_writing+0x54> _ISR_Enable( level ); 10e868: 51 push %ecx 10e869: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e86a: 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 */ } 10e871: 83 c4 0c add $0xc,%esp 10e874: 5b pop %ebx 10e875: 5e pop %esi 10e876: 5f pop %edi 10e877: c9 leave 10e878: c3 ret 10e879: 8d 76 00 lea 0x0(%esi),%esi 10e87c: 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; 10e883: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10e886: 89 7a 20 mov %edi,0x20(%edx) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 10e889: c7 42 30 01 00 00 00 movl $0x1,0x30(%edx) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e890: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Enable( level ); 10e897: 51 push %ecx 10e898: 9d popf _Thread_queue_Enqueue_with_handler( 10e899: c7 45 10 64 e9 10 00 movl $0x10e964,0x10(%ebp) 10e8a0: 89 75 0c mov %esi,0xc(%ebp) 10e8a3: 89 45 08 mov %eax,0x8(%ebp) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 10e8a6: 83 c4 0c add $0xc,%esp 10e8a9: 5b pop %ebx 10e8aa: 5e pop %esi 10e8ab: 5f pop %edi 10e8ac: 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( 10e8ad: e9 ba 18 00 00 jmp 11016c <_Thread_queue_Enqueue_with_handler> =============================================================================== 0010e8b4 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 10e8b4: 55 push %ebp 10e8b5: 89 e5 mov %esp,%ebp 10e8b7: 53 push %ebx 10e8b8: 83 ec 04 sub $0x4,%esp 10e8bb: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; Thread_Control *executing = _Thread_Executing; 10e8be: 8b 0d b8 c1 12 00 mov 0x12c1b8,%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 ); 10e8c4: 9c pushf 10e8c5: fa cli 10e8c6: 5a pop %edx if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 10e8c7: 8b 43 44 mov 0x44(%ebx),%eax 10e8ca: 85 c0 test %eax,%eax 10e8cc: 74 7a je 10e948 <_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 ) { 10e8ce: 48 dec %eax 10e8cf: 74 63 je 10e934 <_CORE_RWLock_Release+0x80> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 10e8d1: 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; 10e8d8: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) _ISR_Enable( level ); 10e8df: 52 push %edx 10e8e0: 9d popf next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 10e8e1: 83 ec 0c sub $0xc,%esp 10e8e4: 53 push %ebx 10e8e5: e8 66 17 00 00 call 110050 <_Thread_queue_Dequeue> if ( next ) { 10e8ea: 83 c4 10 add $0x10,%esp 10e8ed: 85 c0 test %eax,%eax 10e8ef: 74 39 je 10e92a <_CORE_RWLock_Release+0x76> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 10e8f1: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e8f5: 74 61 je 10e958 <_CORE_RWLock_Release+0xa4> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 10e8f7: ff 43 48 incl 0x48(%ebx) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 10e8fa: c7 43 44 01 00 00 00 movl $0x1,0x44(%ebx) 10e901: eb 17 jmp 10e91a <_CORE_RWLock_Release+0x66> 10e903: 90 nop * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) 10e904: 83 78 30 01 cmpl $0x1,0x30(%eax) 10e908: 74 20 je 10e92a <_CORE_RWLock_Release+0x76><== NEVER TAKEN return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 10e90a: ff 43 48 incl 0x48(%ebx) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 10e90d: 83 ec 08 sub $0x8,%esp 10e910: 50 push %eax 10e911: 53 push %ebx 10e912: e8 5d 1a 00 00 call 110374 <_Thread_queue_Extract> } 10e917: 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 ); 10e91a: 83 ec 0c sub $0xc,%esp 10e91d: 53 push %ebx 10e91e: e8 69 1b 00 00 call 11048c <_Thread_queue_First> if ( !next || 10e923: 83 c4 10 add $0x10,%esp 10e926: 85 c0 test %eax,%eax 10e928: 75 da jne 10e904 <_CORE_RWLock_Release+0x50> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e92a: 31 c0 xor %eax,%eax 10e92c: 8b 5d fc mov -0x4(%ebp),%ebx 10e92f: c9 leave 10e930: c3 ret 10e931: 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; 10e934: 8b 43 48 mov 0x48(%ebx),%eax 10e937: 48 dec %eax 10e938: 89 43 48 mov %eax,0x48(%ebx) if ( the_rwlock->number_of_readers != 0 ) { 10e93b: 85 c0 test %eax,%eax 10e93d: 74 92 je 10e8d1 <_CORE_RWLock_Release+0x1d> /* must be unlocked again */ _ISR_Enable( level ); 10e93f: 52 push %edx 10e940: 9d popf } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e941: 31 c0 xor %eax,%eax 10e943: 8b 5d fc mov -0x4(%ebp),%ebx 10e946: c9 leave 10e947: c3 ret * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 10e948: 52 push %edx 10e949: 9d popf executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 10e94a: c7 41 34 02 00 00 00 movl $0x2,0x34(%ecx) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 10e951: 31 c0 xor %eax,%eax 10e953: 8b 5d fc mov -0x4(%ebp),%ebx 10e956: c9 leave 10e957: 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; 10e958: c7 43 44 02 00 00 00 movl $0x2,0x44(%ebx) return CORE_RWLOCK_SUCCESSFUL; 10e95f: eb c9 jmp 10e92a <_CORE_RWLock_Release+0x76> =============================================================================== 0010e964 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 10e964: 55 push %ebp 10e965: 89 e5 mov %esp,%ebp 10e967: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e96a: 8d 45 f4 lea -0xc(%ebp),%eax 10e96d: 50 push %eax 10e96e: ff 75 08 pushl 0x8(%ebp) 10e971: e8 e2 12 00 00 call 10fc58 <_Thread_Get> switch ( location ) { 10e976: 83 c4 10 add $0x10,%esp 10e979: 8b 55 f4 mov -0xc(%ebp),%edx 10e97c: 85 d2 test %edx,%edx 10e97e: 75 17 jne 10e997 <_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 ); 10e980: 83 ec 0c sub $0xc,%esp 10e983: 50 push %eax 10e984: e8 d3 1b 00 00 call 11055c <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e989: a1 f8 c0 12 00 mov 0x12c0f8,%eax 10e98e: 48 dec %eax 10e98f: a3 f8 c0 12 00 mov %eax,0x12c0f8 10e994: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e997: c9 leave 10e998: c3 ret =============================================================================== 0011a1bc <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 11a1bc: 55 push %ebp 11a1bd: 89 e5 mov %esp,%ebp 11a1bf: 57 push %edi 11a1c0: 56 push %esi 11a1c1: 53 push %ebx 11a1c2: 83 ec 1c sub $0x1c,%esp 11a1c5: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a1c8: 8b 45 10 mov 0x10(%ebp),%eax 11a1cb: 39 43 4c cmp %eax,0x4c(%ebx) 11a1ce: 72 60 jb 11a230 <_CORE_message_queue_Broadcast+0x74><== NEVER TAKEN * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 11a1d0: 8b 43 48 mov 0x48(%ebx),%eax 11a1d3: 85 c0 test %eax,%eax 11a1d5: 75 45 jne 11a21c <_CORE_message_queue_Broadcast+0x60> * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 11a1d7: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11a1de: eb 18 jmp 11a1f8 <_CORE_message_queue_Broadcast+0x3c> waitp = &the_thread->Wait; number_broadcasted += 1; 11a1e0: ff 45 e4 incl -0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11a1e3: 8b 42 2c mov 0x2c(%edx),%eax 11a1e6: 89 c7 mov %eax,%edi 11a1e8: 8b 75 0c mov 0xc(%ebp),%esi 11a1eb: 8b 4d 10 mov 0x10(%ebp),%ecx 11a1ee: f3 a4 rep movsb %ds:(%esi),%es:(%edi) buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11a1f0: 8b 42 28 mov 0x28(%edx),%eax 11a1f3: 8b 55 10 mov 0x10(%ebp),%edx 11a1f6: 89 10 mov %edx,(%eax) * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 11a1f8: 83 ec 0c sub $0xc,%esp 11a1fb: 53 push %ebx 11a1fc: e8 03 25 00 00 call 11c704 <_Thread_queue_Dequeue> 11a201: 89 c2 mov %eax,%edx /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 11a203: 83 c4 10 add $0x10,%esp 11a206: 85 c0 test %eax,%eax 11a208: 75 d6 jne 11a1e0 <_CORE_message_queue_Broadcast+0x24> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 11a20a: 8b 55 e4 mov -0x1c(%ebp),%edx 11a20d: 8b 45 1c mov 0x1c(%ebp),%eax 11a210: 89 10 mov %edx,(%eax) 11a212: 31 c0 xor %eax,%eax return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a214: 8d 65 f4 lea -0xc(%ebp),%esp 11a217: 5b pop %ebx 11a218: 5e pop %esi 11a219: 5f pop %edi 11a21a: c9 leave 11a21b: c3 ret * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { *count = 0; 11a21c: 8b 55 1c mov 0x1c(%ebp),%edx 11a21f: c7 02 00 00 00 00 movl $0x0,(%edx) 11a225: 31 c0 xor %eax,%eax #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a227: 8d 65 f4 lea -0xc(%ebp),%esp 11a22a: 5b pop %ebx 11a22b: 5e pop %esi 11a22c: 5f pop %edi 11a22d: c9 leave 11a22e: c3 ret 11a22f: 90 nop { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a230: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11a235: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11a238: 5b pop %ebx <== NOT EXECUTED 11a239: 5e pop %esi <== NOT EXECUTED 11a23a: 5f pop %edi <== NOT EXECUTED 11a23b: c9 leave <== NOT EXECUTED 11a23c: c3 ret <== NOT EXECUTED =============================================================================== 00115314 <_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 ) { 115314: 55 push %ebp 115315: 89 e5 mov %esp,%ebp 115317: 57 push %edi 115318: 56 push %esi 115319: 53 push %ebx 11531a: 83 ec 0c sub $0xc,%esp 11531d: 8b 5d 08 mov 0x8(%ebp),%ebx 115320: 8b 75 10 mov 0x10(%ebp),%esi 115323: 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; 115326: 89 73 44 mov %esi,0x44(%ebx) the_message_queue->number_of_pending_messages = 0; 115329: c7 43 48 00 00 00 00 movl $0x0,0x48(%ebx) the_message_queue->maximum_message_size = maximum_message_size; 115330: 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; 115333: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) the_message_queue->notify_argument = the_argument; 11533a: 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)) { 115341: a8 03 test $0x3,%al 115343: 75 1b jne 115360 <_CORE_message_queue_Initialize+0x4c> 115345: 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)); 115347: 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 * 11534a: 89 f8 mov %edi,%eax 11534c: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 11534f: 39 d0 cmp %edx,%eax 115351: 73 25 jae 115378 <_CORE_message_queue_Initialize+0x64><== ALWAYS TAKEN THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 115353: 31 c0 xor %eax,%eax } 115355: 8d 65 f4 lea -0xc(%ebp),%esp 115358: 5b pop %ebx 115359: 5e pop %esi 11535a: 5f pop %edi 11535b: c9 leave 11535c: c3 ret 11535d: 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)) { allocated_message_size += sizeof(uint32_t); 115360: 8d 50 04 lea 0x4(%eax),%edx allocated_message_size &= ~(sizeof(uint32_t) - 1); 115363: 83 e2 fc and $0xfffffffc,%edx } if (allocated_message_size < maximum_message_size) 115366: 39 d0 cmp %edx,%eax 115368: 77 e9 ja 115353 <_CORE_message_queue_Initialize+0x3f><== NEVER TAKEN /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 11536a: 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 * 11536d: 89 f8 mov %edi,%eax 11536f: 0f af c6 imul %esi,%eax (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 115372: 39 d0 cmp %edx,%eax 115374: 72 dd jb 115353 <_CORE_message_queue_Initialize+0x3f><== NEVER TAKEN 115376: 66 90 xchg %ax,%ax return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 115378: 83 ec 0c sub $0xc,%esp 11537b: 50 push %eax 11537c: e8 27 2a 00 00 call 117da8 <_Workspace_Allocate> 115381: 89 43 5c mov %eax,0x5c(%ebx) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 115384: 83 c4 10 add $0x10,%esp 115387: 85 c0 test %eax,%eax 115389: 74 c8 je 115353 <_CORE_message_queue_Initialize+0x3f> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 11538b: 57 push %edi 11538c: 56 push %esi 11538d: 50 push %eax 11538e: 8d 43 68 lea 0x68(%ebx),%eax 115391: 50 push %eax 115392: e8 71 5b 00 00 call 11af08 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 115397: 8d 43 54 lea 0x54(%ebx),%eax 11539a: 89 43 50 mov %eax,0x50(%ebx) the_chain->permanent_null = NULL; 11539d: c7 43 54 00 00 00 00 movl $0x0,0x54(%ebx) the_chain->last = _Chain_Head(the_chain); 1153a4: 8d 43 50 lea 0x50(%ebx),%eax 1153a7: 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( 1153aa: 6a 06 push $0x6 1153ac: 68 80 00 00 00 push $0x80 1153b1: 8b 45 0c mov 0xc(%ebp),%eax 1153b4: 83 38 01 cmpl $0x1,(%eax) 1153b7: 0f 94 c0 sete %al 1153ba: 0f b6 c0 movzbl %al,%eax 1153bd: 50 push %eax 1153be: 53 push %ebx 1153bf: e8 cc 1f 00 00 call 117390 <_Thread_queue_Initialize> 1153c4: b0 01 mov $0x1,%al THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 1153c6: 83 c4 20 add $0x20,%esp } 1153c9: 8d 65 f4 lea -0xc(%ebp),%esp 1153cc: 5b pop %ebx 1153cd: 5e pop %esi 1153ce: 5f pop %edi 1153cf: c9 leave 1153d0: c3 ret =============================================================================== 0011208c <_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 ) { 11208c: 55 push %ebp 11208d: 89 e5 mov %esp,%ebp 11208f: 56 push %esi 112090: 53 push %ebx 112091: 8b 45 08 mov 0x8(%ebp),%eax 112094: 8b 55 0c mov 0xc(%ebp),%edx 112097: 8b 4d 10 mov 0x10(%ebp),%ecx 11209a: 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 ) { 11209d: 81 f9 ff ff ff 7f cmp $0x7fffffff,%ecx 1120a3: 74 53 je 1120f8 <_CORE_message_queue_Insert_message+0x6c> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 1120a5: 81 f9 00 00 00 80 cmp $0x80000000,%ecx 1120ab: 74 6f je 11211c <_CORE_message_queue_Insert_message+0x90> Chain_Control *the_header; int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 1120ad: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1120b0: 8d 70 54 lea 0x54(%eax),%esi while ( !_Chain_Is_tail( the_header, the_node ) ) { 1120b3: 39 f3 cmp %esi,%ebx 1120b5: 74 05 je 1120bc <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 1120b7: 3b 4b 08 cmp 0x8(%ebx),%ecx 1120ba: 7d 2c jge 1120e8 <_CORE_message_queue_Insert_message+0x5c> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 1120bc: 9c pushf 1120bd: fa cli 1120be: 5e pop %esi SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1120bf: ff 40 48 incl 0x48(%eax) _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 1120c2: 8b 4b 04 mov 0x4(%ebx),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1120c5: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 1120c8: 8b 19 mov (%ecx),%ebx after_node->next = the_node; 1120ca: 89 11 mov %edx,(%ecx) the_node->next = before_node; 1120cc: 89 1a mov %ebx,(%edx) before_node->previous = the_node; 1120ce: 89 53 04 mov %edx,0x4(%ebx) _ISR_Enable( level ); 1120d1: 56 push %esi 1120d2: 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 ) 1120d3: 8b 50 60 mov 0x60(%eax),%edx 1120d6: 85 d2 test %edx,%edx 1120d8: 74 3d je 112117 <_CORE_message_queue_Insert_message+0x8b> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 1120da: 8b 40 64 mov 0x64(%eax),%eax 1120dd: 89 45 08 mov %eax,0x8(%ebp) #endif } 1120e0: 5b pop %ebx 1120e1: 5e pop %esi 1120e2: 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); 1120e3: ff e2 jmp *%edx 1120e5: 8d 76 00 lea 0x0(%esi),%esi 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; 1120e8: 8b 1b mov (%ebx),%ebx int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 1120ea: 39 f3 cmp %esi,%ebx 1120ec: 74 ce je 1120bc <_CORE_message_queue_Insert_message+0x30> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 1120ee: 3b 4b 08 cmp 0x8(%ebx),%ecx 1120f1: 7c c9 jl 1120bc <_CORE_message_queue_Insert_message+0x30> 1120f3: eb f3 jmp 1120e8 <_CORE_message_queue_Insert_message+0x5c> 1120f5: 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 ); 1120f8: 9c pushf 1120f9: fa cli 1120fa: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 1120fb: ff 40 48 incl 0x48(%eax) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1120fe: 8d 48 54 lea 0x54(%eax),%ecx 112101: 89 0a mov %ecx,(%edx) old_last_node = the_chain->last; 112103: 8b 48 58 mov 0x58(%eax),%ecx the_chain->last = the_node; 112106: 89 50 58 mov %edx,0x58(%eax) old_last_node->next = the_node; 112109: 89 11 mov %edx,(%ecx) the_node->previous = old_last_node; 11210b: 89 4a 04 mov %ecx,0x4(%edx) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 11210e: 53 push %ebx 11210f: 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 ) 112110: 8b 50 60 mov 0x60(%eax),%edx 112113: 85 d2 test %edx,%edx 112115: 75 c3 jne 1120da <_CORE_message_queue_Insert_message+0x4e><== NEVER TAKEN (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 112117: 5b pop %ebx 112118: 5e pop %esi 112119: c9 leave 11211a: c3 ret 11211b: 90 nop SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 11211c: 9c pushf 11211d: fa cli 11211e: 5b pop %ebx SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 11211f: ff 40 48 incl 0x48(%eax) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 112122: 8d 48 50 lea 0x50(%eax),%ecx Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 112125: 89 4a 04 mov %ecx,0x4(%edx) before_node = after_node->next; 112128: 8b 48 50 mov 0x50(%eax),%ecx after_node->next = the_node; 11212b: 89 50 50 mov %edx,0x50(%eax) the_node->next = before_node; 11212e: 89 0a mov %ecx,(%edx) before_node->previous = the_node; 112130: 89 51 04 mov %edx,0x4(%ecx) _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 112133: 53 push %ebx 112134: 9d popf 112135: eb 9c jmp 1120d3 <_CORE_message_queue_Insert_message+0x47> =============================================================================== 001153d4 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 1153d4: 55 push %ebp 1153d5: 89 e5 mov %esp,%ebp 1153d7: 57 push %edi 1153d8: 56 push %esi 1153d9: 53 push %ebx 1153da: 83 ec 2c sub $0x2c,%esp 1153dd: 8b 55 08 mov 0x8(%ebp),%edx 1153e0: 8b 45 0c mov 0xc(%ebp),%eax 1153e3: 89 45 dc mov %eax,-0x24(%ebp) 1153e6: 8b 4d 10 mov 0x10(%ebp),%ecx 1153e9: 89 4d e0 mov %ecx,-0x20(%ebp) 1153ec: 8b 45 14 mov 0x14(%ebp),%eax 1153ef: 8b 5d 1c mov 0x1c(%ebp),%ebx 1153f2: 89 5d d8 mov %ebx,-0x28(%ebp) 1153f5: 0f b6 7d 18 movzbl 0x18(%ebp),%edi ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 1153f9: 8b 0d d8 2d 13 00 mov 0x132dd8,%ecx executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 1153ff: c7 41 34 00 00 00 00 movl $0x0,0x34(%ecx) _ISR_Disable( level ); 115406: 9c pushf 115407: fa cli 115408: 8f 45 e4 popl -0x1c(%ebp) */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11540b: 8b 5a 50 mov 0x50(%edx),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11540e: 8d 72 54 lea 0x54(%edx),%esi 115411: 39 f3 cmp %esi,%ebx 115413: 74 7b je 115490 <_CORE_message_queue_Seize+0xbc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 115415: 8b 0b mov (%ebx),%ecx the_chain->first = new_first; 115417: 89 4a 50 mov %ecx,0x50(%edx) new_first->previous = _Chain_Head(the_chain); 11541a: 8d 72 50 lea 0x50(%edx),%esi 11541d: 89 71 04 mov %esi,0x4(%ecx) the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 115420: ff 4a 48 decl 0x48(%edx) _ISR_Enable( level ); 115423: ff 75 e4 pushl -0x1c(%ebp) 115426: 9d popf *size_p = the_message->Contents.size; 115427: 8b 4b 0c mov 0xc(%ebx),%ecx 11542a: 89 08 mov %ecx,(%eax) _Thread_Executing->Wait.count = 11542c: 8b 73 08 mov 0x8(%ebx),%esi 11542f: 8b 0d d8 2d 13 00 mov 0x132dd8,%ecx 115435: 89 71 24 mov %esi,0x24(%ecx) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 115438: 8d 4b 10 lea 0x10(%ebx),%ecx 11543b: 89 4d e4 mov %ecx,-0x1c(%ebp) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11543e: 8b 08 mov (%eax),%ecx 115440: 8b 7d e0 mov -0x20(%ebp),%edi 115443: 8b 75 e4 mov -0x1c(%ebp),%esi 115446: 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 ); 115448: 83 ec 0c sub $0xc,%esp 11544b: 52 push %edx 11544c: 89 55 d4 mov %edx,-0x2c(%ebp) 11544f: e8 c0 1b 00 00 call 117014 <_Thread_queue_Dequeue> if ( !the_thread ) { 115454: 83 c4 10 add $0x10,%esp 115457: 85 c0 test %eax,%eax 115459: 8b 55 d4 mov -0x2c(%ebp),%edx 11545c: 0f 84 86 00 00 00 je 1154e8 <_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; 115462: 8b 48 24 mov 0x24(%eax),%ecx 115465: 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; 115468: 8b 48 30 mov 0x30(%eax),%ecx 11546b: 89 4b 0c mov %ecx,0xc(%ebx) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11546e: 8b 70 2c mov 0x2c(%eax),%esi 115471: 8b 7d e4 mov -0x1c(%ebp),%edi 115474: 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( 115476: 8b 43 08 mov 0x8(%ebx),%eax 115479: 89 45 10 mov %eax,0x10(%ebp) 11547c: 89 5d 0c mov %ebx,0xc(%ebp) 11547f: 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 ); } 115482: 8d 65 f4 lea -0xc(%ebp),%esp 115485: 5b pop %ebx 115486: 5e pop %esi 115487: 5f pop %edi 115488: c9 leave the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 115489: e9 a2 5b 00 00 jmp 11b030 <_CORE_message_queue_Insert_message> 11548e: 66 90 xchg %ax,%ax return; } #endif } if ( !wait ) { 115490: 89 fb mov %edi,%ebx 115492: 84 db test %bl,%bl 115494: 75 16 jne 1154ac <_CORE_message_queue_Seize+0xd8> _ISR_Enable( level ); 115496: ff 75 e4 pushl -0x1c(%ebp) 115499: 9d popf executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 11549a: 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 ); } 1154a1: 8d 65 f4 lea -0xc(%ebp),%esp 1154a4: 5b pop %ebx 1154a5: 5e pop %esi 1154a6: 5f pop %edi 1154a7: c9 leave 1154a8: c3 ret 1154a9: 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; 1154ac: 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; 1154b3: 89 51 44 mov %edx,0x44(%ecx) executing->Wait.id = id; 1154b6: 8b 5d dc mov -0x24(%ebp),%ebx 1154b9: 89 59 20 mov %ebx,0x20(%ecx) executing->Wait.return_argument_second.mutable_object = buffer; 1154bc: 8b 5d e0 mov -0x20(%ebp),%ebx 1154bf: 89 59 2c mov %ebx,0x2c(%ecx) executing->Wait.return_argument = size_p; 1154c2: 89 41 28 mov %eax,0x28(%ecx) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 1154c5: ff 75 e4 pushl -0x1c(%ebp) 1154c8: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 1154c9: c7 45 10 40 74 11 00 movl $0x117440,0x10(%ebp) 1154d0: 8b 45 d8 mov -0x28(%ebp),%eax 1154d3: 89 45 0c mov %eax,0xc(%ebp) 1154d6: 89 55 08 mov %edx,0x8(%ebp) } 1154d9: 8d 65 f4 lea -0xc(%ebp),%esp 1154dc: 5b pop %ebx 1154dd: 5e pop %esi 1154de: 5f pop %edi 1154df: 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 ); 1154e0: e9 4b 1c 00 00 jmp 117130 <_Thread_queue_Enqueue_with_handler> 1154e5: 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 ); 1154e8: 89 5d 0c mov %ebx,0xc(%ebp) 1154eb: 83 c2 68 add $0x68,%edx 1154ee: 89 55 08 mov %edx,0x8(%ebp) } 1154f1: 8d 65 f4 lea -0xc(%ebp),%esp 1154f4: 5b pop %ebx 1154f5: 5e pop %esi 1154f6: 5f pop %edi 1154f7: c9 leave 1154f8: e9 97 fd ff ff jmp 115294 <_Chain_Append> =============================================================================== 0010c620 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 10c620: 55 push %ebp 10c621: 89 e5 mov %esp,%ebp 10c623: 57 push %edi 10c624: 56 push %esi 10c625: 53 push %ebx 10c626: 83 ec 1c sub $0x1c,%esp 10c629: 8b 5d 08 mov 0x8(%ebp),%ebx 10c62c: 8b 75 0c mov 0xc(%ebp),%esi 10c62f: 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 ) { 10c632: 8b 45 10 mov 0x10(%ebp),%eax 10c635: 39 43 4c cmp %eax,0x4c(%ebx) 10c638: 72 2e jb 10c668 <_CORE_message_queue_Submit+0x48> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 10c63a: 8b 43 48 mov 0x48(%ebx),%eax 10c63d: 85 c0 test %eax,%eax 10c63f: 74 37 je 10c678 <_CORE_message_queue_Submit+0x58> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < the_message_queue->maximum_pending_messages ) { 10c641: 39 43 44 cmp %eax,0x44(%ebx) 10c644: 0f 87 b6 00 00 00 ja 10c700 <_CORE_message_queue_Submit+0xe0> /* * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 10c64a: 84 c9 test %cl,%cl 10c64c: 0f 84 ea 00 00 00 je 10c73c <_CORE_message_queue_Submit+0x11c> /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 10c652: a1 54 95 12 00 mov 0x129554,%eax 10c657: 85 c0 test %eax,%eax 10c659: 74 5d je 10c6b8 <_CORE_message_queue_Submit+0x98> 10c65b: 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 } 10c660: 8d 65 f4 lea -0xc(%ebp),%esp 10c663: 5b pop %ebx 10c664: 5e pop %esi 10c665: 5f pop %edi 10c666: c9 leave 10c667: c3 ret ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 10c668: 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 } 10c66d: 8d 65 f4 lea -0xc(%ebp),%esp 10c670: 5b pop %ebx 10c671: 5e pop %esi 10c672: 5f pop %edi 10c673: c9 leave 10c674: c3 ret 10c675: 8d 76 00 lea 0x0(%esi),%esi /* * 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 ); 10c678: 83 ec 0c sub $0xc,%esp 10c67b: 53 push %ebx 10c67c: 88 4d e4 mov %cl,-0x1c(%ebp) 10c67f: e8 04 1a 00 00 call 10e088 <_Thread_queue_Dequeue> 10c684: 89 c2 mov %eax,%edx if ( the_thread ) { 10c686: 83 c4 10 add $0x10,%esp 10c689: 85 c0 test %eax,%eax 10c68b: 8a 4d e4 mov -0x1c(%ebp),%cl 10c68e: 0f 84 b8 00 00 00 je 10c74c <_CORE_message_queue_Submit+0x12c> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c694: 8b 40 2c mov 0x2c(%eax),%eax 10c697: 89 c7 mov %eax,%edi 10c699: 8b 4d 10 mov 0x10(%ebp),%ecx 10c69c: 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; 10c69e: 8b 42 28 mov 0x28(%edx),%eax 10c6a1: 8b 4d 10 mov 0x10(%ebp),%ecx 10c6a4: 89 08 mov %ecx,(%eax) the_thread->Wait.count = (uint32_t) submit_type; 10c6a6: 8b 45 1c mov 0x1c(%ebp),%eax 10c6a9: 89 42 24 mov %eax,0x24(%edx) 10c6ac: 31 c0 xor %eax,%eax _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 10c6ae: 8d 65 f4 lea -0xc(%ebp),%esp 10c6b1: 5b pop %ebx 10c6b2: 5e pop %esi 10c6b3: 5f pop %edi 10c6b4: c9 leave 10c6b5: c3 ret 10c6b6: 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; 10c6b8: a1 78 95 12 00 mov 0x129578,%eax ISR_Level level; _ISR_Disable( level ); 10c6bd: 9c pushf 10c6be: fa cli 10c6bf: 59 pop %ecx RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10c6c0: 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; 10c6c7: 89 58 44 mov %ebx,0x44(%eax) executing->Wait.id = id; 10c6ca: 8b 55 14 mov 0x14(%ebp),%edx 10c6cd: 89 50 20 mov %edx,0x20(%eax) executing->Wait.return_argument_second.immutable_object = buffer; 10c6d0: 89 70 2c mov %esi,0x2c(%eax) executing->Wait.option = (uint32_t) size; 10c6d3: 8b 55 10 mov 0x10(%ebp),%edx 10c6d6: 89 50 30 mov %edx,0x30(%eax) executing->Wait.count = submit_type; 10c6d9: 8b 55 1c mov 0x1c(%ebp),%edx 10c6dc: 89 50 24 mov %edx,0x24(%eax) _ISR_Enable( level ); 10c6df: 51 push %ecx 10c6e0: 9d popf _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 10c6e1: 50 push %eax 10c6e2: 68 b4 e4 10 00 push $0x10e4b4 10c6e7: ff 75 24 pushl 0x24(%ebp) 10c6ea: 53 push %ebx 10c6eb: e8 b4 1a 00 00 call 10e1a4 <_Thread_queue_Enqueue_with_handler> 10c6f0: b8 07 00 00 00 mov $0x7,%eax } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 10c6f5: 83 c4 10 add $0x10,%esp #endif } 10c6f8: 8d 65 f4 lea -0xc(%ebp),%esp 10c6fb: 5b pop %ebx 10c6fc: 5e pop %esi 10c6fd: 5f pop %edi 10c6fe: c9 leave 10c6ff: c3 ret RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 10c700: 83 ec 0c sub $0xc,%esp 10c703: 8d 43 68 lea 0x68(%ebx),%eax 10c706: 50 push %eax 10c707: e8 f0 fe ff ff call 10c5fc <_Chain_Get> 10c70c: 89 c2 mov %eax,%edx const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 10c70e: 8d 40 10 lea 0x10(%eax),%eax 10c711: 89 c7 mov %eax,%edi 10c713: 8b 4d 10 mov 0x10(%ebp),%ecx 10c716: f3 a4 rep movsb %ds:(%esi),%es:(%edi) _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 10c718: 8b 4d 10 mov 0x10(%ebp),%ecx 10c71b: 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; 10c71e: 8b 45 1c mov 0x1c(%ebp),%eax 10c721: 89 42 08 mov %eax,0x8(%edx) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 10c724: 83 c4 0c add $0xc,%esp 10c727: 50 push %eax 10c728: 52 push %edx 10c729: 53 push %ebx 10c72a: e8 5d 59 00 00 call 11208c <_CORE_message_queue_Insert_message> 10c72f: 31 c0 xor %eax,%eax the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 10c731: 83 c4 10 add $0x10,%esp 10c734: e9 34 ff ff ff jmp 10c66d <_CORE_message_queue_Submit+0x4d> 10c739: 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 ) { 10c73c: 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 } 10c741: 8d 65 f4 lea -0xc(%ebp),%esp 10c744: 5b pop %ebx 10c745: 5e pop %esi 10c746: 5f pop %edi 10c747: c9 leave 10c748: c3 ret 10c749: 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 ) { 10c74c: 8b 43 48 mov 0x48(%ebx),%eax 10c74f: e9 ed fe ff ff jmp 10c641 <_CORE_message_queue_Submit+0x21> =============================================================================== 0010c760 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 10c760: 55 push %ebp 10c761: 89 e5 mov %esp,%ebp 10c763: 57 push %edi 10c764: 56 push %esi 10c765: 53 push %ebx 10c766: 83 ec 0c sub $0xc,%esp 10c769: 8b 45 08 mov 0x8(%ebp),%eax 10c76c: 8b 5d 0c mov 0xc(%ebp),%ebx 10c76f: 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; 10c772: 8d 78 40 lea 0x40(%eax),%edi 10c775: b9 04 00 00 00 mov $0x4,%ecx 10c77a: 89 de mov %ebx,%esi 10c77c: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_mutex->lock = initial_lock; 10c77e: 89 50 50 mov %edx,0x50(%eax) the_mutex->blocked_count = 0; 10c781: c7 40 58 00 00 00 00 movl $0x0,0x58(%eax) if ( initial_lock == CORE_MUTEX_LOCKED ) { 10c788: 85 d2 test %edx,%edx 10c78a: 75 30 jne 10c7bc <_CORE_mutex_Initialize+0x5c> the_mutex->nest_count = 1; 10c78c: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) the_mutex->holder = _Thread_Executing; 10c793: 8b 15 78 95 12 00 mov 0x129578,%edx 10c799: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = _Thread_Executing->Object.id; 10c79c: 8b 4a 08 mov 0x8(%edx),%ecx 10c79f: 89 48 60 mov %ecx,0x60(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10c7a2: 8b 48 48 mov 0x48(%eax),%ecx if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c7a5: 83 f9 02 cmp $0x2,%ecx 10c7a8: 74 05 je 10c7af <_CORE_mutex_Initialize+0x4f> 10c7aa: 83 f9 03 cmp $0x3,%ecx 10c7ad: 75 22 jne 10c7d1 <_CORE_mutex_Initialize+0x71> _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c7af: 8b 4a 14 mov 0x14(%edx),%ecx 10c7b2: 3b 48 4c cmp 0x4c(%eax),%ecx 10c7b5: 72 41 jb 10c7f8 <_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++; 10c7b7: ff 42 1c incl 0x1c(%edx) 10c7ba: eb 15 jmp 10c7d1 <_CORE_mutex_Initialize+0x71> } } else { the_mutex->nest_count = 0; 10c7bc: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) the_mutex->holder = NULL; 10c7c3: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) the_mutex->holder_id = 0; 10c7ca: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) } _Thread_queue_Initialize( 10c7d1: 6a 05 push $0x5 10c7d3: 68 00 04 00 00 push $0x400 10c7d8: 31 d2 xor %edx,%edx 10c7da: 83 7b 08 00 cmpl $0x0,0x8(%ebx) 10c7de: 0f 95 c2 setne %dl 10c7e1: 52 push %edx 10c7e2: 50 push %eax 10c7e3: e8 1c 1c 00 00 call 10e404 <_Thread_queue_Initialize> 10c7e8: 31 c0 xor %eax,%eax THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; 10c7ea: 83 c4 10 add $0x10,%esp } 10c7ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c7f0: 5b pop %ebx 10c7f1: 5e pop %esi 10c7f2: 5f pop %edi 10c7f3: c9 leave 10c7f4: c3 ret 10c7f5: 8d 76 00 lea 0x0(%esi),%esi the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) 10c7f8: b8 06 00 00 00 mov $0x6,%eax STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c7fd: 8d 65 f4 lea -0xc(%ebp),%esp 10c800: 5b pop %ebx 10c801: 5e pop %esi 10c802: 5f pop %edi 10c803: c9 leave 10c804: c3 ret =============================================================================== 0010c858 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 10c858: 55 push %ebp 10c859: 89 e5 mov %esp,%ebp 10c85b: 53 push %ebx 10c85c: 83 ec 14 sub $0x14,%esp 10c85f: 8b 5d 08 mov 0x8(%ebp),%ebx 10c862: 8a 55 10 mov 0x10(%ebp),%dl _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 10c865: a1 b8 94 12 00 mov 0x1294b8,%eax 10c86a: 85 c0 test %eax,%eax 10c86c: 74 04 je 10c872 <_CORE_mutex_Seize+0x1a> 10c86e: 84 d2 test %dl,%dl 10c870: 75 36 jne 10c8a8 <_CORE_mutex_Seize+0x50><== ALWAYS TAKEN 10c872: 83 ec 08 sub $0x8,%esp 10c875: 8d 45 18 lea 0x18(%ebp),%eax 10c878: 50 push %eax 10c879: 53 push %ebx 10c87a: 88 55 f4 mov %dl,-0xc(%ebp) 10c87d: e8 b6 58 00 00 call 112138 <_CORE_mutex_Seize_interrupt_trylock> 10c882: 83 c4 10 add $0x10,%esp 10c885: 85 c0 test %eax,%eax 10c887: 8a 55 f4 mov -0xc(%ebp),%dl 10c88a: 74 14 je 10c8a0 <_CORE_mutex_Seize+0x48> 10c88c: 84 d2 test %dl,%dl 10c88e: 75 30 jne 10c8c0 <_CORE_mutex_Seize+0x68> 10c890: ff 75 18 pushl 0x18(%ebp) 10c893: 9d popf 10c894: a1 78 95 12 00 mov 0x129578,%eax 10c899: c7 40 34 01 00 00 00 movl $0x1,0x34(%eax) } 10c8a0: 8b 5d fc mov -0x4(%ebp),%ebx 10c8a3: c9 leave 10c8a4: c3 ret 10c8a5: 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 ); 10c8a8: 83 3d 80 96 12 00 01 cmpl $0x1,0x129680 10c8af: 76 c1 jbe 10c872 <_CORE_mutex_Seize+0x1a> 10c8b1: 53 push %ebx 10c8b2: 6a 13 push $0x13 10c8b4: 6a 00 push $0x0 10c8b6: 6a 00 push $0x0 10c8b8: e8 f3 05 00 00 call 10ceb0 <_Internal_error_Occurred> 10c8bd: 8d 76 00 lea 0x0(%esi),%esi 10c8c0: c7 43 30 01 00 00 00 movl $0x1,0x30(%ebx) 10c8c7: a1 78 95 12 00 mov 0x129578,%eax 10c8cc: 89 58 44 mov %ebx,0x44(%eax) 10c8cf: 8b 55 0c mov 0xc(%ebp),%edx 10c8d2: 89 50 20 mov %edx,0x20(%eax) 10c8d5: a1 b8 94 12 00 mov 0x1294b8,%eax 10c8da: 40 inc %eax 10c8db: a3 b8 94 12 00 mov %eax,0x1294b8 10c8e0: ff 75 18 pushl 0x18(%ebp) 10c8e3: 9d popf 10c8e4: 83 ec 08 sub $0x8,%esp 10c8e7: ff 75 14 pushl 0x14(%ebp) 10c8ea: 53 push %ebx 10c8eb: e8 18 ff ff ff call 10c808 <_CORE_mutex_Seize_interrupt_blocking> 10c8f0: 83 c4 10 add $0x10,%esp } 10c8f3: 8b 5d fc mov -0x4(%ebp),%ebx 10c8f6: c9 leave 10c8f7: c3 ret =============================================================================== 00112138 <_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 ) { 112138: 55 push %ebp 112139: 89 e5 mov %esp,%ebp 11213b: 56 push %esi 11213c: 53 push %ebx 11213d: 8b 45 08 mov 0x8(%ebp),%eax 112140: 8b 4d 0c mov 0xc(%ebp),%ecx { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 112143: 8b 15 78 95 12 00 mov 0x129578,%edx executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 112149: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 112150: 8b 58 50 mov 0x50(%eax),%ebx 112153: 85 db test %ebx,%ebx 112155: 74 31 je 112188 <_CORE_mutex_Seize_interrupt_trylock+0x50> the_mutex->lock = CORE_MUTEX_LOCKED; 112157: c7 40 50 00 00 00 00 movl $0x0,0x50(%eax) the_mutex->holder = executing; 11215e: 89 50 5c mov %edx,0x5c(%eax) the_mutex->holder_id = executing->Object.id; 112161: 8b 5a 08 mov 0x8(%edx),%ebx 112164: 89 58 60 mov %ebx,0x60(%eax) the_mutex->nest_count = 1; 112167: c7 40 54 01 00 00 00 movl $0x1,0x54(%eax) */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 11216e: 8b 58 48 mov 0x48(%eax),%ebx if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 112171: 83 fb 02 cmp $0x2,%ebx 112174: 74 26 je 11219c <_CORE_mutex_Seize_interrupt_trylock+0x64> 112176: 83 fb 03 cmp $0x3,%ebx 112179: 74 3d je 1121b8 <_CORE_mutex_Seize_interrupt_trylock+0x80> executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p ); 11217b: ff 31 pushl (%ecx) 11217d: 9d popf 11217e: 31 c0 xor %eax,%eax return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 112180: 8d 65 f8 lea -0x8(%ebp),%esp 112183: 5b pop %ebx 112184: 5e pop %esi 112185: c9 leave 112186: c3 ret 112187: 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 ) ) { 112188: 3b 50 5c cmp 0x5c(%eax),%edx 11218b: 74 17 je 1121a4 <_CORE_mutex_Seize_interrupt_trylock+0x6c> the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( *level_p ); 11218d: b8 01 00 00 00 mov $0x1,%eax 112192: 8d 65 f8 lea -0x8(%ebp),%esp 112195: 5b pop %ebx 112196: 5e pop %esi 112197: c9 leave 112198: c3 ret 112199: 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++; 11219c: ff 42 1c incl 0x1c(%edx) 11219f: eb da jmp 11217b <_CORE_mutex_Seize_interrupt_trylock+0x43> 1121a1: 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 ) { 1121a4: 8b 58 40 mov 0x40(%eax),%ebx 1121a7: 85 db test %ebx,%ebx 1121a9: 75 45 jne 1121f0 <_CORE_mutex_Seize_interrupt_trylock+0xb8> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 1121ab: ff 40 54 incl 0x54(%eax) _ISR_Enable( *level_p ); 1121ae: ff 31 pushl (%ecx) 1121b0: 9d popf 1121b1: 31 c0 xor %eax,%eax 1121b3: eb dd jmp 112192 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 1121b5: 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++; 1121b8: 8b 5a 1c mov 0x1c(%edx),%ebx 1121bb: 8d 73 01 lea 0x1(%ebx),%esi 1121be: 89 72 1c mov %esi,0x1c(%edx) { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 1121c1: 8b 72 14 mov 0x14(%edx),%esi if ( current == ceiling ) { 1121c4: 39 70 4c cmp %esi,0x4c(%eax) 1121c7: 74 6b je 112234 <_CORE_mutex_Seize_interrupt_trylock+0xfc> _ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) { 1121c9: 72 39 jb 112204 <_CORE_mutex_Seize_interrupt_trylock+0xcc> ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 1121cb: c7 42 34 06 00 00 00 movl $0x6,0x34(%edx) the_mutex->lock = CORE_MUTEX_UNLOCKED; 1121d2: c7 40 50 01 00 00 00 movl $0x1,0x50(%eax) the_mutex->nest_count = 0; /* undo locking above */ 1121d9: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) executing->resource_count--; /* undo locking above */ 1121e0: 89 5a 1c mov %ebx,0x1c(%edx) _ISR_Enable( *level_p ); 1121e3: ff 31 pushl (%ecx) 1121e5: 9d popf 1121e6: 31 c0 xor %eax,%eax 1121e8: 8d 65 f8 lea -0x8(%ebp),%esp 1121eb: 5b pop %ebx 1121ec: 5e pop %esi 1121ed: c9 leave 1121ee: c3 ret 1121ef: 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 ) { 1121f0: 4b dec %ebx 1121f1: 75 9a jne 11218d <_CORE_mutex_Seize_interrupt_trylock+0x55> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( *level_p ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 1121f3: c7 42 34 02 00 00 00 movl $0x2,0x34(%edx) _ISR_Enable( *level_p ); 1121fa: ff 31 pushl (%ecx) 1121fc: 9d popf 1121fd: 31 c0 xor %eax,%eax 1121ff: eb 91 jmp 112192 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 112201: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 112204: 8b 15 b8 94 12 00 mov 0x1294b8,%edx 11220a: 42 inc %edx 11220b: 89 15 b8 94 12 00 mov %edx,0x1294b8 return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); 112211: ff 31 pushl (%ecx) 112213: 9d popf _Thread_Change_priority( 112214: 52 push %edx 112215: 6a 00 push $0x0 112217: ff 70 4c pushl 0x4c(%eax) 11221a: ff 70 5c pushl 0x5c(%eax) 11221d: e8 62 b5 ff ff call 10d784 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 112222: e8 45 ba ff ff call 10dc6c <_Thread_Enable_dispatch> 112227: 31 c0 xor %eax,%eax 112229: 83 c4 10 add $0x10,%esp 11222c: e9 61 ff ff ff jmp 112192 <_CORE_mutex_Seize_interrupt_trylock+0x5a> 112231: 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 ); 112234: ff 31 pushl (%ecx) 112236: 9d popf 112237: 31 c0 xor %eax,%eax 112239: e9 54 ff ff ff jmp 112192 <_CORE_mutex_Seize_interrupt_trylock+0x5a> =============================================================================== 0010c8f8 <_CORE_mutex_Surrender>: #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { 10c8f8: 55 push %ebp 10c8f9: 89 e5 mov %esp,%ebp 10c8fb: 53 push %ebx 10c8fc: 83 ec 04 sub $0x4,%esp 10c8ff: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 10c902: 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 ) { 10c905: 80 7b 44 00 cmpb $0x0,0x44(%ebx) 10c909: 74 15 je 10c920 <_CORE_mutex_Surrender+0x28> if ( !_Thread_Is_executing( holder ) ) 10c90b: 3b 05 78 95 12 00 cmp 0x129578,%eax 10c911: 74 0d je 10c920 <_CORE_mutex_Surrender+0x28> 10c913: b8 03 00 00 00 mov $0x3,%eax } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c918: 8b 5d fc mov -0x4(%ebp),%ebx 10c91b: c9 leave 10c91c: c3 ret 10c91d: 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 ) 10c920: 8b 53 54 mov 0x54(%ebx),%edx 10c923: 85 d2 test %edx,%edx 10c925: 74 65 je 10c98c <_CORE_mutex_Surrender+0x94> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 10c927: 4a dec %edx 10c928: 89 53 54 mov %edx,0x54(%ebx) if ( the_mutex->nest_count != 0 ) { 10c92b: 85 d2 test %edx,%edx 10c92d: 75 5d jne 10c98c <_CORE_mutex_Surrender+0x94> 10c92f: 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 ) || 10c932: 83 fa 02 cmp $0x2,%edx 10c935: 0f 84 99 00 00 00 je 10c9d4 <_CORE_mutex_Surrender+0xdc> 10c93b: 83 fa 03 cmp $0x3,%edx 10c93e: 0f 84 90 00 00 00 je 10c9d4 <_CORE_mutex_Surrender+0xdc> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 10c944: c7 43 5c 00 00 00 00 movl $0x0,0x5c(%ebx) the_mutex->holder_id = 0; 10c94b: c7 43 60 00 00 00 00 movl $0x0,0x60(%ebx) /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 10c952: 83 fa 02 cmp $0x2,%edx 10c955: 74 5d je 10c9b4 <_CORE_mutex_Surrender+0xbc> 10c957: 83 fa 03 cmp $0x3,%edx 10c95a: 74 58 je 10c9b4 <_CORE_mutex_Surrender+0xbc> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 10c95c: 83 ec 0c sub $0xc,%esp 10c95f: 53 push %ebx 10c960: e8 23 17 00 00 call 10e088 <_Thread_queue_Dequeue> 10c965: 83 c4 10 add $0x10,%esp 10c968: 85 c0 test %eax,%eax 10c96a: 74 7c je 10c9e8 <_CORE_mutex_Surrender+0xf0> } else #endif { the_mutex->holder = the_thread; 10c96c: 89 43 5c mov %eax,0x5c(%ebx) the_mutex->holder_id = the_thread->Object.id; 10c96f: 8b 50 08 mov 0x8(%eax),%edx 10c972: 89 53 60 mov %edx,0x60(%ebx) the_mutex->nest_count = 1; 10c975: c7 43 54 01 00 00 00 movl $0x1,0x54(%ebx) switch ( the_mutex->Attributes.discipline ) { 10c97c: 8b 53 48 mov 0x48(%ebx),%edx 10c97f: 83 fa 02 cmp $0x2,%edx 10c982: 74 58 je 10c9dc <_CORE_mutex_Surrender+0xe4> 10c984: 83 fa 03 cmp $0x3,%edx 10c987: 74 0b je 10c994 <_CORE_mutex_Surrender+0x9c> 10c989: 8d 76 00 lea 0x0(%esi),%esi } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c98c: 31 c0 xor %eax,%eax return CORE_MUTEX_STATUS_SUCCESSFUL; } 10c98e: 8b 5d fc mov -0x4(%ebp),%ebx 10c991: c9 leave 10c992: c3 ret 10c993: 90 nop case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c994: ff 40 1c incl 0x1c(%eax) if (the_mutex->Attributes.priority_ceiling < 10c997: 8b 53 4c mov 0x4c(%ebx),%edx the_thread->current_priority){ 10c99a: 3b 50 14 cmp 0x14(%eax),%edx 10c99d: 73 ed jae 10c98c <_CORE_mutex_Surrender+0x94> _Thread_Change_priority( 10c99f: 51 push %ecx 10c9a0: 6a 00 push $0x0 10c9a2: 52 push %edx 10c9a3: 50 push %eax 10c9a4: e8 db 0d 00 00 call 10d784 <_Thread_Change_priority> 10c9a9: 31 c0 xor %eax,%eax 10c9ab: 83 c4 10 add $0x10,%esp 10c9ae: e9 65 ff ff ff jmp 10c918 <_CORE_mutex_Surrender+0x20> 10c9b3: 90 nop _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,true); #endif if ( holder->resource_count == 0 && 10c9b4: 8b 50 1c mov 0x1c(%eax),%edx 10c9b7: 85 d2 test %edx,%edx 10c9b9: 75 a1 jne 10c95c <_CORE_mutex_Surrender+0x64> holder->real_priority != holder->current_priority ) { 10c9bb: 8b 50 18 mov 0x18(%eax),%edx 10c9be: 3b 50 14 cmp 0x14(%eax),%edx 10c9c1: 74 99 je 10c95c <_CORE_mutex_Surrender+0x64> _Thread_Change_priority( holder, holder->real_priority, true ); 10c9c3: 51 push %ecx 10c9c4: 6a 01 push $0x1 10c9c6: 52 push %edx 10c9c7: 50 push %eax 10c9c8: e8 b7 0d 00 00 call 10d784 <_Thread_Change_priority> 10c9cd: 83 c4 10 add $0x10,%esp 10c9d0: eb 8a jmp 10c95c <_CORE_mutex_Surrender+0x64> 10c9d2: 66 90 xchg %ax,%ax the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 10c9d4: ff 48 1c decl 0x1c(%eax) 10c9d7: e9 68 ff ff ff jmp 10c944 <_CORE_mutex_Surrender+0x4c> case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 10c9dc: ff 40 1c incl 0x1c(%eax) 10c9df: 31 c0 xor %eax,%eax break; 10c9e1: e9 32 ff ff ff jmp 10c918 <_CORE_mutex_Surrender+0x20> 10c9e6: 66 90 xchg %ax,%ax } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 10c9e8: c7 43 50 01 00 00 00 movl $0x1,0x50(%ebx) 10c9ef: 31 c0 xor %eax,%eax 10c9f1: e9 22 ff ff ff jmp 10c918 <_CORE_mutex_Surrender+0x20> =============================================================================== 0011601c <_CORE_semaphore_Seize>: CORE_semaphore_Control *the_semaphore, Objects_Id id, bool wait, Watchdog_Interval timeout ) { 11601c: 55 push %ebp 11601d: 89 e5 mov %esp,%ebp 11601f: 57 push %edi 116020: 56 push %esi 116021: 53 push %ebx 116022: 83 ec 1c sub $0x1c,%esp 116025: 8b 45 08 mov 0x8(%ebp),%eax 116028: 8b 7d 0c mov 0xc(%ebp),%edi 11602b: 8b 75 14 mov 0x14(%ebp),%esi 11602e: 8a 5d 10 mov 0x10(%ebp),%bl Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 116031: 8b 15 f8 f0 12 00 mov 0x12f0f8,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 116037: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) _ISR_Disable( level ); 11603e: 9c pushf 11603f: fa cli 116040: 8f 45 e4 popl -0x1c(%ebp) if ( the_semaphore->count != 0 ) { 116043: 8b 48 48 mov 0x48(%eax),%ecx 116046: 85 c9 test %ecx,%ecx 116048: 75 46 jne 116090 <_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 ) { 11604a: 84 db test %bl,%bl 11604c: 75 16 jne 116064 <_CORE_semaphore_Seize+0x48> _ISR_Enable( level ); 11604e: ff 75 e4 pushl -0x1c(%ebp) 116051: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 116052: 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 ); } 116059: 83 c4 1c add $0x1c,%esp 11605c: 5b pop %ebx 11605d: 5e pop %esi 11605e: 5f pop %edi 11605f: c9 leave 116060: c3 ret 116061: 8d 76 00 lea 0x0(%esi),%esi 116064: 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; 11606b: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 11606e: 89 7a 20 mov %edi,0x20(%edx) _ISR_Enable( level ); 116071: ff 75 e4 pushl -0x1c(%ebp) 116074: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 116075: c7 45 10 bc 1c 11 00 movl $0x111cbc,0x10(%ebp) 11607c: 89 75 0c mov %esi,0xc(%ebp) 11607f: 89 45 08 mov %eax,0x8(%ebp) } 116082: 83 c4 1c add $0x1c,%esp 116085: 5b pop %ebx 116086: 5e pop %esi 116087: 5f pop %edi 116088: 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 ); 116089: e9 1e b9 ff ff jmp 1119ac <_Thread_queue_Enqueue_with_handler> 11608e: 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; 116090: 49 dec %ecx 116091: 89 48 48 mov %ecx,0x48(%eax) _ISR_Enable( level ); 116094: ff 75 e4 pushl -0x1c(%ebp) 116097: 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 ); } 116098: 83 c4 1c add $0x1c,%esp 11609b: 5b pop %ebx 11609c: 5e pop %esi 11609d: 5f pop %edi 11609e: c9 leave 11609f: c3 ret =============================================================================== 0010ca44 <_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 ) { 10ca44: 55 push %ebp 10ca45: 89 e5 mov %esp,%ebp 10ca47: 53 push %ebx 10ca48: 83 ec 10 sub $0x10,%esp 10ca4b: 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)) ) { 10ca4e: 53 push %ebx 10ca4f: e8 34 16 00 00 call 10e088 <_Thread_queue_Dequeue> 10ca54: 83 c4 10 add $0x10,%esp 10ca57: 85 c0 test %eax,%eax 10ca59: 74 09 je 10ca64 <_CORE_semaphore_Surrender+0x20> 10ca5b: 31 c0 xor %eax,%eax status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 10ca5d: 8b 5d fc mov -0x4(%ebp),%ebx 10ca60: c9 leave 10ca61: c3 ret 10ca62: 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 ); 10ca64: 9c pushf 10ca65: fa cli 10ca66: 5a pop %edx if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 10ca67: 8b 43 48 mov 0x48(%ebx),%eax 10ca6a: 3b 43 40 cmp 0x40(%ebx),%eax 10ca6d: 72 0d jb 10ca7c <_CORE_semaphore_Surrender+0x38><== ALWAYS TAKEN 10ca6f: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 10ca74: 52 push %edx 10ca75: 9d popf } return status; } 10ca76: 8b 5d fc mov -0x4(%ebp),%ebx 10ca79: c9 leave 10ca7a: c3 ret 10ca7b: 90 nop #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; 10ca7c: 40 inc %eax 10ca7d: 89 43 48 mov %eax,0x48(%ebx) 10ca80: 31 c0 xor %eax,%eax 10ca82: eb f0 jmp 10ca74 <_CORE_semaphore_Surrender+0x30> =============================================================================== 0010d444 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 10d444: 55 push %ebp 10d445: 89 e5 mov %esp,%ebp 10d447: 56 push %esi 10d448: 53 push %ebx 10d449: 8b 5d 08 mov 0x8(%ebp),%ebx 10d44c: 8a 4d 0c mov 0xc(%ebp),%cl ISR_Level level; #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); 10d44f: 9c pushf 10d450: fa cli 10d451: 58 pop %eax if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 10d452: 8b 53 04 mov 0x4(%ebx),%edx 10d455: 4a dec %edx 10d456: 74 60 je 10d4b8 <_CORE_spinlock_Wait+0x74> (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 10d458: 8b 53 08 mov 0x8(%ebx),%edx 10d45b: 42 inc %edx 10d45c: 89 53 08 mov %edx,0x8(%ebx) for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10d45f: 8b 53 04 mov 0x4(%ebx),%edx 10d462: 85 d2 test %edx,%edx 10d464: 74 22 je 10d488 <_CORE_spinlock_Wait+0x44> } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 10d466: 84 c9 test %cl,%cl 10d468: 74 39 je 10d4a3 <_CORE_spinlock_Wait+0x5f> 10d46a: 66 90 xchg %ax,%ax * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 10d46c: 50 push %eax 10d46d: 9d popf /* An ISR could occur here */ _Thread_Enable_dispatch(); 10d46e: e8 45 12 00 00 call 10e6b8 <_Thread_Enable_dispatch> 10d473: a1 d8 a5 12 00 mov 0x12a5d8,%eax 10d478: 40 inc %eax 10d479: a3 d8 a5 12 00 mov %eax,0x12a5d8 /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 10d47e: 9c pushf 10d47f: fa cli 10d480: 58 pop %eax _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 10d481: 8b 53 04 mov 0x4(%ebx),%edx 10d484: 85 d2 test %edx,%edx 10d486: 75 e4 jne 10d46c <_CORE_spinlock_Wait+0x28> the_spinlock->lock = CORE_SPINLOCK_LOCKED; 10d488: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_spinlock->holder = _Thread_Executing->Object.id; 10d48f: 8b 15 98 a6 12 00 mov 0x12a698,%edx 10d495: 8b 52 08 mov 0x8(%edx),%edx 10d498: 89 53 0c mov %edx,0xc(%ebx) _ISR_Enable( level ); 10d49b: 50 push %eax 10d49c: 9d popf 10d49d: 31 c0 xor %eax,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10d49f: 5b pop %ebx 10d4a0: 5e pop %esi 10d4a1: c9 leave 10d4a2: c3 ret /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 10d4a3: 8b 53 08 mov 0x8(%ebx),%edx 10d4a6: 4a dec %edx 10d4a7: 89 53 08 mov %edx,0x8(%ebx) _ISR_Enable( level ); 10d4aa: 50 push %eax 10d4ab: 9d popf 10d4ac: b8 05 00 00 00 mov $0x5,%eax _Thread_Disable_dispatch(); _ISR_Disable( level ); } } 10d4b1: 5b pop %ebx 10d4b2: 5e pop %esi 10d4b3: c9 leave 10d4b4: c3 ret 10d4b5: 8d 76 00 lea 0x0(%esi),%esi Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; #endif _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { 10d4b8: 8b 73 0c mov 0xc(%ebx),%esi 10d4bb: 8b 15 98 a6 12 00 mov 0x12a698,%edx 10d4c1: 3b 72 08 cmp 0x8(%edx),%esi 10d4c4: 75 92 jne 10d458 <_CORE_spinlock_Wait+0x14> _ISR_Enable( level ); 10d4c6: 50 push %eax 10d4c7: 9d popf 10d4c8: b8 01 00 00 00 mov $0x1,%eax return CORE_SPINLOCK_HOLDER_RELOCKING; 10d4cd: eb d0 jmp 10d49f <_CORE_spinlock_Wait+0x5b> =============================================================================== 00111f64 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 111f64: 55 push %ebp 111f65: 89 e5 mov %esp,%ebp 111f67: 57 push %edi 111f68: 56 push %esi 111f69: 53 push %ebx 111f6a: 8b 7d 08 mov 0x8(%ebp),%edi 111f6d: 8b 4d 10 mov 0x10(%ebp),%ecx 111f70: 8b 75 14 mov 0x14(%ebp),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 111f73: 89 fa mov %edi,%edx Chain_Node *current; Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; 111f75: c7 47 04 00 00 00 00 movl $0x0,0x4(%edi) next = starting_address; while ( count-- ) { 111f7c: 85 c9 test %ecx,%ecx 111f7e: 74 17 je 111f97 <_Chain_Initialize+0x33><== NEVER TAKEN Chain_Node *next; count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; 111f80: 8b 45 0c mov 0xc(%ebp),%eax 111f83: eb 05 jmp 111f8a <_Chain_Initialize+0x26> 111f85: 8d 76 00 lea 0x0(%esi),%esi while ( count-- ) { 111f88: 89 d8 mov %ebx,%eax current->next = next; 111f8a: 89 02 mov %eax,(%edx) next->previous = current; 111f8c: 89 50 04 mov %edx,0x4(%eax) 111f8f: 8d 1c 30 lea (%eax,%esi,1),%ebx current = next; next = (Chain_Node *) 111f92: 89 c2 mov %eax,%edx count = number_nodes; current = _Chain_Head( the_chain ); the_chain->permanent_null = NULL; next = starting_address; while ( count-- ) { 111f94: 49 dec %ecx 111f95: 75 f1 jne 111f88 <_Chain_Initialize+0x24> next->previous = current; current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = _Chain_Tail( the_chain ); 111f97: 8d 47 04 lea 0x4(%edi),%eax 111f9a: 89 02 mov %eax,(%edx) the_chain->last = current; 111f9c: 89 57 08 mov %edx,0x8(%edi) } 111f9f: 5b pop %ebx 111fa0: 5e pop %esi 111fa1: 5f pop %edi 111fa2: c9 leave 111fa3: c3 ret =============================================================================== 0010b66c <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 10b66c: 55 push %ebp 10b66d: 89 e5 mov %esp,%ebp 10b66f: 57 push %edi 10b670: 56 push %esi 10b671: 53 push %ebx 10b672: 83 ec 2c sub $0x2c,%esp 10b675: 8b 45 08 mov 0x8(%ebp),%eax 10b678: 8b 4d 0c mov 0xc(%ebp),%ecx 10b67b: 8b 55 10 mov 0x10(%ebp),%edx 10b67e: 89 55 dc mov %edx,-0x24(%ebp) 10b681: 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; 10b684: 8b 1d 78 95 12 00 mov 0x129578,%ebx executing->Wait.return_code = RTEMS_SUCCESSFUL; 10b68a: c7 43 34 00 00 00 00 movl $0x0,0x34(%ebx) api = executing->API_Extensions[ THREAD_API_RTEMS ]; 10b691: 8b b3 f4 00 00 00 mov 0xf4(%ebx),%esi _ISR_Disable( level ); 10b697: 9c pushf 10b698: fa cli 10b699: 8f 45 e0 popl -0x20(%ebp) pending_events = api->pending_events; 10b69c: 8b 16 mov (%esi),%edx 10b69e: 89 55 d4 mov %edx,-0x2c(%ebp) seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 10b6a1: 21 c2 and %eax,%edx 10b6a3: 89 55 e4 mov %edx,-0x1c(%ebp) 10b6a6: 74 0d je 10b6b5 <_Event_Seize+0x49> 10b6a8: 39 d0 cmp %edx,%eax 10b6aa: 0f 84 84 00 00 00 je 10b734 <_Event_Seize+0xc8> 10b6b0: f6 c1 02 test $0x2,%cl 10b6b3: 75 7f jne 10b734 <_Event_Seize+0xc8> <== ALWAYS TAKEN _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 10b6b5: f6 c1 01 test $0x1,%cl 10b6b8: 75 62 jne 10b71c <_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; 10b6ba: 89 4b 30 mov %ecx,0x30(%ebx) executing->Wait.count = (uint32_t) event_in; 10b6bd: 89 43 24 mov %eax,0x24(%ebx) executing->Wait.return_argument = event_out; 10b6c0: 89 7b 28 mov %edi,0x28(%ebx) _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10b6c3: c7 05 c0 9e 12 00 01 movl $0x1,0x129ec0 10b6ca: 00 00 00 _ISR_Enable( level ); 10b6cd: ff 75 e0 pushl -0x20(%ebp) 10b6d0: 9d popf if ( ticks ) { 10b6d1: 8b 45 dc mov -0x24(%ebp),%eax 10b6d4: 85 c0 test %eax,%eax 10b6d6: 0f 85 80 00 00 00 jne 10b75c <_Event_Seize+0xf0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 10b6dc: 83 ec 08 sub $0x8,%esp 10b6df: 68 00 01 00 00 push $0x100 10b6e4: 53 push %ebx 10b6e5: e8 6e 2e 00 00 call 10e558 <_Thread_Set_state> _ISR_Disable( level ); 10b6ea: 9c pushf 10b6eb: fa cli 10b6ec: 5a pop %edx sync_state = _Event_Sync_state; 10b6ed: a1 c0 9e 12 00 mov 0x129ec0,%eax _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10b6f2: c7 05 c0 9e 12 00 00 movl $0x0,0x129ec0 10b6f9: 00 00 00 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 10b6fc: 83 c4 10 add $0x10,%esp 10b6ff: 83 f8 01 cmp $0x1,%eax 10b702: 74 4c je 10b750 <_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 ); 10b704: 89 55 10 mov %edx,0x10(%ebp) 10b707: 89 5d 0c mov %ebx,0xc(%ebp) 10b70a: 89 45 08 mov %eax,0x8(%ebp) } 10b70d: 8d 65 f4 lea -0xc(%ebp),%esp 10b710: 5b pop %ebx 10b711: 5e pop %esi 10b712: 5f pop %edi 10b713: 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 ); 10b714: e9 1f 20 00 00 jmp 10d738 <_Thread_blocking_operation_Cancel> 10b719: 8d 76 00 lea 0x0(%esi),%esi *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 10b71c: ff 75 e0 pushl -0x20(%ebp) 10b71f: 9d popf executing->Wait.return_code = RTEMS_UNSATISFIED; 10b720: c7 43 34 0d 00 00 00 movl $0xd,0x34(%ebx) *event_out = seized_events; 10b727: 8b 55 e4 mov -0x1c(%ebp),%edx 10b72a: 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 ); } 10b72c: 8d 65 f4 lea -0xc(%ebp),%esp 10b72f: 5b pop %ebx 10b730: 5e pop %esi 10b731: 5f pop %edi 10b732: c9 leave 10b733: c3 ret pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 10b734: 8b 45 e4 mov -0x1c(%ebp),%eax 10b737: f7 d0 not %eax 10b739: 23 45 d4 and -0x2c(%ebp),%eax 10b73c: 89 06 mov %eax,(%esi) _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 10b73e: ff 75 e0 pushl -0x20(%ebp) 10b741: 9d popf *event_out = seized_events; 10b742: 8b 45 e4 mov -0x1c(%ebp),%eax 10b745: 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 ); } 10b747: 8d 65 f4 lea -0xc(%ebp),%esp 10b74a: 5b pop %ebx 10b74b: 5e pop %esi 10b74c: 5f pop %edi 10b74d: c9 leave 10b74e: c3 ret 10b74f: 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 ); 10b750: 52 push %edx 10b751: 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 ); } 10b752: 8d 65 f4 lea -0xc(%ebp),%esp 10b755: 5b pop %ebx 10b756: 5e pop %esi 10b757: 5f pop %edi 10b758: c9 leave 10b759: c3 ret 10b75a: 66 90 xchg %ax,%ax _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 10b75c: 8b 43 08 mov 0x8(%ebx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10b75f: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10b766: c7 43 64 10 b9 10 00 movl $0x10b910,0x64(%ebx) the_watchdog->id = id; 10b76d: 89 43 68 mov %eax,0x68(%ebx) the_watchdog->user_data = user_data; 10b770: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10b777: 8b 45 dc mov -0x24(%ebp),%eax 10b77a: 89 43 54 mov %eax,0x54(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10b77d: 83 ec 08 sub $0x8,%esp 10b780: 8d 43 48 lea 0x48(%ebx),%eax 10b783: 50 push %eax 10b784: 68 98 95 12 00 push $0x129598 10b789: e8 52 34 00 00 call 10ebe0 <_Watchdog_Insert> 10b78e: 83 c4 10 add $0x10,%esp 10b791: e9 46 ff ff ff jmp 10b6dc <_Event_Seize+0x70> =============================================================================== 0010b7ec <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 10b7ec: 55 push %ebp 10b7ed: 89 e5 mov %esp,%ebp 10b7ef: 57 push %edi 10b7f0: 56 push %esi 10b7f1: 53 push %ebx 10b7f2: 83 ec 1c sub $0x1c,%esp 10b7f5: 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 ]; 10b7f8: 8b 8b f4 00 00 00 mov 0xf4(%ebx),%ecx option_set = (rtems_option) the_thread->Wait.option; 10b7fe: 8b 73 30 mov 0x30(%ebx),%esi _ISR_Disable( level ); 10b801: 9c pushf 10b802: fa cli 10b803: 8f 45 e4 popl -0x1c(%ebp) pending_events = api->pending_events; 10b806: 8b 11 mov (%ecx),%edx event_condition = (rtems_event_set) the_thread->Wait.count; 10b808: 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 ) ) { 10b80b: 89 c7 mov %eax,%edi 10b80d: 21 d7 and %edx,%edi 10b80f: 89 7d e0 mov %edi,-0x20(%ebp) 10b812: 74 74 je 10b888 <_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() && 10b814: 8b 3d 54 95 12 00 mov 0x129554,%edi 10b81a: 85 ff test %edi,%edi 10b81c: 74 0c je 10b82a <_Event_Surrender+0x3e> 10b81e: 3b 1d 78 95 12 00 cmp 0x129578,%ebx 10b824: 0f 84 96 00 00 00 je 10b8c0 <_Event_Surrender+0xd4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 10b82a: f6 43 11 01 testb $0x1,0x11(%ebx) 10b82e: 74 4c je 10b87c <_Event_Surrender+0x90> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 10b830: 3b 45 e0 cmp -0x20(%ebp),%eax 10b833: 74 05 je 10b83a <_Event_Surrender+0x4e> 10b835: 83 e6 02 and $0x2,%esi 10b838: 74 42 je 10b87c <_Event_Surrender+0x90> <== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 10b83a: 8b 45 e0 mov -0x20(%ebp),%eax 10b83d: f7 d0 not %eax 10b83f: 21 d0 and %edx,%eax 10b841: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b843: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b84a: 8b 43 28 mov 0x28(%ebx),%eax 10b84d: 8b 7d e0 mov -0x20(%ebp),%edi 10b850: 89 38 mov %edi,(%eax) _ISR_Flash( level ); 10b852: ff 75 e4 pushl -0x1c(%ebp) 10b855: 9d popf 10b856: fa cli if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10b857: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10b85b: 74 37 je 10b894 <_Event_Surrender+0xa8> _ISR_Enable( level ); 10b85d: ff 75 e4 pushl -0x1c(%ebp) 10b860: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10b861: 83 ec 08 sub $0x8,%esp 10b864: 68 f8 ff 03 10 push $0x1003fff8 10b869: 53 push %ebx 10b86a: e8 55 20 00 00 call 10d8c4 <_Thread_Clear_state> 10b86f: 83 c4 10 add $0x10,%esp } return; } } _ISR_Enable( level ); } 10b872: 8d 65 f4 lea -0xc(%ebp),%esp 10b875: 5b pop %ebx 10b876: 5e pop %esi 10b877: 5f pop %edi 10b878: c9 leave 10b879: c3 ret 10b87a: 66 90 xchg %ax,%ax _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 10b87c: ff 75 e4 pushl -0x1c(%ebp) 10b87f: 9d popf } 10b880: 8d 65 f4 lea -0xc(%ebp),%esp 10b883: 5b pop %ebx 10b884: 5e pop %esi 10b885: 5f pop %edi 10b886: c9 leave 10b887: c3 ret /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 10b888: ff 75 e4 pushl -0x1c(%ebp) 10b88b: 9d popf } return; } } _ISR_Enable( level ); } 10b88c: 8d 65 f4 lea -0xc(%ebp),%esp 10b88f: 5b pop %ebx 10b890: 5e pop %esi 10b891: 5f pop %edi 10b892: c9 leave 10b893: c3 ret RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10b894: 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 ); 10b89b: ff 75 e4 pushl -0x1c(%ebp) 10b89e: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10b89f: 83 ec 0c sub $0xc,%esp 10b8a2: 8d 43 48 lea 0x48(%ebx),%eax 10b8a5: 50 push %eax 10b8a6: e8 6d 34 00 00 call 10ed18 <_Watchdog_Remove> 10b8ab: 58 pop %eax 10b8ac: 5a pop %edx 10b8ad: 68 f8 ff 03 10 push $0x1003fff8 10b8b2: 53 push %ebx 10b8b3: e8 0c 20 00 00 call 10d8c4 <_Thread_Clear_state> 10b8b8: 83 c4 10 add $0x10,%esp 10b8bb: eb c3 jmp 10b880 <_Event_Surrender+0x94> 10b8bd: 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) || 10b8c0: 8b 3d c0 9e 12 00 mov 0x129ec0,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b8c6: 83 ff 02 cmp $0x2,%edi 10b8c9: 74 0d je 10b8d8 <_Event_Surrender+0xec> <== NEVER TAKEN _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 10b8cb: 8b 3d c0 9e 12 00 mov 0x129ec0,%edi /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 10b8d1: 4f dec %edi 10b8d2: 0f 85 52 ff ff ff jne 10b82a <_Event_Surrender+0x3e> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 10b8d8: 3b 45 e0 cmp -0x20(%ebp),%eax 10b8db: 74 05 je 10b8e2 <_Event_Surrender+0xf6> 10b8dd: 83 e6 02 and $0x2,%esi 10b8e0: 74 22 je 10b904 <_Event_Surrender+0x118><== NEVER TAKEN api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 10b8e2: 8b 45 e0 mov -0x20(%ebp),%eax 10b8e5: f7 d0 not %eax 10b8e7: 21 d0 and %edx,%eax 10b8e9: 89 01 mov %eax,(%ecx) the_thread->Wait.count = 0; 10b8eb: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 10b8f2: 8b 43 28 mov 0x28(%ebx),%eax 10b8f5: 8b 55 e0 mov -0x20(%ebp),%edx 10b8f8: 89 10 mov %edx,(%eax) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 10b8fa: c7 05 c0 9e 12 00 03 movl $0x3,0x129ec0 10b901: 00 00 00 } _ISR_Enable( level ); 10b904: ff 75 e4 pushl -0x1c(%ebp) 10b907: 9d popf return; 10b908: e9 73 ff ff ff jmp 10b880 <_Event_Surrender+0x94> =============================================================================== 0010b910 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 10b910: 55 push %ebp 10b911: 89 e5 mov %esp,%ebp 10b913: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 10b916: 8d 45 f4 lea -0xc(%ebp),%eax 10b919: 50 push %eax 10b91a: ff 75 08 pushl 0x8(%ebp) 10b91d: e8 6e 23 00 00 call 10dc90 <_Thread_Get> switch ( location ) { 10b922: 83 c4 10 add $0x10,%esp 10b925: 8b 55 f4 mov -0xc(%ebp),%edx 10b928: 85 d2 test %edx,%edx 10b92a: 75 37 jne 10b963 <_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 ); 10b92c: 9c pushf 10b92d: fa cli 10b92e: 5a pop %edx _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 10b92f: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) if ( _Thread_Is_executing( the_thread ) ) { 10b936: 3b 05 78 95 12 00 cmp 0x129578,%eax 10b93c: 74 2a je 10b968 <_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; 10b93e: c7 40 34 06 00 00 00 movl $0x6,0x34(%eax) _ISR_Enable( level ); 10b945: 52 push %edx 10b946: 9d popf 10b947: 83 ec 08 sub $0x8,%esp 10b94a: 68 f8 ff 03 10 push $0x1003fff8 10b94f: 50 push %eax 10b950: e8 6f 1f 00 00 call 10d8c4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10b955: a1 b8 94 12 00 mov 0x1294b8,%eax 10b95a: 48 dec %eax 10b95b: a3 b8 94 12 00 mov %eax,0x1294b8 10b960: 83 c4 10 add $0x10,%esp case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10b963: c9 leave 10b964: c3 ret 10b965: 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 ) 10b968: 8b 0d c0 9e 12 00 mov 0x129ec0,%ecx 10b96e: 49 dec %ecx 10b96f: 75 cd jne 10b93e <_Event_Timeout+0x2e> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 10b971: c7 05 c0 9e 12 00 02 movl $0x2,0x129ec0 10b978: 00 00 00 10b97b: eb c1 jmp 10b93e <_Event_Timeout+0x2e> =============================================================================== 00112298 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 112298: 55 push %ebp 112299: 89 e5 mov %esp,%ebp 11229b: 57 push %edi 11229c: 56 push %esi 11229d: 53 push %ebx 11229e: 83 ec 2c sub $0x2c,%esp 1122a1: 8b 7d 0c mov 0xc(%ebp),%edi return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 1122a4: 8b 45 08 mov 0x8(%ebp),%eax 1122a7: 8b 48 08 mov 0x8(%eax),%ecx Heap_Statistics *const stats = &heap->stats; Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *block = _Heap_Free_list_first( heap ); uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_BLOCK_SIZE_OFFSET; uintptr_t const page_size = heap->page_size; 1122aa: 8b 50 10 mov 0x10(%eax),%edx 1122ad: 89 55 d4 mov %edx,-0x2c(%ebp) uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) { 1122b0: 89 f8 mov %edi,%eax 1122b2: 83 c0 04 add $0x4,%eax 1122b5: 89 45 e0 mov %eax,-0x20(%ebp) 1122b8: 0f 82 5a 01 00 00 jb 112418 <_Heap_Allocate_aligned_with_boundary+0x180> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 1122be: 8b 75 14 mov 0x14(%ebp),%esi 1122c1: 85 f6 test %esi,%esi 1122c3: 0f 85 48 01 00 00 jne 112411 <_Heap_Allocate_aligned_with_boundary+0x179> if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1122c9: 39 4d 08 cmp %ecx,0x8(%ebp) 1122cc: 0f 84 50 01 00 00 je 112422 <_Heap_Allocate_aligned_with_boundary+0x18a> 1122d2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 1122d9: 8b 55 d4 mov -0x2c(%ebp),%edx 1122dc: 83 c2 07 add $0x7,%edx 1122df: 89 55 c8 mov %edx,-0x38(%ebp) uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 1122e2: c7 45 d8 04 00 00 00 movl $0x4,-0x28(%ebp) 1122e9: 29 7d d8 sub %edi,-0x28(%ebp) 1122ec: eb 19 jmp 112307 <_Heap_Allocate_aligned_with_boundary+0x6f> 1122ee: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 1122f0: 8d 59 08 lea 0x8(%ecx),%ebx boundary ); } } if ( alloc_begin != 0 ) { 1122f3: 85 db test %ebx,%ebx 1122f5: 0f 85 e9 00 00 00 jne 1123e4 <_Heap_Allocate_aligned_with_boundary+0x14c><== ALWAYS TAKEN break; } block = block->next; 1122fb: 8b 49 08 mov 0x8(%ecx),%ecx if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 1122fe: 39 4d 08 cmp %ecx,0x8(%ebp) 112301: 0f 84 25 01 00 00 je 11242c <_Heap_Allocate_aligned_with_boundary+0x194> _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count; 112307: ff 45 e4 incl -0x1c(%ebp) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 11230a: 8b 59 04 mov 0x4(%ecx),%ebx 11230d: 39 5d e0 cmp %ebx,-0x20(%ebp) 112310: 73 e9 jae 1122fb <_Heap_Allocate_aligned_with_boundary+0x63> if ( alignment == 0 ) { 112312: 8b 55 10 mov 0x10(%ebp),%edx 112315: 85 d2 test %edx,%edx 112317: 74 d7 je 1122f0 <_Heap_Allocate_aligned_with_boundary+0x58> uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 112319: 8b 45 08 mov 0x8(%ebp),%eax 11231c: 8b 40 14 mov 0x14(%eax),%eax 11231f: 89 45 d0 mov %eax,-0x30(%ebp) uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 112322: 83 e3 fe and $0xfffffffe,%ebx 112325: 8d 1c 19 lea (%ecx,%ebx,1),%ebx 112328: 8d 51 08 lea 0x8(%ecx),%edx 11232b: 89 55 cc mov %edx,-0x34(%ebp) uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 11232e: 8b 75 c8 mov -0x38(%ebp),%esi 112331: 29 c6 sub %eax,%esi 112333: 01 de add %ebx,%esi uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size; 112335: 03 5d d8 add -0x28(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 112338: 89 d8 mov %ebx,%eax 11233a: 31 d2 xor %edx,%edx 11233c: f7 75 10 divl 0x10(%ebp) 11233f: 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 ) { 112341: 39 de cmp %ebx,%esi 112343: 73 0b jae 112350 <_Heap_Allocate_aligned_with_boundary+0xb8> 112345: 89 f0 mov %esi,%eax 112347: 31 d2 xor %edx,%edx 112349: f7 75 10 divl 0x10(%ebp) 11234c: 89 f3 mov %esi,%ebx 11234e: 29 d3 sub %edx,%ebx } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 112350: 8b 45 14 mov 0x14(%ebp),%eax 112353: 85 c0 test %eax,%eax 112355: 74 59 je 1123b0 <_Heap_Allocate_aligned_with_boundary+0x118> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 112357: 8d 34 3b lea (%ebx,%edi,1),%esi 11235a: 89 f0 mov %esi,%eax 11235c: 31 d2 xor %edx,%edx 11235e: f7 75 14 divl 0x14(%ebp) 112361: 89 f0 mov %esi,%eax 112363: 29 d0 sub %edx,%eax 112365: 89 c2 mov %eax,%edx /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 112367: 39 c3 cmp %eax,%ebx 112369: 73 45 jae 1123b0 <_Heap_Allocate_aligned_with_boundary+0x118> 11236b: 39 c6 cmp %eax,%esi 11236d: 76 41 jbe 1123b0 <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 11236f: 8b 45 cc mov -0x34(%ebp),%eax 112372: 01 f8 add %edi,%eax 112374: 89 45 dc mov %eax,-0x24(%ebp) uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 112377: 39 d0 cmp %edx,%eax 112379: 77 80 ja 1122fb <_Heap_Allocate_aligned_with_boundary+0x63> 11237b: 89 ce mov %ecx,%esi 11237d: eb 0e jmp 11238d <_Heap_Allocate_aligned_with_boundary+0xf5> 11237f: 90 nop /* 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 ) { 112380: 39 c1 cmp %eax,%ecx 112382: 76 2a jbe 1123ae <_Heap_Allocate_aligned_with_boundary+0x116> if ( boundary_line < boundary_floor ) { 112384: 39 55 dc cmp %edx,-0x24(%ebp) 112387: 0f 87 a3 00 00 00 ja 112430 <_Heap_Allocate_aligned_with_boundary+0x198><== NEVER TAKEN return 0; } alloc_begin = boundary_line - alloc_size; 11238d: 89 d3 mov %edx,%ebx 11238f: 29 fb sub %edi,%ebx 112391: 89 d8 mov %ebx,%eax 112393: 31 d2 xor %edx,%edx 112395: f7 75 10 divl 0x10(%ebp) 112398: 29 d3 sub %edx,%ebx alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 11239a: 8d 0c 3b lea (%ebx,%edi,1),%ecx 11239d: 89 c8 mov %ecx,%eax 11239f: 31 d2 xor %edx,%edx 1123a1: f7 75 14 divl 0x14(%ebp) 1123a4: 89 c8 mov %ecx,%eax 1123a6: 29 d0 sub %edx,%eax 1123a8: 89 c2 mov %eax,%edx /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 1123aa: 39 c3 cmp %eax,%ebx 1123ac: 72 d2 jb 112380 <_Heap_Allocate_aligned_with_boundary+0xe8> 1123ae: 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 ) { 1123b0: 39 5d cc cmp %ebx,-0x34(%ebp) 1123b3: 0f 87 42 ff ff ff ja 1122fb <_Heap_Allocate_aligned_with_boundary+0x63> uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 1123b9: be f8 ff ff ff mov $0xfffffff8,%esi 1123be: 29 ce sub %ecx,%esi 1123c0: 01 de add %ebx,%esi 1123c2: 89 d8 mov %ebx,%eax 1123c4: 31 d2 xor %edx,%edx 1123c6: f7 75 d4 divl -0x2c(%ebp) 1123c9: 29 d6 sub %edx,%esi if ( free_size >= min_block_size || free_size == 0 ) { 1123cb: 39 75 d0 cmp %esi,-0x30(%ebp) 1123ce: 0f 86 1f ff ff ff jbe 1122f3 <_Heap_Allocate_aligned_with_boundary+0x5b> 1123d4: 85 f6 test %esi,%esi 1123d6: 0f 85 1f ff ff ff jne 1122fb <_Heap_Allocate_aligned_with_boundary+0x63> boundary ); } } if ( alloc_begin != 0 ) { 1123dc: 85 db test %ebx,%ebx 1123de: 0f 84 17 ff ff ff je 1122fb <_Heap_Allocate_aligned_with_boundary+0x63><== NEVER TAKEN block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count; 1123e4: 8b 55 e4 mov -0x1c(%ebp),%edx 1123e7: 8b 45 08 mov 0x8(%ebp),%eax 1123ea: 01 50 4c add %edx,0x4c(%eax) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 1123ed: 57 push %edi 1123ee: 53 push %ebx 1123ef: 51 push %ecx 1123f0: 50 push %eax 1123f1: e8 ca a9 ff ff call 10cdc0 <_Heap_Block_allocate> 1123f6: 89 d8 mov %ebx,%eax 1123f8: 83 c4 10 add $0x10,%esp uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats; 1123fb: 8b 4d e4 mov -0x1c(%ebp),%ecx 1123fe: 8b 55 08 mov 0x8(%ebp),%edx 112401: 39 4a 44 cmp %ecx,0x44(%edx) 112404: 73 14 jae 11241a <_Heap_Allocate_aligned_with_boundary+0x182> ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 112406: 89 4a 44 mov %ecx,0x44(%edx) } return (void *) alloc_begin; } 112409: 8d 65 f4 lea -0xc(%ebp),%esp 11240c: 5b pop %ebx 11240d: 5e pop %esi 11240e: 5f pop %edi 11240f: c9 leave 112410: c3 ret /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 112411: 3b 7d 14 cmp 0x14(%ebp),%edi 112414: 76 21 jbe 112437 <_Heap_Allocate_aligned_with_boundary+0x19f> 112416: 66 90 xchg %ax,%ax ); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count; 112418: 31 c0 xor %eax,%eax } return (void *) alloc_begin; } 11241a: 8d 65 f4 lea -0xc(%ebp),%esp 11241d: 5b pop %ebx 11241e: 5e pop %esi 11241f: 5f pop %edi 112420: c9 leave 112421: c3 ret if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) { 112422: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 112429: 8d 76 00 lea 0x0(%esi),%esi 11242c: 31 c0 xor %eax,%eax 11242e: eb cb jmp 1123fb <_Heap_Allocate_aligned_with_boundary+0x163> 112430: 89 f1 mov %esi,%ecx <== NOT EXECUTED 112432: e9 c4 fe ff ff jmp 1122fb <_Heap_Allocate_aligned_with_boundary+0x63><== NOT EXECUTED if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 112437: 8b 5d 10 mov 0x10(%ebp),%ebx 11243a: 85 db test %ebx,%ebx 11243c: 0f 85 87 fe ff ff jne 1122c9 <_Heap_Allocate_aligned_with_boundary+0x31> 112442: 89 55 10 mov %edx,0x10(%ebp) 112445: e9 7f fe ff ff jmp 1122c9 <_Heap_Allocate_aligned_with_boundary+0x31> =============================================================================== 0010cdc0 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 10cdc0: 55 push %ebp 10cdc1: 89 e5 mov %esp,%ebp 10cdc3: 57 push %edi 10cdc4: 56 push %esi 10cdc5: 53 push %ebx 10cdc6: 83 ec 10 sub $0x10,%esp 10cdc9: 8b 75 08 mov 0x8(%ebp),%esi 10cdcc: 8b 5d 0c mov 0xc(%ebp),%ebx RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 10cdcf: 89 5d ec mov %ebx,-0x14(%ebp) 10cdd2: 8b 7d 10 mov 0x10(%ebp),%edi 10cdd5: 83 ef 08 sub $0x8,%edi Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 10cdd8: 89 f8 mov %edi,%eax 10cdda: 29 d8 sub %ebx,%eax Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 10cddc: 8b 53 04 mov 0x4(%ebx),%edx 10cddf: 83 e2 fe and $0xfffffffe,%edx 10cde2: f6 44 13 04 01 testb $0x1,0x4(%ebx,%edx,1) 10cde7: 0f 85 8b 00 00 00 jne 10ce78 <_Heap_Block_allocate+0xb8> free_list_anchor = block->prev; 10cded: 8b 4b 0c mov 0xc(%ebx),%ecx return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 10cdf0: 8b 53 08 mov 0x8(%ebx),%edx Heap_Block *prev = block->prev; prev->next = next; 10cdf3: 89 51 08 mov %edx,0x8(%ecx) next->prev = prev; 10cdf6: 89 4a 0c mov %ecx,0xc(%edx) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 10cdf9: ff 4e 38 decl 0x38(%esi) ++stats->used_blocks; 10cdfc: ff 46 40 incl 0x40(%esi) stats->free_size -= _Heap_Block_size( block ); 10cdff: 8b 53 04 mov 0x4(%ebx),%edx 10ce02: 83 e2 fe and $0xfffffffe,%edx 10ce05: 29 56 30 sub %edx,0x30(%esi) } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 10ce08: 8b 56 10 mov 0x10(%esi),%edx 10ce0b: 89 55 e4 mov %edx,-0x1c(%ebp) 10ce0e: 39 d0 cmp %edx,%eax 10ce10: 72 72 jb 10ce84 <_Heap_Block_allocate+0xc4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10ce12: 8b 43 04 mov 0x4(%ebx),%eax 10ce15: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 10ce18: 8b 45 10 mov 0x10(%ebp),%eax 10ce1b: 31 d2 xor %edx,%edx 10ce1d: f7 75 e4 divl -0x1c(%ebp) 10ce20: 29 d7 sub %edx,%edi _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 10ce22: 89 f8 mov %edi,%eax 10ce24: 29 d8 sub %ebx,%eax _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 10ce26: 01 46 30 add %eax,0x30(%esi) if ( _Heap_Is_prev_used( block ) ) { 10ce29: f6 43 04 01 testb $0x1,0x4(%ebx) 10ce2d: 75 69 jne 10ce98 <_Heap_Block_allocate+0xd8> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 10ce2f: 2b 1b sub (%ebx),%ebx Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_begin = (uintptr_t) block; block_size += prev_block_size; 10ce31: 8b 53 04 mov 0x4(%ebx),%edx 10ce34: 83 e2 fe and $0xfffffffe,%edx 10ce37: 01 d0 add %edx,%eax } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 10ce39: 89 c2 mov %eax,%edx 10ce3b: 83 ca 01 or $0x1,%edx 10ce3e: 89 53 04 mov %edx,0x4(%ebx) new_block->prev_size = block_size; 10ce41: 89 07 mov %eax,(%edi) new_block->size_and_flag = new_block_size; 10ce43: 8b 45 f0 mov -0x10(%ebp),%eax 10ce46: 83 e0 fe and $0xfffffffe,%eax 10ce49: 03 45 ec add -0x14(%ebp),%eax 10ce4c: 29 f8 sub %edi,%eax 10ce4e: 89 47 04 mov %eax,0x4(%edi) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 10ce51: ff 75 14 pushl 0x14(%ebp) 10ce54: 51 push %ecx 10ce55: 57 push %edi 10ce56: 56 push %esi 10ce57: e8 80 fe ff ff call 10ccdc <_Heap_Block_split> 10ce5c: 89 fb mov %edi,%ebx 10ce5e: 83 c4 10 add $0x10,%esp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 10ce61: 8b 46 30 mov 0x30(%esi),%eax Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; 10ce64: 39 46 34 cmp %eax,0x34(%esi) 10ce67: 76 03 jbe 10ce6c <_Heap_Block_allocate+0xac> ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size; 10ce69: 89 46 34 mov %eax,0x34(%esi) } return block; } 10ce6c: 89 d8 mov %ebx,%eax 10ce6e: 8d 65 f4 lea -0xc(%ebp),%esp 10ce71: 5b pop %ebx 10ce72: 5e pop %esi 10ce73: 5f pop %edi 10ce74: c9 leave 10ce75: c3 ret 10ce76: 66 90 xchg %ax,%ax /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 10ce78: 89 f1 mov %esi,%ecx } if ( alloc_area_offset < heap->page_size ) { 10ce7a: 8b 56 10 mov 0x10(%esi),%edx 10ce7d: 89 55 e4 mov %edx,-0x1c(%ebp) 10ce80: 39 d0 cmp %edx,%eax 10ce82: 73 8e jae 10ce12 <_Heap_Block_allocate+0x52><== NEVER TAKEN Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 10ce84: 03 45 14 add 0x14(%ebp),%eax 10ce87: 50 push %eax 10ce88: 51 push %ecx 10ce89: 53 push %ebx 10ce8a: 56 push %esi 10ce8b: e8 4c fe ff ff call 10ccdc <_Heap_Block_split> 10ce90: 83 c4 10 add $0x10,%esp 10ce93: eb cc jmp 10ce61 <_Heap_Block_allocate+0xa1> 10ce95: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10ce98: 8b 51 08 mov 0x8(%ecx),%edx new_block->next = next; 10ce9b: 89 53 08 mov %edx,0x8(%ebx) new_block->prev = block_before; 10ce9e: 89 4b 0c mov %ecx,0xc(%ebx) block_before->next = new_block; 10cea1: 89 59 08 mov %ebx,0x8(%ecx) next->prev = new_block; 10cea4: 89 5a 0c mov %ebx,0xc(%edx) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 10cea7: ff 46 38 incl 0x38(%esi) 10ceaa: 89 d9 mov %ebx,%ecx 10ceac: eb 8b jmp 10ce39 <_Heap_Block_allocate+0x79> =============================================================================== 0010ccdc <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { 10ccdc: 55 push %ebp 10ccdd: 89 e5 mov %esp,%ebp 10ccdf: 57 push %edi 10cce0: 56 push %esi 10cce1: 53 push %ebx 10cce2: 83 ec 14 sub $0x14,%esp 10cce5: 8b 4d 08 mov 0x8(%ebp),%ecx 10cce8: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; 10cceb: 8b 79 10 mov 0x10(%ecx),%edi uintptr_t const min_block_size = heap->min_block_size; 10ccee: 8b 41 14 mov 0x14(%ecx),%eax 10ccf1: 89 45 e8 mov %eax,-0x18(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10ccf4: 8b 43 04 mov 0x4(%ebx),%eax 10ccf7: 89 45 e4 mov %eax,-0x1c(%ebp) 10ccfa: 89 c6 mov %eax,%esi 10ccfc: 83 e6 fe and $0xfffffffe,%esi uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; 10ccff: 8b 55 e8 mov -0x18(%ebp),%edx 10cd02: 83 ea 08 sub $0x8,%edx 10cd05: 8b 45 14 mov 0x14(%ebp),%eax 10cd08: 39 d0 cmp %edx,%eax 10cd0a: 73 02 jae 10cd0e <_Heap_Block_split+0x32> 10cd0c: 89 d0 mov %edx,%eax 10cd0e: 83 c0 08 add $0x8,%eax 10cd11: 89 45 f0 mov %eax,-0x10(%ebp) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 10cd14: 31 d2 xor %edx,%edx 10cd16: f7 f7 div %edi if ( remainder != 0 ) { 10cd18: 85 d2 test %edx,%edx 10cd1a: 75 70 jne 10cd8c <_Heap_Block_split+0xb0> 10cd1c: 8b 7d f0 mov -0x10(%ebp),%edi 10cd1f: 89 7d ec mov %edi,-0x14(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10cd22: 8d 04 33 lea (%ebx,%esi,1),%eax 10cd25: 89 45 e0 mov %eax,-0x20(%ebp) Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_BLOCK_SIZE_OFFSET ); _HAssert( used_size + free_size == block_size + HEAP_BLOCK_SIZE_OFFSET ); if ( free_size >= free_size_limit ) { 10cd28: 8d 56 04 lea 0x4(%esi),%edx 10cd2b: 2b 55 f0 sub -0x10(%ebp),%edx 10cd2e: 8b 7d e8 mov -0x18(%ebp),%edi 10cd31: 83 c7 04 add $0x4,%edi 10cd34: 39 fa cmp %edi,%edx 10cd36: 72 60 jb 10cd98 <_Heap_Block_split+0xbc> 10cd38: 8b 55 ec mov -0x14(%ebp),%edx 10cd3b: 01 da add %ebx,%edx Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; 10cd3d: 2b 75 ec sub -0x14(%ebp),%esi uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 10cd40: 8b 7d e4 mov -0x1c(%ebp),%edi 10cd43: 83 e7 01 and $0x1,%edi 10cd46: 0b 7d ec or -0x14(%ebp),%edi 10cd49: 89 7b 04 mov %edi,0x4(%ebx) _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; 10cd4c: 01 71 30 add %esi,0x30(%ecx) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10cd4f: 8b 58 04 mov 0x4(%eax),%ebx 10cd52: 83 e3 fe and $0xfffffffe,%ebx if ( _Heap_Is_used( next_block ) ) { 10cd55: f6 44 18 04 01 testb $0x1,0x4(%eax,%ebx,1) 10cd5a: 75 4c jne 10cda8 <_Heap_Block_split+0xcc> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 10cd5c: 8b 48 08 mov 0x8(%eax),%ecx Heap_Block *prev = old_block->prev; 10cd5f: 8b 40 0c mov 0xc(%eax),%eax new_block->next = next; 10cd62: 89 4a 08 mov %ecx,0x8(%edx) new_block->prev = prev; 10cd65: 89 42 0c mov %eax,0xc(%edx) next->prev = new_block; 10cd68: 89 51 0c mov %edx,0xc(%ecx) prev->next = new_block; 10cd6b: 89 50 08 mov %edx,0x8(%eax) } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; 10cd6e: 01 de add %ebx,%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10cd70: 8d 04 16 lea (%esi,%edx,1),%eax next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; 10cd73: 89 f1 mov %esi,%ecx 10cd75: 83 c9 01 or $0x1,%ecx 10cd78: 89 4a 04 mov %ecx,0x4(%edx) next_block->prev_size = free_block_size; 10cd7b: 89 30 mov %esi,(%eax) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 10cd7d: 83 60 04 fe andl $0xfffffffe,0x4(%eax) } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; } } 10cd81: 83 c4 14 add $0x14,%esp 10cd84: 5b pop %ebx 10cd85: 5e pop %esi 10cd86: 5f pop %edi 10cd87: c9 leave 10cd88: c3 ret 10cd89: 8d 76 00 lea 0x0(%esi),%esi ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; 10cd8c: 03 7d f0 add -0x10(%ebp),%edi 10cd8f: 29 d7 sub %edx,%edi 10cd91: 89 7d ec mov %edi,-0x14(%ebp) 10cd94: eb 8c jmp 10cd22 <_Heap_Block_split+0x46> 10cd96: 66 90 xchg %ax,%ax free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 10cd98: 8b 45 e0 mov -0x20(%ebp),%eax 10cd9b: 83 48 04 01 orl $0x1,0x4(%eax) } } 10cd9f: 83 c4 14 add $0x14,%esp 10cda2: 5b pop %ebx 10cda3: 5e pop %esi 10cda4: 5f pop %edi 10cda5: c9 leave 10cda6: c3 ret 10cda7: 90 nop RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 10cda8: 8b 7d 10 mov 0x10(%ebp),%edi 10cdab: 8b 5f 08 mov 0x8(%edi),%ebx new_block->next = next; 10cdae: 89 5a 08 mov %ebx,0x8(%edx) new_block->prev = block_before; 10cdb1: 89 7a 0c mov %edi,0xc(%edx) block_before->next = new_block; 10cdb4: 89 57 08 mov %edx,0x8(%edi) next->prev = new_block; 10cdb7: 89 53 0c mov %edx,0xc(%ebx) if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; 10cdba: ff 41 38 incl 0x38(%ecx) 10cdbd: eb b4 jmp 10cd73 <_Heap_Block_split+0x97> =============================================================================== 00115c00 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) { 115c00: 55 push %ebp 115c01: 89 e5 mov %esp,%ebp 115c03: 56 push %esi 115c04: 53 push %ebx 115c05: 8b 4d 08 mov 0x8(%ebp),%ecx 115c08: 8b 45 0c mov 0xc(%ebp),%eax Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; 115c0b: 8b 51 1c mov 0x1c(%ecx),%edx uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block; 115c0e: 8b 59 24 mov 0x24(%ecx),%ebx uintptr_t *amount_extended ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; 115c11: 3b 41 18 cmp 0x18(%ecx),%eax 115c14: 73 3a jae 115c50 <_Heap_Extend+0x50> * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { return HEAP_EXTEND_ERROR; /* case 3 */ } else if ( area_begin != heap_area_end ) { 115c16: 39 d0 cmp %edx,%eax 115c18: 74 0e je 115c28 <_Heap_Extend+0x28> 115c1a: b8 02 00 00 00 mov $0x2,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 115c1f: 8d 65 f8 lea -0x8(%ebp),%esp 115c22: 5b pop %ebx 115c23: 5e pop %esi 115c24: c9 leave 115c25: c3 ret 115c26: 66 90 xchg %ax,%ax { Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end; uintptr_t const new_heap_area_end = heap_area_end + area_size; 115c28: 03 45 10 add 0x10(%ebp),%eax * Currently only case 4 should make it to this point. * The basic trick is to make the extend area look like a used * block and free it. */ heap->area_end = new_heap_area_end; 115c2b: 89 41 1c mov %eax,0x1c(%ecx) extend_size = new_heap_area_end 115c2e: 29 d8 sub %ebx,%eax 115c30: 8d 70 f8 lea -0x8(%eax),%esi RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 115c33: 89 f0 mov %esi,%eax 115c35: 31 d2 xor %edx,%edx 115c37: f7 71 10 divl 0x10(%ecx) 115c3a: 29 d6 sub %edx,%esi - (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE; extend_size = _Heap_Align_down( extend_size, heap->page_size ); *amount_extended = extend_size; 115c3c: 8b 45 14 mov 0x14(%ebp),%eax 115c3f: 89 30 mov %esi,(%eax) if( extend_size >= heap->min_block_size ) { 115c41: 39 71 14 cmp %esi,0x14(%ecx) 115c44: 76 1a jbe 115c60 <_Heap_Extend+0x60> <== ALWAYS TAKEN 115c46: 31 c0 xor %eax,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 115c48: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 115c4b: 5b pop %ebx <== NOT EXECUTED 115c4c: 5e pop %esi <== NOT EXECUTED 115c4d: c9 leave <== NOT EXECUTED 115c4e: c3 ret <== NOT EXECUTED 115c4f: 90 nop <== NOT EXECUTED * 5. non-contiguous higher address (NOT SUPPORTED) * * As noted, this code only supports (4). */ if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) { 115c50: 39 d0 cmp %edx,%eax 115c52: 73 c2 jae 115c16 <_Heap_Extend+0x16> 115c54: b8 01 00 00 00 mov $0x1,%eax _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; } 115c59: 8d 65 f8 lea -0x8(%ebp),%esp 115c5c: 5b pop %ebx 115c5d: 5e pop %esi 115c5e: c9 leave 115c5f: c3 ret RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 115c60: 8d 14 1e lea (%esi,%ebx,1),%edx uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 115c63: 8b 43 04 mov 0x4(%ebx),%eax 115c66: 83 e0 01 and $0x1,%eax 115c69: 09 f0 or %esi,%eax 115c6b: 89 43 04 mov %eax,0x4(%ebx) if( extend_size >= heap->min_block_size ) { Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size ); _Heap_Block_set_size( last_block, extend_size ); new_last_block->size_and_flag = 115c6e: 8b 41 20 mov 0x20(%ecx),%eax 115c71: 29 d0 sub %edx,%eax 115c73: 83 c8 01 or $0x1,%eax 115c76: 89 42 04 mov %eax,0x4(%edx) ((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; 115c79: 89 51 24 mov %edx,0x24(%ecx) /* Statistics */ stats->size += extend_size; 115c7c: 01 71 2c add %esi,0x2c(%ecx) ++stats->used_blocks; 115c7f: ff 41 40 incl 0x40(%ecx) --stats->frees; /* Do not count subsequent call as actual free() */ 115c82: ff 49 50 decl 0x50(%ecx) _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); 115c85: 83 ec 08 sub $0x8,%esp 115c88: 83 c3 08 add $0x8,%ebx 115c8b: 53 push %ebx 115c8c: 51 push %ecx 115c8d: e8 12 9f ff ff call 10fba4 <_Heap_Free> 115c92: 31 c0 xor %eax,%eax 115c94: 83 c4 10 add $0x10,%esp } return HEAP_EXTEND_SUCCESSFUL; } 115c97: 8d 65 f8 lea -0x8(%ebp),%esp 115c9a: 5b pop %ebx 115c9b: 5e pop %esi 115c9c: c9 leave 115c9d: c3 ret =============================================================================== 0011244c <_Heap_Free>: #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 11244c: 55 push %ebp 11244d: 89 e5 mov %esp,%ebp 11244f: 57 push %edi 112450: 56 push %esi 112451: 53 push %ebx 112452: 83 ec 18 sub $0x18,%esp 112455: 8b 5d 08 mov 0x8(%ebp),%ebx 112458: 8b 45 0c mov 0xc(%ebp),%eax RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 11245b: 8d 48 f8 lea -0x8(%eax),%ecx 11245e: 31 d2 xor %edx,%edx 112460: f7 73 10 divl 0x10(%ebx) 112463: 29 d1 sub %edx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 112465: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 112468: 39 c1 cmp %eax,%ecx 11246a: 72 07 jb 112473 <_Heap_Free+0x27> && (uintptr_t) block <= (uintptr_t) heap->last_block; 11246c: 8b 73 24 mov 0x24(%ebx),%esi RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 11246f: 39 f1 cmp %esi,%ecx 112471: 76 0d jbe 112480 <_Heap_Free+0x34> /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 112473: 31 c0 xor %eax,%eax } 112475: 83 c4 18 add $0x18,%esp 112478: 5b pop %ebx 112479: 5e pop %esi 11247a: 5f pop %edi 11247b: c9 leave 11247c: c3 ret 11247d: 8d 76 00 lea 0x0(%esi),%esi - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 112480: 8b 51 04 mov 0x4(%ecx),%edx 112483: 89 55 f0 mov %edx,-0x10(%ebp) 112486: 83 e2 fe and $0xfffffffe,%edx 112489: 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); 11248c: 01 ca add %ecx,%edx 11248e: 89 55 dc mov %edx,-0x24(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 112491: 39 d0 cmp %edx,%eax 112493: 77 de ja 112473 <_Heap_Free+0x27> <== NEVER TAKEN 112495: 39 d6 cmp %edx,%esi 112497: 72 da jb 112473 <_Heap_Free+0x27> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 112499: 8b 7a 04 mov 0x4(%edx),%edi if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 11249c: f7 c7 01 00 00 00 test $0x1,%edi 1124a2: 74 cf je 112473 <_Heap_Free+0x27> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 1124a4: 83 e7 fe and $0xfffffffe,%edi 1124a7: 89 7d e8 mov %edi,-0x18(%ebp) _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 1124aa: 39 d6 cmp %edx,%esi 1124ac: 0f 84 e2 00 00 00 je 112594 <_Heap_Free+0x148> #include #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 1124b2: 8b 55 dc mov -0x24(%ebp),%edx 1124b5: 8b 7d e8 mov -0x18(%ebp),%edi 1124b8: 8b 7c 3a 04 mov 0x4(%edx,%edi,1),%edi 1124bc: 89 7d e0 mov %edi,-0x20(%ebp) 1124bf: 8a 55 e0 mov -0x20(%ebp),%dl 1124c2: 83 e2 01 and $0x1,%edx 1124c5: 88 55 e7 mov %dl,-0x19(%ebp) 1124c8: 80 75 e7 01 xorb $0x1,-0x19(%ebp) next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 1124cc: f6 45 f0 01 testb $0x1,-0x10(%ebp) 1124d0: 75 46 jne 112518 <_Heap_Free+0xcc> uintptr_t const prev_size = block->prev_size; 1124d2: 8b 39 mov (%ecx),%edi 1124d4: 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); 1124d7: 29 f9 sub %edi,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 1124d9: 39 c8 cmp %ecx,%eax 1124db: 77 96 ja 112473 <_Heap_Free+0x27> <== NEVER TAKEN 1124dd: 39 ce cmp %ecx,%esi 1124df: 72 92 jb 112473 <_Heap_Free+0x27> <== NEVER TAKEN return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 1124e1: f6 41 04 01 testb $0x1,0x4(%ecx) 1124e5: 74 8c je 112473 <_Heap_Free+0x27> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 1124e7: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 1124eb: 0f 84 af 00 00 00 je 1125a0 <_Heap_Free+0x154> uintptr_t const size = block_size + prev_size + next_block_size; 1124f1: 8b 45 ec mov -0x14(%ebp),%eax 1124f4: 03 45 e8 add -0x18(%ebp),%eax 1124f7: 01 f8 add %edi,%eax return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 1124f9: 8b 55 dc mov -0x24(%ebp),%edx 1124fc: 8b 72 08 mov 0x8(%edx),%esi Heap_Block *prev = block->prev; 1124ff: 8b 52 0c mov 0xc(%edx),%edx prev->next = next; 112502: 89 72 08 mov %esi,0x8(%edx) next->prev = prev; 112505: 89 56 0c mov %edx,0xc(%esi) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 112508: ff 4b 38 decl 0x38(%ebx) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 11250b: 89 c2 mov %eax,%edx 11250d: 83 ca 01 or $0x1,%edx 112510: 89 51 04 mov %edx,0x4(%ecx) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 112513: 89 04 01 mov %eax,(%ecx,%eax,1) 112516: eb 2c jmp 112544 <_Heap_Free+0xf8> uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 112518: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 11251c: 74 3e je 11255c <_Heap_Free+0x110> uintptr_t const size = block_size + next_block_size; 11251e: 8b 7d e8 mov -0x18(%ebp),%edi 112521: 03 7d ec add -0x14(%ebp),%edi RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; 112524: 8b 75 dc mov -0x24(%ebp),%esi 112527: 8b 46 08 mov 0x8(%esi),%eax Heap_Block *prev = old_block->prev; 11252a: 8b 56 0c mov 0xc(%esi),%edx new_block->next = next; 11252d: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = prev; 112530: 89 51 0c mov %edx,0xc(%ecx) next->prev = new_block; 112533: 89 48 0c mov %ecx,0xc(%eax) prev->next = new_block; 112536: 89 4a 08 mov %ecx,0x8(%edx) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 112539: 89 f8 mov %edi,%eax 11253b: 83 c8 01 or $0x1,%eax 11253e: 89 41 04 mov %eax,0x4(%ecx) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 112541: 89 3c 39 mov %edi,(%ecx,%edi,1) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 112544: ff 4b 40 decl 0x40(%ebx) ++stats->frees; 112547: ff 43 50 incl 0x50(%ebx) stats->free_size += block_size; 11254a: 8b 55 ec mov -0x14(%ebp),%edx 11254d: 01 53 30 add %edx,0x30(%ebx) 112550: b0 01 mov $0x1,%al return( true ); } 112552: 83 c4 18 add $0x18,%esp 112555: 5b pop %ebx 112556: 5e pop %esi 112557: 5f pop %edi 112558: c9 leave 112559: c3 ret 11255a: 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; 11255c: 8b 43 08 mov 0x8(%ebx),%eax new_block->next = next; 11255f: 89 41 08 mov %eax,0x8(%ecx) new_block->prev = block_before; 112562: 89 59 0c mov %ebx,0xc(%ecx) block_before->next = new_block; 112565: 89 4b 08 mov %ecx,0x8(%ebx) next->prev = new_block; 112568: 89 48 0c mov %ecx,0xc(%eax) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 11256b: 8b 45 ec mov -0x14(%ebp),%eax 11256e: 83 c8 01 or $0x1,%eax 112571: 89 41 04 mov %eax,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 112574: 8b 7d dc mov -0x24(%ebp),%edi 112577: 83 67 04 fe andl $0xfffffffe,0x4(%edi) next_block->prev_size = block_size; 11257b: 8b 45 ec mov -0x14(%ebp),%eax 11257e: 89 07 mov %eax,(%edi) /* Statistics */ ++stats->free_blocks; 112580: 8b 43 38 mov 0x38(%ebx),%eax 112583: 40 inc %eax 112584: 89 43 38 mov %eax,0x38(%ebx) #include #include bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { Heap_Statistics *const stats = &heap->stats; 112587: 3b 43 3c cmp 0x3c(%ebx),%eax 11258a: 76 b8 jbe 112544 <_Heap_Free+0xf8> next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 11258c: 89 43 3c mov %eax,0x3c(%ebx) 11258f: eb b3 jmp 112544 <_Heap_Free+0xf8> 112591: 8d 76 00 lea 0x0(%esi),%esi _HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block 112594: c6 45 e7 00 movb $0x0,-0x19(%ebp) 112598: e9 2f ff ff ff jmp 1124cc <_Heap_Free+0x80> 11259d: 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; 1125a0: 8b 45 ec mov -0x14(%ebp),%eax 1125a3: 03 45 f0 add -0x10(%ebp),%eax prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 1125a6: 89 c6 mov %eax,%esi 1125a8: 83 ce 01 or $0x1,%esi 1125ab: 89 71 04 mov %esi,0x4(%ecx) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 1125ae: 8b 55 dc mov -0x24(%ebp),%edx 1125b1: 83 62 04 fe andl $0xfffffffe,0x4(%edx) next_block->prev_size = size; 1125b5: 89 02 mov %eax,(%edx) 1125b7: eb 8b jmp 112544 <_Heap_Free+0xf8> =============================================================================== 00115ca0 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 115ca0: 55 push %ebp 115ca1: 89 e5 mov %esp,%ebp 115ca3: 57 push %edi 115ca4: 56 push %esi 115ca5: 53 push %ebx 115ca6: 8b 7d 08 mov 0x8(%ebp),%edi 115ca9: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 115cac: c7 06 00 00 00 00 movl $0x0,(%esi) info->largest = 0; 115cb2: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) info->total = 0; 115cb9: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 115cc0: 8b 57 08 mov 0x8(%edi),%edx for(the_block = _Heap_Free_list_first(the_heap); 115cc3: 39 d7 cmp %edx,%edi 115cc5: 74 2a je 115cf1 <_Heap_Get_free_information+0x51><== NEVER TAKEN 115cc7: bb 01 00 00 00 mov $0x1,%ebx 115ccc: 31 c9 xor %ecx,%ecx 115cce: eb 02 jmp 115cd2 <_Heap_Get_free_information+0x32> 115cd0: 89 c3 mov %eax,%ebx - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 115cd2: 8b 42 04 mov 0x4(%edx),%eax 115cd5: 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; 115cd8: 01 c1 add %eax,%ecx if ( info->largest < the_size ) 115cda: 39 46 04 cmp %eax,0x4(%esi) 115cdd: 73 03 jae 115ce2 <_Heap_Get_free_information+0x42> info->largest = the_size; 115cdf: 89 46 04 mov %eax,0x4(%esi) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 115ce2: 8b 52 08 mov 0x8(%edx),%edx 115ce5: 8d 43 01 lea 0x1(%ebx),%eax info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 115ce8: 39 d7 cmp %edx,%edi 115cea: 75 e4 jne 115cd0 <_Heap_Get_free_information+0x30> 115cec: 89 1e mov %ebx,(%esi) 115cee: 89 4e 08 mov %ecx,0x8(%esi) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 115cf1: 5b pop %ebx 115cf2: 5e pop %esi 115cf3: 5f pop %edi 115cf4: c9 leave 115cf5: c3 ret =============================================================================== 00115cf8 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 115cf8: 55 push %ebp 115cf9: 89 e5 mov %esp,%ebp 115cfb: 57 push %edi 115cfc: 56 push %esi 115cfd: 53 push %ebx 115cfe: 83 ec 04 sub $0x4,%esp 115d01: 8b 45 08 mov 0x8(%ebp),%eax 115d04: 8b 75 0c mov 0xc(%ebp),%esi Heap_Block *the_block = the_heap->first_block; 115d07: 8b 58 20 mov 0x20(%eax),%ebx Heap_Block *const end = the_heap->last_block; 115d0a: 8b 78 24 mov 0x24(%eax),%edi _HAssert(the_block->prev_size == the_heap->page_size); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 115d0d: c7 06 00 00 00 00 movl $0x0,(%esi) the_info->Free.total = 0; 115d13: c7 46 08 00 00 00 00 movl $0x0,0x8(%esi) the_info->Free.largest = 0; 115d1a: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) the_info->Used.number = 0; 115d21: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) the_info->Used.total = 0; 115d28: c7 46 14 00 00 00 00 movl $0x0,0x14(%esi) the_info->Used.largest = 0; 115d2f: c7 46 10 00 00 00 00 movl $0x0,0x10(%esi) while ( the_block != end ) { 115d36: 39 fb cmp %edi,%ebx 115d38: 74 45 je 115d7f <_Heap_Get_information+0x87><== NEVER TAKEN 115d3a: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 115d3d: 8d 46 0c lea 0xc(%esi),%eax 115d40: 89 45 f0 mov %eax,-0x10(%ebp) 115d43: eb 16 jmp 115d5b <_Heap_Get_information+0x63> 115d45: 8d 76 00 lea 0x0(%esi),%esi 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) ) 115d48: 89 f0 mov %esi,%eax info = &the_info->Used; else info = &the_info->Free; info->number++; 115d4a: ff 00 incl (%eax) info->total += the_size; 115d4c: 01 50 08 add %edx,0x8(%eax) if ( info->largest < the_size ) 115d4f: 39 50 04 cmp %edx,0x4(%eax) 115d52: 73 03 jae 115d57 <_Heap_Get_information+0x5f> info->largest = the_size; 115d54: 89 50 04 mov %edx,0x4(%eax) the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 115d57: 39 df cmp %ebx,%edi 115d59: 74 15 je 115d70 <_Heap_Get_information+0x78> 115d5b: 89 ca mov %ecx,%edx 115d5d: 83 e2 fe and $0xfffffffe,%edx RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 115d60: 01 d3 add %edx,%ebx block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 115d62: 8b 4b 04 mov 0x4(%ebx),%ecx uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 115d65: f6 c1 01 test $0x1,%cl 115d68: 74 de je 115d48 <_Heap_Get_information+0x50> 115d6a: 8b 45 f0 mov -0x10(%ebp),%eax 115d6d: eb db jmp 115d4a <_Heap_Get_information+0x52> 115d6f: 90 nop the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 115d70: 8b 46 14 mov 0x14(%esi),%eax 115d73: 83 c0 08 add $0x8,%eax /* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE; 115d76: 89 46 14 mov %eax,0x14(%esi) } 115d79: 58 pop %eax 115d7a: 5b pop %ebx 115d7b: 5e pop %esi 115d7c: 5f pop %edi 115d7d: c9 leave 115d7e: c3 ret the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 115d7f: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED 115d84: eb f0 jmp 115d76 <_Heap_Get_information+0x7e><== NOT EXECUTED =============================================================================== 00120b64 <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { 120b64: 55 push %ebp 120b65: 89 e5 mov %esp,%ebp 120b67: 57 push %edi 120b68: 56 push %esi 120b69: 53 push %ebx 120b6a: 83 ec 2c sub $0x2c,%esp 120b6d: 8b 5d 08 mov 0x8(%ebp),%ebx 120b70: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 120b73: 8d 4e f8 lea -0x8(%esi),%ecx 120b76: 89 f0 mov %esi,%eax 120b78: 31 d2 xor %edx,%edx 120b7a: f7 73 10 divl 0x10(%ebx) 120b7d: 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; 120b7f: 8b 45 14 mov 0x14(%ebp),%eax 120b82: c7 00 00 00 00 00 movl $0x0,(%eax) *new_size = 0; 120b88: 8b 55 18 mov 0x18(%ebp),%edx 120b8b: c7 02 00 00 00 00 movl $0x0,(%edx) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 120b91: 39 4b 20 cmp %ecx,0x20(%ebx) 120b94: 76 0e jbe 120ba4 <_Heap_Resize_block+0x40> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; /* Statistics */ ++stats->resizes; 120b96: b8 02 00 00 00 mov $0x2,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 120b9b: 8d 65 f4 lea -0xc(%ebp),%esp 120b9e: 5b pop %ebx 120b9f: 5e pop %esi 120ba0: 5f pop %edi 120ba1: c9 leave 120ba2: c3 ret 120ba3: 90 nop 120ba4: 39 4b 24 cmp %ecx,0x24(%ebx) 120ba7: 72 ed jb 120b96 <_Heap_Resize_block+0x32> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 120ba9: 8b 41 04 mov 0x4(%ecx),%eax 120bac: 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; 120baf: 8d 3c 01 lea (%ecx,%eax,1),%edi 120bb2: 89 7d d4 mov %edi,-0x2c(%ebp) uintptr_t alloc_size = block_end - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 120bb5: 89 fa mov %edi,%edx 120bb7: 29 f2 sub %esi,%edx 120bb9: 83 c2 04 add $0x4,%edx 120bbc: 89 55 dc mov %edx,-0x24(%ebp) 120bbf: 8b 57 04 mov 0x4(%edi),%edx 120bc2: 83 e2 fe and $0xfffffffe,%edx 120bc5: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); 120bc8: 8b 54 17 04 mov 0x4(%edi,%edx,1),%edx 120bcc: 83 e2 01 and $0x1,%edx 120bcf: 89 55 e0 mov %edx,-0x20(%ebp) bool next_block_is_free = _Heap_Is_free( next_block );; _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; 120bd2: 8b 55 dc mov -0x24(%ebp),%edx 120bd5: 8b 7d 14 mov 0x14(%ebp),%edi 120bd8: 89 17 mov %edx,(%edi) if ( next_block_is_free ) { 120bda: 8a 55 e0 mov -0x20(%ebp),%dl 120bdd: 80 f2 01 xor $0x1,%dl 120be0: 88 55 e0 mov %dl,-0x20(%ebp) 120be3: 75 17 jne 120bfc <_Heap_Resize_block+0x98> block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { 120be5: 8b 55 dc mov -0x24(%ebp),%edx 120be8: 39 55 10 cmp %edx,0x10(%ebp) 120beb: 76 20 jbe 120c0d <_Heap_Resize_block+0xa9> 120bed: b8 01 00 00 00 mov $0x1,%eax new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 120bf2: 8d 65 f4 lea -0xc(%ebp),%esp 120bf5: 5b pop %ebx 120bf6: 5e pop %esi 120bf7: 5f pop %edi 120bf8: c9 leave 120bf9: c3 ret 120bfa: 66 90 xchg %ax,%ax _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; 120bfc: 03 45 d0 add -0x30(%ebp),%eax alloc_size += next_block_size; 120bff: 8b 7d d0 mov -0x30(%ebp),%edi 120c02: 01 7d dc add %edi,-0x24(%ebp) } if ( new_alloc_size > alloc_size ) { 120c05: 8b 55 dc mov -0x24(%ebp),%edx 120c08: 39 55 10 cmp %edx,0x10(%ebp) 120c0b: 77 e0 ja 120bed <_Heap_Resize_block+0x89> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { 120c0d: 80 7d e0 00 cmpb $0x0,-0x20(%ebp) 120c11: 74 31 je 120c44 <_Heap_Resize_block+0xe0> uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag; 120c13: 8b 79 04 mov 0x4(%ecx),%edi 120c16: 83 e7 01 and $0x1,%edi 120c19: 09 c7 or %eax,%edi 120c1b: 89 79 04 mov %edi,0x4(%ecx) return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; 120c1e: 8b 7d d4 mov -0x2c(%ebp),%edi 120c21: 8b 7f 08 mov 0x8(%edi),%edi 120c24: 89 7d e4 mov %edi,-0x1c(%ebp) Heap_Block *prev = block->prev; 120c27: 8b 55 d4 mov -0x2c(%ebp),%edx 120c2a: 8b 7a 0c mov 0xc(%edx),%edi prev->next = next; 120c2d: 8b 55 e4 mov -0x1c(%ebp),%edx 120c30: 89 57 08 mov %edx,0x8(%edi) next->prev = prev; 120c33: 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; 120c36: 83 4c 08 04 01 orl $0x1,0x4(%eax,%ecx,1) /* Statistics */ --stats->free_blocks; 120c3b: ff 4b 38 decl 0x38(%ebx) stats->free_size -= next_block_size; 120c3e: 8b 7d d0 mov -0x30(%ebp),%edi 120c41: 29 7b 30 sub %edi,0x30(%ebx) } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); 120c44: ff 75 10 pushl 0x10(%ebp) 120c47: 56 push %esi 120c48: 51 push %ecx 120c49: 53 push %ebx 120c4a: e8 71 c1 fe ff call 10cdc0 <_Heap_Block_allocate> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_BLOCK_SIZE_OFFSET; 120c4f: 8b 50 04 mov 0x4(%eax),%edx 120c52: 83 e2 fe and $0xfffffffe,%edx 120c55: 29 f0 sub %esi,%eax 120c57: 8d 44 10 04 lea 0x4(%eax,%edx,1),%eax 120c5b: 8b 55 18 mov 0x18(%ebp),%edx 120c5e: 89 02 mov %eax,(%edx) /* Statistics */ ++stats->resizes; 120c60: ff 43 54 incl 0x54(%ebx) 120c63: 31 c0 xor %eax,%eax 120c65: 83 c4 10 add $0x10,%esp new_size ); } else { return HEAP_RESIZE_FATAL_ERROR; } } 120c68: 8d 65 f4 lea -0xc(%ebp),%esp 120c6b: 5b pop %ebx 120c6c: 5e pop %esi 120c6d: 5f pop %edi 120c6e: c9 leave 120c6f: c3 ret =============================================================================== 00120c70 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 120c70: 55 push %ebp 120c71: 89 e5 mov %esp,%ebp 120c73: 56 push %esi 120c74: 53 push %ebx 120c75: 8b 5d 08 mov 0x8(%ebp),%ebx 120c78: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 120c7b: 8d 4e f8 lea -0x8(%esi),%ecx 120c7e: 89 f0 mov %esi,%eax 120c80: 31 d2 xor %edx,%edx 120c82: f7 73 10 divl 0x10(%ebx) 120c85: 29 d1 sub %edx,%ecx const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 120c87: 8b 43 20 mov 0x20(%ebx),%eax RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 120c8a: 39 c1 cmp %eax,%ecx 120c8c: 72 07 jb 120c95 <_Heap_Size_of_alloc_area+0x25> && (uintptr_t) block <= (uintptr_t) heap->last_block; 120c8e: 8b 53 24 mov 0x24(%ebx),%edx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 120c91: 39 d1 cmp %edx,%ecx 120c93: 76 07 jbe 120c9c <_Heap_Size_of_alloc_area+0x2c><== ALWAYS TAKEN return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; return true; 120c95: 31 c0 xor %eax,%eax } 120c97: 5b pop %ebx 120c98: 5e pop %esi 120c99: c9 leave 120c9a: c3 ret 120c9b: 90 nop RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 120c9c: 8b 59 04 mov 0x4(%ecx),%ebx 120c9f: 83 e3 fe and $0xfffffffe,%ebx 120ca2: 01 d9 add %ebx,%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 120ca4: 39 c8 cmp %ecx,%eax 120ca6: 77 ed ja 120c95 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN 120ca8: 39 ca cmp %ecx,%edx 120caa: 72 e9 jb 120c95 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( 120cac: f6 41 04 01 testb $0x1,0x4(%ecx) 120cb0: 74 e3 je 120c95 <_Heap_Size_of_alloc_area+0x25><== NEVER TAKEN || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin; 120cb2: 29 f1 sub %esi,%ecx 120cb4: 8d 51 04 lea 0x4(%ecx),%edx 120cb7: 8b 45 10 mov 0x10(%ebp),%eax 120cba: 89 10 mov %edx,(%eax) 120cbc: b0 01 mov $0x1,%al return true; } 120cbe: 5b pop %ebx 120cbf: 5e pop %esi 120cc0: c9 leave 120cc1: c3 ret =============================================================================== 0010d928 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 10d928: 55 push %ebp 10d929: 89 e5 mov %esp,%ebp 10d92b: 57 push %edi 10d92c: 56 push %esi 10d92d: 53 push %ebx 10d92e: 83 ec 3c sub $0x3c,%esp 10d931: 8b 5d 08 mov 0x8(%ebp),%ebx uintptr_t const page_size = heap->page_size; 10d934: 8b 43 10 mov 0x10(%ebx),%eax 10d937: 89 45 e0 mov %eax,-0x20(%ebp) uintptr_t const min_block_size = heap->min_block_size; 10d93a: 8b 53 14 mov 0x14(%ebx),%edx 10d93d: 89 55 dc mov %edx,-0x24(%ebp) Heap_Block *const last_block = heap->last_block; 10d940: 8b 43 24 mov 0x24(%ebx),%eax 10d943: 89 45 d8 mov %eax,-0x28(%ebp) Heap_Block *block = heap->first_block; 10d946: 8b 73 20 mov 0x20(%ebx),%esi Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d949: 80 7d 10 00 cmpb $0x0,0x10(%ebp) 10d94d: 75 1d jne 10d96c <_Heap_Walk+0x44> 10d94f: c7 45 e4 20 d9 10 00 movl $0x10d920,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d956: 83 3d 20 bc 12 00 03 cmpl $0x3,0x12bc20 10d95d: 74 1d je 10d97c <_Heap_Walk+0x54> if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10d95f: b0 01 mov $0x1,%al block = next_block; } return true; } 10d961: 8d 65 f4 lea -0xc(%ebp),%esp 10d964: 5b pop %ebx 10d965: 5e pop %esi 10d966: 5f pop %edi 10d967: c9 leave 10d968: c3 ret 10d969: 8d 76 00 lea 0x0(%esi),%esi uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const last_block = heap->last_block; Heap_Block *block = heap->first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 10d96c: c7 45 e4 f0 dc 10 00 movl $0x10dcf0,-0x1c(%ebp) if ( !_System_state_Is_up( _System_state_Get() ) ) { 10d973: 83 3d 20 bc 12 00 03 cmpl $0x3,0x12bc20 10d97a: 75 e3 jne 10d95f <_Heap_Walk+0x37> <== NEVER TAKEN Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 10d97c: 52 push %edx 10d97d: ff 73 0c pushl 0xc(%ebx) 10d980: ff 73 08 pushl 0x8(%ebx) 10d983: ff 75 d8 pushl -0x28(%ebp) 10d986: 56 push %esi 10d987: ff 73 1c pushl 0x1c(%ebx) 10d98a: ff 73 18 pushl 0x18(%ebx) 10d98d: ff 75 dc pushl -0x24(%ebp) 10d990: ff 75 e0 pushl -0x20(%ebp) 10d993: 68 10 3b 12 00 push $0x123b10 10d998: 6a 00 push $0x0 10d99a: ff 75 0c pushl 0xc(%ebp) 10d99d: ff 55 e4 call *-0x1c(%ebp) heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 10d9a0: 83 c4 30 add $0x30,%esp 10d9a3: 8b 45 e0 mov -0x20(%ebp),%eax 10d9a6: 85 c0 test %eax,%eax 10d9a8: 0f 84 b2 00 00 00 je 10da60 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 10d9ae: f6 45 e0 03 testb $0x3,-0x20(%ebp) 10d9b2: 0f 85 b0 00 00 00 jne 10da68 <_Heap_Walk+0x140> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 10d9b8: 8b 45 dc mov -0x24(%ebp),%eax 10d9bb: 31 d2 xor %edx,%edx 10d9bd: f7 75 e0 divl -0x20(%ebp) 10d9c0: 85 d2 test %edx,%edx 10d9c2: 0f 85 ac 00 00 00 jne 10da74 <_Heap_Walk+0x14c> ); return false; } if ( 10d9c8: 8d 46 08 lea 0x8(%esi),%eax 10d9cb: 31 d2 xor %edx,%edx 10d9cd: f7 75 e0 divl -0x20(%ebp) 10d9d0: 85 d2 test %edx,%edx 10d9d2: 0f 85 a8 00 00 00 jne 10da80 <_Heap_Walk+0x158> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10d9d8: 8b 56 04 mov 0x4(%esi),%edx 10d9db: 89 55 cc mov %edx,-0x34(%ebp) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 10d9de: 83 e2 01 and $0x1,%edx 10d9e1: 0f 84 a1 00 00 00 je 10da88 <_Heap_Walk+0x160> ); return false; } if ( first_block->prev_size != page_size ) { 10d9e7: 8b 06 mov (%esi),%eax 10d9e9: 39 45 e0 cmp %eax,-0x20(%ebp) 10d9ec: 75 4e jne 10da3c <_Heap_Walk+0x114> ); return false; } if ( _Heap_Is_free( last_block ) ) { 10d9ee: 8b 55 d8 mov -0x28(%ebp),%edx 10d9f1: 8b 42 04 mov 0x4(%edx),%eax 10d9f4: 83 e0 fe and $0xfffffffe,%eax 10d9f7: f6 44 02 04 01 testb $0x1,0x4(%edx,%eax,1) 10d9fc: 0f 84 bd 02 00 00 je 10dcbf <_Heap_Walk+0x397> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 10da02: 8b 43 10 mov 0x10(%ebx),%eax 10da05: 89 45 d4 mov %eax,-0x2c(%ebp) return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10da08: 8b 4b 08 mov 0x8(%ebx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10da0b: 39 cb cmp %ecx,%ebx 10da0d: 0f 84 09 01 00 00 je 10db1c <_Heap_Walk+0x1f4> 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; 10da13: 8b 7b 20 mov 0x20(%ebx),%edi RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10da16: 39 cf cmp %ecx,%edi 10da18: 76 76 jbe 10da90 <_Heap_Walk+0x168> <== ALWAYS TAKEN 10da1a: 66 90 xchg %ax,%ax if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 10da1c: 51 push %ecx 10da1d: 68 58 3c 12 00 push $0x123c58 10da22: 66 90 xchg %ax,%ax return false; } if ( !prev_used ) { (*printer)( 10da24: 6a 01 push $0x1 10da26: ff 75 0c pushl 0xc(%ebp) 10da29: ff 55 e4 call *-0x1c(%ebp) 10da2c: 31 c0 xor %eax,%eax 10da2e: 83 c4 10 add $0x10,%esp block = next_block; } return true; } 10da31: 8d 65 f4 lea -0xc(%ebp),%esp 10da34: 5b pop %ebx 10da35: 5e pop %esi 10da36: 5f pop %edi 10da37: c9 leave 10da38: c3 ret 10da39: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( first_block->prev_size != page_size ) { (*printer)( 10da3c: 83 ec 0c sub $0xc,%esp 10da3f: ff 75 e0 pushl -0x20(%ebp) 10da42: 50 push %eax 10da43: 68 2c 3c 12 00 push $0x123c2c return false; } if ( free_block->prev != prev_block ) { (*printer)( 10da48: 6a 01 push $0x1 10da4a: ff 75 0c pushl 0xc(%ebp) 10da4d: ff 55 e4 call *-0x1c(%ebp) 10da50: 31 c0 xor %eax,%eax 10da52: 83 c4 20 add $0x20,%esp block = next_block; } return true; } 10da55: 8d 65 f4 lea -0xc(%ebp),%esp 10da58: 5b pop %ebx 10da59: 5e pop %esi 10da5a: 5f pop %edi 10da5b: c9 leave 10da5c: c3 ret 10da5d: 8d 76 00 lea 0x0(%esi),%esi first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 10da60: 57 push %edi 10da61: 68 87 3e 12 00 push $0x123e87 10da66: eb bc jmp 10da24 <_Heap_Walk+0xfc> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 10da68: ff 75 e0 pushl -0x20(%ebp) 10da6b: 68 9a 3e 12 00 push $0x123e9a 10da70: eb b2 jmp 10da24 <_Heap_Walk+0xfc> 10da72: 66 90 xchg %ax,%ax return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 10da74: ff 75 dc pushl -0x24(%ebp) 10da77: 68 a4 3b 12 00 push $0x123ba4 10da7c: eb a6 jmp 10da24 <_Heap_Walk+0xfc> 10da7e: 66 90 xchg %ax,%ax } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 10da80: 56 push %esi 10da81: 68 c8 3b 12 00 push $0x123bc8 10da86: eb 9c jmp 10da24 <_Heap_Walk+0xfc> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 10da88: 56 push %esi 10da89: 68 fc 3b 12 00 push $0x123bfc 10da8e: eb 94 jmp 10da24 <_Heap_Walk+0xfc> && (uintptr_t) block <= (uintptr_t) heap->last_block; 10da90: 8b 53 24 mov 0x24(%ebx),%edx 10da93: 89 55 d0 mov %edx,-0x30(%ebp) RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10da96: 39 d1 cmp %edx,%ecx 10da98: 77 82 ja 10da1c <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10da9a: 8d 41 08 lea 0x8(%ecx),%eax 10da9d: 31 d2 xor %edx,%edx 10da9f: f7 75 d4 divl -0x2c(%ebp) 10daa2: 85 d2 test %edx,%edx 10daa4: 0f 85 20 02 00 00 jne 10dcca <_Heap_Walk+0x3a2> <== NEVER TAKEN ); return false; } if ( _Heap_Is_used( free_block ) ) { 10daaa: 8b 41 04 mov 0x4(%ecx),%eax 10daad: 83 e0 fe and $0xfffffffe,%eax 10dab0: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10dab5: 0f 85 29 02 00 00 jne 10dce4 <_Heap_Walk+0x3bc> <== NEVER TAKEN ); return false; } if ( free_block->prev != prev_block ) { 10dabb: 8b 41 0c mov 0xc(%ecx),%eax 10dabe: 39 d8 cmp %ebx,%eax 10dac0: 0f 85 0f 02 00 00 jne 10dcd5 <_Heap_Walk+0x3ad> <== NEVER TAKEN 10dac6: 89 75 c8 mov %esi,-0x38(%ebp) 10dac9: 89 c6 mov %eax,%esi 10dacb: 89 5d c4 mov %ebx,-0x3c(%ebp) 10dace: eb 3d jmp 10db0d <_Heap_Walk+0x1e5> 10dad0: 39 cf cmp %ecx,%edi 10dad2: 0f 87 44 ff ff ff ja 10da1c <_Heap_Walk+0xf4> 10dad8: 3b 4d d0 cmp -0x30(%ebp),%ecx 10dadb: 0f 87 3b ff ff ff ja 10da1c <_Heap_Walk+0xf4> <== NEVER TAKEN ); return false; } if ( 10dae1: 8d 41 08 lea 0x8(%ecx),%eax 10dae4: 31 d2 xor %edx,%edx 10dae6: f7 75 d4 divl -0x2c(%ebp) 10dae9: 85 d2 test %edx,%edx 10daeb: 0f 85 d9 01 00 00 jne 10dcca <_Heap_Walk+0x3a2> ); return false; } if ( _Heap_Is_used( free_block ) ) { 10daf1: 8b 41 04 mov 0x4(%ecx),%eax 10daf4: 83 e0 fe and $0xfffffffe,%eax 10daf7: f6 44 01 04 01 testb $0x1,0x4(%ecx,%eax,1) 10dafc: 0f 85 e2 01 00 00 jne 10dce4 <_Heap_Walk+0x3bc> ); return false; } if ( free_block->prev != prev_block ) { 10db02: 8b 41 0c mov 0xc(%ecx),%eax 10db05: 39 d8 cmp %ebx,%eax 10db07: 0f 85 c8 01 00 00 jne 10dcd5 <_Heap_Walk+0x3ad> (*printer)( 10db0d: 89 cb mov %ecx,%ebx return false; } prev_block = free_block; free_block = free_block->next; 10db0f: 8b 49 08 mov 0x8(%ecx),%ecx const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10db12: 39 ce cmp %ecx,%esi 10db14: 75 ba jne 10dad0 <_Heap_Walk+0x1a8> 10db16: 8b 75 c8 mov -0x38(%ebp),%esi 10db19: 8b 5d c4 mov -0x3c(%ebp),%ebx if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10db1c: 39 75 d8 cmp %esi,-0x28(%ebp) 10db1f: 0f 84 3a fe ff ff je 10d95f <_Heap_Walk+0x37> <== NEVER TAKEN 10db25: 8b 45 cc mov -0x34(%ebp),%eax - 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; 10db28: 89 c1 mov %eax,%ecx 10db2a: 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); 10db2d: 8d 3c 31 lea (%ecx,%esi,1),%edi uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; if ( prev_used ) { 10db30: a8 01 test $0x1,%al 10db32: 74 30 je 10db64 <_Heap_Walk+0x23c> (*printer)( 10db34: 83 ec 0c sub $0xc,%esp 10db37: 51 push %ecx 10db38: 56 push %esi 10db39: 68 e9 3e 12 00 push $0x123ee9 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10db3e: 6a 00 push $0x0 10db40: ff 75 0c pushl 0xc(%ebp) 10db43: 89 4d c0 mov %ecx,-0x40(%ebp) 10db46: ff 55 e4 call *-0x1c(%ebp) 10db49: 83 c4 20 add $0x20,%esp 10db4c: 8b 4d c0 mov -0x40(%ebp),%ecx RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 10db4f: 39 7b 20 cmp %edi,0x20(%ebx) 10db52: 76 20 jbe 10db74 <_Heap_Walk+0x24c> <== ALWAYS TAKEN block->prev_size ); } if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 10db54: 83 ec 0c sub $0xc,%esp 10db57: 57 push %edi 10db58: 56 push %esi 10db59: 68 04 3d 12 00 push $0x123d04 10db5e: e9 e5 fe ff ff jmp 10da48 <_Heap_Walk+0x120> 10db63: 90 nop "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 10db64: 83 ec 08 sub $0x8,%esp 10db67: ff 36 pushl (%esi) 10db69: 51 push %ecx 10db6a: 56 push %esi 10db6b: 68 dc 3c 12 00 push $0x123cdc 10db70: eb cc jmp 10db3e <_Heap_Walk+0x216> 10db72: 66 90 xchg %ax,%ax 10db74: 39 7b 24 cmp %edi,0x24(%ebx) 10db77: 72 db jb 10db54 <_Heap_Walk+0x22c> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { 10db79: 89 c8 mov %ecx,%eax 10db7b: 31 d2 xor %edx,%edx 10db7d: f7 75 e0 divl -0x20(%ebp) 10db80: 85 d2 test %edx,%edx 10db82: 0f 85 02 01 00 00 jne 10dc8a <_Heap_Walk+0x362> ); return false; } if ( block_size < min_block_size ) { 10db88: 39 4d dc cmp %ecx,-0x24(%ebp) 10db8b: 0f 87 0b 01 00 00 ja 10dc9c <_Heap_Walk+0x374> ); return false; } if ( next_block_begin <= block_begin ) { 10db91: 39 fe cmp %edi,%esi 10db93: 0f 83 17 01 00 00 jae 10dcb0 <_Heap_Walk+0x388> ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 10db99: f6 47 04 01 testb $0x1,0x4(%edi) 10db9d: 0f 85 91 00 00 00 jne 10dc34 <_Heap_Walk+0x30c> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10dba3: 8b 4b 08 mov 0x8(%ebx),%ecx block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 10dba6: 8b 46 04 mov 0x4(%esi),%eax 10dba9: 89 45 cc mov %eax,-0x34(%ebp) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 10dbac: 83 e0 fe and $0xfffffffe,%eax 10dbaf: 89 45 d4 mov %eax,-0x2c(%ebp) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 10dbb2: 01 f0 add %esi,%eax 10dbb4: 89 45 d0 mov %eax,-0x30(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10dbb7: 8b 56 08 mov 0x8(%esi),%edx return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10dbba: 39 53 0c cmp %edx,0xc(%ebx) 10dbbd: 0f 84 99 00 00 00 je 10dc5c <_Heap_Walk+0x334> " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10dbc3: 39 da cmp %ebx,%edx 10dbc5: 0f 84 a9 00 00 00 je 10dc74 <_Heap_Walk+0x34c> 10dbcb: c7 45 c8 55 3a 12 00 movl $0x123a55,-0x38(%ebp) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10dbd2: 8b 46 0c mov 0xc(%esi),%eax 10dbd5: 39 c1 cmp %eax,%ecx 10dbd7: 74 7b je 10dc54 <_Heap_Walk+0x32c> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10dbd9: 39 d8 cmp %ebx,%eax 10dbdb: 0f 84 9f 00 00 00 je 10dc80 <_Heap_Walk+0x358> 10dbe1: b9 55 3a 12 00 mov $0x123a55,%ecx Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 10dbe6: ff 75 c8 pushl -0x38(%ebp) 10dbe9: 52 push %edx 10dbea: 51 push %ecx 10dbeb: 50 push %eax 10dbec: 56 push %esi 10dbed: 68 c4 3d 12 00 push $0x123dc4 10dbf2: 6a 00 push $0x0 10dbf4: ff 75 0c pushl 0xc(%ebp) 10dbf7: ff 55 e4 call *-0x1c(%ebp) block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 10dbfa: 8b 55 d0 mov -0x30(%ebp),%edx 10dbfd: 8b 02 mov (%edx),%eax 10dbff: 83 c4 20 add $0x20,%esp 10dc02: 39 45 d4 cmp %eax,-0x2c(%ebp) 10dc05: 74 11 je 10dc18 <_Heap_Walk+0x2f0> (*printer)( 10dc07: 51 push %ecx 10dc08: 52 push %edx 10dc09: 50 push %eax 10dc0a: ff 75 d4 pushl -0x2c(%ebp) 10dc0d: 56 push %esi 10dc0e: 68 f0 3d 12 00 push $0x123df0 10dc13: e9 30 fe ff ff jmp 10da48 <_Heap_Walk+0x120> ); return false; } if ( !prev_used ) { 10dc18: f6 45 cc 01 testb $0x1,-0x34(%ebp) 10dc1c: 74 4a je 10dc68 <_Heap_Walk+0x340> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; 10dc1e: 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 ) { 10dc21: 39 d8 cmp %ebx,%eax 10dc23: 75 0a jne 10dc2f <_Heap_Walk+0x307> <== ALWAYS TAKEN 10dc25: eb 21 jmp 10dc48 <_Heap_Walk+0x320> <== NOT EXECUTED 10dc27: 90 nop <== NOT EXECUTED if ( free_block == block ) { return true; } free_block = free_block->next; 10dc28: 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 ) { 10dc2b: 39 d8 cmp %ebx,%eax 10dc2d: 74 19 je 10dc48 <_Heap_Walk+0x320> if ( free_block == block ) { 10dc2f: 39 f0 cmp %esi,%eax 10dc31: 75 f5 jne 10dc28 <_Heap_Walk+0x300> 10dc33: 90 nop if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; } while ( block != last_block ) { 10dc34: 39 7d d8 cmp %edi,-0x28(%ebp) 10dc37: 0f 84 22 fd ff ff je 10d95f <_Heap_Walk+0x37> const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 10dc3d: 8b 47 04 mov 0x4(%edi),%eax 10dc40: 89 fe mov %edi,%esi 10dc42: e9 e1 fe ff ff jmp 10db28 <_Heap_Walk+0x200> 10dc47: 90 nop return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 10dc48: 56 push %esi 10dc49: 68 5c 3e 12 00 push $0x123e5c 10dc4e: e9 d1 fd ff ff jmp 10da24 <_Heap_Walk+0xfc> 10dc53: 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)( 10dc54: b9 14 3f 12 00 mov $0x123f14,%ecx 10dc59: eb 8b jmp 10dbe6 <_Heap_Walk+0x2be> 10dc5b: 90 nop } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; 10dc5c: c7 45 c8 00 3f 12 00 movl $0x123f00,-0x38(%ebp) 10dc63: e9 6a ff ff ff jmp 10dbd2 <_Heap_Walk+0x2aa> return false; } if ( !prev_used ) { (*printer)( 10dc68: 56 push %esi 10dc69: 68 2c 3e 12 00 push $0x123e2c 10dc6e: e9 b1 fd ff ff jmp 10da24 <_Heap_Walk+0xfc> 10dc73: 90 nop " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last)" : (block->next == free_list_tail ? " (= tail)" : "") 10dc74: c7 45 c8 0a 3f 12 00 movl $0x123f0a,-0x38(%ebp) 10dc7b: e9 52 ff ff ff jmp 10dbd2 <_Heap_Walk+0x2aa> "block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n", block, block->prev, block->prev == first_free_block ? " (= first)" : (block->prev == free_list_head ? " (= head)" : ""), 10dc80: b9 1f 3f 12 00 mov $0x123f1f,%ecx 10dc85: e9 5c ff ff ff jmp 10dbe6 <_Heap_Walk+0x2be> return false; } if ( !_Heap_Is_aligned( block_size, page_size ) ) { (*printer)( 10dc8a: 83 ec 0c sub $0xc,%esp 10dc8d: 51 push %ecx 10dc8e: 56 push %esi 10dc8f: 68 34 3d 12 00 push $0x123d34 10dc94: e9 af fd ff ff jmp 10da48 <_Heap_Walk+0x120> 10dc99: 8d 76 00 lea 0x0(%esi),%esi return false; } if ( block_size < min_block_size ) { (*printer)( 10dc9c: 83 ec 08 sub $0x8,%esp 10dc9f: ff 75 dc pushl -0x24(%ebp) 10dca2: 51 push %ecx 10dca3: 56 push %esi 10dca4: 68 64 3d 12 00 push $0x123d64 10dca9: e9 9a fd ff ff jmp 10da48 <_Heap_Walk+0x120> 10dcae: 66 90 xchg %ax,%ax return false; } if ( next_block_begin <= block_begin ) { (*printer)( 10dcb0: 83 ec 0c sub $0xc,%esp 10dcb3: 57 push %edi 10dcb4: 56 push %esi 10dcb5: 68 90 3d 12 00 push $0x123d90 10dcba: e9 89 fd ff ff jmp 10da48 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 10dcbf: 53 push %ebx 10dcc0: 68 b8 3e 12 00 push $0x123eb8 10dcc5: e9 5a fd ff ff jmp 10da24 <_Heap_Walk+0xfc> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 10dcca: 51 push %ecx 10dccb: 68 78 3c 12 00 push $0x123c78 10dcd0: e9 4f fd ff ff jmp 10da24 <_Heap_Walk+0xfc> return false; } if ( free_block->prev != prev_block ) { (*printer)( 10dcd5: 83 ec 0c sub $0xc,%esp 10dcd8: 50 push %eax 10dcd9: 51 push %ecx 10dcda: 68 a8 3c 12 00 push $0x123ca8 10dcdf: e9 64 fd ff ff jmp 10da48 <_Heap_Walk+0x120> return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( 10dce4: 51 push %ecx 10dce5: 68 cd 3e 12 00 push $0x123ecd 10dcea: e9 35 fd ff ff jmp 10da24 <_Heap_Walk+0xfc> =============================================================================== 0010c2f8 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 10c2f8: 55 push %ebp 10c2f9: 89 e5 mov %esp,%ebp 10c2fb: 53 push %ebx 10c2fc: 83 ec 04 sub $0x4,%esp rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c2ff: 8b 15 60 9f 12 00 mov 0x129f60,%edx 10c305: 85 d2 test %edx,%edx 10c307: 74 1a je 10c323 <_IO_Initialize_all_drivers+0x2b><== NEVER TAKEN 10c309: 31 db xor %ebx,%ebx 10c30b: 90 nop (void) rtems_io_initialize( major, 0, NULL ); 10c30c: 50 push %eax 10c30d: 6a 00 push $0x0 10c30f: 6a 00 push $0x0 10c311: 53 push %ebx 10c312: e8 05 5c 00 00 call 111f1c void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 10c317: 43 inc %ebx 10c318: 83 c4 10 add $0x10,%esp 10c31b: 39 1d 60 9f 12 00 cmp %ebx,0x129f60 10c321: 77 e9 ja 10c30c <_IO_Initialize_all_drivers+0x14> (void) rtems_io_initialize( major, 0, NULL ); } 10c323: 8b 5d fc mov -0x4(%ebp),%ebx 10c326: c9 leave 10c327: c3 ret =============================================================================== 0010c328 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 10c328: 55 push %ebp 10c329: 89 e5 mov %esp,%ebp 10c32b: 57 push %edi 10c32c: 56 push %esi 10c32d: 53 push %ebx 10c32e: 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; 10c331: 8b 1d 14 53 12 00 mov 0x125314,%ebx drivers_in_table = Configuration.number_of_device_drivers; 10c337: a1 10 53 12 00 mov 0x125310,%eax 10c33c: 89 45 e4 mov %eax,-0x1c(%ebp) number_of_drivers = Configuration.maximum_drivers; 10c33f: 8b 35 0c 53 12 00 mov 0x12530c,%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 ) 10c345: 39 f0 cmp %esi,%eax 10c347: 72 17 jb 10c360 <_IO_Manager_initialization+0x38> * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 10c349: 89 1d 64 9f 12 00 mov %ebx,0x129f64 _IO_Number_of_drivers = number_of_drivers; 10c34f: 8b 45 e4 mov -0x1c(%ebp),%eax 10c352: a3 60 9f 12 00 mov %eax,0x129f60 ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c357: 8d 65 f4 lea -0xc(%ebp),%esp 10c35a: 5b pop %ebx 10c35b: 5e pop %esi 10c35c: 5f pop %edi 10c35d: c9 leave 10c35e: c3 ret 10c35f: 90 nop /* * 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 *) 10c360: 8d 0c 76 lea (%esi,%esi,2),%ecx 10c363: c1 e1 03 shl $0x3,%ecx 10c366: 83 ec 0c sub $0xc,%esp 10c369: 51 push %ecx 10c36a: 89 4d dc mov %ecx,-0x24(%ebp) 10c36d: e8 7e 2a 00 00 call 10edf0 <_Workspace_Allocate_or_fatal_error> 10c372: 89 c2 mov %eax,%edx 10c374: a3 64 9f 12 00 mov %eax,0x129f64 _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 10c379: 89 35 60 9f 12 00 mov %esi,0x129f60 memset( 10c37f: 31 c0 xor %eax,%eax 10c381: 8b 4d dc mov -0x24(%ebp),%ecx 10c384: 89 d7 mov %edx,%edi 10c386: 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++ ) 10c388: 83 c4 10 add $0x10,%esp 10c38b: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c38e: 85 c9 test %ecx,%ecx 10c390: 74 c5 je 10c357 <_IO_Manager_initialization+0x2f><== NEVER TAKEN 10c392: a1 64 9f 12 00 mov 0x129f64,%eax 10c397: 89 45 e0 mov %eax,-0x20(%ebp) 10c39a: 31 c0 xor %eax,%eax 10c39c: 31 d2 xor %edx,%edx 10c39e: 66 90 xchg %ax,%ax _IO_Driver_address_table[index] = driver_table[index]; 10c3a0: 8b 7d e0 mov -0x20(%ebp),%edi 10c3a3: 01 c7 add %eax,%edi 10c3a5: 8d 34 03 lea (%ebx,%eax,1),%esi 10c3a8: b9 06 00 00 00 mov $0x6,%ecx 10c3ad: 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++ ) 10c3af: 42 inc %edx 10c3b0: 83 c0 18 add $0x18,%eax 10c3b3: 39 55 e4 cmp %edx,-0x1c(%ebp) 10c3b6: 77 e8 ja 10c3a0 <_IO_Manager_initialization+0x78> _IO_Driver_address_table[index] = driver_table[index]; number_of_drivers = drivers_in_table; } 10c3b8: 8d 65 f4 lea -0xc(%ebp),%esp 10c3bb: 5b pop %ebx 10c3bc: 5e pop %esi 10c3bd: 5f pop %edi 10c3be: c9 leave 10c3bf: c3 ret =============================================================================== 0010cef0 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 10cef0: 55 push %ebp 10cef1: 89 e5 mov %esp,%ebp 10cef3: 83 ec 08 sub $0x8,%esp _ISR_Signals_to_thread_executing = false; 10cef6: c6 05 28 96 12 00 00 movb $0x0,0x129628 _ISR_Nest_level = 0; 10cefd: c7 05 54 95 12 00 00 movl $0x0,0x129554 10cf04: 00 00 00 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) 10cf07: a1 fc 52 12 00 mov 0x1252fc,%eax 10cf0c: 3b 05 d0 52 12 00 cmp 0x1252d0,%eax 10cf12: 72 25 jb 10cf39 <_ISR_Handler_initialization+0x49><== NEVER TAKEN INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error( 10cf14: 83 ec 0c sub $0xc,%esp 10cf17: 50 push %eax 10cf18: e8 d3 1e 00 00 call 10edf0 <_Workspace_Allocate_or_fatal_error> 10cf1d: a3 c8 94 12 00 mov %eax,0x1294c8 /* Interrupt stack might have to be aligned and/or setup * in a specific way. */ #if defined(_CPU_Interrupt_stack_setup) _CPU_Interrupt_stack_setup(_CPU_Interrupt_stack_low, _CPU_Interrupt_stack_high); 10cf22: 8b 15 fc 52 12 00 mov 0x1252fc,%edx 10cf28: 8d 44 10 fc lea -0x4(%eax,%edx,1),%eax 10cf2c: 83 e0 f0 and $0xfffffff0,%eax 10cf2f: a3 88 94 12 00 mov %eax,0x129488 10cf34: 83 c4 10 add $0x10,%esp #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 10cf37: c9 leave 10cf38: c3 ret _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) ) _Internal_error_Occurred( 10cf39: 50 push %eax 10cf3a: 6a 05 push $0x5 10cf3c: 6a 01 push $0x1 10cf3e: 6a 00 push $0x0 10cf40: e8 6b ff ff ff call 10ceb0 <_Internal_error_Occurred> =============================================================================== 0010ceb0 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10ceb0: 55 push %ebp 10ceb1: 89 e5 mov %esp,%ebp 10ceb3: 53 push %ebx 10ceb4: 83 ec 08 sub $0x8,%esp 10ceb7: 8b 45 08 mov 0x8(%ebp),%eax 10ceba: 8b 55 0c mov 0xc(%ebp),%edx 10cebd: 8b 5d 10 mov 0x10(%ebp),%ebx _Internal_errors_What_happened.the_source = the_source; 10cec0: a3 60 95 12 00 mov %eax,0x129560 _Internal_errors_What_happened.is_internal = is_internal; 10cec5: 88 15 64 95 12 00 mov %dl,0x129564 _Internal_errors_What_happened.the_error = the_error; 10cecb: 89 1d 68 95 12 00 mov %ebx,0x129568 _User_extensions_Fatal( the_source, is_internal, the_error ); 10ced1: 53 push %ebx 10ced2: 0f b6 d2 movzbl %dl,%edx 10ced5: 52 push %edx 10ced6: 50 push %eax 10ced7: e8 ac 1b 00 00 call 10ea88 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 10cedc: c7 05 80 96 12 00 05 movl $0x5,0x129680 <== NOT EXECUTED 10cee3: 00 00 00 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 10cee6: fa cli <== NOT EXECUTED 10cee7: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10cee9: f4 hlt <== NOT EXECUTED 10ceea: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ceed: eb fe jmp 10ceed <_Internal_error_Occurred+0x3d><== NOT EXECUTED =============================================================================== 001125bc <_Objects_API_maximum_class>: #include unsigned int _Objects_API_maximum_class( uint32_t api ) { 1125bc: 55 push %ebp 1125bd: 89 e5 mov %esp,%ebp case OBJECTS_NO_API: default: break; } return 0; } 1125bf: 8b 45 08 mov 0x8(%ebp),%eax 1125c2: 48 dec %eax 1125c3: 83 f8 03 cmp $0x3,%eax 1125c6: 77 0c ja 1125d4 <_Objects_API_maximum_class+0x18> 1125c8: 8b 04 85 5c 32 12 00 mov 0x12325c(,%eax,4),%eax 1125cf: c9 leave 1125d0: c3 ret 1125d1: 8d 76 00 lea 0x0(%esi),%esi 1125d4: 31 c0 xor %eax,%eax 1125d6: c9 leave 1125d7: c3 ret =============================================================================== 0010cf48 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 10cf48: 55 push %ebp 10cf49: 89 e5 mov %esp,%ebp 10cf4b: 56 push %esi 10cf4c: 53 push %ebx 10cf4d: 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 ) 10cf50: 8b 43 18 mov 0x18(%ebx),%eax 10cf53: 85 c0 test %eax,%eax 10cf55: 75 0d jne 10cf64 <_Objects_Allocate+0x1c><== ALWAYS TAKEN 10cf57: 31 c9 xor %ecx,%ecx <== NOT EXECUTED information->inactive--; } } return the_object; } 10cf59: 89 c8 mov %ecx,%eax 10cf5b: 8d 65 f8 lea -0x8(%ebp),%esp 10cf5e: 5b pop %ebx 10cf5f: 5e pop %esi 10cf60: c9 leave 10cf61: c3 ret 10cf62: 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 ); 10cf64: 8d 73 20 lea 0x20(%ebx),%esi 10cf67: 83 ec 0c sub $0xc,%esp 10cf6a: 56 push %esi 10cf6b: e8 8c f6 ff ff call 10c5fc <_Chain_Get> 10cf70: 89 c1 mov %eax,%ecx if ( information->auto_extend ) { 10cf72: 83 c4 10 add $0x10,%esp 10cf75: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10cf79: 74 de je 10cf59 <_Objects_Allocate+0x11> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 10cf7b: 85 c0 test %eax,%eax 10cf7d: 74 29 je 10cfa8 <_Objects_Allocate+0x60> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 10cf7f: 0f b7 41 08 movzwl 0x8(%ecx),%eax 10cf83: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10cf87: 29 d0 sub %edx,%eax _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 10cf89: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10cf8d: 31 d2 xor %edx,%edx 10cf8f: f7 f6 div %esi 10cf91: c1 e0 02 shl $0x2,%eax 10cf94: 03 43 30 add 0x30(%ebx),%eax 10cf97: ff 08 decl (%eax) information->inactive--; 10cf99: 66 ff 4b 2c decw 0x2c(%ebx) } } return the_object; } 10cf9d: 89 c8 mov %ecx,%eax 10cf9f: 8d 65 f8 lea -0x8(%ebp),%esp 10cfa2: 5b pop %ebx 10cfa3: 5e pop %esi 10cfa4: c9 leave 10cfa5: c3 ret 10cfa6: 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 ); 10cfa8: 83 ec 0c sub $0xc,%esp 10cfab: 53 push %ebx 10cfac: e8 3b 00 00 00 call 10cfec <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 10cfb1: 89 34 24 mov %esi,(%esp) 10cfb4: e8 43 f6 ff ff call 10c5fc <_Chain_Get> 10cfb9: 89 c1 mov %eax,%ecx } if ( the_object ) { 10cfbb: 83 c4 10 add $0x10,%esp 10cfbe: 85 c0 test %eax,%eax 10cfc0: 74 97 je 10cf59 <_Objects_Allocate+0x11> 10cfc2: eb bb jmp 10cf7f <_Objects_Allocate+0x37> =============================================================================== 0010cfec <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 10cfec: 55 push %ebp 10cfed: 89 e5 mov %esp,%ebp 10cfef: 57 push %edi 10cff0: 56 push %esi 10cff1: 53 push %ebx 10cff2: 83 ec 4c sub $0x4c,%esp 10cff5: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Search for a free block of indexes. The block variable ends up set * to block_count + 1 if the table needs to be extended. */ minimum_index = _Objects_Get_index( information->minimum_id ); 10cff8: 0f b7 43 08 movzwl 0x8(%ebx),%eax 10cffc: 89 45 d0 mov %eax,-0x30(%ebp) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 10cfff: 8b 4b 34 mov 0x34(%ebx),%ecx 10d002: 85 c9 test %ecx,%ecx 10d004: 0f 84 72 02 00 00 je 10d27c <_Objects_Extend_information+0x290> block_count = 0; else { block_count = information->maximum / information->allocation_size; 10d00a: 8b 7b 10 mov 0x10(%ebx),%edi 10d00d: 66 89 7d d4 mov %di,-0x2c(%ebp) 10d011: 8b 7b 14 mov 0x14(%ebx),%edi 10d014: 31 d2 xor %edx,%edx 10d016: 8b 45 d4 mov -0x2c(%ebp),%eax 10d019: 66 f7 f7 div %di 10d01c: 0f b7 f0 movzwl %ax,%esi for ( ; block < block_count; block++ ) { 10d01f: 85 f6 test %esi,%esi 10d021: 0f 84 6c 02 00 00 je 10d293 <_Objects_Extend_information+0x2a7><== NEVER TAKEN if ( information->object_blocks[ block ] == NULL ) 10d027: 8b 01 mov (%ecx),%eax 10d029: 85 c0 test %eax,%eax 10d02b: 0f 84 72 02 00 00 je 10d2a3 <_Objects_Extend_information+0x2b7><== NEVER TAKEN 10d031: 0f b7 ff movzwl %di,%edi 10d034: 8b 55 d0 mov -0x30(%ebp),%edx 10d037: 89 55 cc mov %edx,-0x34(%ebp) 10d03a: 31 d2 xor %edx,%edx 10d03c: 8b 45 cc mov -0x34(%ebp),%eax 10d03f: eb 09 jmp 10d04a <_Objects_Extend_information+0x5e> 10d041: 8d 76 00 lea 0x0(%esi),%esi 10d044: 83 3c 91 00 cmpl $0x0,(%ecx,%edx,4) 10d048: 74 07 je 10d051 <_Objects_Extend_information+0x65> break; else index_base += information->allocation_size; 10d04a: 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++ ) { 10d04c: 42 inc %edx 10d04d: 39 d6 cmp %edx,%esi 10d04f: 77 f3 ja 10d044 <_Objects_Extend_information+0x58> 10d051: 89 45 cc mov %eax,-0x34(%ebp) else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 10d054: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10d058: 01 f8 add %edi,%eax 10d05a: 89 45 d4 mov %eax,-0x2c(%ebp) /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 10d05d: 3d ff ff 00 00 cmp $0xffff,%eax 10d062: 0f 87 b1 01 00 00 ja 10d219 <_Objects_Extend_information+0x22d><== NEVER TAKEN /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 10d068: 0f af 7b 18 imul 0x18(%ebx),%edi if ( information->auto_extend ) { 10d06c: 80 7b 12 00 cmpb $0x0,0x12(%ebx) 10d070: 0f 85 ae 01 00 00 jne 10d224 <_Objects_Extend_information+0x238> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 10d076: 83 ec 0c sub $0xc,%esp 10d079: 57 push %edi 10d07a: 89 55 b4 mov %edx,-0x4c(%ebp) 10d07d: e8 6e 1d 00 00 call 10edf0 <_Workspace_Allocate_or_fatal_error> 10d082: 89 45 c4 mov %eax,-0x3c(%ebp) 10d085: 83 c4 10 add $0x10,%esp 10d088: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 10d08b: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d08f: 39 45 cc cmp %eax,-0x34(%ebp) 10d092: 0f 82 fe 00 00 00 jb 10d196 <_Objects_Extend_information+0x1aa> */ /* * Up the block count and maximum */ block_count++; 10d098: 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 ); 10d09b: 83 ec 0c sub $0xc,%esp 10d09e: 8d 04 7f lea (%edi,%edi,2),%eax 10d0a1: 03 45 d4 add -0x2c(%ebp),%eax 10d0a4: 03 45 d0 add -0x30(%ebp),%eax 10d0a7: c1 e0 02 shl $0x2,%eax 10d0aa: 50 push %eax 10d0ab: 89 55 b4 mov %edx,-0x4c(%ebp) 10d0ae: e8 69 1d 00 00 call 10ee1c <_Workspace_Allocate> 10d0b3: 89 45 c8 mov %eax,-0x38(%ebp) if ( !object_blocks ) { 10d0b6: 83 c4 10 add $0x10,%esp 10d0b9: 85 c0 test %eax,%eax 10d0bb: 8b 55 b4 mov -0x4c(%ebp),%edx 10d0be: 0f 84 ef 01 00 00 je 10d2b3 <_Objects_Extend_information+0x2c7> RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 10d0c4: 8b 45 c8 mov -0x38(%ebp),%eax 10d0c7: 8d 04 b8 lea (%eax,%edi,4),%eax 10d0ca: 89 45 b8 mov %eax,-0x48(%ebp) 10d0cd: 8b 4d c8 mov -0x38(%ebp),%ecx 10d0d0: 8d 3c f9 lea (%ecx,%edi,8),%edi 10d0d3: 89 7d bc mov %edi,-0x44(%ebp) * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 10d0d6: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d0da: 39 45 d0 cmp %eax,-0x30(%ebp) 10d0dd: 0f 82 60 01 00 00 jb 10d243 <_Objects_Extend_information+0x257> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d0e3: 8b 45 d0 mov -0x30(%ebp),%eax 10d0e6: 85 c0 test %eax,%eax 10d0e8: 74 16 je 10d100 <_Objects_Extend_information+0x114><== NEVER TAKEN information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d0ea: 31 c0 xor %eax,%eax 10d0ec: 8b 4d bc mov -0x44(%ebp),%ecx 10d0ef: 8b 7d d0 mov -0x30(%ebp),%edi 10d0f2: 66 90 xchg %ax,%ax /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 10d0f4: c7 04 81 00 00 00 00 movl $0x0,(%ecx,%eax,4) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 10d0fb: 40 inc %eax 10d0fc: 39 c7 cmp %eax,%edi 10d0fe: 77 f4 ja 10d0f4 <_Objects_Extend_information+0x108><== NEVER TAKEN 10d100: c1 e6 02 shl $0x2,%esi 10d103: 89 75 c0 mov %esi,-0x40(%ebp) } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 10d106: 8b 45 c8 mov -0x38(%ebp),%eax 10d109: 8b 7d c0 mov -0x40(%ebp),%edi 10d10c: c7 04 38 00 00 00 00 movl $0x0,(%eax,%edi,1) inactive_per_block[block_count] = 0; 10d113: 8b 4d b8 mov -0x48(%ebp),%ecx 10d116: c7 04 39 00 00 00 00 movl $0x0,(%ecx,%edi,1) for ( index=index_base ; index < ( information->allocation_size + index_base ); 10d11d: 0f b7 73 14 movzwl 0x14(%ebx),%esi 10d121: 03 75 cc add -0x34(%ebp),%esi * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10d124: 39 75 cc cmp %esi,-0x34(%ebp) 10d127: 73 19 jae 10d142 <_Objects_Extend_information+0x156><== NEVER TAKEN 10d129: 8b 7d cc mov -0x34(%ebp),%edi 10d12c: 8b 45 bc mov -0x44(%ebp),%eax 10d12f: 8d 0c b8 lea (%eax,%edi,4),%ecx 10d132: 89 f8 mov %edi,%eax index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 10d134: c7 01 00 00 00 00 movl $0x0,(%ecx) object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 10d13a: 40 inc %eax 10d13b: 83 c1 04 add $0x4,%ecx * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 10d13e: 39 c6 cmp %eax,%esi 10d140: 77 f2 ja 10d134 <_Objects_Extend_information+0x148> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 10d142: 9c pushf 10d143: fa cli 10d144: 5f pop %edi old_tables = information->object_blocks; 10d145: 8b 4b 34 mov 0x34(%ebx),%ecx information->object_blocks = object_blocks; 10d148: 8b 45 c8 mov -0x38(%ebp),%eax 10d14b: 89 43 34 mov %eax,0x34(%ebx) information->inactive_per_block = inactive_per_block; 10d14e: 8b 45 b8 mov -0x48(%ebp),%eax 10d151: 89 43 30 mov %eax,0x30(%ebx) information->local_table = local_table; 10d154: 8b 45 bc mov -0x44(%ebp),%eax 10d157: 89 43 1c mov %eax,0x1c(%ebx) information->maximum = (Objects_Maximum) maximum; 10d15a: 8b 45 d4 mov -0x2c(%ebp),%eax 10d15d: 66 89 43 10 mov %ax,0x10(%ebx) information->maximum_id = _Objects_Build_id( 10d161: 8b 33 mov (%ebx),%esi 10d163: c1 e6 18 shl $0x18,%esi 10d166: 81 ce 00 00 01 00 or $0x10000,%esi 10d16c: 0f b7 43 04 movzwl 0x4(%ebx),%eax 10d170: c1 e0 1b shl $0x1b,%eax 10d173: 09 c6 or %eax,%esi 10d175: 0f b7 45 d4 movzwl -0x2c(%ebp),%eax 10d179: 09 c6 or %eax,%esi 10d17b: 89 73 0c mov %esi,0xc(%ebx) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 10d17e: 57 push %edi 10d17f: 9d popf if ( old_tables ) 10d180: 85 c9 test %ecx,%ecx 10d182: 74 12 je 10d196 <_Objects_Extend_information+0x1aa> _Workspace_Free( old_tables ); 10d184: 83 ec 0c sub $0xc,%esp 10d187: 51 push %ecx 10d188: 89 55 b4 mov %edx,-0x4c(%ebp) 10d18b: e8 a8 1c 00 00 call 10ee38 <_Workspace_Free> 10d190: 83 c4 10 add $0x10,%esp 10d193: 8b 55 b4 mov -0x4c(%ebp),%edx } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 10d196: c1 e2 02 shl $0x2,%edx 10d199: 89 55 d0 mov %edx,-0x30(%ebp) 10d19c: 8b 43 34 mov 0x34(%ebx),%eax 10d19f: 8b 4d c4 mov -0x3c(%ebp),%ecx 10d1a2: 89 0c 10 mov %ecx,(%eax,%edx,1) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 10d1a5: ff 73 18 pushl 0x18(%ebx) 10d1a8: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d1ac: 52 push %edx 10d1ad: 8b 7d d0 mov -0x30(%ebp),%edi 10d1b0: ff 34 38 pushl (%eax,%edi,1) 10d1b3: 8d 7d dc lea -0x24(%ebp),%edi 10d1b6: 57 push %edi 10d1b7: e8 a8 4d 00 00 call 111f64 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d1bc: 8d 43 20 lea 0x20(%ebx),%eax 10d1bf: 89 45 d4 mov %eax,-0x2c(%ebp) 10d1c2: 8b 75 cc mov -0x34(%ebp),%esi /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 10d1c5: 83 c4 10 add $0x10,%esp 10d1c8: eb 2b jmp 10d1f5 <_Objects_Extend_information+0x209> 10d1ca: 66 90 xchg %ax,%ax the_object->id = _Objects_Build_id( 10d1cc: 8b 13 mov (%ebx),%edx 10d1ce: c1 e2 18 shl $0x18,%edx 10d1d1: 81 ca 00 00 01 00 or $0x10000,%edx 10d1d7: 0f b7 4b 04 movzwl 0x4(%ebx),%ecx 10d1db: c1 e1 1b shl $0x1b,%ecx 10d1de: 09 ca or %ecx,%edx 10d1e0: 09 f2 or %esi,%edx 10d1e2: 89 50 08 mov %edx,0x8(%eax) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 10d1e5: 83 ec 08 sub $0x8,%esp 10d1e8: 50 push %eax 10d1e9: ff 75 d4 pushl -0x2c(%ebp) 10d1ec: e8 cf f3 ff ff call 10c5c0 <_Chain_Append> index++; 10d1f1: 46 inc %esi 10d1f2: 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 ) { 10d1f5: 83 ec 0c sub $0xc,%esp 10d1f8: 57 push %edi 10d1f9: e8 fe f3 ff ff call 10c5fc <_Chain_Get> 10d1fe: 83 c4 10 add $0x10,%esp 10d201: 85 c0 test %eax,%eax 10d203: 75 c7 jne 10d1cc <_Objects_Extend_information+0x1e0> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 10d205: 8b 43 30 mov 0x30(%ebx),%eax 10d208: 0f b7 53 14 movzwl 0x14(%ebx),%edx 10d20c: 8b 4d d0 mov -0x30(%ebp),%ecx 10d20f: 89 14 08 mov %edx,(%eax,%ecx,1) information->inactive = 10d212: 8b 43 14 mov 0x14(%ebx),%eax 10d215: 66 01 43 2c add %ax,0x2c(%ebx) (Objects_Maximum)(information->inactive + information->allocation_size); } 10d219: 8d 65 f4 lea -0xc(%ebp),%esp 10d21c: 5b pop %ebx 10d21d: 5e pop %esi 10d21e: 5f pop %edi 10d21f: c9 leave 10d220: c3 ret 10d221: 8d 76 00 lea 0x0(%esi),%esi * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 10d224: 83 ec 0c sub $0xc,%esp 10d227: 57 push %edi 10d228: 89 55 b4 mov %edx,-0x4c(%ebp) 10d22b: e8 ec 1b 00 00 call 10ee1c <_Workspace_Allocate> 10d230: 89 45 c4 mov %eax,-0x3c(%ebp) if ( !new_object_block ) 10d233: 83 c4 10 add $0x10,%esp 10d236: 85 c0 test %eax,%eax 10d238: 8b 55 b4 mov -0x4c(%ebp),%edx 10d23b: 0f 85 4a fe ff ff jne 10d08b <_Objects_Extend_information+0x9f> 10d241: eb d6 jmp 10d219 <_Objects_Extend_information+0x22d> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 10d243: c1 e6 02 shl $0x2,%esi 10d246: 89 75 c0 mov %esi,-0x40(%ebp) 10d249: 8b 73 34 mov 0x34(%ebx),%esi 10d24c: 8b 7d c8 mov -0x38(%ebp),%edi 10d24f: 8b 4d c0 mov -0x40(%ebp),%ecx 10d252: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 10d254: 8b 73 30 mov 0x30(%ebx),%esi 10d257: 8b 7d b8 mov -0x48(%ebp),%edi 10d25a: 8b 4d c0 mov -0x40(%ebp),%ecx 10d25d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 10d25f: 0f b7 43 10 movzwl 0x10(%ebx),%eax 10d263: 03 45 d0 add -0x30(%ebp),%eax 10d266: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx 10d26d: 8b 73 1c mov 0x1c(%ebx),%esi 10d270: 8b 7d bc mov -0x44(%ebp),%edi 10d273: f3 a4 rep movsb %ds:(%esi),%es:(%edi) 10d275: e9 8c fe ff ff jmp 10d106 <_Objects_Extend_information+0x11a> 10d27a: 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 ) 10d27c: 8b 53 10 mov 0x10(%ebx),%edx 10d27f: 66 89 55 d4 mov %dx,-0x2c(%ebp) 10d283: 0f b7 7b 14 movzwl 0x14(%ebx),%edi 10d287: 89 45 cc mov %eax,-0x34(%ebp) 10d28a: 31 d2 xor %edx,%edx 10d28c: 31 f6 xor %esi,%esi 10d28e: e9 c1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 10d293: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d296: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 10d299: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED 10d29c: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d29e: e9 b1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68><== NOT EXECUTED if ( information->object_blocks[ block ] == NULL ) 10d2a3: 0f b7 ff movzwl %di,%edi <== NOT EXECUTED 10d2a6: 8b 4d d0 mov -0x30(%ebp),%ecx <== NOT EXECUTED 10d2a9: 89 4d cc mov %ecx,-0x34(%ebp) <== NOT EXECUTED 10d2ac: 31 d2 xor %edx,%edx <== NOT EXECUTED 10d2ae: e9 a1 fd ff ff jmp 10d054 <_Objects_Extend_information+0x68><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 10d2b3: 83 ec 0c sub $0xc,%esp 10d2b6: ff 75 c4 pushl -0x3c(%ebp) 10d2b9: e8 7a 1b 00 00 call 10ee38 <_Workspace_Free> return; 10d2be: 83 c4 10 add $0x10,%esp 10d2c1: e9 53 ff ff ff jmp 10d219 <_Objects_Extend_information+0x22d> =============================================================================== 0010d358 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 10d358: 55 push %ebp 10d359: 89 e5 mov %esp,%ebp 10d35b: 56 push %esi 10d35c: 53 push %ebx 10d35d: 8b 75 08 mov 0x8(%ebp),%esi 10d360: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 10d363: 85 db test %ebx,%ebx 10d365: 75 09 jne 10d370 <_Objects_Get_information+0x18> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10d367: 31 c0 xor %eax,%eax return NULL; #endif return info; } 10d369: 8d 65 f8 lea -0x8(%ebp),%esp 10d36c: 5b pop %ebx 10d36d: 5e pop %esi 10d36e: c9 leave 10d36f: c3 ret /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 10d370: 83 ec 0c sub $0xc,%esp 10d373: 56 push %esi 10d374: e8 43 52 00 00 call 1125bc <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 10d379: 83 c4 10 add $0x10,%esp 10d37c: 85 c0 test %eax,%eax 10d37e: 74 e7 je 10d367 <_Objects_Get_information+0xf> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 10d380: 39 c3 cmp %eax,%ebx 10d382: 77 e3 ja 10d367 <_Objects_Get_information+0xf> return NULL; if ( !_Objects_Information_table[ the_api ] ) 10d384: 8b 04 b5 8c 94 12 00 mov 0x12948c(,%esi,4),%eax 10d38b: 85 c0 test %eax,%eax 10d38d: 74 d8 je 10d367 <_Objects_Get_information+0xf><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 10d38f: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !info ) 10d392: 85 c0 test %eax,%eax 10d394: 74 d3 je 10d369 <_Objects_Get_information+0x11><== NEVER TAKEN * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) 10d396: 66 83 78 10 00 cmpw $0x0,0x10(%eax) 10d39b: 75 cc jne 10d369 <_Objects_Get_information+0x11> 10d39d: eb c8 jmp 10d367 <_Objects_Get_information+0xf> =============================================================================== 0010d3a0 <_Objects_Get_isr_disable>: Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 10d3a0: 55 push %ebp 10d3a1: 89 e5 mov %esp,%ebp 10d3a3: 56 push %esi 10d3a4: 53 push %ebx 10d3a5: 8b 55 08 mov 0x8(%ebp),%edx 10d3a8: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; 10d3ab: b8 01 00 00 00 mov $0x1,%eax 10d3b0: 2b 42 08 sub 0x8(%edx),%eax 10d3b3: 03 45 0c add 0xc(%ebp),%eax _ISR_Disable( level ); 10d3b6: 9c pushf 10d3b7: fa cli 10d3b8: 5e pop %esi if ( information->maximum >= index ) { 10d3b9: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 10d3bd: 39 c8 cmp %ecx,%eax 10d3bf: 77 1b ja 10d3dc <_Objects_Get_isr_disable+0x3c> if ( (the_object = information->local_table[ index ]) != NULL ) { 10d3c1: 8b 52 1c mov 0x1c(%edx),%edx 10d3c4: 8b 04 82 mov (%edx,%eax,4),%eax 10d3c7: 85 c0 test %eax,%eax 10d3c9: 74 21 je 10d3ec <_Objects_Get_isr_disable+0x4c> *location = OBJECTS_LOCAL; 10d3cb: c7 03 00 00 00 00 movl $0x0,(%ebx) *level_p = level; 10d3d1: 8b 55 14 mov 0x14(%ebp),%edx 10d3d4: 89 32 mov %esi,(%edx) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d3d6: 5b pop %ebx 10d3d7: 5e pop %esi 10d3d8: c9 leave 10d3d9: c3 ret 10d3da: 66 90 xchg %ax,%ax } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 10d3dc: 56 push %esi 10d3dd: 9d popf *location = OBJECTS_ERROR; 10d3de: c7 03 01 00 00 00 movl $0x1,(%ebx) 10d3e4: 31 c0 xor %eax,%eax _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 10d3e6: 5b pop %ebx 10d3e7: 5e pop %esi 10d3e8: c9 leave 10d3e9: c3 ret 10d3ea: 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 ); 10d3ec: 56 push %esi 10d3ed: 9d popf *location = OBJECTS_ERROR; 10d3ee: c7 03 01 00 00 00 movl $0x1,(%ebx) return NULL; 10d3f4: eb e0 jmp 10d3d6 <_Objects_Get_isr_disable+0x36> =============================================================================== 0010ea48 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10ea48: 55 push %ebp 10ea49: 89 e5 mov %esp,%ebp 10ea4b: 57 push %edi 10ea4c: 56 push %esi 10ea4d: 53 push %ebx 10ea4e: 83 ec 2c sub $0x2c,%esp 10ea51: 8b 55 08 mov 0x8(%ebp),%edx 10ea54: 8b 75 0c mov 0xc(%ebp),%esi 10ea57: 8b 5d 10 mov 0x10(%ebp),%ebx char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10ea5a: 85 f6 test %esi,%esi 10ea5c: 75 0e jne 10ea6c <_Objects_Get_name_as_string+0x24> } } *d = '\0'; _Thread_Enable_dispatch(); return name; 10ea5e: 31 db xor %ebx,%ebx } return NULL; /* unreachable path */ } 10ea60: 89 d8 mov %ebx,%eax 10ea62: 8d 65 f4 lea -0xc(%ebp),%esp 10ea65: 5b pop %ebx 10ea66: 5e pop %esi 10ea67: 5f pop %edi 10ea68: c9 leave 10ea69: c3 ret 10ea6a: 66 90 xchg %ax,%ax Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 10ea6c: 85 db test %ebx,%ebx 10ea6e: 74 f0 je 10ea60 <_Objects_Get_name_as_string+0x18> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10ea70: 85 d2 test %edx,%edx 10ea72: 75 08 jne 10ea7c <_Objects_Get_name_as_string+0x34> 10ea74: a1 78 cd 12 00 mov 0x12cd78,%eax 10ea79: 8b 50 08 mov 0x8(%eax),%edx information = _Objects_Get_information_id( tmpId ); 10ea7c: 83 ec 0c sub $0xc,%esp 10ea7f: 52 push %edx 10ea80: 89 55 cc mov %edx,-0x34(%ebp) 10ea83: e8 00 ff ff ff call 10e988 <_Objects_Get_information_id> 10ea88: 89 c7 mov %eax,%edi if ( !information ) 10ea8a: 83 c4 10 add $0x10,%esp 10ea8d: 85 c0 test %eax,%eax 10ea8f: 8b 55 cc mov -0x34(%ebp),%edx 10ea92: 74 ca je 10ea5e <_Objects_Get_name_as_string+0x16> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 10ea94: 51 push %ecx 10ea95: 8d 45 e4 lea -0x1c(%ebp),%eax 10ea98: 50 push %eax 10ea99: 52 push %edx 10ea9a: 57 push %edi 10ea9b: e8 8c 00 00 00 call 10eb2c <_Objects_Get> switch ( location ) { 10eaa0: 83 c4 10 add $0x10,%esp 10eaa3: 8b 55 e4 mov -0x1c(%ebp),%edx 10eaa6: 85 d2 test %edx,%edx 10eaa8: 75 b4 jne 10ea5e <_Objects_Get_name_as_string+0x16> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10eaaa: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10eaae: 74 4e je 10eafe <_Objects_Get_name_as_string+0xb6> s = the_object->name.name_p; 10eab0: 8b 78 0c mov 0xc(%eax),%edi lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 10eab3: 85 ff test %edi,%edi 10eab5: 74 6e je 10eb25 <_Objects_Get_name_as_string+0xdd> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10eab7: 4e dec %esi 10eab8: 89 75 d4 mov %esi,-0x2c(%ebp) 10eabb: 74 68 je 10eb25 <_Objects_Get_name_as_string+0xdd><== NEVER TAKEN 10eabd: 8a 07 mov (%edi),%al 10eabf: 84 c0 test %al,%al 10eac1: 74 62 je 10eb25 <_Objects_Get_name_as_string+0xdd> 10eac3: 89 d9 mov %ebx,%ecx 10eac5: 31 d2 xor %edx,%edx 10eac7: 89 5d d0 mov %ebx,-0x30(%ebp) 10eaca: eb 07 jmp 10ead3 <_Objects_Get_name_as_string+0x8b> 10eacc: 8a 04 17 mov (%edi,%edx,1),%al 10eacf: 84 c0 test %al,%al 10ead1: 74 1b je 10eaee <_Objects_Get_name_as_string+0xa6> *d = (isprint((unsigned char)*s)) ? *s : '*'; 10ead3: 0f b6 d8 movzbl %al,%ebx 10ead6: 8b 35 f8 a5 12 00 mov 0x12a5f8,%esi 10eadc: f6 44 1e 01 97 testb $0x97,0x1(%esi,%ebx,1) 10eae1: 75 02 jne 10eae5 <_Objects_Get_name_as_string+0x9d> 10eae3: b0 2a mov $0x2a,%al 10eae5: 88 01 mov %al,(%ecx) s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10eae7: 42 inc %edx 10eae8: 41 inc %ecx 10eae9: 3b 55 d4 cmp -0x2c(%ebp),%edx 10eaec: 72 de jb 10eacc <_Objects_Get_name_as_string+0x84> 10eaee: 8b 5d d0 mov -0x30(%ebp),%ebx *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 10eaf1: c6 01 00 movb $0x0,(%ecx) _Thread_Enable_dispatch(); 10eaf4: e8 a7 08 00 00 call 10f3a0 <_Thread_Enable_dispatch> return name; 10eaf9: e9 62 ff ff ff jmp 10ea60 <_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; 10eafe: 8b 40 0c mov 0xc(%eax),%eax lname[ 0 ] = (u32_name >> 24) & 0xff; 10eb01: 89 c2 mov %eax,%edx 10eb03: c1 ea 18 shr $0x18,%edx 10eb06: 88 55 df mov %dl,-0x21(%ebp) lname[ 1 ] = (u32_name >> 16) & 0xff; 10eb09: 89 c2 mov %eax,%edx 10eb0b: c1 ea 10 shr $0x10,%edx 10eb0e: 88 55 e0 mov %dl,-0x20(%ebp) lname[ 2 ] = (u32_name >> 8) & 0xff; 10eb11: 89 c2 mov %eax,%edx 10eb13: c1 ea 08 shr $0x8,%edx 10eb16: 88 55 e1 mov %dl,-0x1f(%ebp) lname[ 3 ] = (u32_name >> 0) & 0xff; 10eb19: 88 45 e2 mov %al,-0x1e(%ebp) lname[ 4 ] = '\0'; 10eb1c: c6 45 e3 00 movb $0x0,-0x1d(%ebp) 10eb20: 8d 7d df lea -0x21(%ebp),%edi 10eb23: eb 92 jmp 10eab7 <_Objects_Get_name_as_string+0x6f> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10eb25: 89 d9 mov %ebx,%ecx 10eb27: eb c8 jmp 10eaf1 <_Objects_Get_name_as_string+0xa9> =============================================================================== 0010d544 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 10d544: 55 push %ebp 10d545: 89 e5 mov %esp,%ebp 10d547: 57 push %edi 10d548: 56 push %esi 10d549: 53 push %ebx 10d54a: 83 ec 0c sub $0xc,%esp 10d54d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d550: 8b 75 0c mov 0xc(%ebp),%esi 10d553: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Control *object; Objects_Id next_id; if ( !information ) 10d556: 85 db test %ebx,%ebx 10d558: 75 0a jne 10d564 <_Objects_Get_next+0x20> *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; 10d55a: 31 c0 xor %eax,%eax } 10d55c: 8d 65 f4 lea -0xc(%ebp),%esp 10d55f: 5b pop %ebx 10d560: 5e pop %esi 10d561: 5f pop %edi 10d562: c9 leave 10d563: c3 ret Objects_Id next_id; if ( !information ) return NULL; if ( !location_p ) 10d564: 85 ff test %edi,%edi 10d566: 74 f2 je 10d55a <_Objects_Get_next+0x16> return NULL; if ( !next_id_p ) 10d568: 8b 45 14 mov 0x14(%ebp),%eax 10d56b: 85 c0 test %eax,%eax 10d56d: 74 eb je 10d55a <_Objects_Get_next+0x16> return NULL; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 10d56f: 66 85 f6 test %si,%si 10d572: 75 04 jne 10d578 <_Objects_Get_next+0x34> next_id = information->minimum_id; 10d574: 8b 73 08 mov 0x8(%ebx),%esi 10d577: 90 nop else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 10d578: 66 39 73 10 cmp %si,0x10(%ebx) 10d57c: 72 22 jb 10d5a0 <_Objects_Get_next+0x5c> *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 10d57e: 51 push %ecx 10d57f: 57 push %edi 10d580: 56 push %esi 10d581: 53 push %ebx 10d582: e8 2d 00 00 00 call 10d5b4 <_Objects_Get> next_id++; 10d587: 46 inc %esi } while (*location_p != OBJECTS_LOCAL); 10d588: 83 c4 10 add $0x10,%esp 10d58b: 8b 17 mov (%edi),%edx 10d58d: 85 d2 test %edx,%edx 10d58f: 75 e7 jne 10d578 <_Objects_Get_next+0x34> *next_id_p = next_id; 10d591: 8b 55 14 mov 0x14(%ebp),%edx 10d594: 89 32 mov %esi,(%edx) return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 10d596: 8d 65 f4 lea -0xc(%ebp),%esp 10d599: 5b pop %ebx 10d59a: 5e pop %esi 10d59b: 5f pop %edi 10d59c: c9 leave 10d59d: c3 ret 10d59e: 66 90 xchg %ax,%ax do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 10d5a0: c7 07 01 00 00 00 movl $0x1,(%edi) *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 10d5a6: 8b 45 14 mov 0x14(%ebp),%eax 10d5a9: c7 00 ff ff ff ff movl $0xffffffff,(%eax) 10d5af: 31 c0 xor %eax,%eax return 0; 10d5b1: eb a9 jmp 10d55c <_Objects_Get_next+0x18> =============================================================================== 0011b99c <_Objects_Get_no_protection>: Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 11b99c: 55 push %ebp 11b99d: 89 e5 mov %esp,%ebp 11b99f: 53 push %ebx 11b9a0: 8b 55 08 mov 0x8(%ebp),%edx 11b9a3: 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; 11b9a6: b8 01 00 00 00 mov $0x1,%eax 11b9ab: 2b 42 08 sub 0x8(%edx),%eax 11b9ae: 03 45 0c add 0xc(%ebp),%eax if ( information->maximum >= index ) { 11b9b1: 0f b7 4a 10 movzwl 0x10(%edx),%ecx 11b9b5: 39 c8 cmp %ecx,%eax 11b9b7: 77 13 ja 11b9cc <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 11b9b9: 8b 52 1c mov 0x1c(%edx),%edx 11b9bc: 8b 04 82 mov (%edx,%eax,4),%eax 11b9bf: 85 c0 test %eax,%eax 11b9c1: 74 09 je 11b9cc <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 11b9c3: 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; } 11b9c9: 5b pop %ebx 11b9ca: c9 leave 11b9cb: 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; 11b9cc: c7 03 01 00 00 00 movl $0x1,(%ebx) 11b9d2: 31 c0 xor %eax,%eax return NULL; } 11b9d4: 5b pop %ebx 11b9d5: c9 leave 11b9d6: c3 ret =============================================================================== 0010e68c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 10e68c: 55 push %ebp 10e68d: 89 e5 mov %esp,%ebp 10e68f: 83 ec 18 sub $0x18,%esp 10e692: 8b 55 08 mov 0x8(%ebp),%edx /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10e695: 85 d2 test %edx,%edx 10e697: 75 08 jne 10e6a1 <_Objects_Id_to_name+0x15> 10e699: a1 98 bc 12 00 mov 0x12bc98,%eax 10e69e: 8b 50 08 mov 0x8(%eax),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 10e6a1: 89 d0 mov %edx,%eax 10e6a3: c1 e8 18 shr $0x18,%eax 10e6a6: 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 ) 10e6a9: 8d 48 ff lea -0x1(%eax),%ecx 10e6ac: 83 f9 03 cmp $0x3,%ecx 10e6af: 77 1d ja 10e6ce <_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 ] ) 10e6b1: 8b 04 85 ac bb 12 00 mov 0x12bbac(,%eax,4),%eax 10e6b8: 85 c0 test %eax,%eax 10e6ba: 74 12 je 10e6ce <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 10e6bc: 89 d1 mov %edx,%ecx 10e6be: c1 e9 1b shr $0x1b,%ecx 10e6c1: 8b 04 88 mov (%eax,%ecx,4),%eax if ( !information ) 10e6c4: 85 c0 test %eax,%eax 10e6c6: 74 06 je 10e6ce <_Objects_Id_to_name+0x42><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 10e6c8: 80 78 38 00 cmpb $0x0,0x38(%eax) 10e6cc: 74 0a je 10e6d8 <_Objects_Id_to_name+0x4c><== ALWAYS TAKEN if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 10e6ce: b8 03 00 00 00 mov $0x3,%eax } 10e6d3: c9 leave 10e6d4: c3 ret 10e6d5: 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 ); 10e6d8: 51 push %ecx 10e6d9: 8d 4d f4 lea -0xc(%ebp),%ecx 10e6dc: 51 push %ecx 10e6dd: 52 push %edx 10e6de: 50 push %eax 10e6df: e8 40 ff ff ff call 10e624 <_Objects_Get> if ( !the_object ) 10e6e4: 83 c4 10 add $0x10,%esp 10e6e7: 85 c0 test %eax,%eax 10e6e9: 74 e3 je 10e6ce <_Objects_Id_to_name+0x42> return OBJECTS_INVALID_ID; *name = the_object->name; 10e6eb: 8b 50 0c mov 0xc(%eax),%edx 10e6ee: 8b 45 0c mov 0xc(%ebp),%eax 10e6f1: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10e6f3: e8 10 08 00 00 call 10ef08 <_Thread_Enable_dispatch> 10e6f8: 31 c0 xor %eax,%eax return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 10e6fa: c9 leave 10e6fb: c3 ret =============================================================================== 0010d460 <_Objects_Initialize_information>: , bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) { 10d460: 55 push %ebp 10d461: 89 e5 mov %esp,%ebp 10d463: 57 push %edi 10d464: 56 push %esi 10d465: 53 push %ebx 10d466: 83 ec 0c sub $0xc,%esp 10d469: 8b 45 08 mov 0x8(%ebp),%eax 10d46c: 8b 55 0c mov 0xc(%ebp),%edx 10d46f: 8b 5d 10 mov 0x10(%ebp),%ebx 10d472: 8b 75 20 mov 0x20(%ebp),%esi 10d475: 0f b7 7d 18 movzwl 0x18(%ebp),%edi uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; 10d479: 89 10 mov %edx,(%eax) information->the_class = the_class; 10d47b: 66 89 58 04 mov %bx,0x4(%eax) information->size = size; 10d47f: 89 78 18 mov %edi,0x18(%eax) information->local_table = 0; 10d482: c7 40 1c 00 00 00 00 movl $0x0,0x1c(%eax) information->inactive_per_block = 0; 10d489: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) information->object_blocks = 0; 10d490: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) information->inactive = 0; 10d497: 66 c7 40 2c 00 00 movw $0x0,0x2c(%eax) #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) information->is_string = is_string; 10d49d: 8b 7d 1c mov 0x1c(%ebp),%edi 10d4a0: 89 f9 mov %edi,%ecx 10d4a2: 88 48 38 mov %cl,0x38(%eax) /* * Set the maximum value to 0. It will be updated when objects are * added to the inactive set from _Objects_Extend_information() */ information->maximum = 0; 10d4a5: 66 c7 40 10 00 00 movw $0x0,0x10(%eax) /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information; 10d4ab: 8b 3c 95 8c 94 12 00 mov 0x12948c(,%edx,4),%edi 10d4b2: 89 04 9f mov %eax,(%edi,%ebx,4) /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; 10d4b5: 8b 7d 14 mov 0x14(%ebp),%edi 10d4b8: c1 ef 1f shr $0x1f,%edi _Objects_Information_table[ the_api ][ the_class ] = information; /* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = 10d4bb: 89 f9 mov %edi,%ecx 10d4bd: 88 48 12 mov %cl,0x12(%eax) (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false; maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS; 10d4c0: 8b 4d 14 mov 0x14(%ebp),%ecx 10d4c3: 81 e1 ff ff ff 7f and $0x7fffffff,%ecx /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { 10d4c9: 85 ff test %edi,%edi 10d4cb: 74 04 je 10d4d1 <_Objects_Initialize_information+0x71> 10d4cd: 85 c9 test %ecx,%ecx 10d4cf: 74 6a je 10d53b <_Objects_Initialize_information+0xdb> } /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation; 10d4d1: 66 89 48 14 mov %cx,0x14(%eax) /* * Provide a null local table entry for the case of any empty table. */ information->local_table = &null_local_table; 10d4d5: c7 40 1c 04 91 12 00 movl $0x129104,0x1c(%eax) /* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id = 10d4dc: c1 e2 18 shl $0x18,%edx 10d4df: 81 ca 00 00 01 00 or $0x10000,%edx 10d4e5: c1 e3 1b shl $0x1b,%ebx 10d4e8: 09 da or %ebx,%edx 10d4ea: 31 db xor %ebx,%ebx 10d4ec: 85 c9 test %ecx,%ecx 10d4ee: 0f 95 c3 setne %bl 10d4f1: 09 da or %ebx,%edx 10d4f3: 89 50 08 mov %edx,0x8(%eax) /* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) 10d4f6: f7 c6 03 00 00 00 test $0x3,%esi 10d4fc: 75 26 jne 10d524 <_Objects_Initialize_information+0xc4> name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length; 10d4fe: 66 89 70 3a mov %si,0x3a(%eax) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10d502: 8d 50 24 lea 0x24(%eax),%edx 10d505: 89 50 20 mov %edx,0x20(%eax) the_chain->permanent_null = NULL; 10d508: c7 40 24 00 00 00 00 movl $0x0,0x24(%eax) the_chain->last = _Chain_Head(the_chain); 10d50f: 8d 50 20 lea 0x20(%eax),%edx 10d512: 89 50 28 mov %edx,0x28(%eax) _Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) { 10d515: 85 c9 test %ecx,%ecx 10d517: 75 13 jne 10d52c <_Objects_Initialize_information+0xcc> _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d519: 8d 65 f4 lea -0xc(%ebp),%esp 10d51c: 5b pop %ebx 10d51d: 5e pop %esi 10d51e: 5f pop %edi 10d51f: c9 leave 10d520: c3 ret 10d521: 8d 76 00 lea 0x0(%esi),%esi * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) ) name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & 10d524: 83 c6 04 add $0x4,%esi 10d527: 83 e6 fc and $0xfffffffc,%esi 10d52a: eb d2 jmp 10d4fe <_Objects_Initialize_information+0x9e> /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10d52c: 89 45 08 mov %eax,0x8(%ebp) _Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif } 10d52f: 8d 65 f4 lea -0xc(%ebp),%esp 10d532: 5b pop %ebx 10d533: 5e pop %esi 10d534: 5f pop %edi 10d535: c9 leave /* * Always have the maximum size available so the current performance * figures are create are met. If the user moves past the maximum * number then a performance hit is taken. */ _Objects_Extend_information( information ); 10d536: e9 b1 fa ff ff jmp 10cfec <_Objects_Extend_information> /* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred( 10d53b: 50 push %eax 10d53c: 6a 14 push $0x14 10d53e: 6a 01 push $0x1 10d540: 6a 00 push $0x0 10d542: e8 69 f9 ff ff call 10ceb0 <_Internal_error_Occurred> =============================================================================== 00118898 <_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 ) { 118898: 55 push %ebp 118899: 89 e5 mov %esp,%ebp 11889b: 57 push %edi 11889c: 56 push %esi 11889d: 53 push %ebx 11889e: 83 ec 1c sub $0x1c,%esp 1188a1: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 1188a4: 8b 5d 10 mov 0x10(%ebp),%ebx 1188a7: 85 db test %ebx,%ebx 1188a9: 74 75 je 118920 <_Objects_Name_to_id_string+0x88> return OBJECTS_INVALID_ADDRESS; if ( !name ) 1188ab: 8b 4d 0c mov 0xc(%ebp),%ecx 1188ae: 85 c9 test %ecx,%ecx 1188b0: 74 4b je 1188fd <_Objects_Name_to_id_string+0x65> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 1188b2: 8b 47 10 mov 0x10(%edi),%eax 1188b5: 66 85 c0 test %ax,%ax 1188b8: 74 43 je 1188fd <_Objects_Name_to_id_string+0x65> name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1188ba: 0f b7 c0 movzwl %ax,%eax 1188bd: 89 45 e4 mov %eax,-0x1c(%ebp) 1188c0: 8b 47 1c mov 0x1c(%edi),%eax 1188c3: bb 01 00 00 00 mov $0x1,%ebx 1188c8: 89 7d e0 mov %edi,-0x20(%ebp) 1188cb: 89 c7 mov %eax,%edi 1188cd: 8d 76 00 lea 0x0(%esi),%esi the_object = information->local_table[ index ]; 1188d0: 8b 34 9f mov (%edi,%ebx,4),%esi if ( !the_object ) 1188d3: 85 f6 test %esi,%esi 1188d5: 74 20 je 1188f7 <_Objects_Name_to_id_string+0x5f> continue; if ( !the_object->name.name_p ) 1188d7: 8b 46 0c mov 0xc(%esi),%eax 1188da: 85 c0 test %eax,%eax 1188dc: 74 19 je 1188f7 <_Objects_Name_to_id_string+0x5f> continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 1188de: 52 push %edx 1188df: 8b 4d e0 mov -0x20(%ebp),%ecx 1188e2: 0f b7 51 3a movzwl 0x3a(%ecx),%edx 1188e6: 52 push %edx 1188e7: 50 push %eax 1188e8: ff 75 0c pushl 0xc(%ebp) 1188eb: e8 fc 3c 00 00 call 11c5ec 1188f0: 83 c4 10 add $0x10,%esp 1188f3: 85 c0 test %eax,%eax 1188f5: 74 15 je 11890c <_Objects_Name_to_id_string+0x74> return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 1188f7: 43 inc %ebx 1188f8: 3b 5d e4 cmp -0x1c(%ebp),%ebx 1188fb: 76 d3 jbe 1188d0 <_Objects_Name_to_id_string+0x38> 1188fd: b8 01 00 00 00 mov $0x1,%eax } } } return OBJECTS_INVALID_NAME; } 118902: 8d 65 f4 lea -0xc(%ebp),%esp 118905: 5b pop %ebx 118906: 5e pop %esi 118907: 5f pop %edi 118908: c9 leave 118909: c3 ret 11890a: 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; 11890c: 8b 46 08 mov 0x8(%esi),%eax 11890f: 8b 55 10 mov 0x10(%ebp),%edx 118912: 89 02 mov %eax,(%edx) 118914: 31 c0 xor %eax,%eax } } } return OBJECTS_INVALID_NAME; } 118916: 8d 65 f4 lea -0xc(%ebp),%esp 118919: 5b pop %ebx 11891a: 5e pop %esi 11891b: 5f pop %edi 11891c: c9 leave 11891d: c3 ret 11891e: 66 90 xchg %ax,%ax uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == true */ if ( !id ) 118920: b8 02 00 00 00 mov $0x2,%eax } } } return OBJECTS_INVALID_NAME; } 118925: 8d 65 f4 lea -0xc(%ebp),%esp 118928: 5b pop %ebx 118929: 5e pop %esi 11892a: 5f pop %edi 11892b: c9 leave 11892c: c3 ret =============================================================================== 0010d57c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 10d57c: 55 push %ebp 10d57d: 89 e5 mov %esp,%ebp 10d57f: 57 push %edi 10d580: 56 push %esi 10d581: 53 push %ebx 10d582: 8b 45 08 mov 0x8(%ebp),%eax 10d585: 8b 4d 0c mov 0xc(%ebp),%ecx 10d588: 8b 55 10 mov 0x10(%ebp),%edx 10d58b: 8b 7d 14 mov 0x14(%ebp),%edi Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d58e: 85 ff test %edi,%edi 10d590: 74 56 je 10d5e8 <_Objects_Name_to_id_u32+0x6c> return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 10d592: 85 c9 test %ecx,%ecx 10d594: 74 08 je 10d59e <_Objects_Name_to_id_u32+0x22> return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d596: 8b 70 10 mov 0x10(%eax),%esi 10d599: 66 85 f6 test %si,%si 10d59c: 75 0a jne 10d5a8 <_Objects_Name_to_id_u32+0x2c> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d59e: b8 01 00 00 00 mov $0x1,%eax name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 10d5a3: 5b pop %ebx 10d5a4: 5e pop %esi 10d5a5: 5f pop %edi 10d5a6: c9 leave 10d5a7: c3 ret if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d5a8: 85 d2 test %edx,%edx 10d5aa: 75 20 jne 10d5cc <_Objects_Name_to_id_u32+0x50> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d5ac: 0f b7 f6 movzwl %si,%esi 10d5af: 8b 58 1c mov 0x1c(%eax),%ebx 10d5b2: b8 01 00 00 00 mov $0x1,%eax 10d5b7: 90 nop the_object = information->local_table[ index ]; 10d5b8: 8b 14 83 mov (%ebx,%eax,4),%edx if ( !the_object ) 10d5bb: 85 d2 test %edx,%edx 10d5bd: 74 05 je 10d5c4 <_Objects_Name_to_id_u32+0x48> continue; if ( name == the_object->name.name_u32 ) { 10d5bf: 39 4a 0c cmp %ecx,0xc(%edx) 10d5c2: 74 18 je 10d5dc <_Objects_Name_to_id_u32+0x60> search_local_node = true; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 10d5c4: 40 inc %eax 10d5c5: 39 c6 cmp %eax,%esi 10d5c7: 73 ef jae 10d5b8 <_Objects_Name_to_id_u32+0x3c> 10d5c9: eb d3 jmp 10d59e <_Objects_Name_to_id_u32+0x22> 10d5cb: 90 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = false; if ( information->maximum != 0 && 10d5cc: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 10d5d2: 74 d8 je 10d5ac <_Objects_Name_to_id_u32+0x30> 10d5d4: 4a dec %edx 10d5d5: 75 c7 jne 10d59e <_Objects_Name_to_id_u32+0x22> 10d5d7: eb d3 jmp 10d5ac <_Objects_Name_to_id_u32+0x30> 10d5d9: 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; 10d5dc: 8b 42 08 mov 0x8(%edx),%eax 10d5df: 89 07 mov %eax,(%edi) 10d5e1: 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 } 10d5e3: 5b pop %ebx 10d5e4: 5e pop %esi 10d5e5: 5f pop %edi 10d5e6: c9 leave 10d5e7: c3 ret Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == false */ if ( !id ) 10d5e8: 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 } 10d5ed: 5b pop %ebx 10d5ee: 5e pop %esi 10d5ef: 5f pop %edi 10d5f0: c9 leave 10d5f1: c3 ret =============================================================================== 0010dc4c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 10dc4c: 55 push %ebp 10dc4d: 89 e5 mov %esp,%ebp 10dc4f: 57 push %edi 10dc50: 56 push %esi 10dc51: 53 push %ebx 10dc52: 83 ec 14 sub $0x14,%esp 10dc55: 8b 7d 08 mov 0x8(%ebp),%edi 10dc58: 8b 5d 10 mov 0x10(%ebp),%ebx size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 10dc5b: 0f b7 47 3a movzwl 0x3a(%edi),%eax 10dc5f: 50 push %eax 10dc60: 53 push %ebx 10dc61: e8 92 8f 00 00 call 116bf8 10dc66: 89 c6 mov %eax,%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 10dc68: 83 c4 10 add $0x10,%esp 10dc6b: 80 7f 38 00 cmpb $0x0,0x38(%edi) 10dc6f: 75 53 jne 10dcc4 <_Objects_Set_name+0x78> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10dc71: 0f be 13 movsbl (%ebx),%edx 10dc74: c1 e2 18 shl $0x18,%edx 10dc77: 83 f8 01 cmp $0x1,%eax 10dc7a: 76 34 jbe 10dcb0 <_Objects_Set_name+0x64> 10dc7c: 0f be 43 01 movsbl 0x1(%ebx),%eax 10dc80: c1 e0 10 shl $0x10,%eax 10dc83: 09 d0 or %edx,%eax 10dc85: 83 fe 02 cmp $0x2,%esi 10dc88: 74 2d je 10dcb7 <_Objects_Set_name+0x6b> 10dc8a: 0f be 53 02 movsbl 0x2(%ebx),%edx 10dc8e: c1 e2 08 shl $0x8,%edx 10dc91: 09 c2 or %eax,%edx 10dc93: 83 fe 03 cmp $0x3,%esi 10dc96: 74 24 je 10dcbc <_Objects_Set_name+0x70> 10dc98: 0f be 43 03 movsbl 0x3(%ebx),%eax 10dc9c: 09 c2 or %eax,%edx 10dc9e: 8b 45 0c mov 0xc(%ebp),%eax 10dca1: 89 50 0c mov %edx,0xc(%eax) 10dca4: b0 01 mov $0x1,%al ); } return true; } 10dca6: 8d 65 f4 lea -0xc(%ebp),%esp 10dca9: 5b pop %ebx 10dcaa: 5e pop %esi 10dcab: 5f pop %edi 10dcac: c9 leave 10dcad: c3 ret 10dcae: 66 90 xchg %ax,%ax d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 10dcb0: 89 d0 mov %edx,%eax 10dcb2: 0d 00 00 20 00 or $0x200000,%eax 10dcb7: 89 c2 mov %eax,%edx 10dcb9: 80 ce 20 or $0x20,%dh 10dcbc: b8 20 00 00 00 mov $0x20,%eax 10dcc1: eb d9 jmp 10dc9c <_Objects_Set_name+0x50> 10dcc3: 90 nop #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 10dcc4: 83 ec 0c sub $0xc,%esp 10dcc7: 8d 40 01 lea 0x1(%eax),%eax 10dcca: 50 push %eax 10dccb: e8 78 18 00 00 call 10f548 <_Workspace_Allocate> 10dcd0: 89 c7 mov %eax,%edi if ( !d ) 10dcd2: 83 c4 10 add $0x10,%esp 10dcd5: 85 c0 test %eax,%eax 10dcd7: 74 43 je 10dd1c <_Objects_Set_name+0xd0><== NEVER TAKEN return false; if ( the_object->name.name_p ) { 10dcd9: 8b 55 0c mov 0xc(%ebp),%edx 10dcdc: 8b 42 0c mov 0xc(%edx),%eax 10dcdf: 85 c0 test %eax,%eax 10dce1: 74 16 je 10dcf9 <_Objects_Set_name+0xad> _Workspace_Free( (void *)the_object->name.name_p ); 10dce3: 83 ec 0c sub $0xc,%esp 10dce6: 50 push %eax 10dce7: e8 78 18 00 00 call 10f564 <_Workspace_Free> the_object->name.name_p = NULL; 10dcec: 8b 45 0c mov 0xc(%ebp),%eax 10dcef: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 10dcf6: 83 c4 10 add $0x10,%esp } strncpy( d, name, length ); 10dcf9: 50 push %eax 10dcfa: 56 push %esi 10dcfb: 53 push %ebx 10dcfc: 57 push %edi 10dcfd: e8 7a 8e 00 00 call 116b7c d[length] = '\0'; 10dd02: c6 04 37 00 movb $0x0,(%edi,%esi,1) the_object->name.name_p = d; 10dd06: 8b 55 0c mov 0xc(%ebp),%edx 10dd09: 89 7a 0c mov %edi,0xc(%edx) 10dd0c: b0 01 mov $0x1,%al 10dd0e: 83 c4 10 add $0x10,%esp ); } return true; } 10dd11: 8d 65 f4 lea -0xc(%ebp),%esp 10dd14: 5b pop %ebx 10dd15: 5e pop %esi 10dd16: 5f pop %edi 10dd17: c9 leave 10dd18: c3 ret 10dd19: 8d 76 00 lea 0x0(%esi),%esi #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) 10dd1c: 31 c0 xor %eax,%eax 10dd1e: eb 86 jmp 10dca6 <_Objects_Set_name+0x5a><== NOT EXECUTED =============================================================================== 0010d5f4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 10d5f4: 55 push %ebp 10d5f5: 89 e5 mov %esp,%ebp 10d5f7: 57 push %edi 10d5f8: 56 push %esi 10d5f9: 53 push %ebx 10d5fa: 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 ); 10d5fd: 8b 45 08 mov 0x8(%ebp),%eax 10d600: 0f b7 58 08 movzwl 0x8(%eax),%ebx block_count = (information->maximum - index_base) / 10d604: 0f b7 48 14 movzwl 0x14(%eax),%ecx 10d608: 0f b7 40 10 movzwl 0x10(%eax),%eax 10d60c: 29 d8 sub %ebx,%eax 10d60e: 31 d2 xor %edx,%edx 10d610: f7 f1 div %ecx information->allocation_size; for ( block = 0; block < block_count; block++ ) { 10d612: 85 c0 test %eax,%eax 10d614: 74 21 je 10d637 <_Objects_Shrink_information+0x43><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 10d616: 8b 55 08 mov 0x8(%ebp),%edx 10d619: 8b 7a 30 mov 0x30(%edx),%edi 10d61c: 3b 0f cmp (%edi),%ecx 10d61e: 74 1f je 10d63f <_Objects_Shrink_information+0x4b><== NEVER TAKEN information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 10d620: 31 d2 xor %edx,%edx 10d622: eb 0e jmp 10d632 <_Objects_Shrink_information+0x3e> } index_base += information->allocation_size; 10d624: 01 cb add %ecx,%ebx 10d626: 8d 34 95 00 00 00 00 lea 0x0(,%edx,4),%esi index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == 10d62d: 3b 0c 97 cmp (%edi,%edx,4),%ecx 10d630: 74 12 je 10d644 <_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++ ) { 10d632: 42 inc %edx 10d633: 39 d0 cmp %edx,%eax 10d635: 77 ed ja 10d624 <_Objects_Shrink_information+0x30> return; } index_base += information->allocation_size; } } 10d637: 8d 65 f4 lea -0xc(%ebp),%esp 10d63a: 5b pop %ebx 10d63b: 5e pop %esi 10d63c: 5f pop %edi 10d63d: c9 leave 10d63e: 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 ] == 10d63f: 31 f6 xor %esi,%esi 10d641: 8d 76 00 lea 0x0(%esi),%esi information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; 10d644: 8b 55 08 mov 0x8(%ebp),%edx 10d647: 8b 42 20 mov 0x20(%edx),%eax 10d64a: 89 75 e4 mov %esi,-0x1c(%ebp) 10d64d: eb 07 jmp 10d656 <_Objects_Shrink_information+0x62> 10d64f: 90 nop if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 10d650: 85 ff test %edi,%edi 10d652: 74 2c je 10d680 <_Objects_Shrink_information+0x8c> 10d654: 89 f8 mov %edi,%eax * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) information->Inactive.first; do { index = _Objects_Get_index( the_object->id ); 10d656: 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; 10d65a: 8b 38 mov (%eax),%edi if ((index >= index_base) && 10d65c: 39 da cmp %ebx,%edx 10d65e: 72 f0 jb 10d650 <_Objects_Shrink_information+0x5c> (index < (index_base + information->allocation_size))) { 10d660: 8b 75 08 mov 0x8(%ebp),%esi 10d663: 0f b7 4e 14 movzwl 0x14(%esi),%ecx 10d667: 8d 0c 0b lea (%ebx,%ecx,1),%ecx 10d66a: 39 ca cmp %ecx,%edx 10d66c: 73 e2 jae 10d650 <_Objects_Shrink_information+0x5c> _Chain_Extract( &extract_me->Node ); 10d66e: 83 ec 0c sub $0xc,%esp 10d671: 50 push %eax 10d672: e8 6d ef ff ff call 10c5e4 <_Chain_Extract> 10d677: 83 c4 10 add $0x10,%esp } } while ( the_object ); 10d67a: 85 ff test %edi,%edi 10d67c: 75 d6 jne 10d654 <_Objects_Shrink_information+0x60> 10d67e: 66 90 xchg %ax,%ax 10d680: 8b 75 e4 mov -0x1c(%ebp),%esi /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 10d683: 83 ec 0c sub $0xc,%esp 10d686: 8b 55 08 mov 0x8(%ebp),%edx 10d689: 8b 42 34 mov 0x34(%edx),%eax 10d68c: ff 34 30 pushl (%eax,%esi,1) 10d68f: e8 a4 17 00 00 call 10ee38 <_Workspace_Free> information->object_blocks[ block ] = NULL; 10d694: 8b 55 08 mov 0x8(%ebp),%edx 10d697: 8b 42 34 mov 0x34(%edx),%eax 10d69a: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive_per_block[ block ] = 0; 10d6a1: 8b 42 30 mov 0x30(%edx),%eax 10d6a4: c7 04 30 00 00 00 00 movl $0x0,(%eax,%esi,1) information->inactive -= information->allocation_size; 10d6ab: 8b 42 14 mov 0x14(%edx),%eax 10d6ae: 66 29 42 2c sub %ax,0x2c(%edx) return; 10d6b2: 83 c4 10 add $0x10,%esp } index_base += information->allocation_size; } } 10d6b5: 8d 65 f4 lea -0xc(%ebp),%esp 10d6b8: 5b pop %ebx 10d6b9: 5e pop %esi 10d6ba: 5f pop %edi 10d6bb: c9 leave 10d6bc: c3 ret =============================================================================== 0010dae8 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { 10dae8: 55 push %ebp 10dae9: 89 e5 mov %esp,%ebp 10daeb: 57 push %edi 10daec: 56 push %esi 10daed: 53 push %ebx 10daee: 83 ec 38 sub $0x38,%esp 10daf1: 8b 5d 08 mov 0x8(%ebp),%ebx 10daf4: 8b 75 0c mov 0xc(%ebp),%esi /* * Make sure there is always a value returned. */ *ticks_out = 0; 10daf7: c7 06 00 00 00 00 movl $0x0,(%esi) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) 10dafd: 53 push %ebx 10dafe: e8 85 3c 00 00 call 111788 <_Timespec_Is_valid> 10db03: 83 c4 10 add $0x10,%esp 10db06: 84 c0 test %al,%al 10db08: 75 0a jne 10db14 <_POSIX_Absolute_timeout_to_ticks+0x2c> 10db0a: 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; } 10db0c: 8d 65 f4 lea -0xc(%ebp),%esp 10db0f: 5b pop %ebx 10db10: 5e pop %esi 10db11: 5f pop %edi 10db12: c9 leave 10db13: c3 ret return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); 10db14: 83 ec 0c sub $0xc,%esp 10db17: 8d 7d e0 lea -0x20(%ebp),%edi 10db1a: 57 push %edi 10db1b: e8 70 1d 00 00 call 10f890 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) 10db20: 5a pop %edx 10db21: 59 pop %ecx 10db22: 57 push %edi 10db23: 53 push %ebx 10db24: e8 87 3c 00 00 call 1117b0 <_Timespec_Less_than> 10db29: 83 c4 10 add $0x10,%esp 10db2c: 84 c0 test %al,%al 10db2e: 74 10 je 10db40 <_POSIX_Absolute_timeout_to_ticks+0x58> 10db30: 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; } 10db35: 8d 65 f4 lea -0xc(%ebp),%esp 10db38: 5b pop %ebx 10db39: 5e pop %esi 10db3a: 5f pop %edi 10db3b: c9 leave 10db3c: c3 ret 10db3d: 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 ); 10db40: 50 push %eax 10db41: 8d 45 d8 lea -0x28(%ebp),%eax 10db44: 50 push %eax 10db45: 53 push %ebx 10db46: 57 push %edi 10db47: 89 45 d4 mov %eax,-0x2c(%ebp) 10db4a: e8 85 3c 00 00 call 1117d4 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); 10db4f: 8b 45 d4 mov -0x2c(%ebp),%eax 10db52: 89 04 24 mov %eax,(%esp) 10db55: e8 b6 3c 00 00 call 111810 <_Timespec_To_ticks> 10db5a: 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 ) 10db5c: 83 c4 10 add $0x10,%esp 10db5f: 83 f8 01 cmp $0x1,%eax 10db62: 19 c0 sbb %eax,%eax 10db64: 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; } 10db67: 8d 65 f4 lea -0xc(%ebp),%esp 10db6a: 5b pop %ebx 10db6b: 5e pop %esi 10db6c: 5f pop %edi 10db6d: c9 leave 10db6e: c3 ret =============================================================================== 0010c6c8 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 10c6c8: 55 push %ebp 10c6c9: 89 e5 mov %esp,%ebp 10c6cb: 56 push %esi 10c6cc: 53 push %ebx 10c6cd: 8b 5d 08 mov 0x8(%ebp),%ebx 10c6d0: 8b 75 0c mov 0xc(%ebp),%esi int status; if ( !cond ) { 10c6d3: 85 db test %ebx,%ebx 10c6d5: 74 39 je 10c710 <_POSIX_Condition_variables_Get+0x48> *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *cond == PTHREAD_COND_INITIALIZER ) { 10c6d7: 8b 03 mov (%ebx),%eax 10c6d9: 83 f8 ff cmp $0xffffffff,%eax 10c6dc: 74 1a je 10c6f8 <_POSIX_Condition_variables_Get+0x30> } /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *)_Objects_Get( 10c6de: 52 push %edx 10c6df: 56 push %esi 10c6e0: 50 push %eax 10c6e1: 68 40 c1 12 00 push $0x12c140 10c6e6: e8 2d 2b 00 00 call 10f218 <_Objects_Get> 10c6eb: 83 c4 10 add $0x10,%esp &_POSIX_Condition_variables_Information, (Objects_Id) *cond, location ); } 10c6ee: 8d 65 f8 lea -0x8(%ebp),%esp 10c6f1: 5b pop %ebx 10c6f2: 5e pop %esi 10c6f3: c9 leave 10c6f4: c3 ret 10c6f5: 8d 76 00 lea 0x0(%esi),%esi if ( *cond == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( cond, 0 ); 10c6f8: 83 ec 08 sub $0x8,%esp 10c6fb: 6a 00 push $0x0 10c6fd: 53 push %ebx 10c6fe: e8 19 00 00 00 call 10c71c if ( status ) { 10c703: 83 c4 10 add $0x10,%esp 10c706: 85 c0 test %eax,%eax 10c708: 75 06 jne 10c710 <_POSIX_Condition_variables_Get+0x48> 10c70a: 8b 03 mov (%ebx),%eax 10c70c: eb d0 jmp 10c6de <_POSIX_Condition_variables_Get+0x16> 10c70e: 66 90 xchg %ax,%ax *location = OBJECTS_ERROR; 10c710: c7 06 01 00 00 00 movl $0x1,(%esi) 10c716: 31 c0 xor %eax,%eax return (POSIX_Condition_variables_Control *) 0; 10c718: eb d4 jmp 10c6ee <_POSIX_Condition_variables_Get+0x26> =============================================================================== 0010c7e4 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, bool is_broadcast ) { 10c7e4: 55 push %ebp 10c7e5: 89 e5 mov %esp,%ebp 10c7e7: 57 push %edi 10c7e8: 56 push %esi 10c7e9: 53 push %ebx 10c7ea: 83 ec 24 sub $0x24,%esp 10c7ed: 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 ); 10c7f0: 8d 45 e4 lea -0x1c(%ebp),%eax 10c7f3: 50 push %eax 10c7f4: ff 75 08 pushl 0x8(%ebp) 10c7f7: e8 cc fe ff ff call 10c6c8 <_POSIX_Condition_variables_Get> 10c7fc: 89 c7 mov %eax,%edi switch ( location ) { 10c7fe: 83 c4 10 add $0x10,%esp 10c801: 8b 45 e4 mov -0x1c(%ebp),%eax 10c804: 85 c0 test %eax,%eax 10c806: 74 10 je 10c818 <_POSIX_Condition_variables_Signal_support+0x34> 10c808: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c80d: 8d 65 f4 lea -0xc(%ebp),%esp 10c810: 5b pop %ebx 10c811: 5e pop %esi 10c812: 5f pop %edi 10c813: c9 leave 10c814: c3 ret 10c815: 8d 76 00 lea 0x0(%esi),%esi the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 10c818: 8d 77 18 lea 0x18(%edi),%esi 10c81b: eb 0b jmp 10c828 <_POSIX_Condition_variables_Signal_support+0x44> 10c81d: 8d 76 00 lea 0x0(%esi),%esi if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 10c820: 84 db test %bl,%bl 10c822: 74 20 je 10c844 <_POSIX_Condition_variables_Signal_support+0x60> 10c824: 85 c0 test %eax,%eax 10c826: 74 1c je 10c844 <_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 ); 10c828: 83 ec 0c sub $0xc,%esp 10c82b: 56 push %esi 10c82c: e8 77 36 00 00 call 10fea8 <_Thread_queue_Dequeue> if ( !the_thread ) 10c831: 83 c4 10 add $0x10,%esp 10c834: 85 c0 test %eax,%eax 10c836: 75 e8 jne 10c820 <_POSIX_Condition_variables_Signal_support+0x3c> the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c838: c7 47 14 00 00 00 00 movl $0x0,0x14(%edi) } while ( is_broadcast && the_thread ); 10c83f: 84 db test %bl,%bl 10c841: 75 e1 jne 10c824 <_POSIX_Condition_variables_Signal_support+0x40> 10c843: 90 nop _Thread_Enable_dispatch(); 10c844: e8 43 32 00 00 call 10fa8c <_Thread_Enable_dispatch> 10c849: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c84b: 8d 65 f4 lea -0xc(%ebp),%esp 10c84e: 5b pop %ebx 10c84f: 5e pop %esi 10c850: 5f pop %edi 10c851: c9 leave 10c852: c3 ret =============================================================================== 0010c8ac <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 10c8ac: 55 push %ebp 10c8ad: 89 e5 mov %esp,%ebp 10c8af: 57 push %edi 10c8b0: 56 push %esi 10c8b1: 53 push %ebx 10c8b2: 83 ec 34 sub $0x34,%esp 10c8b5: 8b 7d 08 mov 0x8(%ebp),%edi 10c8b8: 8b 5d 0c mov 0xc(%ebp),%ebx 10c8bb: 8a 45 14 mov 0x14(%ebp),%al 10c8be: 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 ) ) { 10c8c1: 8d 75 e4 lea -0x1c(%ebp),%esi 10c8c4: 56 push %esi 10c8c5: 53 push %ebx 10c8c6: e8 b1 01 00 00 call 10ca7c <_POSIX_Mutex_Get> 10c8cb: 83 c4 10 add $0x10,%esp 10c8ce: 85 c0 test %eax,%eax 10c8d0: 74 21 je 10c8f3 <_POSIX_Condition_variables_Wait_support+0x47> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10c8d2: a1 58 bc 12 00 mov 0x12bc58,%eax 10c8d7: 48 dec %eax 10c8d8: a3 58 bc 12 00 mov %eax,0x12bc58 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c8dd: 83 ec 08 sub $0x8,%esp 10c8e0: 56 push %esi 10c8e1: 57 push %edi 10c8e2: e8 e1 fd ff ff call 10c6c8 <_POSIX_Condition_variables_Get> 10c8e7: 89 c6 mov %eax,%esi switch ( location ) { 10c8e9: 83 c4 10 add $0x10,%esp 10c8ec: 8b 55 e4 mov -0x1c(%ebp),%edx 10c8ef: 85 d2 test %edx,%edx 10c8f1: 74 11 je 10c904 <_POSIX_Condition_variables_Wait_support+0x58> /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); if ( mutex_status ) 10c8f3: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c8f8: 89 f0 mov %esi,%eax 10c8fa: 8d 65 f4 lea -0xc(%ebp),%esp 10c8fd: 5b pop %ebx 10c8fe: 5e pop %esi 10c8ff: 5f pop %edi 10c900: c9 leave 10c901: c3 ret 10c902: 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 ) ) { 10c904: 8b 40 14 mov 0x14(%eax),%eax 10c907: 85 c0 test %eax,%eax 10c909: 74 19 je 10c924 <_POSIX_Condition_variables_Wait_support+0x78> 10c90b: 3b 03 cmp (%ebx),%eax 10c90d: 74 15 je 10c924 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 10c90f: e8 78 31 00 00 call 10fa8c <_Thread_Enable_dispatch> 10c914: be 16 00 00 00 mov $0x16,%esi case OBJECTS_ERROR: break; } return EINVAL; } 10c919: 89 f0 mov %esi,%eax 10c91b: 8d 65 f4 lea -0xc(%ebp),%esp 10c91e: 5b pop %ebx 10c91f: 5e pop %esi 10c920: 5f pop %edi 10c921: c9 leave 10c922: c3 ret 10c923: 90 nop if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 10c924: 83 ec 0c sub $0xc,%esp 10c927: 53 push %ebx 10c928: e8 73 03 00 00 call 10cca0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 10c92d: 83 c4 10 add $0x10,%esp 10c930: 80 7d d7 00 cmpb $0x0,-0x29(%ebp) 10c934: 74 26 je 10c95c <_POSIX_Condition_variables_Wait_support+0xb0> status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 10c936: e8 51 31 00 00 call 10fa8c <_Thread_Enable_dispatch> 10c93b: be 74 00 00 00 mov $0x74,%esi /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 10c940: 83 ec 0c sub $0xc,%esp 10c943: 53 push %ebx 10c944: e8 cf 02 00 00 call 10cc18 if ( mutex_status ) 10c949: 83 c4 10 add $0x10,%esp 10c94c: 85 c0 test %eax,%eax 10c94e: 75 a3 jne 10c8f3 <_POSIX_Condition_variables_Wait_support+0x47> case OBJECTS_ERROR: break; } return EINVAL; } 10c950: 89 f0 mov %esi,%eax 10c952: 8d 65 f4 lea -0xc(%ebp),%esp 10c955: 5b pop %ebx 10c956: 5e pop %esi 10c957: 5f pop %edi 10c958: c9 leave 10c959: c3 ret 10c95a: 66 90 xchg %ax,%ax return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 10c95c: 8b 03 mov (%ebx),%eax 10c95e: 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; 10c961: 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; 10c968: a1 18 bd 12 00 mov 0x12bd18,%eax 10c96d: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 10c974: 83 c6 18 add $0x18,%esi 10c977: 89 70 44 mov %esi,0x44(%eax) _Thread_Executing->Wait.id = *cond; 10c97a: 8b 17 mov (%edi),%edx 10c97c: 89 50 20 mov %edx,0x20(%eax) _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 10c97f: 50 push %eax 10c980: 68 28 03 11 00 push $0x110328 10c985: ff 75 10 pushl 0x10(%ebp) 10c988: 56 push %esi 10c989: e8 36 36 00 00 call 10ffc4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c98e: e8 f9 30 00 00 call 10fa8c <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 10c993: a1 18 bd 12 00 mov 0x12bd18,%eax 10c998: 8b 70 34 mov 0x34(%eax),%esi if ( status && status != ETIMEDOUT ) 10c99b: 83 c4 10 add $0x10,%esp 10c99e: 85 f6 test %esi,%esi 10c9a0: 74 9e je 10c940 <_POSIX_Condition_variables_Wait_support+0x94> 10c9a2: 83 fe 74 cmp $0x74,%esi 10c9a5: 0f 85 4d ff ff ff jne 10c8f8 <_POSIX_Condition_variables_Wait_support+0x4c><== NEVER TAKEN 10c9ab: eb 93 jmp 10c940 <_POSIX_Condition_variables_Wait_support+0x94> =============================================================================== 001143c8 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 1143c8: 55 push %ebp 1143c9: 89 e5 mov %esp,%ebp 1143cb: 57 push %edi 1143cc: 56 push %esi 1143cd: 53 push %ebx 1143ce: 83 ec 1c sub $0x1c,%esp Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 1143d1: 8b 45 08 mov 0x8(%ebp),%eax 1143d4: 8b 50 08 mov 0x8(%eax),%edx */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 1143d7: 89 d0 mov %edx,%eax 1143d9: c1 e8 18 shr $0x18,%eax 1143dc: 83 e0 07 and $0x7,%eax for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 1143df: 0f b7 d2 movzwl %dx,%edx 1143e2: c1 e2 02 shl $0x2,%edx 1143e5: 89 55 e4 mov %edx,-0x1c(%ebp) 1143e8: 83 c0 04 add $0x4,%eax 1143eb: 89 45 e0 mov %eax,-0x20(%ebp) * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 1143ee: 8b 1d 70 99 12 00 mov 0x129970,%ebx done = true; for ( index = 1 ; index <= max ; ++index ) { 1143f4: 66 85 db test %bx,%bx 1143f7: 75 0b jne 114404 <_POSIX_Keys_Run_destructors+0x3c> done = false; } } } } } 1143f9: 8d 65 f4 lea -0xc(%ebp),%esp 1143fc: 5b pop %ebx 1143fd: 5e pop %esi 1143fe: 5f pop %edi 1143ff: c9 leave 114400: c3 ret 114401: 8d 76 00 lea 0x0(%esi),%esi Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 114404: be 01 00 00 00 mov $0x1,%esi 114409: b2 01 mov $0x1,%dl POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; 11440b: 0f b7 ce movzwl %si,%ecx 11440e: a1 7c 99 12 00 mov 0x12997c,%eax 114413: 8b 04 88 mov (%eax,%ecx,4),%eax if ( key != NULL && key->destructor != NULL ) { 114416: 85 c0 test %eax,%eax 114418: 74 29 je 114443 <_POSIX_Keys_Run_destructors+0x7b> 11441a: 8b 48 10 mov 0x10(%eax),%ecx 11441d: 85 c9 test %ecx,%ecx 11441f: 74 22 je 114443 <_POSIX_Keys_Run_destructors+0x7b> void *value = key->Values [ thread_api ][ thread_index ]; 114421: 8b 7d e4 mov -0x1c(%ebp),%edi 114424: 8b 4d e0 mov -0x20(%ebp),%ecx 114427: 03 7c 88 04 add 0x4(%eax,%ecx,4),%edi 11442b: 8b 0f mov (%edi),%ecx if ( value != NULL ) { 11442d: 85 c9 test %ecx,%ecx 11442f: 74 12 je 114443 <_POSIX_Keys_Run_destructors+0x7b> key->Values [ thread_api ][ thread_index ] = NULL; 114431: c7 07 00 00 00 00 movl $0x0,(%edi) (*key->destructor)( value ); 114437: 83 ec 0c sub $0xc,%esp 11443a: 51 push %ecx 11443b: ff 50 10 call *0x10(%eax) 11443e: 31 d2 xor %edx,%edx 114440: 83 c4 10 add $0x10,%esp Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 114443: 46 inc %esi 114444: 66 39 f3 cmp %si,%bx 114447: 73 c2 jae 11440b <_POSIX_Keys_Run_destructors+0x43> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 114449: 84 d2 test %dl,%dl 11444b: 74 a1 je 1143ee <_POSIX_Keys_Run_destructors+0x26> 11444d: eb aa jmp 1143f9 <_POSIX_Keys_Run_destructors+0x31> =============================================================================== 0011726c <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 11726c: 55 push %ebp 11726d: 89 e5 mov %esp,%ebp 11726f: 57 push %edi 117270: 56 push %esi 117271: 53 push %ebx 117272: 83 ec 34 sub $0x34,%esp 117275: 8b 75 10 mov 0x10(%ebp),%esi CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 117278: 68 ff 00 00 00 push $0xff 11727d: ff 75 08 pushl 0x8(%ebp) 117280: e8 5f 54 00 00 call 11c6e4 117285: 89 c3 mov %eax,%ebx 117287: a1 58 21 13 00 mov 0x132158,%eax 11728c: 40 inc %eax 11728d: a3 58 21 13 00 mov %eax,0x132158 * 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 ) { 117292: 83 c4 10 add $0x10,%esp 117295: 85 f6 test %esi,%esi 117297: 0f 84 c3 00 00 00 je 117360 <_POSIX_Message_queue_Create_support+0xf4> attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 11729d: 8b 4e 04 mov 0x4(%esi),%ecx 1172a0: 85 c9 test %ecx,%ecx 1172a2: 0f 8e fc 00 00 00 jle 1173a4 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 1172a8: 8b 56 08 mov 0x8(%esi),%edx 1172ab: 85 d2 test %edx,%edx 1172ad: 0f 8e f1 00 00 00 jle 1173a4 <_POSIX_Message_queue_Create_support+0x138> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } attr = *attr_ptr; 1172b3: 8d 7d d8 lea -0x28(%ebp),%edi 1172b6: b9 04 00 00 00 mov $0x4,%ecx 1172bb: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 1172bd: 8b 45 dc mov -0x24(%ebp),%eax 1172c0: 89 45 d4 mov %eax,-0x2c(%ebp) 1172c3: 8b 45 e0 mov -0x20(%ebp),%eax 1172c6: 89 45 d0 mov %eax,-0x30(%ebp) */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 1172c9: 83 ec 0c sub $0xc,%esp 1172cc: 68 20 25 13 00 push $0x132520 1172d1: e8 5a ba ff ff call 112d30 <_Objects_Allocate> 1172d6: 89 c6 mov %eax,%esi } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 1172d8: 83 c4 10 add $0x10,%esp 1172db: 85 c0 test %eax,%eax 1172dd: 0f 84 03 01 00 00 je 1173e6 <_POSIX_Message_queue_Create_support+0x17a> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 1172e3: 8b 45 0c mov 0xc(%ebp),%eax 1172e6: 89 46 10 mov %eax,0x10(%esi) the_mq->named = true; 1172e9: c6 46 14 01 movb $0x1,0x14(%esi) the_mq->open_count = 1; 1172ed: c7 46 18 01 00 00 00 movl $0x1,0x18(%esi) the_mq->linked = true; 1172f4: c6 46 15 01 movb $0x1,0x15(%esi) /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n+1); 1172f8: 43 inc %ebx 1172f9: 83 ec 0c sub $0xc,%esp 1172fc: 53 push %ebx 1172fd: e8 2e da ff ff call 114d30 <_Workspace_Allocate> 117302: 89 c7 mov %eax,%edi if (!name) { 117304: 83 c4 10 add $0x10,%esp 117307: 85 c0 test %eax,%eax 117309: 0f 84 ac 00 00 00 je 1173bb <_POSIX_Message_queue_Create_support+0x14f> _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strncpy( name, name_arg, n+1 ); 11730f: 50 push %eax 117310: 53 push %ebx 117311: ff 75 08 pushl 0x8(%ebp) 117314: 57 push %edi 117315: e8 4e 53 00 00 call 11c668 * * 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; 11731a: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) if ( !_CORE_message_queue_Initialize( 117321: ff 75 d0 pushl -0x30(%ebp) 117324: ff 75 d4 pushl -0x2c(%ebp) 117327: 8d 46 5c lea 0x5c(%esi),%eax 11732a: 50 push %eax 11732b: 8d 46 1c lea 0x1c(%esi),%eax 11732e: 50 push %eax 11732f: e8 60 0f 00 00 call 118294 <_CORE_message_queue_Initialize> 117334: 83 c4 20 add $0x20,%esp 117337: 84 c0 test %al,%al 117339: 74 39 je 117374 <_POSIX_Message_queue_Create_support+0x108> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11733b: 0f b7 56 08 movzwl 0x8(%esi),%edx 11733f: a1 3c 25 13 00 mov 0x13253c,%eax 117344: 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; 117347: 89 7e 0c mov %edi,0xc(%esi) &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 11734a: 8b 45 14 mov 0x14(%ebp),%eax 11734d: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 11734f: e8 50 c7 ff ff call 113aa4 <_Thread_Enable_dispatch> 117354: 31 c0 xor %eax,%eax return 0; } 117356: 8d 65 f4 lea -0xc(%ebp),%esp 117359: 5b pop %ebx 11735a: 5e pop %esi 11735b: 5f pop %edi 11735c: c9 leave 11735d: c3 ret 11735e: 66 90 xchg %ax,%ax * 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 ) { 117360: c7 45 d4 0a 00 00 00 movl $0xa,-0x2c(%ebp) 117367: c7 45 d0 10 00 00 00 movl $0x10,-0x30(%ebp) 11736e: e9 56 ff ff ff jmp 1172c9 <_POSIX_Message_queue_Create_support+0x5d> 117373: 90 nop RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 117374: 83 ec 08 sub $0x8,%esp 117377: 56 push %esi 117378: 68 20 25 13 00 push $0x132520 11737d: e8 2e bd ff ff call 1130b0 <_Objects_Free> attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 117382: 89 3c 24 mov %edi,(%esp) 117385: e8 c2 d9 ff ff call 114d4c <_Workspace_Free> _Thread_Enable_dispatch(); 11738a: e8 15 c7 ff ff call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 11738f: e8 2c 3d 00 00 call 11b0c0 <__errno> 117394: c7 00 1c 00 00 00 movl $0x1c,(%eax) 11739a: b8 ff ff ff ff mov $0xffffffff,%eax 11739f: 83 c4 10 add $0x10,%esp 1173a2: eb b2 jmp 117356 <_POSIX_Message_queue_Create_support+0xea> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 1173a4: e8 fb c6 ff ff call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 1173a9: e8 12 3d 00 00 call 11b0c0 <__errno> 1173ae: c7 00 16 00 00 00 movl $0x16,(%eax) 1173b4: b8 ff ff ff ff mov $0xffffffff,%eax 1173b9: eb 9b jmp 117356 <_POSIX_Message_queue_Create_support+0xea> 1173bb: 83 ec 08 sub $0x8,%esp 1173be: 56 push %esi 1173bf: 68 20 25 13 00 push $0x132520 1173c4: e8 e7 bc ff ff call 1130b0 <_Objects_Free> * dynamically constructed. */ name = _Workspace_Allocate(n+1); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 1173c9: e8 d6 c6 ff ff call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOMEM ); 1173ce: e8 ed 3c 00 00 call 11b0c0 <__errno> 1173d3: c7 00 0c 00 00 00 movl $0xc,(%eax) 1173d9: b8 ff ff ff ff mov $0xffffffff,%eax 1173de: 83 c4 10 add $0x10,%esp 1173e1: e9 70 ff ff ff jmp 117356 <_POSIX_Message_queue_Create_support+0xea> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 1173e6: e8 b9 c6 ff ff call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 1173eb: e8 d0 3c 00 00 call 11b0c0 <__errno> 1173f0: c7 00 17 00 00 00 movl $0x17,(%eax) 1173f6: b8 ff ff ff ff mov $0xffffffff,%eax 1173fb: e9 56 ff ff ff jmp 117356 <_POSIX_Message_queue_Create_support+0xea> =============================================================================== 00117400 <_POSIX_Message_queue_Name_to_id>: */ int _POSIX_Message_queue_Name_to_id( const char *name, Objects_Id *id ) { 117400: 55 push %ebp 117401: 89 e5 mov %esp,%ebp 117403: 53 push %ebx 117404: 83 ec 14 sub $0x14,%esp 117407: 8b 5d 08 mov 0x8(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 11740a: 85 db test %ebx,%ebx 11740c: 74 05 je 117413 <_POSIX_Message_queue_Name_to_id+0x13> return EINVAL; if ( !name[0] ) 11740e: 80 3b 00 cmpb $0x0,(%ebx) 117411: 75 0d jne 117420 <_POSIX_Message_queue_Name_to_id+0x20> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 117413: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 117418: 8b 5d fc mov -0x4(%ebp),%ebx 11741b: c9 leave 11741c: c3 ret 11741d: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; if ( !name[0] ) return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 117420: 83 ec 08 sub $0x8,%esp 117423: 68 ff 00 00 00 push $0xff 117428: 53 push %ebx 117429: e8 b6 52 00 00 call 11c6e4 11742e: 83 c4 10 add $0x10,%esp 117431: 3d fe 00 00 00 cmp $0xfe,%eax 117436: 76 0c jbe 117444 <_POSIX_Message_queue_Name_to_id+0x44> 117438: b8 5b 00 00 00 mov $0x5b,%eax if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) return 0; return ENOENT; } 11743d: 8b 5d fc mov -0x4(%ebp),%ebx 117440: c9 leave 117441: c3 ret 117442: 66 90 xchg %ax,%ax return EINVAL; if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) return ENAMETOOLONG; status = _Objects_Name_to_id_string( 117444: 50 push %eax 117445: 8d 45 f4 lea -0xc(%ebp),%eax 117448: 50 push %eax 117449: 53 push %ebx 11744a: 68 20 25 13 00 push $0x132520 11744f: e8 44 14 00 00 call 118898 <_Objects_Name_to_id_string> &_POSIX_Message_queue_Information, name, &the_id ); *id = the_id; 117454: 8b 4d f4 mov -0xc(%ebp),%ecx 117457: 8b 55 0c mov 0xc(%ebp),%edx 11745a: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 11745c: 83 c4 10 add $0x10,%esp 11745f: 83 f8 01 cmp $0x1,%eax 117462: 19 c0 sbb %eax,%eax 117464: f7 d0 not %eax 117466: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 117469: 8b 5d fc mov -0x4(%ebp),%ebx 11746c: c9 leave 11746d: c3 ret =============================================================================== 001102d0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 1102d0: 55 push %ebp 1102d1: 89 e5 mov %esp,%ebp 1102d3: 56 push %esi 1102d4: 53 push %ebx 1102d5: 83 ec 24 sub $0x24,%esp 1102d8: 8b 5d 08 mov 0x8(%ebp),%ebx 1102db: 8b 75 14 mov 0x14(%ebp),%esi 1102de: 8a 45 18 mov 0x18(%ebp),%al 1102e1: 88 45 e7 mov %al,-0x19(%ebp) RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 1102e4: 8d 45 f4 lea -0xc(%ebp),%eax 1102e7: 50 push %eax 1102e8: 53 push %ebx 1102e9: 68 c0 26 13 00 push $0x1326c0 1102ee: e8 ed 2e 00 00 call 1131e0 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 1102f3: 83 c4 10 add $0x10,%esp 1102f6: 8b 55 f4 mov -0xc(%ebp),%edx 1102f9: 85 d2 test %edx,%edx 1102fb: 74 17 je 110314 <_POSIX_Message_queue_Receive_support+0x44> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 1102fd: e8 be ad 00 00 call 11b0c0 <__errno> 110302: c7 00 09 00 00 00 movl $0x9,(%eax) 110308: b8 ff ff ff ff mov $0xffffffff,%eax } 11030d: 8d 65 f8 lea -0x8(%ebp),%esp 110310: 5b pop %ebx 110311: 5e pop %esi 110312: c9 leave 110313: c3 ret the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 110314: 8b 48 14 mov 0x14(%eax),%ecx 110317: 89 ca mov %ecx,%edx 110319: 83 e2 03 and $0x3,%edx 11031c: 4a dec %edx 11031d: 0f 84 af 00 00 00 je 1103d2 <_POSIX_Message_queue_Receive_support+0x102> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 110323: 8b 50 10 mov 0x10(%eax),%edx if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 110326: 8b 45 10 mov 0x10(%ebp),%eax 110329: 39 42 68 cmp %eax,0x68(%edx) 11032c: 77 62 ja 110390 <_POSIX_Message_queue_Receive_support+0xc0> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 11032e: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 110332: 75 48 jne 11037c <_POSIX_Message_queue_Receive_support+0xac><== ALWAYS TAKEN 110334: 31 c0 xor %eax,%eax /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 110336: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 11033d: 83 ec 08 sub $0x8,%esp 110340: ff 75 1c pushl 0x1c(%ebp) 110343: 50 push %eax 110344: 8d 45 f0 lea -0x10(%ebp),%eax 110347: 50 push %eax 110348: ff 75 0c pushl 0xc(%ebp) 11034b: 53 push %ebx 11034c: 83 c2 1c add $0x1c,%edx 11034f: 52 push %edx 110350: e8 63 1f 00 00 call 1122b8 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 110355: 83 c4 20 add $0x20,%esp 110358: e8 47 37 00 00 call 113aa4 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 11035d: a1 18 22 13 00 mov 0x132218,%eax do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 110362: 8b 50 24 mov 0x24(%eax),%edx 110365: 89 16 mov %edx,(%esi) 110367: 85 d2 test %edx,%edx 110369: 78 21 js 11038c <_POSIX_Message_queue_Receive_support+0xbc> _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 11036b: 8b 40 34 mov 0x34(%eax),%eax 11036e: 85 c0 test %eax,%eax 110370: 75 3a jne 1103ac <_POSIX_Message_queue_Receive_support+0xdc> return length_out; 110372: 8b 45 f0 mov -0x10(%ebp),%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 110375: 8d 65 f8 lea -0x8(%ebp),%esp 110378: 5b pop %ebx 110379: 5e pop %esi 11037a: c9 leave 11037b: c3 ret length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 11037c: 89 c8 mov %ecx,%eax 11037e: c1 e8 0e shr $0xe,%eax 110381: 83 f0 01 xor $0x1,%eax 110384: 83 e0 01 and $0x1,%eax 110387: eb ad jmp 110336 <_POSIX_Message_queue_Receive_support+0x66> 110389: 8d 76 00 lea 0x0(%esi),%esi do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 11038c: f7 1e negl (%esi) 11038e: eb db jmp 11036b <_POSIX_Message_queue_Receive_support+0x9b> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 110390: e8 0f 37 00 00 call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 110395: e8 26 ad 00 00 call 11b0c0 <__errno> 11039a: c7 00 7a 00 00 00 movl $0x7a,(%eax) 1103a0: b8 ff ff ff ff mov $0xffffffff,%eax 1103a5: e9 63 ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d> 1103aa: 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( 1103ac: e8 0f ad 00 00 call 11b0c0 <__errno> 1103b1: 89 c3 mov %eax,%ebx 1103b3: 83 ec 0c sub $0xc,%esp 1103b6: a1 18 22 13 00 mov 0x132218,%eax 1103bb: ff 70 34 pushl 0x34(%eax) 1103be: e8 39 02 00 00 call 1105fc <_POSIX_Message_queue_Translate_core_message_queue_return_code> 1103c3: 89 03 mov %eax,(%ebx) 1103c5: b8 ff ff ff ff mov $0xffffffff,%eax 1103ca: 83 c4 10 add $0x10,%esp 1103cd: e9 3b ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d> the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 1103d2: e8 cd 36 00 00 call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 1103d7: e8 e4 ac 00 00 call 11b0c0 <__errno> 1103dc: c7 00 09 00 00 00 movl $0x9,(%eax) 1103e2: b8 ff ff ff ff mov $0xffffffff,%eax 1103e7: e9 21 ff ff ff jmp 11030d <_POSIX_Message_queue_Receive_support+0x3d> =============================================================================== 0011040c <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 11040c: 55 push %ebp 11040d: 89 e5 mov %esp,%ebp 11040f: 57 push %edi 110410: 56 push %esi 110411: 53 push %ebx 110412: 83 ec 2c sub $0x2c,%esp 110415: 8b 75 08 mov 0x8(%ebp),%esi 110418: 8b 5d 14 mov 0x14(%ebp),%ebx 11041b: 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 ) 11041e: 83 fb 20 cmp $0x20,%ebx 110421: 0f 87 9d 00 00 00 ja 1104c4 <_POSIX_Message_queue_Send_support+0xb8> 110427: 51 push %ecx 110428: 8d 45 e4 lea -0x1c(%ebp),%eax 11042b: 50 push %eax 11042c: 56 push %esi 11042d: 68 c0 26 13 00 push $0x1326c0 110432: 88 55 d4 mov %dl,-0x2c(%ebp) 110435: e8 a6 2d 00 00 call 1131e0 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 11043a: 83 c4 10 add $0x10,%esp 11043d: 8b 55 e4 mov -0x1c(%ebp),%edx 110440: 85 d2 test %edx,%edx 110442: 8a 55 d4 mov -0x2c(%ebp),%dl 110445: 75 69 jne 1104b0 <_POSIX_Message_queue_Send_support+0xa4> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 110447: 8b 48 14 mov 0x14(%eax),%ecx 11044a: f6 c1 03 test $0x3,%cl 11044d: 0f 84 85 00 00 00 je 1104d8 <_POSIX_Message_queue_Send_support+0xcc> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 110453: 8b 78 10 mov 0x10(%eax),%edi /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 110456: 84 d2 test %dl,%dl 110458: 75 3a jne 110494 <_POSIX_Message_queue_Send_support+0x88> 11045a: 31 c0 xor %eax,%eax do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 11045c: ff 75 1c pushl 0x1c(%ebp) 11045f: 50 push %eax 110460: f7 db neg %ebx 110462: 53 push %ebx 110463: 6a 00 push $0x0 110465: 56 push %esi 110466: ff 75 10 pushl 0x10(%ebp) 110469: ff 75 0c pushl 0xc(%ebp) 11046c: 8d 47 1c lea 0x1c(%edi),%eax 11046f: 50 push %eax 110470: e8 6f 1f 00 00 call 1123e4 <_CORE_message_queue_Submit> 110475: 89 c3 mov %eax,%ebx _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 110477: 83 c4 20 add $0x20,%esp 11047a: e8 25 36 00 00 call 113aa4 <_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 ) 11047f: 83 fb 07 cmp $0x7,%ebx 110482: 74 20 je 1104a4 <_POSIX_Message_queue_Send_support+0x98> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 110484: 85 db test %ebx,%ebx 110486: 75 68 jne 1104f0 <_POSIX_Message_queue_Send_support+0xe4> 110488: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 11048a: 8d 65 f4 lea -0xc(%ebp),%esp 11048d: 5b pop %ebx 11048e: 5e pop %esi 11048f: 5f pop %edi 110490: c9 leave 110491: c3 ret 110492: 66 90 xchg %ax,%ax the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 110494: 89 c8 mov %ecx,%eax 110496: c1 e8 0e shr $0xe,%eax 110499: 83 f0 01 xor $0x1,%eax 11049c: 83 e0 01 and $0x1,%eax 11049f: eb bb jmp 11045c <_POSIX_Message_queue_Send_support+0x50> 1104a1: 8d 76 00 lea 0x0(%esi),%esi * 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; 1104a4: a1 18 22 13 00 mov 0x132218,%eax 1104a9: 8b 58 34 mov 0x34(%eax),%ebx 1104ac: eb d6 jmp 110484 <_POSIX_Message_queue_Send_support+0x78> 1104ae: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 1104b0: e8 0b ac 00 00 call 11b0c0 <__errno> 1104b5: c7 00 09 00 00 00 movl $0x9,(%eax) 1104bb: b8 ff ff ff ff mov $0xffffffff,%eax 1104c0: eb c8 jmp 11048a <_POSIX_Message_queue_Send_support+0x7e> 1104c2: 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 ); 1104c4: e8 f7 ab 00 00 call 11b0c0 <__errno> 1104c9: c7 00 16 00 00 00 movl $0x16,(%eax) 1104cf: b8 ff ff ff ff mov $0xffffffff,%eax 1104d4: eb b4 jmp 11048a <_POSIX_Message_queue_Send_support+0x7e> 1104d6: 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(); 1104d8: e8 c7 35 00 00 call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 1104dd: e8 de ab 00 00 call 11b0c0 <__errno> 1104e2: c7 00 09 00 00 00 movl $0x9,(%eax) 1104e8: b8 ff ff ff ff mov $0xffffffff,%eax 1104ed: eb 9b jmp 11048a <_POSIX_Message_queue_Send_support+0x7e> 1104ef: 90 nop msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 1104f0: e8 cb ab 00 00 call 11b0c0 <__errno> 1104f5: 89 c6 mov %eax,%esi 1104f7: 83 ec 0c sub $0xc,%esp 1104fa: 53 push %ebx 1104fb: e8 fc 00 00 00 call 1105fc <_POSIX_Message_queue_Translate_core_message_queue_return_code> 110500: 89 06 mov %eax,(%esi) 110502: b8 ff ff ff ff mov $0xffffffff,%eax 110507: 83 c4 10 add $0x10,%esp 11050a: e9 7b ff ff ff jmp 11048a <_POSIX_Message_queue_Send_support+0x7e> =============================================================================== 0010d738 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 10d738: 55 push %ebp 10d739: 89 e5 mov %esp,%ebp 10d73b: 56 push %esi 10d73c: 53 push %ebx 10d73d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d740: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d743: 85 db test %ebx,%ebx 10d745: 74 39 je 10d780 <_POSIX_Mutex_Get+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d747: 8b 03 mov (%ebx),%eax 10d749: 83 f8 ff cmp $0xffffffff,%eax 10d74c: 74 1a je 10d768 <_POSIX_Mutex_Get+0x30> return (POSIX_Mutex_Control *) 10d74e: 52 push %edx 10d74f: 56 push %esi 10d750: 50 push %eax 10d751: 68 80 d8 12 00 push $0x12d880 10d756: e8 15 2b 00 00 call 110270 <_Objects_Get> 10d75b: 83 c4 10 add $0x10,%esp _Objects_Get( &_POSIX_Mutex_Information, (Objects_Id) *mutex, location ); } 10d75e: 8d 65 f8 lea -0x8(%ebp),%esp 10d761: 5b pop %ebx 10d762: 5e pop %esi 10d763: c9 leave 10d764: c3 ret 10d765: 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 ); 10d768: 83 ec 08 sub $0x8,%esp 10d76b: 6a 00 push $0x0 10d76d: 53 push %ebx 10d76e: e8 65 00 00 00 call 10d7d8 10d773: 83 c4 10 add $0x10,%esp 10d776: 85 c0 test %eax,%eax 10d778: 75 06 jne 10d780 <_POSIX_Mutex_Get+0x48> 10d77a: 8b 03 mov (%ebx),%eax 10d77c: eb d0 jmp 10d74e <_POSIX_Mutex_Get+0x16> 10d77e: 66 90 xchg %ax,%ax 10d780: c7 06 01 00 00 00 movl $0x1,(%esi) 10d786: 31 c0 xor %eax,%eax 10d788: eb d4 jmp 10d75e <_POSIX_Mutex_Get+0x26> =============================================================================== 0010d6e4 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 10d6e4: 55 push %ebp 10d6e5: 89 e5 mov %esp,%ebp 10d6e7: 56 push %esi 10d6e8: 53 push %ebx 10d6e9: 8b 5d 08 mov 0x8(%ebp),%ebx 10d6ec: 8b 75 0c mov 0xc(%ebp),%esi ___POSIX_Mutex_Get_support_error_check( mutex, location ); 10d6ef: 85 db test %ebx,%ebx 10d6f1: 74 39 je 10d72c <_POSIX_Mutex_Get_interrupt_disable+0x48> ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d6f3: 8b 03 mov (%ebx),%eax 10d6f5: 83 f8 ff cmp $0xffffffff,%eax 10d6f8: 74 1a je 10d714 <_POSIX_Mutex_Get_interrupt_disable+0x30> return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( 10d6fa: ff 75 10 pushl 0x10(%ebp) 10d6fd: 56 push %esi 10d6fe: 50 push %eax 10d6ff: 68 80 d8 12 00 push $0x12d880 10d704: e8 0f 2b 00 00 call 110218 <_Objects_Get_isr_disable> 10d709: 83 c4 10 add $0x10,%esp &_POSIX_Mutex_Information, (Objects_Id) *mutex, location, level ); } 10d70c: 8d 65 f8 lea -0x8(%ebp),%esp 10d70f: 5b pop %ebx 10d710: 5e pop %esi 10d711: c9 leave 10d712: c3 ret 10d713: 90 nop ISR_Level *level ) { ___POSIX_Mutex_Get_support_error_check( mutex, location ); ___POSIX_Mutex_Get_support_auto_initialization( mutex, location ); 10d714: 83 ec 08 sub $0x8,%esp 10d717: 6a 00 push $0x0 10d719: 53 push %ebx 10d71a: e8 b9 00 00 00 call 10d7d8 10d71f: 83 c4 10 add $0x10,%esp 10d722: 85 c0 test %eax,%eax 10d724: 75 06 jne 10d72c <_POSIX_Mutex_Get_interrupt_disable+0x48> 10d726: 8b 03 mov (%ebx),%eax 10d728: eb d0 jmp 10d6fa <_POSIX_Mutex_Get_interrupt_disable+0x16> 10d72a: 66 90 xchg %ax,%ax 10d72c: c7 06 01 00 00 00 movl $0x1,(%esi) 10d732: 31 c0 xor %eax,%eax 10d734: eb d6 jmp 10d70c <_POSIX_Mutex_Get_interrupt_disable+0x28> =============================================================================== 0010d934 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, bool blocking, Watchdog_Interval timeout ) { 10d934: 55 push %ebp 10d935: 89 e5 mov %esp,%ebp 10d937: 53 push %ebx 10d938: 83 ec 18 sub $0x18,%esp 10d93b: 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 ); 10d93e: 8d 45 f0 lea -0x10(%ebp),%eax 10d941: 50 push %eax 10d942: 8d 45 f4 lea -0xc(%ebp),%eax 10d945: 50 push %eax 10d946: ff 75 08 pushl 0x8(%ebp) 10d949: e8 96 fd ff ff call 10d6e4 <_POSIX_Mutex_Get_interrupt_disable> switch ( location ) { 10d94e: 83 c4 10 add $0x10,%esp 10d951: 8b 55 f4 mov -0xc(%ebp),%edx 10d954: 85 d2 test %edx,%edx 10d956: 75 34 jne 10d98c <_POSIX_Mutex_Lock_support+0x58> case OBJECTS_LOCAL: _CORE_mutex_Seize( 10d958: 83 ec 0c sub $0xc,%esp 10d95b: ff 75 f0 pushl -0x10(%ebp) 10d95e: ff 75 10 pushl 0x10(%ebp) 10d961: 0f b6 db movzbl %bl,%ebx 10d964: 53 push %ebx 10d965: ff 70 08 pushl 0x8(%eax) 10d968: 83 c0 14 add $0x14,%eax 10d96b: 50 push %eax 10d96c: e8 f3 1c 00 00 call 10f664 <_CORE_mutex_Seize> the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_Translate_core_mutex_return_code( 10d971: 83 c4 14 add $0x14,%esp 10d974: a1 38 d5 12 00 mov 0x12d538,%eax 10d979: ff 70 34 pushl 0x34(%eax) 10d97c: e8 f3 00 00 00 call 10da74 <_POSIX_Mutex_Translate_core_mutex_return_code> 10d981: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10d984: 8b 5d fc mov -0x4(%ebp),%ebx 10d987: c9 leave 10d988: c3 ret 10d989: 8d 76 00 lea 0x0(%esi),%esi register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 10d98c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d991: 8b 5d fc mov -0x4(%ebp),%ebx 10d994: c9 leave 10d995: c3 ret =============================================================================== 00115428 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 115428: 55 push %ebp 115429: 89 e5 mov %esp,%ebp 11542b: 56 push %esi 11542c: 53 push %ebx 11542d: 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) 115430: 8b 55 0c mov 0xc(%ebp),%edx 115433: 85 d2 test %edx,%edx 115435: 0f 85 b9 00 00 00 jne 1154f4 <_POSIX_Semaphore_Create_support+0xcc> rtems_set_errno_and_return_minus_one( ENOSYS ); if ( name ) { 11543b: 85 db test %ebx,%ebx 11543d: 74 1c je 11545b <_POSIX_Semaphore_Create_support+0x33> if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) 11543f: 83 ec 08 sub $0x8,%esp 115442: 68 ff 00 00 00 push $0xff 115447: 53 push %ebx 115448: e8 77 4c 00 00 call 11a0c4 11544d: 83 c4 10 add $0x10,%esp 115450: 3d fe 00 00 00 cmp $0xfe,%eax 115455: 0f 87 ad 00 00 00 ja 115508 <_POSIX_Semaphore_Create_support+0xe0> 11545b: a1 38 f0 12 00 mov 0x12f038,%eax 115460: 40 inc %eax 115461: a3 38 f0 12 00 mov %eax,0x12f038 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 115466: 83 ec 0c sub $0xc,%esp 115469: 68 80 f3 12 00 push $0x12f380 11546e: e8 8d b2 ff ff call 110700 <_Objects_Allocate> 115473: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 115475: 83 c4 10 add $0x10,%esp 115478: 85 c0 test %eax,%eax 11547a: 0f 84 9a 00 00 00 je 11551a <_POSIX_Semaphore_Create_support+0xf2> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; 115480: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) if ( name ) { 115487: 85 db test %ebx,%ebx 115489: 74 55 je 1154e0 <_POSIX_Semaphore_Create_support+0xb8> the_semaphore->named = true; 11548b: c6 40 14 01 movb $0x1,0x14(%eax) the_semaphore->open_count = 1; 11548f: c7 40 18 01 00 00 00 movl $0x1,0x18(%eax) the_semaphore->linked = true; 115496: 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; 11549a: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 1154a1: c7 46 5c ff ff ff ff movl $0xffffffff,0x5c(%esi) _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 1154a8: 50 push %eax 1154a9: ff 75 10 pushl 0x10(%ebp) 1154ac: 8d 46 5c lea 0x5c(%esi),%eax 1154af: 50 push %eax 1154b0: 8d 46 1c lea 0x1c(%esi),%eax 1154b3: 50 push %eax 1154b4: e8 03 ad ff ff call 1101bc <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 1154b9: 0f b7 56 08 movzwl 0x8(%esi),%edx 1154bd: a1 9c f3 12 00 mov 0x12f39c,%eax 1154c2: 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; 1154c5: 89 5e 0c mov %ebx,0xc(%esi) &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 1154c8: 8b 45 14 mov 0x14(%ebp),%eax 1154cb: 89 30 mov %esi,(%eax) _Thread_Enable_dispatch(); 1154cd: e8 a2 bf ff ff call 111474 <_Thread_Enable_dispatch> 1154d2: 31 c0 xor %eax,%eax return 0; 1154d4: 83 c4 10 add $0x10,%esp } 1154d7: 8d 65 f8 lea -0x8(%ebp),%esp 1154da: 5b pop %ebx 1154db: 5e pop %esi 1154dc: c9 leave 1154dd: c3 ret 1154de: 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; 1154e0: c6 40 14 00 movb $0x0,0x14(%eax) the_semaphore->open_count = 0; 1154e4: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_semaphore->linked = false; 1154eb: c6 40 15 00 movb $0x0,0x15(%eax) 1154ef: eb a9 jmp 11549a <_POSIX_Semaphore_Create_support+0x72> 1154f1: 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 ); 1154f4: e8 5b 3c 00 00 call 119154 <__errno> 1154f9: c7 00 58 00 00 00 movl $0x58,(%eax) 1154ff: b8 ff ff ff ff mov $0xffffffff,%eax 115504: eb d1 jmp 1154d7 <_POSIX_Semaphore_Create_support+0xaf> 115506: 66 90 xchg %ax,%ax if ( name ) { if ( strnlen( name, NAME_MAX ) >= NAME_MAX ) rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 115508: e8 47 3c 00 00 call 119154 <__errno> 11550d: c7 00 5b 00 00 00 movl $0x5b,(%eax) 115513: b8 ff ff ff ff mov $0xffffffff,%eax 115518: eb bd jmp 1154d7 <_POSIX_Semaphore_Create_support+0xaf> _Thread_Disable_dispatch(); the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 11551a: e8 55 bf ff ff call 111474 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSPC ); 11551f: e8 30 3c 00 00 call 119154 <__errno> 115524: c7 00 1c 00 00 00 movl $0x1c,(%eax) 11552a: b8 ff ff ff ff mov $0xffffffff,%eax 11552f: eb a6 jmp 1154d7 <_POSIX_Semaphore_Create_support+0xaf> =============================================================================== 00115584 <_POSIX_Semaphore_Name_to_id>: int _POSIX_Semaphore_Name_to_id( const char *name, sem_t *id ) { 115584: 55 push %ebp 115585: 89 e5 mov %esp,%ebp 115587: 83 ec 18 sub $0x18,%esp 11558a: 8b 45 08 mov 0x8(%ebp),%eax Objects_Name_or_id_lookup_errors status; Objects_Id the_id; if ( !name ) 11558d: 85 c0 test %eax,%eax 11558f: 74 05 je 115596 <_POSIX_Semaphore_Name_to_id+0x12> return EINVAL; if ( !name[0] ) 115591: 80 38 00 cmpb $0x0,(%eax) 115594: 75 0a jne 1155a0 <_POSIX_Semaphore_Name_to_id+0x1c> name, &the_id ); *id = the_id; if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 115596: b8 16 00 00 00 mov $0x16,%eax return 0; return ENOENT; } 11559b: c9 leave 11559c: c3 ret 11559d: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; if ( !name[0] ) return EINVAL; status = _Objects_Name_to_id_string( 1155a0: 52 push %edx 1155a1: 8d 55 f4 lea -0xc(%ebp),%edx 1155a4: 52 push %edx 1155a5: 50 push %eax 1155a6: 68 80 f3 12 00 push $0x12f380 1155ab: e8 18 0f 00 00 call 1164c8 <_Objects_Name_to_id_string> &_POSIX_Semaphore_Information, name, &the_id ); *id = the_id; 1155b0: 8b 4d f4 mov -0xc(%ebp),%ecx 1155b3: 8b 55 0c mov 0xc(%ebp),%edx 1155b6: 89 0a mov %ecx,(%edx) if ( status == OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL ) 1155b8: 83 c4 10 add $0x10,%esp 1155bb: 83 f8 01 cmp $0x1,%eax 1155be: 19 c0 sbb %eax,%eax 1155c0: f7 d0 not %eax 1155c2: 83 e0 02 and $0x2,%eax return 0; return ENOENT; } 1155c5: c9 leave 1155c6: c3 ret =============================================================================== 001155f0 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, bool blocking, Watchdog_Interval timeout ) { 1155f0: 55 push %ebp 1155f1: 89 e5 mov %esp,%ebp 1155f3: 53 push %ebx 1155f4: 83 ec 18 sub $0x18,%esp 1155f7: 8a 5d 0c mov 0xc(%ebp),%bl RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 1155fa: 8d 45 f4 lea -0xc(%ebp),%eax 1155fd: 50 push %eax 1155fe: 8b 45 08 mov 0x8(%ebp),%eax 115601: ff 30 pushl (%eax) 115603: 68 80 f3 12 00 push $0x12f380 115608: e8 a3 b5 ff ff call 110bb0 <_Objects_Get> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 11560d: 83 c4 10 add $0x10,%esp 115610: 8b 55 f4 mov -0xc(%ebp),%edx 115613: 85 d2 test %edx,%edx 115615: 74 15 je 11562c <_POSIX_Semaphore_Wait_support+0x3c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 115617: e8 38 3b 00 00 call 119154 <__errno> 11561c: c7 00 16 00 00 00 movl $0x16,(%eax) 115622: b8 ff ff ff ff mov $0xffffffff,%eax } 115627: 8b 5d fc mov -0x4(%ebp),%ebx 11562a: c9 leave 11562b: c3 ret the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Seize( 11562c: ff 75 10 pushl 0x10(%ebp) 11562f: 0f b6 db movzbl %bl,%ebx 115632: 53 push %ebx 115633: ff 70 08 pushl 0x8(%eax) 115636: 83 c0 1c add $0x1c,%eax 115639: 50 push %eax 11563a: e8 dd 09 00 00 call 11601c <_CORE_semaphore_Seize> &the_semaphore->Semaphore, the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); 11563f: e8 30 be ff ff call 111474 <_Thread_Enable_dispatch> if ( !_Thread_Executing->Wait.return_code ) 115644: 83 c4 10 add $0x10,%esp 115647: a1 f8 f0 12 00 mov 0x12f0f8,%eax 11564c: 8b 40 34 mov 0x34(%eax),%eax 11564f: 85 c0 test %eax,%eax 115651: 75 09 jne 11565c <_POSIX_Semaphore_Wait_support+0x6c> 115653: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 115655: 8b 5d fc mov -0x4(%ebp),%ebx 115658: c9 leave 115659: c3 ret 11565a: 66 90 xchg %ax,%ax _Thread_Enable_dispatch(); if ( !_Thread_Executing->Wait.return_code ) return 0; rtems_set_errno_and_return_minus_one( 11565c: e8 f3 3a 00 00 call 119154 <__errno> 115661: 89 c3 mov %eax,%ebx 115663: 83 ec 0c sub $0xc,%esp 115666: a1 f8 f0 12 00 mov 0x12f0f8,%eax 11566b: ff 70 34 pushl 0x34(%eax) 11566e: e8 7d 35 00 00 call 118bf0 <_POSIX_Semaphore_Translate_core_semaphore_return_code> 115673: 89 03 mov %eax,(%ebx) 115675: b8 ff ff ff ff mov $0xffffffff,%eax 11567a: 83 c4 10 add $0x10,%esp 11567d: eb a8 jmp 115627 <_POSIX_Semaphore_Wait_support+0x37> =============================================================================== 00111648 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 111648: 55 push %ebp 111649: 89 e5 mov %esp,%ebp 11164b: 83 ec 08 sub $0x8,%esp 11164e: 8b 55 08 mov 0x8(%ebp),%edx POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111651: 8b 82 f8 00 00 00 mov 0xf8(%edx),%eax if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 111657: 8b 88 d4 00 00 00 mov 0xd4(%eax),%ecx 11165d: 85 c9 test %ecx,%ecx 11165f: 75 09 jne 11166a <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22><== NEVER TAKEN thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 111661: 83 b8 d8 00 00 00 01 cmpl $0x1,0xd8(%eax) 111668: 74 06 je 111670 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 11166a: 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(); 11166b: e9 48 ca ff ff jmp 10e0b8 <_Thread_Enable_dispatch> thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { 111670: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax 111676: 85 c0 test %eax,%eax 111678: 74 f0 je 11166a <_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; 11167a: a1 b8 a7 12 00 mov 0x12a7b8,%eax 11167f: 48 dec %eax 111680: a3 b8 a7 12 00 mov %eax,0x12a7b8 _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 111685: 83 ec 08 sub $0x8,%esp 111688: 6a ff push $0xffffffff 11168a: 52 push %edx 11168b: e8 44 06 00 00 call 111cd4 <_POSIX_Thread_Exit> { POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 111690: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 111693: c9 leave 111694: c3 ret =============================================================================== 00112710 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 112710: 55 push %ebp 112711: 89 e5 mov %esp,%ebp 112713: 57 push %edi 112714: 56 push %esi 112715: 53 push %ebx 112716: 83 ec 18 sub $0x18,%esp 112719: 8b 5d 08 mov 0x8(%ebp),%ebx 11271c: 8b 75 0c mov 0xc(%ebp),%esi 11271f: 8b 7d 10 mov 0x10(%ebp),%edi if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 112722: ff 36 pushl (%esi) 112724: e8 cb ff ff ff call 1126f4 <_POSIX_Priority_Is_valid> 112729: 83 c4 10 add $0x10,%esp 11272c: 84 c0 test %al,%al 11272e: 74 2a je 11275a <_POSIX_Thread_Translate_sched_param+0x4a><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 112730: c7 07 00 00 00 00 movl $0x0,(%edi) *budget_callout = NULL; 112736: 8b 45 14 mov 0x14(%ebp),%eax 112739: c7 00 00 00 00 00 movl $0x0,(%eax) if ( policy == SCHED_OTHER ) { 11273f: 85 db test %ebx,%ebx 112741: 74 25 je 112768 <_POSIX_Thread_Translate_sched_param+0x58> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 112743: 83 fb 01 cmp $0x1,%ebx 112746: 0f 84 90 00 00 00 je 1127dc <_POSIX_Thread_Translate_sched_param+0xcc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 11274c: 83 fb 02 cmp $0x2,%ebx 11274f: 0f 84 97 00 00 00 je 1127ec <_POSIX_Thread_Translate_sched_param+0xdc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 112755: 83 fb 04 cmp $0x4,%ebx 112758: 74 1e je 112778 <_POSIX_Thread_Translate_sched_param+0x68> if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 11275a: b8 16 00 00 00 mov $0x16,%eax } return EINVAL; } 11275f: 8d 65 f4 lea -0xc(%ebp),%esp 112762: 5b pop %ebx 112763: 5e pop %esi 112764: 5f pop %edi 112765: c9 leave 112766: c3 ret 112767: 90 nop *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 112768: c7 07 01 00 00 00 movl $0x1,(%edi) 11276e: 31 c0 xor %eax,%eax *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 112770: 8d 65 f4 lea -0xc(%ebp),%esp 112773: 5b pop %ebx 112774: 5e pop %esi 112775: 5f pop %edi 112776: c9 leave 112777: 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) && 112778: 8b 5e 08 mov 0x8(%esi),%ebx 11277b: 85 db test %ebx,%ebx 11277d: 75 07 jne 112786 <_POSIX_Thread_Translate_sched_param+0x76> (param->sched_ss_repl_period.tv_nsec == 0) ) 11277f: 8b 4e 0c mov 0xc(%esi),%ecx 112782: 85 c9 test %ecx,%ecx 112784: 74 d4 je 11275a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 112786: 8b 56 10 mov 0x10(%esi),%edx 112789: 85 d2 test %edx,%edx 11278b: 75 07 jne 112794 <_POSIX_Thread_Translate_sched_param+0x84> (param->sched_ss_init_budget.tv_nsec == 0) ) 11278d: 8b 46 14 mov 0x14(%esi),%eax 112790: 85 c0 test %eax,%eax 112792: 74 c6 je 11275a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 112794: 83 ec 0c sub $0xc,%esp 112797: 8d 46 08 lea 0x8(%esi),%eax 11279a: 50 push %eax 11279b: e8 1c d2 ff ff call 10f9bc <_Timespec_To_ticks> 1127a0: 89 c3 mov %eax,%ebx 1127a2: 8d 46 10 lea 0x10(%esi),%eax 1127a5: 89 04 24 mov %eax,(%esp) 1127a8: e8 0f d2 ff ff call 10f9bc <_Timespec_To_ticks> 1127ad: 83 c4 10 add $0x10,%esp 1127b0: 39 c3 cmp %eax,%ebx 1127b2: 72 a6 jb 11275a <_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 ) ) 1127b4: 83 ec 0c sub $0xc,%esp 1127b7: ff 76 04 pushl 0x4(%esi) 1127ba: e8 35 ff ff ff call 1126f4 <_POSIX_Priority_Is_valid> 1127bf: 83 c4 10 add $0x10,%esp 1127c2: 84 c0 test %al,%al 1127c4: 74 94 je 11275a <_POSIX_Thread_Translate_sched_param+0x4a> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 1127c6: c7 07 03 00 00 00 movl $0x3,(%edi) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 1127cc: 8b 45 14 mov 0x14(%ebp),%eax 1127cf: c7 00 c0 c2 10 00 movl $0x10c2c0,(%eax) 1127d5: 31 c0 xor %eax,%eax return 0; 1127d7: eb 86 jmp 11275f <_POSIX_Thread_Translate_sched_param+0x4f> 1127d9: 8d 76 00 lea 0x0(%esi),%esi *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 1127dc: c7 07 00 00 00 00 movl $0x0,(%edi) 1127e2: 31 c0 xor %eax,%eax return 0; 1127e4: e9 76 ff ff ff jmp 11275f <_POSIX_Thread_Translate_sched_param+0x4f> 1127e9: 8d 76 00 lea 0x0(%esi),%esi } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 1127ec: c7 07 02 00 00 00 movl $0x2,(%edi) 1127f2: 31 c0 xor %eax,%eax return 0; 1127f4: e9 66 ff ff ff jmp 11275f <_POSIX_Thread_Translate_sched_param+0x4f> =============================================================================== 00111628 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *created ) { 111628: 55 push %ebp 111629: 89 e5 mov %esp,%ebp 11162b: 57 push %edi 11162c: 56 push %esi 11162d: 53 push %ebx 11162e: 83 ec 28 sub $0x28,%esp 111631: 8b 55 0c mov 0xc(%ebp),%edx POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 111634: 68 ec 00 00 00 push $0xec 111639: 89 55 e4 mov %edx,-0x1c(%ebp) 11163c: e8 db d7 ff ff call 10ee1c <_Workspace_Allocate> 111641: 89 c3 mov %eax,%ebx if ( !api ) 111643: 83 c4 10 add $0x10,%esp 111646: 85 c0 test %eax,%eax 111648: 8b 55 e4 mov -0x1c(%ebp),%edx 11164b: 0f 84 2f 01 00 00 je 111780 <_POSIX_Threads_Create_extension+0x158> return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 111651: 89 82 f8 00 00 00 mov %eax,0xf8(%edx) /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 111657: b9 3c 00 00 00 mov $0x3c,%ecx 11165c: 31 c0 xor %eax,%eax 11165e: 89 df mov %ebx,%edi 111660: f3 aa rep stos %al,%es:(%edi) 111662: c7 03 01 00 00 00 movl $0x1,(%ebx) 111668: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) 11166f: c7 43 14 01 00 00 00 movl $0x1,0x14(%ebx) 111676: c7 43 18 02 00 00 00 movl $0x2,0x18(%ebx) 11167d: c7 43 34 01 00 00 00 movl $0x1,0x34(%ebx) 111684: c7 43 38 01 00 00 00 movl $0x1,0x38(%ebx) api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 11168b: c7 43 3c 01 00 00 00 movl $0x1,0x3c(%ebx) api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 111692: c7 83 80 00 00 00 01 movl $0x1,0x80(%ebx) 111699: 00 00 00 api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 11169c: be 38 32 12 00 mov $0x123238,%esi 1116a1: 8d bb 84 00 00 00 lea 0x84(%ebx),%edi 1116a7: b1 07 mov $0x7,%cl 1116a9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->schedparam.sched_priority = 1116ab: 0f b6 05 d4 52 12 00 movzbl 0x1252d4,%eax 1116b2: 2b 42 14 sub 0x14(%edx),%eax 1116b5: 89 83 84 00 00 00 mov %eax,0x84(%ebx) _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 1116bb: c7 83 dc 00 00 00 00 movl $0x0,0xdc(%ebx) 1116c2: 00 00 00 api->cancelability_state = PTHREAD_CANCEL_ENABLE; 1116c5: c7 83 d4 00 00 00 00 movl $0x0,0xd4(%ebx) 1116cc: 00 00 00 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 1116cf: c7 83 d8 00 00 00 00 movl $0x0,0xd8(%ebx) 1116d6: 00 00 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1116d9: 8d 83 e4 00 00 00 lea 0xe4(%ebx),%eax 1116df: 89 83 e0 00 00 00 mov %eax,0xe0(%ebx) the_chain->permanent_null = NULL; 1116e5: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) 1116ec: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1116ef: 8d 83 e0 00 00 00 lea 0xe0(%ebx),%eax 1116f5: 89 83 e8 00 00 00 mov %eax,0xe8(%ebx) * * The check for class == 1 is debug. Should never really happen. */ /* XXX use signal constants */ api->signals_pending = 0; 1116fb: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 111702: 00 00 00 if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API 111705: 0f b6 42 0b movzbl 0xb(%edx),%eax 111709: 83 e0 07 and $0x7,%eax 11170c: 83 f8 03 cmp $0x3,%eax 11170f: 74 53 je 111764 <_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; 111711: c7 83 cc 00 00 00 ff movl $0xffffffff,0xcc(%ebx) 111718: ff ff ff } _Thread_queue_Initialize( 11171b: 6a 00 push $0x0 11171d: 68 00 10 00 00 push $0x1000 111722: 6a 00 push $0x0 111724: 8d 43 40 lea 0x40(%ebx),%eax 111727: 50 push %eax 111728: 89 55 e4 mov %edx,-0x1c(%ebp) 11172b: e8 d4 cc ff ff call 10e404 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 111730: 8b 55 e4 mov -0x1c(%ebp),%edx 111733: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 111736: c7 83 ac 00 00 00 00 movl $0x0,0xac(%ebx) 11173d: 00 00 00 the_watchdog->routine = routine; 111740: c7 83 c0 00 00 00 d0 movl $0x1117d0,0xc0(%ebx) 111747: 17 11 00 the_watchdog->id = id; 11174a: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) the_watchdog->user_data = user_data; 111750: 89 93 c8 00 00 00 mov %edx,0xc8(%ebx) 111756: b0 01 mov $0x1,%al _POSIX_Threads_Sporadic_budget_TSR, created->Object.id, created ); return true; 111758: 83 c4 10 add $0x10,%esp } 11175b: 8d 65 f4 lea -0xc(%ebp),%esp 11175e: 5b pop %ebx 11175f: 5e pop %esi 111760: 5f pop %edi 111761: c9 leave 111762: c3 ret 111763: 90 nop #if defined(RTEMS_DEBUG) && _Objects_Get_class( created->Object.id ) == 1 #endif ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 111764: a1 78 95 12 00 mov 0x129578,%eax 111769: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 11176f: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 111775: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) 11177b: eb 9e jmp 11171b <_POSIX_Threads_Create_extension+0xf3> 11177d: 8d 76 00 lea 0x0(%esi),%esi POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); if ( !api ) 111780: 31 c0 xor %eax,%eax created->Object.id, created ); return true; } 111782: 8d 65 f4 lea -0xc(%ebp),%esp 111785: 5b pop %ebx 111786: 5e pop %esi 111787: 5f pop %edi 111788: c9 leave 111789: c3 ret =============================================================================== 001115a0 <_POSIX_Threads_Delete_extension>: */ void _POSIX_Threads_Delete_extension( Thread_Control *executing __attribute__((unused)), Thread_Control *deleted ) { 1115a0: 55 push %ebp 1115a1: 89 e5 mov %esp,%ebp 1115a3: 57 push %edi 1115a4: 56 push %esi 1115a5: 53 push %ebx 1115a6: 83 ec 28 sub $0x28,%esp 1115a9: 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 ]; 1115ac: 8b 87 f8 00 00 00 mov 0xf8(%edi),%eax 1115b2: 89 45 e4 mov %eax,-0x1c(%ebp) /* * Run the POSIX cancellation handlers */ _POSIX_Threads_cancel_run( deleted ); 1115b5: 57 push %edi 1115b6: e8 a9 2d 00 00 call 114364 <_POSIX_Threads_cancel_run> /* * Run all the key destructors */ _POSIX_Keys_Run_destructors( deleted ); 1115bb: 89 3c 24 mov %edi,(%esp) 1115be: e8 05 2e 00 00 call 1143c8 <_POSIX_Keys_Run_destructors> /* * Wakeup all the tasks which joined with this one */ value_ptr = (void **) deleted->Wait.return_argument; 1115c3: 8b 77 28 mov 0x28(%edi),%esi while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) ) 1115c6: 8b 5d e4 mov -0x1c(%ebp),%ebx 1115c9: 83 c3 40 add $0x40,%ebx 1115cc: 83 c4 10 add $0x10,%esp 1115cf: eb 08 jmp 1115d9 <_POSIX_Threads_Delete_extension+0x39> 1115d1: 8d 76 00 lea 0x0(%esi),%esi *(void **)the_thread->Wait.return_argument = value_ptr; 1115d4: 8b 40 28 mov 0x28(%eax),%eax 1115d7: 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 )) ) 1115d9: 83 ec 0c sub $0xc,%esp 1115dc: 53 push %ebx 1115dd: e8 a6 ca ff ff call 10e088 <_Thread_queue_Dequeue> 1115e2: 83 c4 10 add $0x10,%esp 1115e5: 85 c0 test %eax,%eax 1115e7: 75 eb jne 1115d4 <_POSIX_Threads_Delete_extension+0x34> *(void **)the_thread->Wait.return_argument = value_ptr; if ( api->schedpolicy == SCHED_SPORADIC ) 1115e9: 8b 45 e4 mov -0x1c(%ebp),%eax 1115ec: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 1115f3: 74 1f je 111614 <_POSIX_Threads_Delete_extension+0x74> (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; 1115f5: c7 87 f8 00 00 00 00 movl $0x0,0xf8(%edi) 1115fc: 00 00 00 (void) _Workspace_Free( api ); 1115ff: 8b 45 e4 mov -0x1c(%ebp),%eax 111602: 89 45 08 mov %eax,0x8(%ebp) } 111605: 8d 65 f4 lea -0xc(%ebp),%esp 111608: 5b pop %ebx 111609: 5e pop %esi 11160a: 5f pop %edi 11160b: c9 leave if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); deleted->API_Extensions[ THREAD_API_POSIX ] = NULL; (void) _Workspace_Free( api ); 11160c: e9 27 d8 ff ff jmp 10ee38 <_Workspace_Free> 111611: 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 ); 111614: 83 ec 0c sub $0xc,%esp 111617: 05 a4 00 00 00 add $0xa4,%eax 11161c: 50 push %eax 11161d: e8 f6 d6 ff ff call 10ed18 <_Watchdog_Remove> 111622: 83 c4 10 add $0x10,%esp 111625: eb ce jmp 1115f5 <_POSIX_Threads_Delete_extension+0x55> =============================================================================== 00111520 <_POSIX_Threads_Initialize_user_threads>: * * This routine creates and starts all configured user * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { 111520: 55 push %ebp 111521: 89 e5 mov %esp,%ebp 111523: 83 ec 08 sub $0x8,%esp if ( _POSIX_Threads_Initialize_user_threads_p ) 111526: a1 58 77 12 00 mov 0x127758,%eax 11152b: 85 c0 test %eax,%eax 11152d: 74 05 je 111534 <_POSIX_Threads_Initialize_user_threads+0x14> (*_POSIX_Threads_Initialize_user_threads_p)(); } 11152f: c9 leave * initialzation threads. */ void _POSIX_Threads_Initialize_user_threads( void ) { if ( _POSIX_Threads_Initialize_user_threads_p ) (*_POSIX_Threads_Initialize_user_threads_p)(); 111530: ff e0 jmp *%eax 111532: 66 90 xchg %ax,%ax } 111534: c9 leave 111535: c3 ret =============================================================================== 0010bfe0 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 10bfe0: 55 push %ebp 10bfe1: 89 e5 mov %esp,%ebp 10bfe3: 57 push %edi 10bfe4: 56 push %esi 10bfe5: 53 push %ebx 10bfe6: 83 ec 5c sub $0x5c,%esp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 10bfe9: 8b 3d b4 64 12 00 mov 0x1264b4,%edi maximum = Configuration_POSIX_API.number_of_initialization_threads; 10bfef: a1 b0 64 12 00 mov 0x1264b0,%eax 10bff4: 89 45 a4 mov %eax,-0x5c(%ebp) if ( !user_threads || maximum == 0 ) 10bff7: 85 ff test %edi,%edi 10bff9: 74 44 je 10c03f <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10bffb: 85 c0 test %eax,%eax 10bffd: 74 40 je 10c03f <_POSIX_Threads_Initialize_user_threads_body+0x5f><== NEVER TAKEN 10bfff: 31 db xor %ebx,%ebx 10c001: 8d 75 a8 lea -0x58(%ebp),%esi for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 10c004: 83 ec 0c sub $0xc,%esp 10c007: 56 push %esi 10c008: e8 ef 67 00 00 call 1127fc (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 10c00d: 5a pop %edx 10c00e: 59 pop %ecx 10c00f: 6a 02 push $0x2 10c011: 56 push %esi 10c012: e8 0d 68 00 00 call 112824 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 10c017: 59 pop %ecx 10c018: 58 pop %eax 10c019: ff 74 df 04 pushl 0x4(%edi,%ebx,8) 10c01d: 56 push %esi 10c01e: e8 35 68 00 00 call 112858 status = pthread_create( 10c023: 6a 00 push $0x0 10c025: ff 34 df pushl (%edi,%ebx,8) 10c028: 56 push %esi 10c029: 8d 45 e4 lea -0x1c(%ebp),%eax 10c02c: 50 push %eax 10c02d: e8 9a fc ff ff call 10bccc &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 10c032: 83 c4 20 add $0x20,%esp 10c035: 85 c0 test %eax,%eax 10c037: 75 0e jne 10c047 <_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++ ) { 10c039: 43 inc %ebx 10c03a: 39 5d a4 cmp %ebx,-0x5c(%ebp) 10c03d: 77 c5 ja 10c004 <_POSIX_Threads_Initialize_user_threads_body+0x24><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 10c03f: 8d 65 f4 lea -0xc(%ebp),%esp 10c042: 5b pop %ebx 10c043: 5e pop %esi 10c044: 5f pop %edi 10c045: c9 leave 10c046: c3 ret &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 10c047: 52 push %edx 10c048: 50 push %eax 10c049: 6a 01 push $0x1 10c04b: 6a 02 push $0x2 10c04d: e8 5a 1e 00 00 call 10deac <_Internal_error_Occurred> =============================================================================== 001117d0 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 1117d0: 55 push %ebp 1117d1: 89 e5 mov %esp,%ebp 1117d3: 56 push %esi 1117d4: 53 push %ebx 1117d5: 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 ]; 1117d8: 8b 9e f8 00 00 00 mov 0xf8(%esi),%ebx /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 1117de: 83 ec 0c sub $0xc,%esp 1117e1: 8d 83 94 00 00 00 lea 0x94(%ebx),%eax 1117e7: 50 push %eax 1117e8: e8 4f 12 00 00 call 112a3c <_Timespec_To_ticks> the_thread->cpu_time_budget = ticks; 1117ed: 89 46 78 mov %eax,0x78(%esi) 1117f0: 0f b6 05 d4 52 12 00 movzbl 0x1252d4,%eax 1117f7: 2b 83 84 00 00 00 sub 0x84(%ebx),%eax new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 1117fd: 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 ) { 111800: 83 c4 10 add $0x10,%esp 111803: 8b 4e 1c mov 0x1c(%esi),%ecx 111806: 85 c9 test %ecx,%ecx 111808: 75 05 jne 11180f <_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 ) { 11180a: 39 46 14 cmp %eax,0x14(%esi) 11180d: 77 35 ja 111844 <_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 ); 11180f: 83 ec 0c sub $0xc,%esp 111812: 8d 83 8c 00 00 00 lea 0x8c(%ebx),%eax 111818: 50 push %eax 111819: e8 1e 12 00 00 call 112a3c <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 11181e: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 111824: 83 c4 10 add $0x10,%esp 111827: 81 c3 a4 00 00 00 add $0xa4,%ebx 11182d: 89 5d 0c mov %ebx,0xc(%ebp) 111830: c7 45 08 98 95 12 00 movl $0x129598,0x8(%ebp) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } 111837: 8d 65 f8 lea -0x8(%ebp),%esp 11183a: 5b pop %ebx 11183b: 5e pop %esi 11183c: c9 leave 11183d: e9 9e d3 ff ff jmp 10ebe0 <_Watchdog_Insert> 111842: 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 ); 111844: 52 push %edx 111845: 6a 01 push $0x1 111847: 50 push %eax 111848: 56 push %esi 111849: e8 36 bf ff ff call 10d784 <_Thread_Change_priority> 11184e: 83 c4 10 add $0x10,%esp 111851: eb bc jmp 11180f <_POSIX_Threads_Sporadic_budget_TSR+0x3f> =============================================================================== 0011178c <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 11178c: 55 push %ebp 11178d: 89 e5 mov %esp,%ebp 11178f: 83 ec 08 sub $0x8,%esp 111792: 8b 45 08 mov 0x8(%ebp),%eax POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111795: 8b 88 f8 00 00 00 mov 0xf8(%eax),%ecx /* * This will prevent the thread from consuming its entire "budget" * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ 11179b: c7 40 78 ff ff ff ff movl $0xffffffff,0x78(%eax) RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 1117a2: 0f b6 15 d4 52 12 00 movzbl 0x1252d4,%edx 1117a9: 2b 91 88 00 00 00 sub 0x88(%ecx),%edx new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 1117af: 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 ) { 1117b2: 8b 48 1c mov 0x1c(%eax),%ecx 1117b5: 85 c9 test %ecx,%ecx 1117b7: 75 05 jne 1117be <_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 ) { 1117b9: 39 50 14 cmp %edx,0x14(%eax) 1117bc: 72 02 jb 1117c0 <_POSIX_Threads_Sporadic_budget_callout+0x34><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 1117be: c9 leave <== NOT EXECUTED 1117bf: 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 ); 1117c0: 51 push %ecx 1117c1: 6a 01 push $0x1 1117c3: 52 push %edx 1117c4: 50 push %eax 1117c5: e8 ba bf ff ff call 10d784 <_Thread_Change_priority> 1117ca: 83 c4 10 add $0x10,%esp #if 0 printk( "lower priority\n" ); #endif } } } 1117cd: c9 leave 1117ce: c3 ret =============================================================================== 00114364 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 114364: 55 push %ebp 114365: 89 e5 mov %esp,%ebp 114367: 57 push %edi 114368: 56 push %esi 114369: 53 push %ebx 11436a: 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 ]; 11436d: 8b 45 08 mov 0x8(%ebp),%eax 114370: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 114376: c7 86 d4 00 00 00 01 movl $0x1,0xd4(%esi) 11437d: 00 00 00 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114380: 8d 9e e4 00 00 00 lea 0xe4(%esi),%ebx POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 114386: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi) 11438c: 74 30 je 1143be <_POSIX_Threads_cancel_run+0x5a> 11438e: 66 90 xchg %ax,%ax thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 114390: 9c pushf 114391: fa cli 114392: 59 pop %ecx handler = (POSIX_Cancel_Handler_control *) 114393: 8b 7b 04 mov 0x4(%ebx),%edi ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 114396: 8b 17 mov (%edi),%edx previous = the_node->previous; 114398: 8b 47 04 mov 0x4(%edi),%eax next->previous = previous; 11439b: 89 42 04 mov %eax,0x4(%edx) previous->next = next; 11439e: 89 10 mov %edx,(%eax) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 1143a0: 51 push %ecx 1143a1: 9d popf (*handler->routine)( handler->arg ); 1143a2: 83 ec 0c sub $0xc,%esp 1143a5: ff 77 0c pushl 0xc(%edi) 1143a8: ff 57 08 call *0x8(%edi) _Workspace_Free( handler ); 1143ab: 89 3c 24 mov %edi,(%esp) 1143ae: e8 85 aa ff ff call 10ee38 <_Workspace_Free> POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 1143b3: 83 c4 10 add $0x10,%esp 1143b6: 39 9e e0 00 00 00 cmp %ebx,0xe0(%esi) 1143bc: 75 d2 jne 114390 <_POSIX_Threads_cancel_run+0x2c><== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 1143be: 8d 65 f4 lea -0xc(%ebp),%esp 1143c1: 5b pop %ebx 1143c2: 5e pop %esi 1143c3: 5f pop %edi 1143c4: c9 leave 1143c5: c3 ret =============================================================================== 001124f0 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 1124f0: 55 push %ebp 1124f1: 89 e5 mov %esp,%ebp 1124f3: 56 push %esi 1124f4: 53 push %ebx 1124f5: 8b 5d 08 mov 0x8(%ebp),%ebx ISR_Level level; (void) _Watchdog_Remove( timer ); 1124f8: 83 ec 0c sub $0xc,%esp 1124fb: 53 push %ebx 1124fc: e8 db d2 ff ff call 10f7dc <_Watchdog_Remove> _ISR_Disable( level ); 112501: 9c pushf 112502: fa cli 112503: 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 ) { 112504: 83 c4 10 add $0x10,%esp 112507: 8b 43 08 mov 0x8(%ebx),%eax 11250a: 85 c0 test %eax,%eax 11250c: 74 0e je 11251c <_POSIX_Timer_Insert_helper+0x2c> _ISR_Enable( level ); 11250e: 56 push %esi 11250f: 9d popf 112510: 31 c0 xor %eax,%eax */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); return true; } 112512: 8d 65 f8 lea -0x8(%ebp),%esp 112515: 5b pop %ebx 112516: 5e pop %esi 112517: c9 leave 112518: c3 ret 112519: 8d 76 00 lea 0x0(%esi),%esi Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 11251c: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) the_watchdog->routine = routine; 112523: 8b 45 14 mov 0x14(%ebp),%eax 112526: 89 43 1c mov %eax,0x1c(%ebx) the_watchdog->id = id; 112529: 8b 45 10 mov 0x10(%ebp),%eax 11252c: 89 43 20 mov %eax,0x20(%ebx) the_watchdog->user_data = user_data; 11252f: 8b 45 18 mov 0x18(%ebp),%eax 112532: 89 43 24 mov %eax,0x24(%ebx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 112535: 8b 45 0c mov 0xc(%ebp),%eax 112538: 89 43 0c mov %eax,0xc(%ebx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 11253b: 83 ec 08 sub $0x8,%esp 11253e: 53 push %ebx 11253f: 68 98 b3 12 00 push $0x12b398 112544: e8 5b d1 ff ff call 10f6a4 <_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 ); 112549: 56 push %esi 11254a: 9d popf 11254b: b0 01 mov $0x1,%al return true; 11254d: 83 c4 10 add $0x10,%esp } 112550: 8d 65 f8 lea -0x8(%ebp),%esp 112553: 5b pop %ebx 112554: 5e pop %esi 112555: c9 leave 112556: c3 ret =============================================================================== 0010bdec <_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) { 10bdec: 55 push %ebp 10bded: 89 e5 mov %esp,%ebp 10bdef: 53 push %ebx 10bdf0: 83 ec 04 sub $0x4,%esp 10bdf3: 8b 5d 0c mov 0xc(%ebp),%ebx bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 10bdf6: ff 43 68 incl 0x68(%ebx) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10bdf9: 8b 53 54 mov 0x54(%ebx),%edx 10bdfc: 85 d2 test %edx,%edx 10bdfe: 75 28 jne 10be28 <_POSIX_Timer_TSR+0x3c> ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { 10be00: 8b 43 58 mov 0x58(%ebx),%eax 10be03: 85 c0 test %eax,%eax 10be05: 75 21 jne 10be28 <_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; 10be07: c6 43 3c 04 movb $0x4,0x3c(%ebx) /* * 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 ) ) { 10be0b: 83 ec 08 sub $0x8,%esp 10be0e: ff 73 44 pushl 0x44(%ebx) 10be11: ff 73 38 pushl 0x38(%ebx) 10be14: e8 5f 62 00 00 call 112078 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 10be19: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) 10be20: 83 c4 10 add $0x10,%esp } 10be23: 8b 5d fc mov -0x4(%ebp),%ebx 10be26: c9 leave 10be27: 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( 10be28: 83 ec 0c sub $0xc,%esp 10be2b: 53 push %ebx 10be2c: 68 ec bd 10 00 push $0x10bdec 10be31: ff 73 08 pushl 0x8(%ebx) 10be34: ff 73 64 pushl 0x64(%ebx) 10be37: 8d 43 10 lea 0x10(%ebx),%eax 10be3a: 50 push %eax 10be3b: e8 b0 66 00 00 call 1124f0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 10be40: 83 c4 20 add $0x20,%esp 10be43: 84 c0 test %al,%al 10be45: 74 dc je 10be23 <_POSIX_Timer_TSR+0x37> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 10be47: 83 ec 0c sub $0xc,%esp 10be4a: 8d 43 6c lea 0x6c(%ebx),%eax 10be4d: 50 push %eax 10be4e: e8 7d 16 00 00 call 10d4d0 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10be53: c6 43 3c 03 movb $0x3,0x3c(%ebx) /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 10be57: 83 c4 10 add $0x10,%esp 10be5a: eb af jmp 10be0b <_POSIX_Timer_TSR+0x1f> =============================================================================== 001146e0 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { 1146e0: 55 push %ebp 1146e1: 89 e5 mov %esp,%ebp 1146e3: 57 push %edi 1146e4: 56 push %esi 1146e5: 53 push %ebx 1146e6: 83 ec 48 sub $0x48,%esp 1146e9: 8b 75 08 mov 0x8(%ebp),%esi 1146ec: 8b 5d 0c mov 0xc(%ebp),%ebx siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 1146ef: 6a 01 push $0x1 1146f1: 0f b6 45 10 movzbl 0x10(%ebp),%eax 1146f5: 50 push %eax 1146f6: 8d 7d dc lea -0x24(%ebp),%edi 1146f9: 57 push %edi 1146fa: 53 push %ebx 1146fb: 56 push %esi 1146fc: e8 6b 00 00 00 call 11476c <_POSIX_signals_Clear_signals> 114701: 83 c4 20 add $0x20,%esp 114704: 84 c0 test %al,%al 114706: 74 58 je 114760 <_POSIX_signals_Check_signal+0x80> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 114708: 8d 04 5b lea (%ebx,%ebx,2),%eax 11470b: c1 e0 02 shl $0x2,%eax 11470e: 8b 90 a8 9a 12 00 mov 0x129aa8(%eax),%edx 114714: 89 55 c4 mov %edx,-0x3c(%ebp) 114717: 4a dec %edx 114718: 74 46 je 114760 <_POSIX_signals_Check_signal+0x80><== NEVER TAKEN return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 11471a: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 114720: 8b 90 a4 9a 12 00 mov 0x129aa4(%eax),%edx 114726: 09 ca or %ecx,%edx 114728: 89 96 cc 00 00 00 mov %edx,0xcc(%esi) /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 11472e: 83 b8 a0 9a 12 00 02 cmpl $0x2,0x129aa0(%eax) 114735: 74 21 je 114758 <_POSIX_signals_Check_signal+0x78> &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 114737: 83 ec 0c sub $0xc,%esp 11473a: 53 push %ebx 11473b: 89 4d d4 mov %ecx,-0x2c(%ebp) 11473e: ff 55 c4 call *-0x3c(%ebp) 114741: 83 c4 10 add $0x10,%esp 114744: 8b 4d d4 mov -0x2c(%ebp),%ecx } /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 114747: 89 8e cc 00 00 00 mov %ecx,0xcc(%esi) 11474d: b0 01 mov $0x1,%al return true; } 11474f: 8d 65 f4 lea -0xc(%ebp),%esp 114752: 5b pop %ebx 114753: 5e pop %esi 114754: 5f pop %edi 114755: c9 leave 114756: c3 ret 114757: 90 nop /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 114758: 50 push %eax 114759: 6a 00 push $0x0 11475b: 57 push %edi 11475c: eb dc jmp 11473a <_POSIX_signals_Check_signal+0x5a> 11475e: 66 90 xchg %ax,%ax /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; return true; 114760: 31 c0 xor %eax,%eax } 114762: 8d 65 f4 lea -0xc(%ebp),%esp 114765: 5b pop %ebx 114766: 5e pop %esi 114767: 5f pop %edi 114768: c9 leave 114769: c3 ret =============================================================================== 00114fac <_POSIX_signals_Clear_process_signals>: */ void _POSIX_signals_Clear_process_signals( int signo ) { 114fac: 55 push %ebp 114fad: 89 e5 mov %esp,%ebp 114faf: 53 push %ebx 114fb0: 8b 4d 08 mov 0x8(%ebp),%ecx clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 114fb3: 9c pushf 114fb4: fa cli 114fb5: 5a pop %edx if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 114fb6: 8d 04 49 lea (%ecx,%ecx,2),%eax 114fb9: c1 e0 02 shl $0x2,%eax 114fbc: 83 b8 a0 9a 12 00 02 cmpl $0x2,0x129aa0(%eax) 114fc3: 74 23 je 114fe8 <_POSIX_signals_Clear_process_signals+0x3c> if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 114fc5: 49 dec %ecx 114fc6: b8 fe ff ff ff mov $0xfffffffe,%eax 114fcb: d3 c0 rol %cl,%eax 114fcd: 23 05 a8 9c 12 00 and 0x129ca8,%eax 114fd3: a3 a8 9c 12 00 mov %eax,0x129ca8 if ( !_POSIX_signals_Pending ) 114fd8: 85 c0 test %eax,%eax 114fda: 75 06 jne 114fe2 <_POSIX_signals_Clear_process_signals+0x36><== NEVER TAKEN _Thread_Do_post_task_switch_extension--; 114fdc: ff 0d 5c 95 12 00 decl 0x12955c } _ISR_Enable( level ); 114fe2: 52 push %edx 114fe3: 9d popf } 114fe4: 5b pop %ebx 114fe5: c9 leave 114fe6: c3 ret 114fe7: 90 nop */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114fe8: 8d 98 c4 9c 12 00 lea 0x129cc4(%eax),%ebx 114fee: 39 98 c0 9c 12 00 cmp %ebx,0x129cc0(%eax) 114ff4: 75 ec jne 114fe2 <_POSIX_signals_Clear_process_signals+0x36><== NEVER TAKEN 114ff6: eb cd jmp 114fc5 <_POSIX_signals_Clear_process_signals+0x19> =============================================================================== 0011476c <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 11476c: 55 push %ebp 11476d: 89 e5 mov %esp,%ebp 11476f: 57 push %edi 114770: 56 push %esi 114771: 53 push %ebx 114772: 83 ec 1c sub $0x1c,%esp 114775: 8b 5d 0c mov 0xc(%ebp),%ebx 114778: 0f b6 7d 14 movzbl 0x14(%ebp),%edi 11477c: 8d 4b ff lea -0x1(%ebx),%ecx 11477f: b8 01 00 00 00 mov $0x1,%eax 114784: 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 ) 114786: 80 7d 18 00 cmpb $0x0,0x18(%ebp) 11478a: 75 3c jne 1147c8 <_POSIX_signals_Clear_signals+0x5c> 11478c: b9 ff ff ff ff mov $0xffffffff,%ecx signals_blocked = SIGNAL_ALL_MASK; /* XXX is this right for siginfo type signals? */ /* XXX are we sure they can be cleared the same way? */ _ISR_Disable( level ); 114791: 9c pushf 114792: fa cli 114793: 8f 45 e4 popl -0x1c(%ebp) if ( is_global ) { 114796: 89 fa mov %edi,%edx 114798: 84 d2 test %dl,%dl 11479a: 74 3c je 1147d8 <_POSIX_signals_Clear_signals+0x6c> if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 11479c: 23 05 a8 9c 12 00 and 0x129ca8,%eax 1147a2: 85 c8 test %ecx,%eax 1147a4: 74 5e je 114804 <_POSIX_signals_Clear_signals+0x98> if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 1147a6: 8d 14 1b lea (%ebx,%ebx,1),%edx 1147a9: 8d 04 1a lea (%edx,%ebx,1),%eax 1147ac: 83 3c 85 a0 9a 12 00 cmpl $0x2,0x129aa0(,%eax,4) 1147b3: 02 1147b4: 74 52 je 114808 <_POSIX_signals_Clear_signals+0x9c> &psiginfo->Node ); } else do_callout = false; } _POSIX_signals_Clear_process_signals( signo ); 1147b6: 83 ec 0c sub $0xc,%esp 1147b9: 53 push %ebx 1147ba: e8 ed 07 00 00 call 114fac <_POSIX_signals_Clear_process_signals> 1147bf: b0 01 mov $0x1,%al 1147c1: 83 c4 10 add $0x10,%esp 1147c4: eb 2f jmp 1147f5 <_POSIX_signals_Clear_signals+0x89> 1147c6: 66 90 xchg %ax,%ax /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) signals_blocked = ~api->signals_blocked; 1147c8: 8b 55 08 mov 0x8(%ebp),%edx 1147cb: 8b 8a cc 00 00 00 mov 0xcc(%edx),%ecx 1147d1: f7 d1 not %ecx 1147d3: eb bc jmp 114791 <_POSIX_signals_Clear_signals+0x25> 1147d5: 8d 76 00 lea 0x0(%esi),%esi } _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 1147d8: 8b 55 08 mov 0x8(%ebp),%edx 1147db: 8b 9a d0 00 00 00 mov 0xd0(%edx),%ebx 1147e1: 89 c6 mov %eax,%esi 1147e3: 21 de and %ebx,%esi 1147e5: 85 ce test %ecx,%esi 1147e7: 74 1b je 114804 <_POSIX_signals_Clear_signals+0x98> api->signals_pending &= ~mask; 1147e9: f7 d0 not %eax 1147eb: 21 d8 and %ebx,%eax 1147ed: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) 1147f3: b0 01 mov $0x1,%al do_callout = true; } } _ISR_Enable( level ); 1147f5: ff 75 e4 pushl -0x1c(%ebp) 1147f8: 9d popf return do_callout; } 1147f9: 8d 65 f4 lea -0xc(%ebp),%esp 1147fc: 5b pop %ebx 1147fd: 5e pop %esi 1147fe: 5f pop %edi 1147ff: c9 leave 114800: c3 ret 114801: 8d 76 00 lea 0x0(%esi),%esi _POSIX_signals_Clear_process_signals( signo ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 114804: 31 c0 xor %eax,%eax 114806: eb ed jmp 1147f5 <_POSIX_signals_Clear_signals+0x89> _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 114808: 89 c2 mov %eax,%edx 11480a: c1 e2 02 shl $0x2,%edx 11480d: 8d 8a c0 9c 12 00 lea 0x129cc0(%edx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 114813: 8b 82 c0 9c 12 00 mov 0x129cc0(%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 114819: 8d 71 04 lea 0x4(%ecx),%esi 11481c: 39 f0 cmp %esi,%eax 11481e: 74 48 je 114868 <_POSIX_signals_Clear_signals+0xfc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 114820: 8b 30 mov (%eax),%esi the_chain->first = new_first; 114822: 89 b2 c0 9c 12 00 mov %esi,0x129cc0(%edx) new_first->previous = _Chain_Head(the_chain); 114828: 89 4e 04 mov %ecx,0x4(%esi) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); _POSIX_signals_Clear_process_signals( signo ); 11482b: 83 ec 0c sub $0xc,%esp 11482e: 53 push %ebx 11482f: 89 45 e0 mov %eax,-0x20(%ebp) 114832: e8 75 07 00 00 call 114fac <_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; 114837: 8b 45 e0 mov -0x20(%ebp),%eax 11483a: 8d 70 08 lea 0x8(%eax),%esi 11483d: b9 03 00 00 00 mov $0x3,%ecx 114842: 8b 7d 10 mov 0x10(%ebp),%edi 114845: f3 a5 rep movsl %ds:(%esi),%es:(%edi) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 114847: c7 00 24 9c 12 00 movl $0x129c24,(%eax) old_last_node = the_chain->last; 11484d: 8b 15 28 9c 12 00 mov 0x129c28,%edx the_chain->last = the_node; 114853: a3 28 9c 12 00 mov %eax,0x129c28 old_last_node->next = the_node; 114858: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11485a: 89 50 04 mov %edx,0x4(%eax) 11485d: 83 c4 10 add $0x10,%esp 114860: e9 51 ff ff ff jmp 1147b6 <_POSIX_signals_Clear_signals+0x4a> 114865: 8d 76 00 lea 0x0(%esi),%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 ); 114868: 83 ec 0c sub $0xc,%esp 11486b: 53 push %ebx 11486c: e8 3b 07 00 00 call 114fac <_POSIX_signals_Clear_process_signals> 114871: 83 c4 10 add $0x10,%esp 114874: e9 3d ff ff ff jmp 1147b6 <_POSIX_signals_Clear_signals+0x4a> =============================================================================== 0010c6c8 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 10c6c8: 55 push %ebp 10c6c9: 89 e5 mov %esp,%ebp 10c6cb: 56 push %esi 10c6cc: 53 push %ebx 10c6cd: 8b 55 08 mov 0x8(%ebp),%edx 10c6d0: b8 1b 00 00 00 mov $0x1b,%eax int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c6d5: bb 01 00 00 00 mov $0x1,%ebx 10c6da: 8d 48 ff lea -0x1(%eax),%ecx 10c6dd: 89 de mov %ebx,%esi 10c6df: d3 e6 shl %cl,%esi 10c6e1: 85 d6 test %edx,%esi 10c6e3: 75 20 jne 10c705 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 10c6e5: 40 inc %eax 10c6e6: 83 f8 20 cmp $0x20,%eax 10c6e9: 75 ef jne 10c6da <_POSIX_signals_Get_highest+0x12> 10c6eb: b0 01 mov $0x1,%al #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 10c6ed: bb 01 00 00 00 mov $0x1,%ebx 10c6f2: eb 06 jmp 10c6fa <_POSIX_signals_Get_highest+0x32> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 10c6f4: 40 inc %eax 10c6f5: 83 f8 1b cmp $0x1b,%eax 10c6f8: 74 0b je 10c705 <_POSIX_signals_Get_highest+0x3d><== NEVER TAKEN if ( set & signo_to_mask( signo ) ) { 10c6fa: 8d 48 ff lea -0x1(%eax),%ecx 10c6fd: 89 de mov %ebx,%esi 10c6ff: d3 e6 shl %cl,%esi 10c701: 85 d6 test %edx,%esi 10c703: 74 ef je 10c6f4 <_POSIX_signals_Get_highest+0x2c> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 10c705: 5b pop %ebx 10c706: 5e pop %esi 10c707: c9 leave 10c708: c3 ret =============================================================================== 00111464 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 111464: 55 push %ebp 111465: 89 e5 mov %esp,%ebp 111467: 56 push %esi 111468: 53 push %ebx POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 111469: 8b 45 08 mov 0x8(%ebp),%eax 11146c: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi /* * api may be NULL in case of a thread close in progress */ if ( !api ) 111472: 85 f6 test %esi,%esi 111474: 74 69 je 1114df <_POSIX_signals_Post_switch_extension+0x7b><== NEVER TAKEN 111476: 66 90 xchg %ax,%ax * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 111478: 9c pushf 111479: fa cli 11147a: 59 pop %ecx if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 11147b: 8b 15 a8 9c 12 00 mov 0x129ca8,%edx 111481: 0b 96 d0 00 00 00 or 0xd0(%esi),%edx * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 111487: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 11148d: f7 d0 not %eax 11148f: 85 c2 test %eax,%edx 111491: 74 4a je 1114dd <_POSIX_signals_Post_switch_extension+0x79> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 111493: 51 push %ecx 111494: 9d popf 111495: bb 1b 00 00 00 mov $0x1b,%ebx for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 11149a: 52 push %edx 11149b: 6a 00 push $0x0 11149d: 53 push %ebx 11149e: 56 push %esi 11149f: e8 3c 32 00 00 call 1146e0 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 1114a4: 83 c4 0c add $0xc,%esp 1114a7: 6a 01 push $0x1 1114a9: 53 push %ebx 1114aa: 56 push %esi 1114ab: e8 30 32 00 00 call 1146e0 <_POSIX_signals_Check_signal> _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 1114b0: 43 inc %ebx 1114b1: 83 c4 10 add $0x10,%esp 1114b4: 83 fb 20 cmp $0x20,%ebx 1114b7: 75 e1 jne 11149a <_POSIX_signals_Post_switch_extension+0x36> 1114b9: b3 01 mov $0x1,%bl 1114bb: 90 nop _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 1114bc: 50 push %eax 1114bd: 6a 00 push $0x0 1114bf: 53 push %ebx 1114c0: 56 push %esi 1114c1: e8 1a 32 00 00 call 1146e0 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, true ); 1114c6: 83 c4 0c add $0xc,%esp 1114c9: 6a 01 push $0x1 1114cb: 53 push %ebx 1114cc: 56 push %esi 1114cd: e8 0e 32 00 00 call 1146e0 <_POSIX_signals_Check_signal> _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 1114d2: 43 inc %ebx 1114d3: 83 c4 10 add $0x10,%esp 1114d6: 83 fb 1b cmp $0x1b,%ebx 1114d9: 75 e1 jne 1114bc <_POSIX_signals_Post_switch_extension+0x58> 1114db: eb 9b jmp 111478 <_POSIX_signals_Post_switch_extension+0x14> */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 1114dd: 51 push %ecx 1114de: 9d popf for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 1114df: 8d 65 f8 lea -0x8(%ebp),%esp 1114e2: 5b pop %ebx 1114e3: 5e pop %esi 1114e4: c9 leave 1114e5: c3 ret =============================================================================== 001148a0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 1148a0: 55 push %ebp 1148a1: 89 e5 mov %esp,%ebp 1148a3: 57 push %edi 1148a4: 56 push %esi 1148a5: 53 push %ebx 1148a6: 83 ec 0c sub $0xc,%esp 1148a9: 8b 5d 08 mov 0x8(%ebp),%ebx 1148ac: 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 ]; 1148af: 8b b3 f8 00 00 00 mov 0xf8(%ebx),%esi 1148b5: 8d 4a ff lea -0x1(%edx),%ecx 1148b8: b8 01 00 00 00 mov $0x1,%eax 1148bd: d3 e0 shl %cl,%eax /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 1148bf: 8b 4b 10 mov 0x10(%ebx),%ecx 1148c2: 89 cf mov %ecx,%edi 1148c4: 81 e7 00 80 00 10 and $0x10008000,%edi 1148ca: 81 ff 00 80 00 10 cmp $0x10008000,%edi 1148d0: 74 6e je 114940 <_POSIX_signals_Unblock_thread+0xa0> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 1148d2: 8b 96 cc 00 00 00 mov 0xcc(%esi),%edx 1148d8: f7 d2 not %edx 1148da: 85 d0 test %edx,%eax 1148dc: 74 56 je 114934 <_POSIX_signals_Unblock_thread+0x94> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; 1148de: c6 43 74 01 movb $0x1,0x74(%ebx) if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 1148e2: f7 c1 00 00 00 10 test $0x10000000,%ecx 1148e8: 74 32 je 11491c <_POSIX_signals_Unblock_thread+0x7c> the_thread->Wait.return_code = EINTR; 1148ea: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) #if 0 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ 1148f1: 83 e1 08 and $0x8,%ecx 1148f4: 74 3e je 114934 <_POSIX_signals_Unblock_thread+0x94><== NEVER TAKEN if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1148f6: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1148fa: 0f 84 a8 00 00 00 je 1149a8 <_POSIX_signals_Unblock_thread+0x108><== ALWAYS TAKEN RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 114900: 83 ec 08 sub $0x8,%esp 114903: 68 f8 ff 03 10 push $0x1003fff8 114908: 53 push %ebx 114909: e8 b6 8f ff ff call 10d8c4 <_Thread_Clear_state> 11490e: 31 c0 xor %eax,%eax 114910: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 114913: 8d 65 f4 lea -0xc(%ebp),%esp 114916: 5b pop %ebx 114917: 5e pop %esi 114918: 5f pop %edi 114919: c9 leave 11491a: c3 ret 11491b: 90 nop if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 11491c: 85 c9 test %ecx,%ecx 11491e: 75 14 jne 114934 <_POSIX_signals_Unblock_thread+0x94><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 114920: a1 54 95 12 00 mov 0x129554,%eax 114925: 85 c0 test %eax,%eax 114927: 74 0b je 114934 <_POSIX_signals_Unblock_thread+0x94> 114929: 3b 1d 78 95 12 00 cmp 0x129578,%ebx 11492f: 74 6b je 11499c <_POSIX_signals_Unblock_thread+0xfc><== ALWAYS TAKEN 114931: 8d 76 00 lea 0x0(%esi),%esi _ISR_Signals_to_thread_executing = true; 114934: 31 c0 xor %eax,%eax } } return false; } 114936: 8d 65 f4 lea -0xc(%ebp),%esp 114939: 5b pop %ebx 11493a: 5e pop %esi 11493b: 5f pop %edi 11493c: c9 leave 11493d: c3 ret 11493e: 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) ) { 114940: 85 43 30 test %eax,0x30(%ebx) 114943: 74 33 je 114978 <_POSIX_signals_Unblock_thread+0xd8> the_thread->Wait.return_code = EINTR; 114945: c7 43 34 04 00 00 00 movl $0x4,0x34(%ebx) the_info = (siginfo_t *) the_thread->Wait.return_argument; 11494c: 8b 43 28 mov 0x28(%ebx),%eax if ( !info ) { 11494f: 8b 4d 10 mov 0x10(%ebp),%ecx 114952: 85 c9 test %ecx,%ecx 114954: 74 32 je 114988 <_POSIX_signals_Unblock_thread+0xe8> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 114956: b9 03 00 00 00 mov $0x3,%ecx 11495b: 89 c7 mov %eax,%edi 11495d: 8b 75 10 mov 0x10(%ebp),%esi 114960: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } _Thread_queue_Extract_with_proxy( the_thread ); 114962: 83 ec 0c sub $0xc,%esp 114965: 53 push %ebx 114966: e8 41 9a ff ff call 10e3ac <_Thread_queue_Extract_with_proxy> 11496b: b0 01 mov $0x1,%al return true; 11496d: 83 c4 10 add $0x10,%esp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; } } return false; } 114970: 8d 65 f4 lea -0xc(%ebp),%esp 114973: 5b pop %ebx 114974: 5e pop %esi 114975: 5f pop %edi 114976: c9 leave 114977: 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) ) { 114978: 8b 8e cc 00 00 00 mov 0xcc(%esi),%ecx 11497e: f7 d1 not %ecx 114980: 85 c8 test %ecx,%eax 114982: 75 c1 jne 114945 <_POSIX_signals_Unblock_thread+0xa5> 114984: eb ae jmp 114934 <_POSIX_signals_Unblock_thread+0x94> 114986: 66 90 xchg %ax,%ax the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 114988: 89 10 mov %edx,(%eax) the_info->si_code = SI_USER; 11498a: c7 40 04 01 00 00 00 movl $0x1,0x4(%eax) the_info->si_value.sival_int = 0; 114991: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) 114998: eb c8 jmp 114962 <_POSIX_signals_Unblock_thread+0xc2> 11499a: 66 90 xchg %ax,%ax (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 11499c: c6 05 28 96 12 00 01 movb $0x1,0x129628 1149a3: 31 c0 xor %eax,%eax 1149a5: eb 8f jmp 114936 <_POSIX_signals_Unblock_thread+0x96> 1149a7: 90 nop _Thread_queue_Extract_with_proxy( the_thread ); else #endif if ( _States_Is_delaying(the_thread->current_state) ){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 1149a8: 83 ec 0c sub $0xc,%esp 1149ab: 8d 43 48 lea 0x48(%ebx),%eax 1149ae: 50 push %eax 1149af: e8 64 a3 ff ff call 10ed18 <_Watchdog_Remove> 1149b4: 83 c4 10 add $0x10,%esp 1149b7: e9 44 ff ff ff jmp 114900 <_POSIX_signals_Unblock_thread+0x60> =============================================================================== 00110e84 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 110e84: 55 push %ebp 110e85: 89 e5 mov %esp,%ebp 110e87: 56 push %esi 110e88: 53 push %ebx 110e89: 8b 5d 08 mov 0x8(%ebp),%ebx 110e8c: 8b 75 0c mov 0xc(%ebp),%esi if ( !the_heap ) 110e8f: 85 db test %ebx,%ebx 110e91: 74 35 je 110ec8 <_Protected_heap_Get_information+0x44> return false; if ( !the_info ) 110e93: 85 f6 test %esi,%esi 110e95: 74 31 je 110ec8 <_Protected_heap_Get_information+0x44> return false; _RTEMS_Lock_allocator(); 110e97: 83 ec 0c sub $0xc,%esp 110e9a: ff 35 50 00 13 00 pushl 0x130050 110ea0: e8 9b e4 ff ff call 10f340 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); 110ea5: 5a pop %edx 110ea6: 59 pop %ecx 110ea7: 56 push %esi 110ea8: 53 push %ebx 110ea9: e8 4a 4e 00 00 call 115cf8 <_Heap_Get_information> _RTEMS_Unlock_allocator(); 110eae: 58 pop %eax 110eaf: ff 35 50 00 13 00 pushl 0x130050 110eb5: e8 ce e4 ff ff call 10f388 <_API_Mutex_Unlock> 110eba: b0 01 mov $0x1,%al return true; 110ebc: 83 c4 10 add $0x10,%esp } 110ebf: 8d 65 f8 lea -0x8(%ebp),%esp 110ec2: 5b pop %ebx 110ec3: 5e pop %esi 110ec4: c9 leave 110ec5: c3 ret 110ec6: 66 90 xchg %ax,%ax _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; 110ec8: 31 c0 xor %eax,%eax } 110eca: 8d 65 f8 lea -0x8(%ebp),%esp 110ecd: 5b pop %ebx 110ece: 5e pop %esi 110ecf: c9 leave 110ed0: c3 ret =============================================================================== 00110f28 <_Protected_heap_Walk>: bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 110f28: 55 push %ebp 110f29: 89 e5 mov %esp,%ebp 110f2b: 56 push %esi 110f2c: 53 push %ebx 110f2d: 83 ec 10 sub $0x10,%esp 110f30: 8b 5d 08 mov 0x8(%ebp),%ebx 110f33: 8b 75 0c mov 0xc(%ebp),%esi 110f36: 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 ) { 110f39: 8b 15 98 ff 12 00 mov 0x12ff98,%edx 110f3f: 85 d2 test %edx,%edx 110f41: 74 19 je 110f5c <_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 ); 110f43: 0f b6 c0 movzbl %al,%eax 110f46: 89 45 10 mov %eax,0x10(%ebp) 110f49: 89 75 0c mov %esi,0xc(%ebp) 110f4c: 89 5d 08 mov %ebx,0x8(%ebp) } return status; } 110f4f: 8d 65 f8 lea -0x8(%ebp),%esp 110f52: 5b pop %ebx 110f53: 5e pop %esi 110f54: 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 ); 110f55: e9 f2 f1 ff ff jmp 11014c <_Heap_Walk> 110f5a: 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(); 110f5c: 83 ec 0c sub $0xc,%esp 110f5f: ff 35 50 00 13 00 pushl 0x130050 110f65: 88 45 f4 mov %al,-0xc(%ebp) 110f68: e8 d3 e3 ff ff call 10f340 <_API_Mutex_Lock> status = _Heap_Walk( the_heap, source, do_dump ); 110f6d: 83 c4 0c add $0xc,%esp 110f70: 8a 45 f4 mov -0xc(%ebp),%al 110f73: 0f b6 c0 movzbl %al,%eax 110f76: 50 push %eax 110f77: 56 push %esi 110f78: 53 push %ebx 110f79: e8 ce f1 ff ff call 11014c <_Heap_Walk> _RTEMS_Unlock_allocator(); 110f7e: 5a pop %edx 110f7f: ff 35 50 00 13 00 pushl 0x130050 110f85: 88 45 f4 mov %al,-0xc(%ebp) 110f88: e8 fb e3 ff ff call 10f388 <_API_Mutex_Unlock> 110f8d: 83 c4 10 add $0x10,%esp } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } 110f90: 8a 45 f4 mov -0xc(%ebp),%al 110f93: 8d 65 f8 lea -0x8(%ebp),%esp 110f96: 5b pop %ebx 110f97: 5e pop %esi 110f98: c9 leave 110f99: c3 ret =============================================================================== 00111ca4 <_RTEMS_tasks_Initialize_user_tasks>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks( void ) { 111ca4: 55 push %ebp 111ca5: 89 e5 mov %esp,%ebp 111ca7: 83 ec 08 sub $0x8,%esp if ( _RTEMS_tasks_Initialize_user_tasks_p ) 111caa: a1 20 53 12 00 mov 0x125320,%eax 111caf: 85 c0 test %eax,%eax 111cb1: 74 05 je 111cb8 <_RTEMS_tasks_Initialize_user_tasks+0x14> (*_RTEMS_tasks_Initialize_user_tasks_p)(); } 111cb3: c9 leave */ void _RTEMS_tasks_Initialize_user_tasks( void ) { if ( _RTEMS_tasks_Initialize_user_tasks_p ) (*_RTEMS_tasks_Initialize_user_tasks_p)(); 111cb4: ff e0 jmp *%eax 111cb6: 66 90 xchg %ax,%ax } 111cb8: c9 leave 111cb9: c3 ret =============================================================================== 0010c074 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 10c074: 55 push %ebp 10c075: 89 e5 mov %esp,%ebp 10c077: 57 push %edi 10c078: 56 push %esi 10c079: 53 push %ebx 10c07a: 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; 10c07d: 8b 1d cc 52 12 00 mov 0x1252cc,%ebx maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 10c083: 8b 3d c8 52 12 00 mov 0x1252c8,%edi /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 10c089: 85 db test %ebx,%ebx 10c08b: 74 46 je 10c0d3 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c08d: 85 ff test %edi,%edi 10c08f: 74 42 je 10c0d3 <_RTEMS_tasks_Initialize_user_tasks_body+0x5f><== NEVER TAKEN 10c091: 31 f6 xor %esi,%esi 10c093: 90 nop return_value = rtems_task_create( 10c094: 83 ec 08 sub $0x8,%esp 10c097: 8d 45 e4 lea -0x1c(%ebp),%eax 10c09a: 50 push %eax 10c09b: ff 73 0c pushl 0xc(%ebx) 10c09e: ff 73 14 pushl 0x14(%ebx) 10c0a1: ff 73 04 pushl 0x4(%ebx) 10c0a4: ff 73 08 pushl 0x8(%ebx) 10c0a7: ff 33 pushl (%ebx) 10c0a9: e8 96 fd ff ff call 10be44 user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 10c0ae: 83 c4 20 add $0x20,%esp 10c0b1: 85 c0 test %eax,%eax 10c0b3: 75 26 jne 10c0db <_RTEMS_tasks_Initialize_user_tasks_body+0x67> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 10c0b5: 51 push %ecx 10c0b6: ff 73 18 pushl 0x18(%ebx) 10c0b9: ff 73 10 pushl 0x10(%ebx) 10c0bc: ff 75 e4 pushl -0x1c(%ebp) 10c0bf: e8 24 00 00 00 call 10c0e8 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 10c0c4: 83 c4 10 add $0x10,%esp 10c0c7: 85 c0 test %eax,%eax 10c0c9: 75 10 jne 10c0db <_RTEMS_tasks_Initialize_user_tasks_body+0x67> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 10c0cb: 46 inc %esi 10c0cc: 83 c3 1c add $0x1c,%ebx 10c0cf: 39 f7 cmp %esi,%edi 10c0d1: 77 c1 ja 10c094 <_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 ); } } 10c0d3: 8d 65 f4 lea -0xc(%ebp),%esp 10c0d6: 5b pop %ebx 10c0d7: 5e pop %esi 10c0d8: 5f pop %edi 10c0d9: c9 leave 10c0da: 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 ); 10c0db: 52 push %edx 10c0dc: 50 push %eax 10c0dd: 6a 01 push $0x1 10c0df: 6a 01 push $0x1 10c0e1: e8 ca 0d 00 00 call 10ceb0 <_Internal_error_Occurred> =============================================================================== 00111d00 <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) { 111d00: 55 push %ebp 111d01: 89 e5 mov %esp,%ebp 111d03: 57 push %edi 111d04: 56 push %esi 111d05: 53 push %ebx 111d06: 83 ec 1c sub $0x1c,%esp RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; Modes_Control prev_mode; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 111d09: 8b 45 08 mov 0x8(%ebp),%eax 111d0c: 8b 98 f4 00 00 00 mov 0xf4(%eax),%ebx if ( !api ) 111d12: 85 db test %ebx,%ebx 111d14: 74 45 je 111d5b <_RTEMS_tasks_Post_switch_extension+0x5b><== NEVER TAKEN * Signal Processing */ asr = &api->Signal; _ISR_Disable( level ); 111d16: 9c pushf 111d17: fa cli 111d18: 58 pop %eax signal_set = asr->signals_posted; 111d19: 8b 73 14 mov 0x14(%ebx),%esi asr->signals_posted = 0; 111d1c: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) _ISR_Enable( level ); 111d23: 50 push %eax 111d24: 9d popf if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ 111d25: 85 f6 test %esi,%esi 111d27: 74 32 je 111d5b <_RTEMS_tasks_Post_switch_extension+0x5b> return; asr->nest_level += 1; 111d29: ff 43 1c incl 0x1c(%ebx) rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111d2c: 50 push %eax 111d2d: 8d 7d e4 lea -0x1c(%ebp),%edi 111d30: 57 push %edi 111d31: 68 ff ff 00 00 push $0xffff 111d36: ff 73 10 pushl 0x10(%ebx) 111d39: e8 e6 2d 00 00 call 114b24 (*asr->handler)( signal_set ); 111d3e: 89 34 24 mov %esi,(%esp) 111d41: ff 53 0c call *0xc(%ebx) asr->nest_level -= 1; 111d44: ff 4b 1c decl 0x1c(%ebx) rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); 111d47: 83 c4 0c add $0xc,%esp 111d4a: 57 push %edi 111d4b: 68 ff ff 00 00 push $0xffff 111d50: ff 75 e4 pushl -0x1c(%ebp) 111d53: e8 cc 2d 00 00 call 114b24 111d58: 83 c4 10 add $0x10,%esp } 111d5b: 8d 65 f4 lea -0xc(%ebp),%esp 111d5e: 5b pop %ebx 111d5f: 5e pop %esi 111d60: 5f pop %edi 111d61: c9 leave 111d62: c3 ret =============================================================================== 00111c5c <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 111c5c: 55 push %ebp 111c5d: 89 e5 mov %esp,%ebp /* * Per Task Variables */ tvp = executing->task_variables; 111c5f: 8b 45 08 mov 0x8(%ebp),%eax 111c62: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 111c68: 85 c0 test %eax,%eax 111c6a: 74 13 je 111c7f <_RTEMS_tasks_Switch_extension+0x23> tvp->tval = *tvp->ptr; 111c6c: 8b 50 04 mov 0x4(%eax),%edx 111c6f: 8b 0a mov (%edx),%ecx 111c71: 89 48 0c mov %ecx,0xc(%eax) *tvp->ptr = tvp->gval; 111c74: 8b 48 08 mov 0x8(%eax),%ecx 111c77: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111c79: 8b 00 mov (%eax),%eax /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 111c7b: 85 c0 test %eax,%eax 111c7d: 75 ed jne 111c6c <_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; 111c7f: 8b 45 0c mov 0xc(%ebp),%eax 111c82: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 111c88: 85 c0 test %eax,%eax 111c8a: 74 13 je 111c9f <_RTEMS_tasks_Switch_extension+0x43> tvp->gval = *tvp->ptr; 111c8c: 8b 50 04 mov 0x4(%eax),%edx 111c8f: 8b 0a mov (%edx),%ecx 111c91: 89 48 08 mov %ecx,0x8(%eax) *tvp->ptr = tvp->tval; 111c94: 8b 48 0c mov 0xc(%eax),%ecx 111c97: 89 0a mov %ecx,(%edx) tvp = (rtems_task_variable_t *)tvp->next; 111c99: 8b 00 mov (%eax),%eax *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 111c9b: 85 c0 test %eax,%eax 111c9d: 75 ed jne 111c8c <_RTEMS_tasks_Switch_extension+0x30><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 111c9f: c9 leave 111ca0: c3 ret =============================================================================== 0010ca48 <_Rate_monotonic_Initiate_statistics>: } void _Rate_monotonic_Initiate_statistics( Rate_monotonic_Control *the_period ) { 10ca48: 55 push %ebp 10ca49: 89 e5 mov %esp,%ebp 10ca4b: 57 push %edi 10ca4c: 56 push %esi 10ca4d: 53 push %ebx 10ca4e: 83 ec 28 sub $0x28,%esp 10ca51: 8b 5d 08 mov 0x8(%ebp),%ebx Thread_Control *owning_thread = the_period->owner; 10ca54: 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 ); 10ca57: 8d 7d e0 lea -0x20(%ebp),%edi 10ca5a: 57 push %edi 10ca5b: e8 04 19 00 00 call 10e364 <_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; 10ca60: 8b 45 e0 mov -0x20(%ebp),%eax 10ca63: 8b 55 e4 mov -0x1c(%ebp),%edx 10ca66: 89 43 4c mov %eax,0x4c(%ebx) 10ca69: 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; 10ca6c: 8b 86 84 00 00 00 mov 0x84(%esi),%eax 10ca72: 8b 96 88 00 00 00 mov 0x88(%esi),%edx 10ca78: 89 43 44 mov %eax,0x44(%ebx) 10ca7b: 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) { 10ca7e: 83 c4 10 add $0x10,%esp 10ca81: 3b 35 18 c4 12 00 cmp 0x12c418,%esi 10ca87: 74 0b je 10ca94 <_Rate_monotonic_Initiate_statistics+0x4c> ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); } #endif } 10ca89: 8d 65 f4 lea -0xc(%ebp),%esp 10ca8c: 5b pop %ebx 10ca8d: 5e pop %esi 10ca8e: 5f pop %edi 10ca8f: c9 leave 10ca90: c3 ret 10ca91: 8d 76 00 lea 0x0(%esi),%esi /* * Adjust the CPU time used to account for the time since last * context switch. */ _Timespec_Subtract( 10ca94: 51 push %ecx 10ca95: 8d 75 d8 lea -0x28(%ebp),%esi 10ca98: 56 push %esi 10ca99: 57 push %edi 10ca9a: 68 20 c4 12 00 push $0x12c420 10ca9f: e8 04 3a 00 00 call 1104a8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timespec_Add_to( &the_period->cpu_usage_period_initiated, &ran ); 10caa4: 58 pop %eax 10caa5: 5a pop %edx 10caa6: 56 push %esi 10caa7: 83 c3 44 add $0x44,%ebx 10caaa: 53 push %ebx 10caab: e8 f4 38 00 00 call 1103a4 <_Timespec_Add_to> 10cab0: 83 c4 10 add $0x10,%esp } #endif } 10cab3: 8d 65 f4 lea -0xc(%ebp),%esp 10cab6: 5b pop %ebx 10cab7: 5e pop %esi 10cab8: 5f pop %edi 10cab9: c9 leave 10caba: c3 ret =============================================================================== 0010d09c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 10d09c: 55 push %ebp 10d09d: 89 e5 mov %esp,%ebp 10d09f: 83 ec 2c sub $0x2c,%esp 10d0a2: 8d 45 f4 lea -0xc(%ebp),%eax 10d0a5: 50 push %eax 10d0a6: ff 75 08 pushl 0x8(%ebp) 10d0a9: 68 60 c2 12 00 push $0x12c260 10d0ae: e8 09 1d 00 00 call 10edbc <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10d0b3: 83 c4 10 add $0x10,%esp 10d0b6: 8b 55 f4 mov -0xc(%ebp),%edx 10d0b9: 85 d2 test %edx,%edx 10d0bb: 75 29 jne 10d0e6 <_Rate_monotonic_Timeout+0x4a><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 10d0bd: 8b 50 40 mov 0x40(%eax),%edx if ( _States_Is_waiting_for_period( the_thread->current_state ) && 10d0c0: f6 42 11 40 testb $0x40,0x11(%edx) 10d0c4: 74 08 je 10d0ce <_Rate_monotonic_Timeout+0x32> the_thread->Wait.id == the_period->Object.id ) { 10d0c6: 8b 4a 20 mov 0x20(%edx),%ecx 10d0c9: 3b 48 08 cmp 0x8(%eax),%ecx 10d0cc: 74 4e je 10d11c <_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 ) { 10d0ce: 83 78 38 01 cmpl $0x1,0x38(%eax) 10d0d2: 74 14 je 10d0e8 <_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; 10d0d4: 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; 10d0db: a1 58 c3 12 00 mov 0x12c358,%eax 10d0e0: 48 dec %eax 10d0e1: a3 58 c3 12 00 mov %eax,0x12c358 case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 10d0e6: c9 leave 10d0e7: 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; 10d0e8: c7 40 38 03 00 00 00 movl $0x3,0x38(%eax) _Rate_monotonic_Initiate_statistics( the_period ); 10d0ef: 83 ec 0c sub $0xc,%esp 10d0f2: 50 push %eax 10d0f3: 89 45 e4 mov %eax,-0x1c(%ebp) 10d0f6: e8 4d f9 ff ff call 10ca48 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d0fb: 8b 45 e4 mov -0x1c(%ebp),%eax 10d0fe: 8b 50 3c mov 0x3c(%eax),%edx 10d101: 89 50 1c mov %edx,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10d104: 5a pop %edx 10d105: 59 pop %ecx 10d106: 83 c0 10 add $0x10,%eax 10d109: 50 push %eax 10d10a: 68 38 c4 12 00 push $0x12c438 10d10f: e8 64 36 00 00 call 110778 <_Watchdog_Insert> 10d114: 83 c4 10 add $0x10,%esp 10d117: eb c2 jmp 10d0db <_Rate_monotonic_Timeout+0x3f> 10d119: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10d11c: 83 ec 08 sub $0x8,%esp 10d11f: 68 f8 ff 03 10 push $0x1003fff8 10d124: 52 push %edx 10d125: 89 45 e4 mov %eax,-0x1c(%ebp) 10d128: e8 5b 21 00 00 call 10f288 <_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 ); 10d12d: 8b 45 e4 mov -0x1c(%ebp),%eax 10d130: 89 04 24 mov %eax,(%esp) 10d133: eb c1 jmp 10d0f6 <_Rate_monotonic_Timeout+0x5a> =============================================================================== 0010cb54 <_Rate_monotonic_Update_statistics>: } void _Rate_monotonic_Update_statistics( Rate_monotonic_Control *the_period ) { 10cb54: 55 push %ebp 10cb55: 89 e5 mov %esp,%ebp 10cb57: 57 push %edi 10cb58: 56 push %esi 10cb59: 53 push %ebx 10cb5a: 83 ec 1c sub $0x1c,%esp 10cb5d: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Update the counts. */ stats = &the_period->Statistics; stats->count++; 10cb60: ff 43 54 incl 0x54(%ebx) if ( the_period->state == RATE_MONOTONIC_EXPIRED ) 10cb63: 83 7b 38 04 cmpl $0x4,0x38(%ebx) 10cb67: 0f 84 bf 00 00 00 je 10cc2c <_Rate_monotonic_Update_statistics+0xd8> /* * Grab status for time statistics. */ valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); 10cb6d: 52 push %edx 10cb6e: 8d 7d e0 lea -0x20(%ebp),%edi 10cb71: 57 push %edi 10cb72: 8d 75 d8 lea -0x28(%ebp),%esi 10cb75: 56 push %esi 10cb76: 53 push %ebx 10cb77: e8 40 ff ff ff call 10cabc <_Rate_monotonic_Get_status> if (!valid_status) 10cb7c: 83 c4 10 add $0x10,%esp 10cb7f: 84 c0 test %al,%al 10cb81: 75 09 jne 10cb8c <_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 } 10cb83: 8d 65 f4 lea -0xc(%ebp),%esp 10cb86: 5b pop %ebx 10cb87: 5e pop %esi 10cb88: 5f pop %edi 10cb89: c9 leave 10cb8a: c3 ret 10cb8b: 90 nop /* * Update CPU time */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Add_to( &stats->total_cpu_time, &executed ); 10cb8c: 83 ec 08 sub $0x8,%esp 10cb8f: 57 push %edi 10cb90: 8d 43 6c lea 0x6c(%ebx),%eax 10cb93: 50 push %eax 10cb94: e8 0b 38 00 00 call 1103a4 <_Timespec_Add_to> if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) ) 10cb99: 59 pop %ecx 10cb9a: 58 pop %eax 10cb9b: 8d 43 5c lea 0x5c(%ebx),%eax 10cb9e: 50 push %eax 10cb9f: 57 push %edi 10cba0: e8 df 38 00 00 call 110484 <_Timespec_Less_than> 10cba5: 83 c4 10 add $0x10,%esp 10cba8: 84 c0 test %al,%al 10cbaa: 74 0c je 10cbb8 <_Rate_monotonic_Update_statistics+0x64> stats->min_cpu_time = executed; 10cbac: 8b 45 e0 mov -0x20(%ebp),%eax 10cbaf: 8b 55 e4 mov -0x1c(%ebp),%edx 10cbb2: 89 43 5c mov %eax,0x5c(%ebx) 10cbb5: 89 53 60 mov %edx,0x60(%ebx) if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) ) 10cbb8: 83 ec 08 sub $0x8,%esp 10cbbb: 8d 43 64 lea 0x64(%ebx),%eax 10cbbe: 50 push %eax 10cbbf: 57 push %edi 10cbc0: e8 9b 38 00 00 call 110460 <_Timespec_Greater_than> 10cbc5: 83 c4 10 add $0x10,%esp 10cbc8: 84 c0 test %al,%al 10cbca: 74 0c je 10cbd8 <_Rate_monotonic_Update_statistics+0x84> stats->max_cpu_time = executed; 10cbcc: 8b 45 e0 mov -0x20(%ebp),%eax 10cbcf: 8b 55 e4 mov -0x1c(%ebp),%edx 10cbd2: 89 43 64 mov %eax,0x64(%ebx) 10cbd5: 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 ); 10cbd8: 83 ec 08 sub $0x8,%esp 10cbdb: 56 push %esi 10cbdc: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10cbe2: 50 push %eax 10cbe3: e8 bc 37 00 00 call 1103a4 <_Timespec_Add_to> if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) ) 10cbe8: 58 pop %eax 10cbe9: 5a pop %edx 10cbea: 8d 43 74 lea 0x74(%ebx),%eax 10cbed: 50 push %eax 10cbee: 56 push %esi 10cbef: e8 90 38 00 00 call 110484 <_Timespec_Less_than> 10cbf4: 83 c4 10 add $0x10,%esp 10cbf7: 84 c0 test %al,%al 10cbf9: 75 39 jne 10cc34 <_Rate_monotonic_Update_statistics+0xe0> stats->min_wall_time = since_last_period; if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) ) 10cbfb: 83 ec 08 sub $0x8,%esp 10cbfe: 8d 43 7c lea 0x7c(%ebx),%eax 10cc01: 50 push %eax 10cc02: 56 push %esi 10cc03: e8 58 38 00 00 call 110460 <_Timespec_Greater_than> 10cc08: 83 c4 10 add $0x10,%esp 10cc0b: 84 c0 test %al,%al 10cc0d: 0f 84 70 ff ff ff je 10cb83 <_Rate_monotonic_Update_statistics+0x2f> stats->max_wall_time = since_last_period; 10cc13: 8b 45 d8 mov -0x28(%ebp),%eax 10cc16: 8b 55 dc mov -0x24(%ebp),%edx 10cc19: 89 43 7c mov %eax,0x7c(%ebx) 10cc1c: 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 } 10cc22: 8d 65 f4 lea -0xc(%ebp),%esp 10cc25: 5b pop %ebx 10cc26: 5e pop %esi 10cc27: 5f pop %edi 10cc28: c9 leave 10cc29: c3 ret 10cc2a: 66 90 xchg %ax,%ax */ stats = &the_period->Statistics; stats->count++; if ( the_period->state == RATE_MONOTONIC_EXPIRED ) stats->missed_count++; 10cc2c: ff 43 58 incl 0x58(%ebx) 10cc2f: e9 39 ff ff ff jmp 10cb6d <_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; 10cc34: 8b 45 d8 mov -0x28(%ebp),%eax 10cc37: 8b 55 dc mov -0x24(%ebp),%edx 10cc3a: 89 43 74 mov %eax,0x74(%ebx) 10cc3d: 89 53 78 mov %edx,0x78(%ebx) 10cc40: eb b9 jmp 10cbfb <_Rate_monotonic_Update_statistics+0xa7> =============================================================================== 0010e08c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 10e08c: 55 push %ebp 10e08d: 89 e5 mov %esp,%ebp 10e08f: 53 push %ebx 10e090: 83 ec 04 sub $0x4,%esp 10e093: 8b 5d 08 mov 0x8(%ebp),%ebx 10e096: a1 b8 cc 12 00 mov 0x12ccb8,%eax 10e09b: 40 inc %eax 10e09c: a3 b8 cc 12 00 mov %eax,0x12ccb8 long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 10e0a1: a1 4c cd 12 00 mov 0x12cd4c,%eax if ( time->tv_sec < seconds ) 10e0a6: 8b 13 mov (%ebx),%edx 10e0a8: 39 d0 cmp %edx,%eax 10e0aa: 7f 34 jg 10e0e0 <_TOD_Set+0x54> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 10e0ac: 51 push %ecx 10e0ad: 29 c2 sub %eax,%edx 10e0af: 52 push %edx 10e0b0: 6a 00 push $0x0 10e0b2: 68 8c cd 12 00 push $0x12cd8c 10e0b7: e8 04 25 00 00 call 1105c0 <_Watchdog_Adjust> 10e0bc: 83 c4 10 add $0x10,%esp _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 10e0bf: 8b 03 mov (%ebx),%eax 10e0c1: a3 4c cd 12 00 mov %eax,0x12cd4c 10e0c6: 8b 43 04 mov 0x4(%ebx),%eax 10e0c9: a3 50 cd 12 00 mov %eax,0x12cd50 _TOD_Is_set = true; 10e0ce: c6 05 cc cc 12 00 01 movb $0x1,0x12cccc _TOD_Activate(); _Thread_Enable_dispatch(); } 10e0d5: 8b 5d fc mov -0x4(%ebp),%ebx 10e0d8: c9 leave _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); 10e0d9: e9 c2 12 00 00 jmp 10f3a0 <_Thread_Enable_dispatch> 10e0de: 66 90 xchg %ax,%ax 10e0e0: 51 push %ecx 10e0e1: 29 d0 sub %edx,%eax 10e0e3: 50 push %eax 10e0e4: 6a 01 push $0x1 10e0e6: 68 8c cd 12 00 push $0x12cd8c 10e0eb: e8 d0 24 00 00 call 1105c0 <_Watchdog_Adjust> 10e0f0: 83 c4 10 add $0x10,%esp 10e0f3: eb ca jmp 10e0bf <_TOD_Set+0x33> =============================================================================== 0010c7c4 <_TOD_To_seconds>: */ uint32_t _TOD_To_seconds( const rtems_time_of_day *the_tod ) { 10c7c4: 55 push %ebp 10c7c5: 89 e5 mov %esp,%ebp 10c7c7: 56 push %esi 10c7c8: 53 push %ebx 10c7c9: 8b 55 08 mov 0x8(%ebp),%edx uint32_t time; uint32_t year_mod_4; time = the_tod->day - 1; 10c7cc: 8b 72 08 mov 0x8(%edx),%esi 10c7cf: 4e dec %esi year_mod_4 = the_tod->year & 3; 10c7d0: 8b 02 mov (%edx),%eax if ( year_mod_4 == 0 ) 10c7d2: 89 c3 mov %eax,%ebx 10c7d4: 83 e3 03 and $0x3,%ebx 10c7d7: 74 67 je 10c840 <_TOD_To_seconds+0x7c> time += _TOD_Days_to_date[ 1 ][ the_tod->month ]; else time += _TOD_Days_to_date[ 0 ][ the_tod->month ]; 10c7d9: 8b 4a 04 mov 0x4(%edx),%ecx 10c7dc: 0f b7 8c 09 20 54 12 movzwl 0x125420(%ecx,%ecx,1),%ecx 10c7e3: 00 10c7e4: 8d 34 31 lea (%ecx,%esi,1),%esi time += ( (the_tod->year - TOD_BASE_YEAR) / 4 ) * 10c7e7: 0f b7 8c 1b 54 54 12 movzwl 0x125454(%ebx,%ebx,1),%ecx 10c7ee: 00 10c7ef: 2d c4 07 00 00 sub $0x7c4,%eax 10c7f4: c1 e8 02 shr $0x2,%eax 10c7f7: 8d 1c c0 lea (%eax,%eax,8),%ebx 10c7fa: 8d 1c d8 lea (%eax,%ebx,8),%ebx 10c7fd: 8d 1c 9b lea (%ebx,%ebx,4),%ebx 10c800: 8d 04 98 lea (%eax,%ebx,4),%eax 10c803: 01 c1 add %eax,%ecx ( (TOD_DAYS_PER_YEAR * 4) + 1); time += _TOD_Days_since_last_leap_year[ year_mod_4 ]; 10c805: 01 f1 add %esi,%ecx time *= TOD_SECONDS_PER_DAY; 10c807: 8d 04 89 lea (%ecx,%ecx,4),%eax 10c80a: 8d 04 81 lea (%ecx,%eax,4),%eax 10c80d: 8d 04 c1 lea (%ecx,%eax,8),%eax 10c810: c1 e0 02 shl $0x2,%eax 10c813: 29 c8 sub %ecx,%eax 10c815: c1 e0 07 shl $0x7,%eax time += ((the_tod->hour * TOD_MINUTES_PER_HOUR) + the_tod->minute) 10c818: 8b 5a 14 mov 0x14(%edx),%ebx * TOD_SECONDS_PER_MINUTE; time += the_tod->second; 10c81b: 8b 4a 0c mov 0xc(%edx),%ecx 10c81e: 8d 0c 49 lea (%ecx,%ecx,2),%ecx 10c821: 8d 0c 89 lea (%ecx,%ecx,4),%ecx 10c824: c1 e1 02 shl $0x2,%ecx 10c827: 03 4a 10 add 0x10(%edx),%ecx 10c82a: 8d 14 49 lea (%ecx,%ecx,2),%edx 10c82d: 8d 14 92 lea (%edx,%edx,4),%edx 10c830: 8d 94 93 00 e5 da 21 lea 0x21dae500(%ebx,%edx,4),%edx 10c837: 8d 04 02 lea (%edx,%eax,1),%eax time += TOD_SECONDS_1970_THROUGH_1988; return( time ); } 10c83a: 5b pop %ebx 10c83b: 5e pop %esi 10c83c: c9 leave 10c83d: c3 ret 10c83e: 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 ]; 10c840: 8b 4a 04 mov 0x4(%edx),%ecx 10c843: 0f b7 8c 09 3a 54 12 movzwl 0x12543a(%ecx,%ecx,1),%ecx 10c84a: 00 10c84b: 8d 34 31 lea (%ecx,%esi,1),%esi 10c84e: eb 97 jmp 10c7e7 <_TOD_To_seconds+0x23> =============================================================================== 0010c850 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 10c850: 55 push %ebp 10c851: 89 e5 mov %esp,%ebp 10c853: 53 push %ebx 10c854: 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(); 10c857: 8b 1d 8c 86 12 00 mov 0x12868c,%ebx if ((!the_tod) || 10c85d: 85 c9 test %ecx,%ecx 10c85f: 74 53 je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c861: b8 40 42 0f 00 mov $0xf4240,%eax 10c866: 31 d2 xor %edx,%edx 10c868: f7 f3 div %ebx (the_tod->ticks >= ticks_per_second) || 10c86a: 3b 41 18 cmp 0x18(%ecx),%eax 10c86d: 76 45 jbe 10c8b4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 10c86f: 83 79 14 3b cmpl $0x3b,0x14(%ecx) 10c873: 77 3f ja 10c8b4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 10c875: 83 79 10 3b cmpl $0x3b,0x10(%ecx) 10c879: 77 39 ja 10c8b4 <_TOD_Validate+0x64> (the_tod->hour >= TOD_HOURS_PER_DAY) || 10c87b: 83 79 0c 17 cmpl $0x17,0xc(%ecx) 10c87f: 77 33 ja 10c8b4 <_TOD_Validate+0x64> (the_tod->month == 0) || 10c881: 8b 41 04 mov 0x4(%ecx),%eax uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c884: 85 c0 test %eax,%eax 10c886: 74 2c je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN 10c888: 83 f8 0c cmp $0xc,%eax 10c88b: 77 27 ja 10c8b4 <_TOD_Validate+0x64> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 10c88d: 8b 11 mov (%ecx),%edx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c88f: 81 fa c3 07 00 00 cmp $0x7c3,%edx 10c895: 76 1d jbe 10c8b4 <_TOD_Validate+0x64> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 10c897: 8b 49 08 mov 0x8(%ecx),%ecx uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 10c89a: 85 c9 test %ecx,%ecx 10c89c: 74 16 je 10c8b4 <_TOD_Validate+0x64> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 10c89e: 83 e2 03 and $0x3,%edx 10c8a1: 75 16 jne 10c8b9 <_TOD_Validate+0x69> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 10c8a3: 8b 04 85 94 54 12 00 mov 0x125494(,%eax,4),%eax * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 10c8aa: 39 c8 cmp %ecx,%eax 10c8ac: 0f 93 c0 setae %al 10c8af: eb 05 jmp 10c8b6 <_TOD_Validate+0x66> 10c8b1: 8d 76 00 lea 0x0(%esi),%esi 10c8b4: 31 c0 xor %eax,%eax if ( the_tod->day > days_in_month ) return false; return true; } 10c8b6: 5b pop %ebx 10c8b7: c9 leave 10c8b8: 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 ]; 10c8b9: 8b 04 85 60 54 12 00 mov 0x125460(,%eax,4),%eax 10c8c0: eb e8 jmp 10c8aa <_TOD_Validate+0x5a> =============================================================================== 0010d784 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 10d784: 55 push %ebp 10d785: 89 e5 mov %esp,%ebp 10d787: 57 push %edi 10d788: 56 push %esi 10d789: 53 push %ebx 10d78a: 83 ec 28 sub $0x28,%esp 10d78d: 8b 5d 08 mov 0x8(%ebp),%ebx 10d790: 8b 75 0c mov 0xc(%ebp),%esi 10d793: 8a 45 10 mov 0x10(%ebp),%al 10d796: 88 45 e7 mov %al,-0x19(%ebp) */ /* * Save original state */ original_state = the_thread->current_state; 10d799: 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 ); 10d79c: 53 push %ebx 10d79d: e8 92 0e 00 00 call 10e634 <_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 ) 10d7a2: 83 c4 10 add $0x10,%esp 10d7a5: 39 73 14 cmp %esi,0x14(%ebx) 10d7a8: 74 0d je 10d7b7 <_Thread_Change_priority+0x33> _Thread_Set_priority( the_thread, new_priority ); 10d7aa: 83 ec 08 sub $0x8,%esp 10d7ad: 56 push %esi 10d7ae: 53 push %ebx 10d7af: e8 38 0d 00 00 call 10e4ec <_Thread_Set_priority> 10d7b4: 83 c4 10 add $0x10,%esp _ISR_Disable( level ); 10d7b7: 9c pushf 10d7b8: fa cli 10d7b9: 5a pop %edx /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 10d7ba: 8b 43 10 mov 0x10(%ebx),%eax if ( state != STATES_TRANSIENT ) { 10d7bd: 83 f8 04 cmp $0x4,%eax 10d7c0: 74 26 je 10d7e8 <_Thread_Change_priority+0x64> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 10d7c2: 83 e7 04 and $0x4,%edi 10d7c5: 74 15 je 10d7dc <_Thread_Change_priority+0x58><== ALWAYS TAKEN the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 10d7c7: 52 push %edx 10d7c8: 9d popf if ( _States_Is_waiting_on_thread_queue( state ) ) { 10d7c9: a9 e0 be 03 00 test $0x3bee0,%eax 10d7ce: 0f 85 bc 00 00 00 jne 10d890 <_Thread_Change_priority+0x10c> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d7d4: 8d 65 f4 lea -0xc(%ebp),%esp 10d7d7: 5b pop %ebx 10d7d8: 5e pop %esi 10d7d9: 5f pop %edi 10d7da: c9 leave 10d7db: c3 ret */ state = the_thread->current_state; if ( state != STATES_TRANSIENT ) { /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d7dc: 89 c1 mov %eax,%ecx 10d7de: 83 e1 fb and $0xfffffffb,%ecx 10d7e1: 89 4b 10 mov %ecx,0x10(%ebx) 10d7e4: eb e1 jmp 10d7c7 <_Thread_Change_priority+0x43> 10d7e6: 66 90 xchg %ax,%ax } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 10d7e8: 83 e7 04 and $0x4,%edi 10d7eb: 75 45 jne 10d832 <_Thread_Change_priority+0xae><== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 10d7ed: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d7f4: 8b 83 90 00 00 00 mov 0x90(%ebx),%eax 10d7fa: 66 8b 8b 96 00 00 00 mov 0x96(%ebx),%cx 10d801: 66 09 08 or %cx,(%eax) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d804: 66 a1 6c 95 12 00 mov 0x12956c,%ax 10d80a: 0b 83 94 00 00 00 or 0x94(%ebx),%eax 10d810: 66 a3 6c 95 12 00 mov %ax,0x12956c _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) 10d816: 80 7d e7 00 cmpb $0x0,-0x19(%ebp) 10d81a: 0f 84 88 00 00 00 je 10d8a8 <_Thread_Change_priority+0x124> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 10d820: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10d826: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10d829: 8b 08 mov (%eax),%ecx after_node->next = the_node; 10d82b: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10d82d: 89 0b mov %ecx,(%ebx) before_node->previous = the_node; 10d82f: 89 59 04 mov %ebx,0x4(%ecx) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); } _ISR_Flash( level ); 10d832: 52 push %edx 10d833: 9d popf 10d834: fa cli RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10d835: 66 8b 1d 6c 95 12 00 mov 0x12956c,%bx 10d83c: 31 c0 xor %eax,%eax 10d83e: 89 c1 mov %eax,%ecx 10d840: 66 0f bc cb bsf %bx,%cx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10d844: 0f b7 c9 movzwl %cx,%ecx 10d847: 66 8b 9c 09 00 96 12 mov 0x129600(%ecx,%ecx,1),%bx 10d84e: 00 10d84f: 66 0f bc c3 bsf %bx,%ax * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10d853: c1 e1 04 shl $0x4,%ecx 10d856: 0f b7 c0 movzwl %ax,%eax 10d859: 8d 04 01 lea (%ecx,%eax,1),%eax 10d85c: 8d 0c 40 lea (%eax,%eax,2),%ecx 10d85f: a1 80 94 12 00 mov 0x129480,%eax 10d864: 8b 04 88 mov (%eax,%ecx,4),%eax 10d867: a3 48 95 12 00 mov %eax,0x129548 * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 10d86c: 8b 0d 78 95 12 00 mov 0x129578,%ecx * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Thread_Calculate_heir(); if ( !_Thread_Is_executing_also_the_heir() && 10d872: 39 c8 cmp %ecx,%eax 10d874: 74 0d je 10d883 <_Thread_Change_priority+0xff> _Thread_Executing->is_preemptible ) 10d876: 80 79 75 00 cmpb $0x0,0x75(%ecx) 10d87a: 74 07 je 10d883 <_Thread_Change_priority+0xff> _Context_Switch_necessary = true; 10d87c: c6 05 88 95 12 00 01 movb $0x1,0x129588 _ISR_Enable( level ); 10d883: 52 push %edx 10d884: 9d popf } 10d885: 8d 65 f4 lea -0xc(%ebp),%esp 10d888: 5b pop %ebx 10d889: 5e pop %esi 10d88a: 5f pop %edi 10d88b: c9 leave 10d88c: c3 ret 10d88d: 8d 76 00 lea 0x0(%esi),%esi /* 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 ); 10d890: 89 5d 0c mov %ebx,0xc(%ebp) 10d893: 8b 43 44 mov 0x44(%ebx),%eax 10d896: 89 45 08 mov %eax,0x8(%ebp) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10d899: 8d 65 f4 lea -0xc(%ebp),%esp 10d89c: 5b pop %ebx 10d89d: 5e pop %esi 10d89e: 5f pop %edi 10d89f: 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 ); 10d8a0: e9 af 0b 00 00 jmp 10e454 <_Thread_queue_Requeue> 10d8a5: 8d 76 00 lea 0x0(%esi),%esi _Priority_Add_to_bit_map( &the_thread->Priority_map ); if ( prepend_it ) _Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node ); else _Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node ); 10d8a8: 8b 83 8c 00 00 00 mov 0x8c(%ebx),%eax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d8ae: 8d 48 04 lea 0x4(%eax),%ecx 10d8b1: 89 0b mov %ecx,(%ebx) old_last_node = the_chain->last; 10d8b3: 8b 48 08 mov 0x8(%eax),%ecx the_chain->last = the_node; 10d8b6: 89 58 08 mov %ebx,0x8(%eax) old_last_node->next = the_node; 10d8b9: 89 19 mov %ebx,(%ecx) the_node->previous = old_last_node; 10d8bb: 89 4b 04 mov %ecx,0x4(%ebx) 10d8be: e9 6f ff ff ff jmp 10d832 <_Thread_Change_priority+0xae> =============================================================================== 0010d8c4 <_Thread_Clear_state>: void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) { 10d8c4: 55 push %ebp 10d8c5: 89 e5 mov %esp,%ebp 10d8c7: 53 push %ebx 10d8c8: 8b 45 08 mov 0x8(%ebp),%eax 10d8cb: 8b 55 0c mov 0xc(%ebp),%edx ISR_Level level; States_Control current_state; _ISR_Disable( level ); 10d8ce: 9c pushf 10d8cf: fa cli 10d8d0: 5b pop %ebx current_state = the_thread->current_state; 10d8d1: 8b 48 10 mov 0x10(%eax),%ecx if ( current_state & state ) { 10d8d4: 85 ca test %ecx,%edx 10d8d6: 74 70 je 10d948 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 10d8d8: f7 d2 not %edx 10d8da: 21 ca and %ecx,%edx current_state = 10d8dc: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) { 10d8df: 85 d2 test %edx,%edx 10d8e1: 75 65 jne 10d948 <_Thread_Clear_state+0x84> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 10d8e3: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10d8e9: 66 8b 88 96 00 00 00 mov 0x96(%eax),%cx 10d8f0: 66 09 0a or %cx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 10d8f3: 66 8b 15 6c 95 12 00 mov 0x12956c,%dx 10d8fa: 0b 90 94 00 00 00 or 0x94(%eax),%edx 10d900: 66 89 15 6c 95 12 00 mov %dx,0x12956c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 10d907: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10d90d: 8d 4a 04 lea 0x4(%edx),%ecx 10d910: 89 08 mov %ecx,(%eax) old_last_node = the_chain->last; 10d912: 8b 4a 08 mov 0x8(%edx),%ecx the_chain->last = the_node; 10d915: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10d918: 89 01 mov %eax,(%ecx) the_node->previous = old_last_node; 10d91a: 89 48 04 mov %ecx,0x4(%eax) _ISR_Flash( level ); 10d91d: 53 push %ebx 10d91e: 9d popf 10d91f: fa cli * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 10d920: 8b 50 14 mov 0x14(%eax),%edx 10d923: 8b 0d 48 95 12 00 mov 0x129548,%ecx 10d929: 3b 51 14 cmp 0x14(%ecx),%edx 10d92c: 73 1a jae 10d948 <_Thread_Clear_state+0x84> _Thread_Heir = the_thread; 10d92e: a3 48 95 12 00 mov %eax,0x129548 if ( _Thread_Executing->is_preemptible || 10d933: a1 78 95 12 00 mov 0x129578,%eax 10d938: 80 78 75 00 cmpb $0x0,0x75(%eax) 10d93c: 74 12 je 10d950 <_Thread_Clear_state+0x8c> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 10d93e: c6 05 88 95 12 00 01 movb $0x1,0x129588 10d945: 8d 76 00 lea 0x0(%esi),%esi } } } _ISR_Enable( level ); 10d948: 53 push %ebx 10d949: 9d popf } 10d94a: 5b pop %ebx 10d94b: c9 leave 10d94c: c3 ret 10d94d: 8d 76 00 lea 0x0(%esi),%esi * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 10d950: 85 d2 test %edx,%edx 10d952: 74 ea je 10d93e <_Thread_Clear_state+0x7a><== NEVER TAKEN 10d954: eb f2 jmp 10d948 <_Thread_Clear_state+0x84> =============================================================================== 0010d958 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 10d958: 55 push %ebp 10d959: 89 e5 mov %esp,%ebp 10d95b: 56 push %esi 10d95c: 53 push %ebx 10d95d: 8b 75 08 mov 0x8(%ebp),%esi 10d960: 8b 5d 0c mov 0xc(%ebp),%ebx 10d963: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10d967: 8b 46 1c mov 0x1c(%esi),%eax 10d96a: c7 04 90 00 00 00 00 movl $0x0,(%eax,%edx,4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10d971: a1 b8 94 12 00 mov 0x1294b8,%eax 10d976: 48 dec %eax 10d977: a3 b8 94 12 00 mov %eax,0x1294b8 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 10d97c: 83 ec 0c sub $0xc,%esp 10d97f: 53 push %ebx 10d980: e8 9b 11 00 00 call 10eb20 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d985: a1 b8 94 12 00 mov 0x1294b8,%eax 10d98a: 40 inc %eax 10d98b: a3 b8 94 12 00 mov %eax,0x1294b8 /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 10d990: 59 pop %ecx 10d991: 58 pop %eax 10d992: 53 push %ebx 10d993: 56 push %esi 10d994: e8 2b f6 ff ff call 10cfc4 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 10d999: 58 pop %eax 10d99a: 5a pop %edx 10d99b: 6a 01 push $0x1 10d99d: 53 push %ebx 10d99e: e8 b5 0b 00 00 call 10e558 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 10d9a3: 89 1c 24 mov %ebx,(%esp) 10d9a6: e8 01 0a 00 00 call 10e3ac <_Thread_queue_Extract_with_proxy> 10d9ab: 83 c4 10 add $0x10,%esp 10d9ae: 84 c0 test %al,%al 10d9b0: 75 06 jne 10d9b8 <_Thread_Close+0x60> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 10d9b2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10d9b6: 74 68 je 10da20 <_Thread_Close+0xc8> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 10d9b8: 3b 1d 40 95 12 00 cmp 0x129540,%ebx 10d9be: 74 74 je 10da34 <_Thread_Close+0xdc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 10d9c0: c7 83 ec 00 00 00 00 movl $0x0,0xec(%ebx) 10d9c7: 00 00 00 if ( the_thread->Start.fp_context ) 10d9ca: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10d9d0: 85 c0 test %eax,%eax 10d9d2: 74 0c je 10d9e0 <_Thread_Close+0x88> (void) _Workspace_Free( the_thread->Start.fp_context ); 10d9d4: 83 ec 0c sub $0xc,%esp 10d9d7: 50 push %eax 10d9d8: e8 5b 14 00 00 call 10ee38 <_Workspace_Free> 10d9dd: 83 c4 10 add $0x10,%esp /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 10d9e0: 83 ec 0c sub $0xc,%esp 10d9e3: 53 push %ebx 10d9e4: e8 23 0d 00 00 call 10e70c <_Thread_Stack_Free> the_thread->Start.stack = NULL; 10d9e9: c7 83 d0 00 00 00 00 movl $0x0,0xd0(%ebx) 10d9f0: 00 00 00 if ( the_thread->extensions ) 10d9f3: 8b 83 00 01 00 00 mov 0x100(%ebx),%eax 10d9f9: 83 c4 10 add $0x10,%esp 10d9fc: 85 c0 test %eax,%eax 10d9fe: 74 0c je 10da0c <_Thread_Close+0xb4> (void) _Workspace_Free( the_thread->extensions ); 10da00: 83 ec 0c sub $0xc,%esp 10da03: 50 push %eax 10da04: e8 2f 14 00 00 call 10ee38 <_Workspace_Free> 10da09: 83 c4 10 add $0x10,%esp the_thread->extensions = NULL; 10da0c: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10da13: 00 00 00 } 10da16: 8d 65 f8 lea -0x8(%ebp),%esp 10da19: 5b pop %ebx 10da1a: 5e pop %esi 10da1b: c9 leave 10da1c: c3 ret 10da1d: 8d 76 00 lea 0x0(%esi),%esi */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 10da20: 83 ec 0c sub $0xc,%esp 10da23: 8d 43 48 lea 0x48(%ebx),%eax 10da26: 50 push %eax 10da27: e8 ec 12 00 00 call 10ed18 <_Watchdog_Remove> 10da2c: 83 c4 10 add $0x10,%esp 10da2f: eb 87 jmp 10d9b8 <_Thread_Close+0x60> 10da31: 8d 76 00 lea 0x0(%esi),%esi */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 10da34: c7 05 40 95 12 00 00 movl $0x0,0x129540 10da3b: 00 00 00 10da3e: eb 80 jmp 10d9c0 <_Thread_Close+0x68> =============================================================================== 0010dad4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 10dad4: 55 push %ebp 10dad5: 89 e5 mov %esp,%ebp 10dad7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10dada: 8d 45 f4 lea -0xc(%ebp),%eax 10dadd: 50 push %eax 10dade: ff 75 08 pushl 0x8(%ebp) 10dae1: e8 aa 01 00 00 call 10dc90 <_Thread_Get> switch ( location ) { 10dae6: 83 c4 10 add $0x10,%esp 10dae9: 8b 55 f4 mov -0xc(%ebp),%edx 10daec: 85 d2 test %edx,%edx 10daee: 75 1c jne 10db0c <_Thread_Delay_ended+0x38><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 10daf0: 83 ec 08 sub $0x8,%esp 10daf3: 68 18 00 00 10 push $0x10000018 10daf8: 50 push %eax 10daf9: e8 c6 fd ff ff call 10d8c4 <_Thread_Clear_state> 10dafe: a1 b8 94 12 00 mov 0x1294b8,%eax 10db03: 48 dec %eax 10db04: a3 b8 94 12 00 mov %eax,0x1294b8 10db09: 83 c4 10 add $0x10,%esp | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 10db0c: c9 leave 10db0d: c3 ret =============================================================================== 0010db10 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 10db10: 55 push %ebp 10db11: 89 e5 mov %esp,%ebp 10db13: 57 push %edi 10db14: 56 push %esi 10db15: 53 push %ebx 10db16: 83 ec 1c sub $0x1c,%esp Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 10db19: 8b 1d 78 95 12 00 mov 0x129578,%ebx _ISR_Disable( level ); 10db1f: 9c pushf 10db20: fa cli 10db21: 58 pop %eax while ( _Context_Switch_necessary == true ) { 10db22: 8a 15 88 95 12 00 mov 0x129588,%dl 10db28: 84 d2 test %dl,%dl 10db2a: 0f 84 10 01 00 00 je 10dc40 <_Thread_Dispatch+0x130> 10db30: 8d 7d d8 lea -0x28(%ebp),%edi 10db33: e9 d1 00 00 00 jmp 10dc09 <_Thread_Dispatch+0xf9> executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 10db38: 50 push %eax 10db39: 9d popf #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 10db3a: 83 ec 0c sub $0xc,%esp 10db3d: 8d 45 e0 lea -0x20(%ebp),%eax 10db40: 50 push %eax 10db41: e8 fa 46 00 00 call 112240 <_TOD_Get_uptime> _Timestamp_Subtract( 10db46: 83 c4 0c add $0xc,%esp 10db49: 57 push %edi 10db4a: 8d 45 e0 lea -0x20(%ebp),%eax 10db4d: 50 push %eax 10db4e: 68 80 95 12 00 push $0x129580 10db53: e8 b8 0d 00 00 call 10e910 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 10db58: 5a pop %edx 10db59: 59 pop %ecx 10db5a: 57 push %edi 10db5b: 8d 83 84 00 00 00 lea 0x84(%ebx),%eax 10db61: 50 push %eax 10db62: e8 6d 0d 00 00 call 10e8d4 <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; 10db67: 8b 45 e0 mov -0x20(%ebp),%eax 10db6a: 8b 55 e4 mov -0x1c(%ebp),%edx 10db6d: a3 80 95 12 00 mov %eax,0x129580 10db72: 89 15 84 95 12 00 mov %edx,0x129584 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 10db78: a1 44 95 12 00 mov 0x129544,%eax 10db7d: 83 c4 10 add $0x10,%esp 10db80: 85 c0 test %eax,%eax 10db82: 74 10 je 10db94 <_Thread_Dispatch+0x84> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 10db84: 8b 10 mov (%eax),%edx 10db86: 89 93 f0 00 00 00 mov %edx,0xf0(%ebx) *_Thread_libc_reent = heir->libc_reent; 10db8c: 8b 96 f0 00 00 00 mov 0xf0(%esi),%edx 10db92: 89 10 mov %edx,(%eax) } _User_extensions_Thread_switch( executing, heir ); 10db94: 83 ec 08 sub $0x8,%esp 10db97: 56 push %esi 10db98: 53 push %ebx 10db99: e8 02 10 00 00 call 10eba0 <_User_extensions_Thread_switch> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 10db9e: 59 pop %ecx 10db9f: 58 pop %eax 10dba0: 81 c6 d4 00 00 00 add $0xd4,%esi 10dba6: 56 push %esi 10dba7: 8d 83 d4 00 00 00 lea 0xd4(%ebx),%eax 10dbad: 50 push %eax 10dbae: e8 ed 12 00 00 call 10eea0 <_CPU_Context_switch> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 10dbb3: 83 c4 10 add $0x10,%esp 10dbb6: 8b 93 ec 00 00 00 mov 0xec(%ebx),%edx 10dbbc: 85 d2 test %edx,%edx 10dbbe: 74 36 je 10dbf6 <_Thread_Dispatch+0xe6> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 10dbc0: a1 40 95 12 00 mov 0x129540,%eax 10dbc5: 39 c3 cmp %eax,%ebx 10dbc7: 74 2d je 10dbf6 <_Thread_Dispatch+0xe6> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 10dbc9: 85 c0 test %eax,%eax 10dbcb: 74 11 je 10dbde <_Thread_Dispatch+0xce> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 10dbcd: 83 ec 0c sub $0xc,%esp 10dbd0: 05 ec 00 00 00 add $0xec,%eax 10dbd5: 50 push %eax 10dbd6: e8 f9 12 00 00 call 10eed4 <_CPU_Context_save_fp> 10dbdb: 83 c4 10 add $0x10,%esp _Context_Restore_fp( &executing->fp_context ); 10dbde: 83 ec 0c sub $0xc,%esp 10dbe1: 8d 83 ec 00 00 00 lea 0xec(%ebx),%eax 10dbe7: 50 push %eax 10dbe8: e8 f1 12 00 00 call 10eede <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 10dbed: 89 1d 40 95 12 00 mov %ebx,0x129540 10dbf3: 83 c4 10 add $0x10,%esp if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 10dbf6: 8b 1d 78 95 12 00 mov 0x129578,%ebx _ISR_Disable( level ); 10dbfc: 9c pushf 10dbfd: fa cli 10dbfe: 58 pop %eax Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Context_Switch_necessary == true ) { 10dbff: 8a 15 88 95 12 00 mov 0x129588,%dl 10dc05: 84 d2 test %dl,%dl 10dc07: 74 37 je 10dc40 <_Thread_Dispatch+0x130> heir = _Thread_Heir; 10dc09: 8b 35 48 95 12 00 mov 0x129548,%esi _Thread_Dispatch_disable_level = 1; 10dc0f: c7 05 b8 94 12 00 01 movl $0x1,0x1294b8 10dc16: 00 00 00 _Context_Switch_necessary = false; 10dc19: c6 05 88 95 12 00 00 movb $0x0,0x129588 _Thread_Executing = heir; 10dc20: 89 35 78 95 12 00 mov %esi,0x129578 #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 ) 10dc26: 83 7e 7c 01 cmpl $0x1,0x7c(%esi) 10dc2a: 0f 85 08 ff ff ff jne 10db38 <_Thread_Dispatch+0x28> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dc30: 8b 15 84 94 12 00 mov 0x129484,%edx 10dc36: 89 56 78 mov %edx,0x78(%esi) 10dc39: e9 fa fe ff ff jmp 10db38 <_Thread_Dispatch+0x28> 10dc3e: 66 90 xchg %ax,%ax executing = _Thread_Executing; _ISR_Disable( level ); } _Thread_Dispatch_disable_level = 0; 10dc40: c7 05 b8 94 12 00 00 movl $0x0,0x1294b8 10dc47: 00 00 00 _ISR_Enable( level ); 10dc4a: 50 push %eax 10dc4b: 9d popf if ( _Thread_Do_post_task_switch_extension || 10dc4c: a1 5c 95 12 00 mov 0x12955c,%eax 10dc51: 85 c0 test %eax,%eax 10dc53: 75 06 jne 10dc5b <_Thread_Dispatch+0x14b> executing->do_post_task_switch_extension ) { 10dc55: 80 7b 74 00 cmpb $0x0,0x74(%ebx) 10dc59: 74 09 je 10dc64 <_Thread_Dispatch+0x154> executing->do_post_task_switch_extension = false; 10dc5b: c6 43 74 00 movb $0x0,0x74(%ebx) _API_extensions_Run_postswitch(); 10dc5f: e8 3c e8 ff ff call 10c4a0 <_API_extensions_Run_postswitch> } } 10dc64: 8d 65 f4 lea -0xc(%ebp),%esp 10dc67: 5b pop %ebx 10dc68: 5e pop %esi 10dc69: 5f pop %edi 10dc6a: c9 leave 10dc6b: c3 ret =============================================================================== 00114df4 <_Thread_Evaluate_mode>: * * XXX */ bool _Thread_Evaluate_mode( void ) { 114df4: 55 push %ebp 114df5: 89 e5 mov %esp,%ebp Thread_Control *executing; executing = _Thread_Executing; 114df7: a1 78 95 12 00 mov 0x129578,%eax if ( !_States_Is_ready( executing->current_state ) || 114dfc: 8b 50 10 mov 0x10(%eax),%edx 114dff: 85 d2 test %edx,%edx 114e01: 75 0e jne 114e11 <_Thread_Evaluate_mode+0x1d><== NEVER TAKEN 114e03: 3b 05 48 95 12 00 cmp 0x129548,%eax 114e09: 74 11 je 114e1c <_Thread_Evaluate_mode+0x28> ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 114e0b: 80 78 75 00 cmpb $0x0,0x75(%eax) 114e0f: 74 0b je 114e1c <_Thread_Evaluate_mode+0x28><== NEVER TAKEN _Context_Switch_necessary = true; 114e11: c6 05 88 95 12 00 01 movb $0x1,0x129588 114e18: b0 01 mov $0x1,%al return true; } return false; } 114e1a: c9 leave 114e1b: c3 ret executing = _Thread_Executing; if ( !_States_Is_ready( executing->current_state ) || ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = true; return true; 114e1c: 31 c0 xor %eax,%eax } return false; } 114e1e: c9 leave 114e1f: c3 ret =============================================================================== 0010dc90 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 10dc90: 55 push %ebp 10dc91: 89 e5 mov %esp,%ebp 10dc93: 53 push %ebx 10dc94: 83 ec 04 sub $0x4,%esp 10dc97: 8b 45 08 mov 0x8(%ebp),%eax 10dc9a: 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 ) ) { 10dc9d: 85 c0 test %eax,%eax 10dc9f: 74 4b je 10dcec <_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); 10dca1: 89 c2 mov %eax,%edx 10dca3: c1 ea 18 shr $0x18,%edx 10dca6: 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 ) 10dca9: 8d 5a ff lea -0x1(%edx),%ebx 10dcac: 83 fb 03 cmp $0x3,%ebx 10dcaf: 77 2b ja 10dcdc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 10dcb1: 89 c3 mov %eax,%ebx 10dcb3: c1 eb 1b shr $0x1b,%ebx 10dcb6: 4b dec %ebx 10dcb7: 75 23 jne 10dcdc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 10dcb9: 8b 14 95 8c 94 12 00 mov 0x12948c(,%edx,4),%edx if ( !api_information ) { 10dcc0: 85 d2 test %edx,%edx 10dcc2: 74 18 je 10dcdc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 10dcc4: 8b 52 04 mov 0x4(%edx),%edx if ( !information ) { 10dcc7: 85 d2 test %edx,%edx 10dcc9: 74 11 je 10dcdc <_Thread_Get+0x4c> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 10dccb: 53 push %ebx 10dccc: 51 push %ecx 10dccd: 50 push %eax 10dcce: 52 push %edx 10dccf: e8 24 f7 ff ff call 10d3f8 <_Objects_Get> 10dcd4: 83 c4 10 add $0x10,%esp done: return tp; } 10dcd7: 8b 5d fc mov -0x4(%ebp),%ebx 10dcda: c9 leave 10dcdb: c3 ret goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 10dcdc: c7 01 01 00 00 00 movl $0x1,(%ecx) 10dce2: 31 c0 xor %eax,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dce4: 8b 5d fc mov -0x4(%ebp),%ebx 10dce7: c9 leave 10dce8: c3 ret 10dce9: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10dcec: a1 b8 94 12 00 mov 0x1294b8,%eax 10dcf1: 40 inc %eax 10dcf2: a3 b8 94 12 00 mov %eax,0x1294b8 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; 10dcf7: c7 01 00 00 00 00 movl $0x0,(%ecx) tp = _Thread_Executing; 10dcfd: a1 78 95 12 00 mov 0x129578,%eax tp = (Thread_Control *) _Objects_Get( information, id, location ); done: return tp; } 10dd02: 8b 5d fc mov -0x4(%ebp),%ebx 10dd05: c9 leave 10dd06: c3 ret =============================================================================== 00114e20 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 114e20: 55 push %ebp 114e21: 89 e5 mov %esp,%ebp 114e23: 53 push %ebx 114e24: 83 ec 14 sub $0x14,%esp #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 114e27: 8b 1d 78 95 12 00 mov 0x129578,%ebx /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 114e2d: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax _ISR_Set_level(level); 114e33: 85 c0 test %eax,%eax 114e35: 74 79 je 114eb0 <_Thread_Handler+0x90> 114e37: fa cli #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 114e38: a0 14 91 12 00 mov 0x129114,%al 114e3d: 88 45 f7 mov %al,-0x9(%ebp) doneConstructors = 1; 114e40: c6 05 14 91 12 00 01 movb $0x1,0x129114 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 114e47: 8b 83 ec 00 00 00 mov 0xec(%ebx),%eax 114e4d: 85 c0 test %eax,%eax 114e4f: 74 24 je 114e75 <_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 ); 114e51: a1 40 95 12 00 mov 0x129540,%eax 114e56: 39 c3 cmp %eax,%ebx 114e58: 74 1b je 114e75 <_Thread_Handler+0x55> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 114e5a: 85 c0 test %eax,%eax 114e5c: 74 11 je 114e6f <_Thread_Handler+0x4f> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 114e5e: 83 ec 0c sub $0xc,%esp 114e61: 05 ec 00 00 00 add $0xec,%eax 114e66: 50 push %eax 114e67: e8 68 a0 ff ff call 10eed4 <_CPU_Context_save_fp> 114e6c: 83 c4 10 add $0x10,%esp _Thread_Allocated_fp = executing; 114e6f: 89 1d 40 95 12 00 mov %ebx,0x129540 /* * 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 ); 114e75: 83 ec 0c sub $0xc,%esp 114e78: 53 push %ebx 114e79: e8 92 9b ff ff call 10ea10 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 114e7e: e8 e9 8d ff ff call 10dc6c <_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) */ { 114e83: 83 c4 10 add $0x10,%esp 114e86: 80 7d f7 00 cmpb $0x0,-0x9(%ebp) 114e8a: 74 28 je 114eb4 <_Thread_Handler+0x94> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 114e8c: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 114e92: 85 c0 test %eax,%eax 114e94: 74 2d je 114ec3 <_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 ) { 114e96: 48 dec %eax 114e97: 74 43 je 114edc <_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 ); 114e99: 83 ec 0c sub $0xc,%esp 114e9c: 53 push %ebx 114e9d: e8 aa 9b ff ff call 10ea4c <_User_extensions_Thread_exitted> _Internal_error_Occurred( 114ea2: 83 c4 0c add $0xc,%esp 114ea5: 6a 06 push $0x6 114ea7: 6a 01 push $0x1 114ea9: 6a 00 push $0x0 114eab: e8 00 80 ff ff call 10ceb0 <_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); 114eb0: fb sti 114eb1: eb 85 jmp 114e38 <_Thread_Handler+0x18> 114eb3: 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 (); 114eb4: e8 17 c0 00 00 call 120ed0 <__start_set_sysctl_set> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 114eb9: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax 114ebf: 85 c0 test %eax,%eax 114ec1: 75 d3 jne 114e96 <_Thread_Handler+0x76> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 114ec3: 83 ec 0c sub $0xc,%esp 114ec6: ff b3 a8 00 00 00 pushl 0xa8(%ebx) 114ecc: ff 93 9c 00 00 00 call *0x9c(%ebx) INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 114ed2: 89 43 28 mov %eax,0x28(%ebx) 114ed5: 83 c4 10 add $0x10,%esp 114ed8: eb bf jmp 114e99 <_Thread_Handler+0x79> 114eda: 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)( 114edc: 83 ec 0c sub $0xc,%esp 114edf: ff b3 a4 00 00 00 pushl 0xa4(%ebx) 114ee5: ff 93 9c 00 00 00 call *0x9c(%ebx) executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 114eeb: 89 43 28 mov %eax,0x28(%ebx) 114eee: 83 c4 10 add $0x10,%esp 114ef1: eb a6 jmp 114e99 <_Thread_Handler+0x79> =============================================================================== 0010dd08 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 10dd08: 55 push %ebp 10dd09: 89 e5 mov %esp,%ebp 10dd0b: 57 push %edi 10dd0c: 56 push %esi 10dd0d: 53 push %ebx 10dd0e: 83 ec 1c sub $0x1c,%esp 10dd11: 8b 5d 0c mov 0xc(%ebp),%ebx 10dd14: 8b 4d 10 mov 0x10(%ebp),%ecx 10dd17: 8b 7d 14 mov 0x14(%ebp),%edi 10dd1a: 8b 75 1c mov 0x1c(%ebp),%esi 10dd1d: 8a 55 18 mov 0x18(%ebp),%dl 10dd20: 8a 45 20 mov 0x20(%ebp),%al 10dd23: 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; 10dd26: c7 83 f4 00 00 00 00 movl $0x0,0xf4(%ebx) 10dd2d: 00 00 00 10dd30: c7 83 f8 00 00 00 00 movl $0x0,0xf8(%ebx) 10dd37: 00 00 00 10dd3a: c7 83 fc 00 00 00 00 movl $0x0,0xfc(%ebx) 10dd41: 00 00 00 extensions_area = NULL; the_thread->libc_reent = NULL; 10dd44: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 10dd4b: 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 ) { 10dd4e: 85 c9 test %ecx,%ecx 10dd50: 0f 84 13 02 00 00 je 10df69 <_Thread_Initialize+0x261> stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; 10dd56: c6 83 c0 00 00 00 00 movb $0x0,0xc0(%ebx) 10dd5d: 89 f8 mov %edi,%eax Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 10dd5f: 89 8b c8 00 00 00 mov %ecx,0xc8(%ebx) the_stack->size = size; 10dd65: 89 83 c4 00 00 00 mov %eax,0xc4(%ebx) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 10dd6b: 84 d2 test %dl,%dl 10dd6d: 0f 85 89 01 00 00 jne 10defc <_Thread_Initialize+0x1f4> 10dd73: 31 c0 xor %eax,%eax 10dd75: 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; 10dd7c: 89 83 ec 00 00 00 mov %eax,0xec(%ebx) the_thread->Start.fp_context = fp_area; 10dd82: 89 83 cc 00 00 00 mov %eax,0xcc(%ebx) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10dd88: c7 43 50 00 00 00 00 movl $0x0,0x50(%ebx) the_watchdog->routine = routine; 10dd8f: c7 43 64 00 00 00 00 movl $0x0,0x64(%ebx) the_watchdog->id = id; 10dd96: c7 43 68 00 00 00 00 movl $0x0,0x68(%ebx) the_watchdog->user_data = user_data; 10dd9d: c7 43 6c 00 00 00 00 movl $0x0,0x6c(%ebx) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 10dda4: a1 58 95 12 00 mov 0x129558,%eax 10dda9: 85 c0 test %eax,%eax 10ddab: 0f 85 6b 01 00 00 jne 10df1c <_Thread_Initialize+0x214> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 10ddb1: c7 83 00 01 00 00 00 movl $0x0,0x100(%ebx) 10ddb8: 00 00 00 10ddbb: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 10ddc2: 8a 45 df mov -0x21(%ebp),%al 10ddc5: 88 83 ac 00 00 00 mov %al,0xac(%ebx) the_thread->Start.budget_algorithm = budget_algorithm; 10ddcb: 8b 45 24 mov 0x24(%ebp),%eax 10ddce: 89 83 b0 00 00 00 mov %eax,0xb0(%ebx) the_thread->Start.budget_callout = budget_callout; 10ddd4: 8b 45 28 mov 0x28(%ebp),%eax 10ddd7: 89 83 b4 00 00 00 mov %eax,0xb4(%ebx) switch ( budget_algorithm ) { 10dddd: 83 7d 24 02 cmpl $0x2,0x24(%ebp) 10dde1: 75 08 jne 10ddeb <_Thread_Initialize+0xe3> case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10dde3: a1 84 94 12 00 mov 0x129484,%eax 10dde8: 89 43 78 mov %eax,0x78(%ebx) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 10ddeb: 8b 45 2c mov 0x2c(%ebp),%eax 10ddee: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) the_thread->current_state = STATES_DORMANT; 10ddf4: c7 43 10 01 00 00 00 movl $0x1,0x10(%ebx) the_thread->Wait.queue = NULL; 10ddfb: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) the_thread->resource_count = 0; 10de02: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority; 10de09: 89 73 18 mov %esi,0x18(%ebx) the_thread->Start.initial_priority = priority; 10de0c: 89 b3 bc 00 00 00 mov %esi,0xbc(%ebx) _Thread_Set_priority( the_thread, priority ); 10de12: 83 ec 08 sub $0x8,%esp 10de15: 56 push %esi 10de16: 53 push %ebx 10de17: e8 d0 06 00 00 call 10e4ec <_Thread_Set_priority> /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 10de1c: c7 83 84 00 00 00 00 movl $0x0,0x84(%ebx) 10de23: 00 00 00 10de26: c7 83 88 00 00 00 00 movl $0x0,0x88(%ebx) 10de2d: 00 00 00 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10de30: 0f b7 53 08 movzwl 0x8(%ebx),%edx 10de34: 8b 45 08 mov 0x8(%ebp),%eax 10de37: 8b 40 1c mov 0x1c(%eax),%eax 10de3a: 89 1c 90 mov %ebx,(%eax,%edx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10de3d: 8b 45 30 mov 0x30(%ebp),%eax 10de40: 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 ); 10de43: 89 1c 24 mov %ebx,(%esp) 10de46: e8 8d 0c 00 00 call 10ead8 <_User_extensions_Thread_create> if ( extension_status ) 10de4b: 83 c4 10 add $0x10,%esp 10de4e: 84 c0 test %al,%al 10de50: 0f 85 9a 00 00 00 jne 10def0 <_Thread_Initialize+0x1e8> return true; failed: if ( the_thread->libc_reent ) 10de56: 8b 83 f0 00 00 00 mov 0xf0(%ebx),%eax 10de5c: 85 c0 test %eax,%eax 10de5e: 74 0c je 10de6c <_Thread_Initialize+0x164> _Workspace_Free( the_thread->libc_reent ); 10de60: 83 ec 0c sub $0xc,%esp 10de63: 50 push %eax 10de64: e8 cf 0f 00 00 call 10ee38 <_Workspace_Free> 10de69: 83 c4 10 add $0x10,%esp for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10de6c: 8b 83 f4 00 00 00 mov 0xf4(%ebx),%eax 10de72: 85 c0 test %eax,%eax 10de74: 74 0c je 10de82 <_Thread_Initialize+0x17a> _Workspace_Free( the_thread->API_Extensions[i] ); 10de76: 83 ec 0c sub $0xc,%esp 10de79: 50 push %eax 10de7a: e8 b9 0f 00 00 call 10ee38 <_Workspace_Free> 10de7f: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10de82: 8b 83 f8 00 00 00 mov 0xf8(%ebx),%eax 10de88: 85 c0 test %eax,%eax 10de8a: 74 0c je 10de98 <_Thread_Initialize+0x190> _Workspace_Free( the_thread->API_Extensions[i] ); 10de8c: 83 ec 0c sub $0xc,%esp 10de8f: 50 push %eax 10de90: e8 a3 0f 00 00 call 10ee38 <_Workspace_Free> 10de95: 83 c4 10 add $0x10,%esp failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) 10de98: 8b 83 fc 00 00 00 mov 0xfc(%ebx),%eax 10de9e: 85 c0 test %eax,%eax 10dea0: 74 0c je 10deae <_Thread_Initialize+0x1a6><== ALWAYS TAKEN _Workspace_Free( the_thread->API_Extensions[i] ); 10dea2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10dea5: 50 push %eax <== NOT EXECUTED 10dea6: e8 8d 0f 00 00 call 10ee38 <_Workspace_Free> <== NOT EXECUTED 10deab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( extensions_area ) 10deae: 8b 55 e4 mov -0x1c(%ebp),%edx 10deb1: 85 d2 test %edx,%edx 10deb3: 74 0e je 10dec3 <_Thread_Initialize+0x1bb> (void) _Workspace_Free( extensions_area ); 10deb5: 83 ec 0c sub $0xc,%esp 10deb8: ff 75 e4 pushl -0x1c(%ebp) 10debb: e8 78 0f 00 00 call 10ee38 <_Workspace_Free> 10dec0: 83 c4 10 add $0x10,%esp #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 10dec3: 8b 45 e0 mov -0x20(%ebp),%eax 10dec6: 85 c0 test %eax,%eax 10dec8: 74 0e je 10ded8 <_Thread_Initialize+0x1d0> (void) _Workspace_Free( fp_area ); 10deca: 83 ec 0c sub $0xc,%esp 10decd: ff 75 e0 pushl -0x20(%ebp) 10ded0: e8 63 0f 00 00 call 10ee38 <_Workspace_Free> 10ded5: 83 c4 10 add $0x10,%esp #endif _Thread_Stack_Free( the_thread ); 10ded8: 83 ec 0c sub $0xc,%esp 10dedb: 53 push %ebx 10dedc: e8 2b 08 00 00 call 10e70c <_Thread_Stack_Free> 10dee1: 31 c0 xor %eax,%eax return false; 10dee3: 83 c4 10 add $0x10,%esp } 10dee6: 8d 65 f4 lea -0xc(%ebp),%esp 10dee9: 5b pop %ebx 10deea: 5e pop %esi 10deeb: 5f pop %edi 10deec: c9 leave 10deed: c3 ret 10deee: 66 90 xchg %ax,%ax * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) 10def0: b0 01 mov $0x1,%al _Thread_Stack_Free( the_thread ); return false; } 10def2: 8d 65 f4 lea -0xc(%ebp),%esp 10def5: 5b pop %ebx 10def6: 5e pop %esi 10def7: 5f pop %edi 10def8: c9 leave 10def9: c3 ret 10defa: 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 ); 10defc: 83 ec 0c sub $0xc,%esp 10deff: 6a 6c push $0x6c 10df01: e8 16 0f 00 00 call 10ee1c <_Workspace_Allocate> 10df06: 89 45 e0 mov %eax,-0x20(%ebp) if ( !fp_area ) 10df09: 83 c4 10 add $0x10,%esp 10df0c: 85 c0 test %eax,%eax 10df0e: 0f 84 89 00 00 00 je 10df9d <_Thread_Initialize+0x295> 10df14: 8b 45 e0 mov -0x20(%ebp),%eax 10df17: e9 60 fe ff ff jmp 10dd7c <_Thread_Initialize+0x74> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 10df1c: 83 ec 0c sub $0xc,%esp 10df1f: 8d 04 85 04 00 00 00 lea 0x4(,%eax,4),%eax 10df26: 50 push %eax 10df27: e8 f0 0e 00 00 call 10ee1c <_Workspace_Allocate> 10df2c: 89 45 e4 mov %eax,-0x1c(%ebp) (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 10df2f: 83 c4 10 add $0x10,%esp 10df32: 85 c0 test %eax,%eax 10df34: 0f 84 1c ff ff ff je 10de56 <_Thread_Initialize+0x14e> goto failed; } the_thread->extensions = (void **) extensions_area; 10df3a: 89 c1 mov %eax,%ecx 10df3c: 89 83 00 01 00 00 mov %eax,0x100(%ebx) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10df42: 8b 3d 58 95 12 00 mov 0x129558,%edi 10df48: 31 d2 xor %edx,%edx 10df4a: 31 c0 xor %eax,%eax 10df4c: eb 08 jmp 10df56 <_Thread_Initialize+0x24e> 10df4e: 66 90 xchg %ax,%ax 10df50: 8b 8b 00 01 00 00 mov 0x100(%ebx),%ecx the_thread->extensions[i] = NULL; 10df56: c7 04 91 00 00 00 00 movl $0x0,(%ecx,%edx,4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 10df5d: 40 inc %eax 10df5e: 89 c2 mov %eax,%edx 10df60: 39 c7 cmp %eax,%edi 10df62: 73 ec jae 10df50 <_Thread_Initialize+0x248> 10df64: e9 59 fe ff ff jmp 10ddc2 <_Thread_Initialize+0xba> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 10df69: 83 ec 08 sub $0x8,%esp 10df6c: 57 push %edi 10df6d: 53 push %ebx 10df6e: 88 55 d8 mov %dl,-0x28(%ebp) 10df71: e8 32 07 00 00 call 10e6a8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 10df76: 83 c4 10 add $0x10,%esp 10df79: 85 c0 test %eax,%eax 10df7b: 8a 55 d8 mov -0x28(%ebp),%dl 10df7e: 74 16 je 10df96 <_Thread_Initialize+0x28e> 10df80: 39 c7 cmp %eax,%edi 10df82: 77 12 ja 10df96 <_Thread_Initialize+0x28e><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 10df84: 8b 8b d0 00 00 00 mov 0xd0(%ebx),%ecx the_thread->Start.core_allocated_stack = true; 10df8a: c6 83 c0 00 00 00 01 movb $0x1,0xc0(%ebx) 10df91: e9 c9 fd ff ff jmp 10dd5f <_Thread_Initialize+0x57> if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return false; 10df96: 31 c0 xor %eax,%eax 10df98: e9 49 ff ff ff jmp 10dee6 <_Thread_Initialize+0x1de> * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) 10df9d: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 10dfa4: e9 ad fe ff ff jmp 10de56 <_Thread_Initialize+0x14e> =============================================================================== 00113584 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 113584: 55 push %ebp 113585: 89 e5 mov %esp,%ebp 113587: 53 push %ebx 113588: 83 ec 10 sub $0x10,%esp 11358b: 8b 5d 08 mov 0x8(%ebp),%ebx the_thread->resource_count = 0; 11358e: c7 43 1c 00 00 00 00 movl $0x0,0x1c(%ebx) #if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->is_preemptible = the_thread->Start.is_preemptible; 113595: 8a 83 ac 00 00 00 mov 0xac(%ebx),%al 11359b: 88 43 75 mov %al,0x75(%ebx) the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 11359e: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax 1135a4: 89 43 7c mov %eax,0x7c(%ebx) the_thread->budget_callout = the_thread->Start.budget_callout; 1135a7: 8b 83 b4 00 00 00 mov 0xb4(%ebx),%eax 1135ad: 89 83 80 00 00 00 mov %eax,0x80(%ebx) the_thread->Start.pointer_argument = pointer_argument; 1135b3: 8b 45 0c mov 0xc(%ebp),%eax 1135b6: 89 83 a4 00 00 00 mov %eax,0xa4(%ebx) the_thread->Start.numeric_argument = numeric_argument; 1135bc: 8b 45 10 mov 0x10(%ebp),%eax 1135bf: 89 83 a8 00 00 00 mov %eax,0xa8(%ebx) if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 1135c5: 53 push %ebx 1135c6: e8 09 b9 ff ff call 10eed4 <_Thread_queue_Extract_with_proxy> 1135cb: 83 c4 10 add $0x10,%esp 1135ce: 84 c0 test %al,%al 1135d0: 75 06 jne 1135d8 <_Thread_Reset+0x54> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 1135d2: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1135d6: 74 28 je 113600 <_Thread_Reset+0x7c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 1135d8: 8b 83 bc 00 00 00 mov 0xbc(%ebx),%eax 1135de: 39 43 14 cmp %eax,0x14(%ebx) 1135e1: 74 15 je 1135f8 <_Thread_Reset+0x74> the_thread->real_priority = the_thread->Start.initial_priority; 1135e3: 89 43 18 mov %eax,0x18(%ebx) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 1135e6: 89 45 0c mov %eax,0xc(%ebp) 1135e9: 89 5d 08 mov %ebx,0x8(%ebp) } } 1135ec: 8b 5d fc mov -0x4(%ebp),%ebx 1135ef: 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 ); 1135f0: e9 ab ba ff ff jmp 10f0a0 <_Thread_Set_priority> 1135f5: 8d 76 00 lea 0x0(%esi),%esi } } 1135f8: 8b 5d fc mov -0x4(%ebp),%ebx 1135fb: c9 leave 1135fc: c3 ret 1135fd: 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 ); 113600: 83 ec 0c sub $0xc,%esp 113603: 8d 43 48 lea 0x48(%ebx),%eax 113606: 50 push %eax 113607: e8 00 c3 ff ff call 10f90c <_Watchdog_Remove> 11360c: 83 c4 10 add $0x10,%esp 11360f: eb c7 jmp 1135d8 <_Thread_Reset+0x54> =============================================================================== 001128fc <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 1128fc: 55 push %ebp 1128fd: 89 e5 mov %esp,%ebp 1128ff: 56 push %esi 112900: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 112901: a1 78 95 12 00 mov 0x129578,%eax ready = executing->ready; 112906: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 11290c: 9c pushf 11290d: fa cli 11290e: 59 pop %ecx if ( _Chain_Has_only_one_node( ready ) ) { 11290f: 8b 1a mov (%edx),%ebx 112911: 3b 5a 08 cmp 0x8(%edx),%ebx 112914: 74 3e je 112954 <_Thread_Reset_timeslice+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112916: 8b 30 mov (%eax),%esi previous = the_node->previous; 112918: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 11291b: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 11291e: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 112920: 8d 5a 04 lea 0x4(%edx),%ebx 112923: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 112925: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 112928: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 11292b: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 11292d: 89 58 04 mov %ebx,0x4(%eax) return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 112930: 51 push %ecx 112931: 9d popf 112932: fa cli if ( _Thread_Is_heir( executing ) ) 112933: 3b 05 48 95 12 00 cmp 0x129548,%eax 112939: 74 0d je 112948 <_Thread_Reset_timeslice+0x4c> _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; 11293b: c6 05 88 95 12 00 01 movb $0x1,0x129588 _ISR_Enable( level ); 112942: 51 push %ecx 112943: 9d popf } 112944: 5b pop %ebx 112945: 5e pop %esi 112946: c9 leave 112947: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 112948: 8b 02 mov (%edx),%eax 11294a: a3 48 95 12 00 mov %eax,0x129548 11294f: eb ea jmp 11293b <_Thread_Reset_timeslice+0x3f> 112951: 8d 76 00 lea 0x0(%esi),%esi executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 112954: 51 push %ecx 112955: 9d popf _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); } 112956: 5b pop %ebx 112957: 5e pop %esi 112958: c9 leave 112959: c3 ret =============================================================================== 00111870 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 111870: 55 push %ebp 111871: 89 e5 mov %esp,%ebp 111873: 53 push %ebx 111874: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; States_Control current_state; _ISR_Disable( level ); 111877: 9c pushf 111878: fa cli 111879: 59 pop %ecx _ISR_Enable( level ); return; } #endif current_state = the_thread->current_state; 11187a: 8b 50 10 mov 0x10(%eax),%edx if ( current_state & STATES_SUSPENDED ) { 11187d: f6 c2 02 test $0x2,%dl 111880: 74 6e je 1118f0 <_Thread_Resume+0x80> <== NEVER TAKEN 111882: 83 e2 fd and $0xfffffffd,%edx current_state = 111885: 89 50 10 mov %edx,0x10(%eax) the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 111888: 85 d2 test %edx,%edx 11188a: 75 64 jne 1118f0 <_Thread_Resume+0x80> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 11188c: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 111892: 66 8b 98 96 00 00 00 mov 0x96(%eax),%bx 111899: 66 09 1a or %bx,(%edx) _Priority_Major_bit_map |= the_priority_map->ready_major; 11189c: 66 8b 15 0c ce 12 00 mov 0x12ce0c,%dx 1118a3: 0b 90 94 00 00 00 or 0x94(%eax),%edx 1118a9: 66 89 15 0c ce 12 00 mov %dx,0x12ce0c _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 1118b0: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1118b6: 8d 5a 04 lea 0x4(%edx),%ebx 1118b9: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 1118bb: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 1118be: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 1118c1: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 1118c3: 89 58 04 mov %ebx,0x4(%eax) _ISR_Flash( level ); 1118c6: 51 push %ecx 1118c7: 9d popf 1118c8: fa cli if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 1118c9: 8b 50 14 mov 0x14(%eax),%edx 1118cc: 8b 1d e8 cd 12 00 mov 0x12cde8,%ebx 1118d2: 3b 53 14 cmp 0x14(%ebx),%edx 1118d5: 73 19 jae 1118f0 <_Thread_Resume+0x80> _Thread_Heir = the_thread; 1118d7: a3 e8 cd 12 00 mov %eax,0x12cde8 if ( _Thread_Executing->is_preemptible || 1118dc: a1 18 ce 12 00 mov 0x12ce18,%eax 1118e1: 80 78 75 00 cmpb $0x0,0x75(%eax) 1118e5: 74 11 je 1118f8 <_Thread_Resume+0x88> the_thread->current_priority == 0 ) _Context_Switch_necessary = true; 1118e7: c6 05 28 ce 12 00 01 movb $0x1,0x12ce28 1118ee: 66 90 xchg %ax,%ax } } } _ISR_Enable( level ); 1118f0: 51 push %ecx 1118f1: 9d popf } 1118f2: 5b pop %ebx 1118f3: c9 leave 1118f4: c3 ret 1118f5: 8d 76 00 lea 0x0(%esi),%esi _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 1118f8: 85 d2 test %edx,%edx 1118fa: 74 eb je 1118e7 <_Thread_Resume+0x77> <== NEVER TAKEN 1118fc: eb f2 jmp 1118f0 <_Thread_Resume+0x80> =============================================================================== 0010e558 <_Thread_Set_state>: void _Thread_Set_state( Thread_Control *the_thread, States_Control state ) { 10e558: 55 push %ebp 10e559: 89 e5 mov %esp,%ebp 10e55b: 56 push %esi 10e55c: 53 push %ebx 10e55d: 8b 45 08 mov 0x8(%ebp),%eax 10e560: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 10e563: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e569: 9c pushf 10e56a: fa cli 10e56b: 59 pop %ecx if ( !_States_Is_ready( the_thread->current_state ) ) { 10e56c: 8b 58 10 mov 0x10(%eax),%ebx 10e56f: 85 db test %ebx,%ebx 10e571: 75 2d jne 10e5a0 <_Thread_Set_state+0x48> _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = state; 10e573: 89 70 10 mov %esi,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 10e576: 8b 1a mov (%edx),%ebx 10e578: 3b 5a 08 cmp 0x8(%edx),%ebx 10e57b: 74 3b je 10e5b8 <_Thread_Set_state+0x60> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e57d: 8b 18 mov (%eax),%ebx previous = the_node->previous; 10e57f: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10e582: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 10e585: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 10e587: 51 push %ecx 10e588: 9d popf 10e589: fa cli if ( _Thread_Is_heir( the_thread ) ) 10e58a: 3b 05 48 95 12 00 cmp 0x129548,%eax 10e590: 74 62 je 10e5f4 <_Thread_Set_state+0x9c> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 10e592: 3b 05 78 95 12 00 cmp 0x129578,%eax 10e598: 74 12 je 10e5ac <_Thread_Set_state+0x54> _Context_Switch_necessary = true; _ISR_Enable( level ); 10e59a: 51 push %ecx 10e59b: 9d popf } 10e59c: 5b pop %ebx 10e59d: 5e pop %esi 10e59e: c9 leave 10e59f: c3 ret Chain_Control *ready; ready = the_thread->ready; _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 10e5a0: 09 f3 or %esi,%ebx 10e5a2: 89 58 10 mov %ebx,0x10(%eax) _States_Set( state, the_thread->current_state ); _ISR_Enable( level ); 10e5a5: 51 push %ecx 10e5a6: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 10e5a7: 5b pop %ebx 10e5a8: 5e pop %esi 10e5a9: c9 leave 10e5aa: c3 ret 10e5ab: 90 nop if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 10e5ac: c6 05 88 95 12 00 01 movb $0x1,0x129588 10e5b3: eb e5 jmp 10e59a <_Thread_Set_state+0x42> 10e5b5: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e5b8: 8d 5a 04 lea 0x4(%edx),%ebx 10e5bb: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 10e5bd: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 10e5c4: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 10e5c7: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 10e5cd: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 10e5d4: 66 21 1a and %bx,(%edx) the_thread->current_state = state; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 10e5d7: 66 83 3a 00 cmpw $0x0,(%edx) 10e5db: 75 aa jne 10e587 <_Thread_Set_state+0x2f> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 10e5dd: 66 8b 15 6c 95 12 00 mov 0x12956c,%dx 10e5e4: 23 90 98 00 00 00 and 0x98(%eax),%edx 10e5ea: 66 89 15 6c 95 12 00 mov %dx,0x12956c 10e5f1: eb 94 jmp 10e587 <_Thread_Set_state+0x2f> 10e5f3: 90 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 10e5f4: 66 8b 35 6c 95 12 00 mov 0x12956c,%si 10e5fb: 31 d2 xor %edx,%edx 10e5fd: 89 d3 mov %edx,%ebx 10e5ff: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 10e603: 0f b7 db movzwl %bx,%ebx 10e606: 66 8b b4 1b 00 96 12 mov 0x129600(%ebx,%ebx,1),%si 10e60d: 00 10e60e: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 10e612: c1 e3 04 shl $0x4,%ebx 10e615: 0f b7 d2 movzwl %dx,%edx 10e618: 8d 14 13 lea (%ebx,%edx,1),%edx 10e61b: 8d 1c 52 lea (%edx,%edx,2),%ebx 10e61e: 8b 15 80 94 12 00 mov 0x129480,%edx 10e624: 8b 14 9a mov (%edx,%ebx,4),%edx 10e627: 89 15 48 95 12 00 mov %edx,0x129548 10e62d: e9 60 ff ff ff jmp 10e592 <_Thread_Set_state+0x3a> =============================================================================== 0010e6a8 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 10e6a8: 55 push %ebp 10e6a9: 89 e5 mov %esp,%ebp 10e6ab: 53 push %ebx 10e6ac: 83 ec 04 sub $0x4,%esp 10e6af: a1 d0 52 12 00 mov 0x1252d0,%eax 10e6b4: 8b 5d 0c mov 0xc(%ebp),%ebx 10e6b7: 39 c3 cmp %eax,%ebx 10e6b9: 73 02 jae 10e6bd <_Thread_Stack_Allocate+0x15> 10e6bb: 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 ) { 10e6bd: a1 00 53 12 00 mov 0x125300,%eax 10e6c2: 85 c0 test %eax,%eax 10e6c4: 74 32 je 10e6f8 <_Thread_Stack_Allocate+0x50> stack_addr = (*Configuration.stack_allocate_hook)( the_stack_size ); 10e6c6: 83 ec 0c sub $0xc,%esp 10e6c9: 53 push %ebx 10e6ca: ff d0 call *%eax 10e6cc: 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 ) 10e6cf: 85 c0 test %eax,%eax 10e6d1: 74 11 je 10e6e4 <_Thread_Stack_Allocate+0x3c> the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e6d3: 8b 55 08 mov 0x8(%ebp),%edx 10e6d6: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e6dc: 89 d8 mov %ebx,%eax 10e6de: 8b 5d fc mov -0x4(%ebp),%ebx 10e6e1: c9 leave 10e6e2: c3 ret 10e6e3: 90 nop the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 10e6e4: 31 db xor %ebx,%ebx the_stack_size = 0; the_thread->Start.stack = stack_addr; 10e6e6: 8b 55 08 mov 0x8(%ebp),%edx 10e6e9: 89 82 d0 00 00 00 mov %eax,0xd0(%edx) return the_stack_size; } 10e6ef: 89 d8 mov %ebx,%eax 10e6f1: 8b 5d fc mov -0x4(%ebp),%ebx 10e6f4: c9 leave 10e6f5: c3 ret 10e6f6: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 10e6f8: 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 ); 10e6fb: 83 ec 0c sub $0xc,%esp 10e6fe: 53 push %ebx 10e6ff: e8 18 07 00 00 call 10ee1c <_Workspace_Allocate> 10e704: 83 c4 10 add $0x10,%esp 10e707: eb c6 jmp 10e6cf <_Thread_Stack_Allocate+0x27> =============================================================================== 0010e70c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 10e70c: 55 push %ebp 10e70d: 89 e5 mov %esp,%ebp 10e70f: 83 ec 08 sub $0x8,%esp 10e712: 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 ) 10e715: 80 b8 c0 00 00 00 00 cmpb $0x0,0xc0(%eax) 10e71c: 74 16 je 10e734 <_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 ) 10e71e: 8b 15 04 53 12 00 mov 0x125304,%edx 10e724: 85 d2 test %edx,%edx 10e726: 74 10 je 10e738 <_Thread_Stack_Free+0x2c> (*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area ); 10e728: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e72e: 89 45 08 mov %eax,0x8(%ebp) else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e731: 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 ); 10e732: ff e2 jmp *%edx else _Workspace_Free( the_thread->Start.Initial_stack.area ); } 10e734: c9 leave 10e735: c3 ret 10e736: 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 ); 10e738: 8b 80 c8 00 00 00 mov 0xc8(%eax),%eax 10e73e: 89 45 08 mov %eax,0x8(%ebp) } 10e741: 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 ); 10e742: e9 f1 06 00 00 jmp 10ee38 <_Workspace_Free> =============================================================================== 0011295c <_Thread_Suspend>: */ void _Thread_Suspend( Thread_Control *the_thread ) { 11295c: 55 push %ebp 11295d: 89 e5 mov %esp,%ebp 11295f: 56 push %esi 112960: 53 push %ebx 112961: 8b 45 08 mov 0x8(%ebp),%eax ISR_Level level; Chain_Control *ready; ready = the_thread->ready; 112964: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 11296a: 9c pushf 11296b: fa cli 11296c: 59 pop %ecx #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { 11296d: 8b 58 10 mov 0x10(%eax),%ebx 112970: 85 db test %ebx,%ebx 112972: 75 34 jne 1129a8 <_Thread_Suspend+0x4c> _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); return; } the_thread->current_state = STATES_SUSPENDED; 112974: c7 40 10 02 00 00 00 movl $0x2,0x10(%eax) if ( _Chain_Has_only_one_node( ready ) ) { 11297b: 8b 1a mov (%edx),%ebx 11297d: 3b 5a 08 cmp 0x8(%edx),%ebx 112980: 74 3e je 1129c0 <_Thread_Suspend+0x64> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 112982: 8b 18 mov (%eax),%ebx previous = the_node->previous; 112984: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 112987: 89 53 04 mov %edx,0x4(%ebx) previous->next = next; 11298a: 89 1a mov %ebx,(%edx) _Priority_Remove_from_bit_map( &the_thread->Priority_map ); } else _Chain_Extract_unprotected( &the_thread->Object.Node ); _ISR_Flash( level ); 11298c: 51 push %ecx 11298d: 9d popf 11298e: fa cli if ( _Thread_Is_heir( the_thread ) ) 11298f: 3b 05 48 95 12 00 cmp 0x129548,%eax 112995: 74 65 je 1129fc <_Thread_Suspend+0xa0> _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) 112997: 3b 05 78 95 12 00 cmp 0x129578,%eax 11299d: 74 15 je 1129b4 <_Thread_Suspend+0x58> _Context_Switch_necessary = true; _ISR_Enable( level ); 11299f: 51 push %ecx 1129a0: 9d popf } 1129a1: 5b pop %ebx 1129a2: 5e pop %esi 1129a3: c9 leave 1129a4: c3 ret 1129a5: 8d 76 00 lea 0x0(%esi),%esi _ISR_Disable( level ); #if defined(RTEMS_ITRON_API) the_thread->suspend_count++; #endif if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = 1129a8: 83 cb 02 or $0x2,%ebx 1129ab: 89 58 10 mov %ebx,0x10(%eax) _States_Set( STATES_SUSPENDED, the_thread->current_state ); _ISR_Enable( level ); 1129ae: 51 push %ecx 1129af: 9d popf if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; _ISR_Enable( level ); } 1129b0: 5b pop %ebx 1129b1: 5e pop %esi 1129b2: c9 leave 1129b3: c3 ret if ( _Thread_Is_heir( the_thread ) ) _Thread_Calculate_heir(); if ( _Thread_Is_executing( the_thread ) ) _Context_Switch_necessary = true; 1129b4: c6 05 88 95 12 00 01 movb $0x1,0x129588 1129bb: eb e2 jmp 11299f <_Thread_Suspend+0x43> 1129bd: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1129c0: 8d 5a 04 lea 0x4(%edx),%ebx 1129c3: 89 1a mov %ebx,(%edx) the_chain->permanent_null = NULL; 1129c5: c7 42 04 00 00 00 00 movl $0x0,0x4(%edx) the_chain->last = _Chain_Head(the_chain); 1129cc: 89 52 08 mov %edx,0x8(%edx) RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 1129cf: 8b 90 90 00 00 00 mov 0x90(%eax),%edx 1129d5: 66 8b 98 9a 00 00 00 mov 0x9a(%eax),%bx 1129dc: 66 21 1a and %bx,(%edx) the_thread->current_state = STATES_SUSPENDED; if ( _Chain_Has_only_one_node( ready ) ) { _Chain_Initialize_empty( ready ); _Priority_Remove_from_bit_map( &the_thread->Priority_map ); 1129df: 66 83 3a 00 cmpw $0x0,(%edx) 1129e3: 75 a7 jne 11298c <_Thread_Suspend+0x30> if ( *the_priority_map->minor == 0 ) _Priority_Major_bit_map &= the_priority_map->block_major; 1129e5: 66 8b 15 6c 95 12 00 mov 0x12956c,%dx 1129ec: 23 90 98 00 00 00 and 0x98(%eax),%edx 1129f2: 66 89 15 6c 95 12 00 mov %dx,0x12956c 1129f9: eb 91 jmp 11298c <_Thread_Suspend+0x30> 1129fb: 90 nop RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void ) { Priority_Bit_map_control minor; Priority_Bit_map_control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 1129fc: 66 8b 35 6c 95 12 00 mov 0x12956c,%si 112a03: 31 d2 xor %edx,%edx 112a05: 89 d3 mov %edx,%ebx 112a07: 66 0f bc de bsf %si,%bx _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 112a0b: 0f b7 db movzwl %bx,%ebx 112a0e: 66 8b b4 1b 00 96 12 mov 0x129600(%ebx,%ebx,1),%si 112a15: 00 112a16: 66 0f bc d6 bsf %si,%dx * ready thread. */ RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void ) { _Thread_Heir = (Thread_Control *) 112a1a: c1 e3 04 shl $0x4,%ebx 112a1d: 0f b7 d2 movzwl %dx,%edx 112a20: 8d 14 13 lea (%ebx,%edx,1),%edx 112a23: 8d 1c 52 lea (%edx,%edx,2),%ebx 112a26: 8b 15 80 94 12 00 mov 0x129480,%edx 112a2c: 8b 14 9a mov (%edx,%ebx,4),%edx 112a2f: 89 15 48 95 12 00 mov %edx,0x129548 112a35: e9 5d ff ff ff jmp 112997 <_Thread_Suspend+0x3b> =============================================================================== 0010e804 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 10e804: 55 push %ebp 10e805: 89 e5 mov %esp,%ebp 10e807: 53 push %ebx 10e808: 83 ec 04 sub $0x4,%esp Thread_Control *executing; executing = _Thread_Executing; 10e80b: 8b 1d 78 95 12 00 mov 0x129578,%ebx /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 10e811: 80 7b 75 00 cmpb $0x0,0x75(%ebx) 10e815: 74 19 je 10e830 <_Thread_Tickle_timeslice+0x2c> return; if ( !_States_Is_ready( executing->current_state ) ) 10e817: 8b 43 10 mov 0x10(%ebx),%eax 10e81a: 85 c0 test %eax,%eax 10e81c: 75 12 jne 10e830 <_Thread_Tickle_timeslice+0x2c> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 10e81e: 8b 43 7c mov 0x7c(%ebx),%eax 10e821: 83 f8 01 cmp $0x1,%eax 10e824: 72 0a jb 10e830 <_Thread_Tickle_timeslice+0x2c> 10e826: 83 f8 02 cmp $0x2,%eax 10e829: 76 29 jbe 10e854 <_Thread_Tickle_timeslice+0x50> 10e82b: 83 f8 03 cmp $0x3,%eax 10e82e: 74 08 je 10e838 <_Thread_Tickle_timeslice+0x34><== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 10e830: 8b 5d fc mov -0x4(%ebp),%ebx 10e833: c9 leave 10e834: c3 ret 10e835: 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 ) 10e838: 8b 43 78 mov 0x78(%ebx),%eax 10e83b: 48 dec %eax 10e83c: 89 43 78 mov %eax,0x78(%ebx) 10e83f: 85 c0 test %eax,%eax 10e841: 75 ed jne 10e830 <_Thread_Tickle_timeslice+0x2c> (*executing->budget_callout)( executing ); 10e843: 83 ec 0c sub $0xc,%esp 10e846: 53 push %ebx 10e847: ff 93 80 00 00 00 call *0x80(%ebx) 10e84d: 83 c4 10 add $0x10,%esp 10e850: eb de jmp 10e830 <_Thread_Tickle_timeslice+0x2c> 10e852: 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 ) { 10e854: 8b 43 78 mov 0x78(%ebx),%eax 10e857: 48 dec %eax 10e858: 89 43 78 mov %eax,0x78(%ebx) 10e85b: 85 c0 test %eax,%eax 10e85d: 7f d1 jg 10e830 <_Thread_Tickle_timeslice+0x2c> _Thread_Reset_timeslice(); 10e85f: e8 98 40 00 00 call 1128fc <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e864: a1 84 94 12 00 mov 0x129484,%eax 10e869: 89 43 78 mov %eax,0x78(%ebx) 10e86c: eb c2 jmp 10e830 <_Thread_Tickle_timeslice+0x2c> =============================================================================== 0010e870 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 10e870: 55 push %ebp 10e871: 89 e5 mov %esp,%ebp 10e873: 56 push %esi 10e874: 53 push %ebx ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 10e875: a1 78 95 12 00 mov 0x129578,%eax ready = executing->ready; 10e87a: 8b 90 8c 00 00 00 mov 0x8c(%eax),%edx _ISR_Disable( level ); 10e880: 9c pushf 10e881: fa cli 10e882: 59 pop %ecx if ( !_Chain_Has_only_one_node( ready ) ) { 10e883: 8b 1a mov (%edx),%ebx 10e885: 3b 5a 08 cmp 0x8(%edx),%ebx 10e888: 74 3e je 10e8c8 <_Thread_Yield_processor+0x58> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10e88a: 8b 30 mov (%eax),%esi previous = the_node->previous; 10e88c: 8b 58 04 mov 0x4(%eax),%ebx next->previous = previous; 10e88f: 89 5e 04 mov %ebx,0x4(%esi) previous->next = next; 10e892: 89 33 mov %esi,(%ebx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 10e894: 8d 5a 04 lea 0x4(%edx),%ebx 10e897: 89 18 mov %ebx,(%eax) old_last_node = the_chain->last; 10e899: 8b 5a 08 mov 0x8(%edx),%ebx the_chain->last = the_node; 10e89c: 89 42 08 mov %eax,0x8(%edx) old_last_node->next = the_node; 10e89f: 89 03 mov %eax,(%ebx) the_node->previous = old_last_node; 10e8a1: 89 58 04 mov %ebx,0x4(%eax) _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 10e8a4: 51 push %ecx 10e8a5: 9d popf 10e8a6: fa cli if ( _Thread_Is_heir( executing ) ) 10e8a7: 3b 05 48 95 12 00 cmp 0x129548,%eax 10e8ad: 74 0d je 10e8bc <_Thread_Yield_processor+0x4c><== ALWAYS TAKEN _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true; 10e8af: c6 05 88 95 12 00 01 movb $0x1,0x129588 _ISR_Enable( level ); 10e8b6: 51 push %ecx 10e8b7: 9d popf } 10e8b8: 5b pop %ebx 10e8b9: 5e pop %esi 10e8ba: c9 leave 10e8bb: c3 ret _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 10e8bc: 8b 02 mov (%edx),%eax 10e8be: a3 48 95 12 00 mov %eax,0x129548 10e8c3: eb ea jmp 10e8af <_Thread_Yield_processor+0x3f> 10e8c5: 8d 76 00 lea 0x0(%esi),%esi _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) 10e8c8: 3b 05 48 95 12 00 cmp 0x129548,%eax 10e8ce: 75 df jne 10e8af <_Thread_Yield_processor+0x3f><== NEVER TAKEN 10e8d0: eb e4 jmp 10e8b6 <_Thread_Yield_processor+0x46> =============================================================================== 0010e0d4 <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 10e0d4: 55 push %ebp 10e0d5: 89 e5 mov %esp,%ebp 10e0d7: 57 push %edi 10e0d8: 56 push %esi 10e0d9: 53 push %ebx 10e0da: 83 ec 1c sub $0x1c,%esp 10e0dd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 10e0e0: 9c pushf 10e0e1: fa cli 10e0e2: 58 pop %eax 10e0e3: 89 f2 mov %esi,%edx 10e0e5: 31 c9 xor %ecx,%ecx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e0e7: 8d 5a 04 lea 0x4(%edx),%ebx 10e0ea: 39 1a cmp %ebx,(%edx) 10e0ec: 75 1a jne 10e108 <_Thread_queue_Dequeue_priority+0x34> for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 10e0ee: 41 inc %ecx 10e0ef: 83 c2 0c add $0xc,%edx Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 10e0f2: 83 f9 04 cmp $0x4,%ecx 10e0f5: 75 f0 jne 10e0e7 <_Thread_queue_Dequeue_priority+0x13> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 10e0f7: 50 push %eax 10e0f8: 9d popf 10e0f9: 31 db xor %ebx,%ebx #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 10e0fb: 89 d8 mov %ebx,%eax 10e0fd: 8d 65 f4 lea -0xc(%ebp),%esp 10e100: 5b pop %ebx 10e101: 5e pop %esi 10e102: 5f pop %edi 10e103: c9 leave 10e104: c3 ret 10e105: 8d 76 00 lea 0x0(%esi),%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 ] ) ) { the_thread = (Thread_Control *) 10e108: 8d 14 49 lea (%ecx,%ecx,2),%edx 10e10b: 8b 1c 96 mov (%esi,%edx,4),%ebx */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 10e10e: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) new_first_node = the_thread->Wait.Block2n.first; 10e115: 8b 53 38 mov 0x38(%ebx),%edx new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 10e118: 8b 0b mov (%ebx),%ecx previous_node = the_thread->Object.Node.previous; 10e11a: 8b 73 04 mov 0x4(%ebx),%esi 10e11d: 8d 7b 3c lea 0x3c(%ebx),%edi 10e120: 39 fa cmp %edi,%edx 10e122: 74 76 je 10e19a <_Thread_queue_Dequeue_priority+0xc6> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; 10e124: 8b 7b 40 mov 0x40(%ebx),%edi 10e127: 89 7d e4 mov %edi,-0x1c(%ebp) new_second_node = new_first_node->next; 10e12a: 8b 3a mov (%edx),%edi previous_node->next = new_first_node; 10e12c: 89 16 mov %edx,(%esi) next_node->previous = new_first_node; 10e12e: 89 51 04 mov %edx,0x4(%ecx) new_first_node->next = next_node; 10e131: 89 0a mov %ecx,(%edx) new_first_node->previous = previous_node; 10e133: 89 72 04 mov %esi,0x4(%edx) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 10e136: 8b 4b 38 mov 0x38(%ebx),%ecx 10e139: 3b 4b 40 cmp 0x40(%ebx),%ecx 10e13c: 74 14 je 10e152 <_Thread_queue_Dequeue_priority+0x7e> /* > two threads on 2-n */ new_second_node->previous = 10e13e: 8d 4a 38 lea 0x38(%edx),%ecx 10e141: 89 4f 04 mov %ecx,0x4(%edi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 10e144: 89 7a 38 mov %edi,0x38(%edx) new_first_thread->Wait.Block2n.last = last_node; 10e147: 8b 4d e4 mov -0x1c(%ebp),%ecx 10e14a: 89 4a 40 mov %ecx,0x40(%edx) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 10e14d: 83 c2 3c add $0x3c,%edx 10e150: 89 11 mov %edx,(%ecx) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 10e152: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 10e156: 74 18 je 10e170 <_Thread_queue_Dequeue_priority+0x9c> _ISR_Enable( level ); 10e158: 50 push %eax 10e159: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 10e15a: 83 ec 08 sub $0x8,%esp 10e15d: 68 f8 ff 03 10 push $0x1003fff8 10e162: 53 push %ebx 10e163: e8 5c f7 ff ff call 10d8c4 <_Thread_Clear_state> 10e168: 83 c4 10 add $0x10,%esp 10e16b: eb 8e jmp 10e0fb <_Thread_queue_Dequeue_priority+0x27> 10e16d: 8d 76 00 lea 0x0(%esi),%esi RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 10e170: c7 43 50 03 00 00 00 movl $0x3,0x50(%ebx) _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 10e177: 50 push %eax 10e178: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 10e179: 83 ec 0c sub $0xc,%esp 10e17c: 8d 43 48 lea 0x48(%ebx),%eax 10e17f: 50 push %eax 10e180: e8 93 0b 00 00 call 10ed18 <_Watchdog_Remove> 10e185: 58 pop %eax 10e186: 5a pop %edx 10e187: 68 f8 ff 03 10 push $0x1003fff8 10e18c: 53 push %ebx 10e18d: e8 32 f7 ff ff call 10d8c4 <_Thread_Clear_state> 10e192: 83 c4 10 add $0x10,%esp 10e195: e9 61 ff ff ff jmp 10e0fb <_Thread_queue_Dequeue_priority+0x27> new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 10e19a: 89 0e mov %ecx,(%esi) next_node->previous = previous_node; 10e19c: 89 71 04 mov %esi,0x4(%ecx) 10e19f: eb b1 jmp 10e152 <_Thread_queue_Dequeue_priority+0x7e> =============================================================================== 001126e0 <_Thread_queue_Enqueue_fifo>: Thread_blocking_operation_States _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 1126e0: 55 push %ebp 1126e1: 89 e5 mov %esp,%ebp 1126e3: 56 push %esi 1126e4: 53 push %ebx 1126e5: 8b 55 08 mov 0x8(%ebp),%edx 1126e8: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_blocking_operation_States sync_state; ISR_Level level; _ISR_Disable( level ); 1126eb: 9c pushf 1126ec: fa cli 1126ed: 59 pop %ecx sync_state = the_thread_queue->sync_state; 1126ee: 8b 42 30 mov 0x30(%edx),%eax the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 1126f1: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { 1126f8: 83 f8 01 cmp $0x1,%eax 1126fb: 74 0b je 112708 <_Thread_queue_Enqueue_fifo+0x28> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 1126fd: 8b 55 10 mov 0x10(%ebp),%edx 112700: 89 0a mov %ecx,(%edx) return sync_state; } 112702: 5b pop %ebx 112703: 5e pop %esi 112704: c9 leave 112705: c3 ret 112706: 66 90 xchg %ax,%ax Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 112708: 8d 72 04 lea 0x4(%edx),%esi 11270b: 89 33 mov %esi,(%ebx) old_last_node = the_chain->last; 11270d: 8b 72 08 mov 0x8(%edx),%esi the_chain->last = the_node; 112710: 89 5a 08 mov %ebx,0x8(%edx) old_last_node->next = the_node; 112713: 89 1e mov %ebx,(%esi) the_node->previous = old_last_node; 112715: 89 73 04 mov %esi,0x4(%ebx) if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) { _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 112718: 89 53 44 mov %edx,0x44(%ebx) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; _ISR_Enable( level ); 11271b: 51 push %ecx 11271c: 9d popf * * WARNING! Returning with interrupts disabled! */ *level_p = level; return sync_state; } 11271d: 5b pop %ebx 11271e: 5e pop %esi 11271f: c9 leave 112720: c3 ret =============================================================================== 0010e23c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 10e23c: 55 push %ebp 10e23d: 89 e5 mov %esp,%ebp 10e23f: 57 push %edi 10e240: 56 push %esi 10e241: 53 push %ebx 10e242: 83 ec 08 sub $0x8,%esp 10e245: 8b 7d 0c mov 0xc(%ebp),%edi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e248: 8d 47 3c lea 0x3c(%edi),%eax 10e24b: 89 47 38 mov %eax,0x38(%edi) the_chain->permanent_null = NULL; 10e24e: c7 47 3c 00 00 00 00 movl $0x0,0x3c(%edi) the_chain->last = _Chain_Head(the_chain); 10e255: 8d 47 38 lea 0x38(%edi),%eax 10e258: 89 47 40 mov %eax,0x40(%edi) Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 10e25b: 8b 57 14 mov 0x14(%edi),%edx header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 10e25e: 89 d0 mov %edx,%eax 10e260: c1 e8 06 shr $0x6,%eax 10e263: 8d 04 40 lea (%eax,%eax,2),%eax 10e266: 8b 4d 08 mov 0x8(%ebp),%ecx 10e269: 8d 34 81 lea (%ecx,%eax,4),%esi block_state = the_thread_queue->state; 10e26c: 8b 59 38 mov 0x38(%ecx),%ebx if ( _Thread_queue_Is_reverse_search( priority ) ) 10e26f: f6 c2 20 test $0x20,%dl 10e272: 75 60 jne 10e2d4 <_Thread_queue_Enqueue_priority+0x98> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10e274: 8d 46 04 lea 0x4(%esi),%eax 10e277: 89 75 f0 mov %esi,-0x10(%ebp) 10e27a: 89 7d ec mov %edi,-0x14(%ebp) 10e27d: 89 c7 mov %eax,%edi goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 10e27f: 9c pushf 10e280: fa cli 10e281: 5e pop %esi search_thread = (Thread_Control *) header->first; 10e282: 8b 4d f0 mov -0x10(%ebp),%ecx 10e285: 8b 01 mov (%ecx),%eax while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e287: 39 f8 cmp %edi,%eax 10e289: 75 17 jne 10e2a2 <_Thread_queue_Enqueue_priority+0x66> 10e28b: e9 09 01 00 00 jmp 10e399 <_Thread_queue_Enqueue_priority+0x15d> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 10e290: 56 push %esi 10e291: 9d popf 10e292: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e293: 85 58 10 test %ebx,0x10(%eax) 10e296: 0f 84 a8 00 00 00 je 10e344 <_Thread_queue_Enqueue_priority+0x108><== NEVER TAKEN _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 10e29c: 8b 00 mov (%eax),%eax restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e29e: 39 f8 cmp %edi,%eax 10e2a0: 74 07 je 10e2a9 <_Thread_queue_Enqueue_priority+0x6d> search_priority = search_thread->current_priority; 10e2a2: 8b 48 14 mov 0x14(%eax),%ecx if ( priority <= search_priority ) 10e2a5: 39 ca cmp %ecx,%edx 10e2a7: 77 e7 ja 10e290 <_Thread_queue_Enqueue_priority+0x54> 10e2a9: 89 4d f0 mov %ecx,-0x10(%ebp) 10e2ac: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e2af: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 10e2b1: 8b 4d 08 mov 0x8(%ebp),%ecx 10e2b4: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e2b8: 0f 84 8e 00 00 00 je 10e34c <_Thread_queue_Enqueue_priority+0x110> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 10e2be: 8b 45 10 mov 0x10(%ebp),%eax 10e2c1: 89 18 mov %ebx,(%eax) return the_thread_queue->sync_state; 10e2c3: 8b 55 08 mov 0x8(%ebp),%edx 10e2c6: 8b 42 30 mov 0x30(%edx),%eax } 10e2c9: 83 c4 08 add $0x8,%esp 10e2cc: 5b pop %ebx 10e2cd: 5e pop %esi 10e2ce: 5f pop %edi 10e2cf: c9 leave 10e2d0: c3 ret 10e2d1: 8d 76 00 lea 0x0(%esi),%esi 10e2d4: 89 7d f0 mov %edi,-0x10(%ebp) the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 10e2d7: 0f b6 0d d4 52 12 00 movzbl 0x1252d4,%ecx 10e2de: 41 inc %ecx _ISR_Disable( level ); 10e2df: 9c pushf 10e2e0: fa cli 10e2e1: 5f pop %edi search_thread = (Thread_Control *) header->last; 10e2e2: 8b 46 08 mov 0x8(%esi),%eax while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e2e5: 39 f0 cmp %esi,%eax 10e2e7: 75 12 jne 10e2fb <_Thread_queue_Enqueue_priority+0xbf> 10e2e9: eb 17 jmp 10e302 <_Thread_queue_Enqueue_priority+0xc6> 10e2eb: 90 nop break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 10e2ec: 57 push %edi 10e2ed: 9d popf 10e2ee: fa cli if ( !_States_Are_set( search_thread->current_state, block_state) ) { 10e2ef: 85 58 10 test %ebx,0x10(%eax) 10e2f2: 74 4c je 10e340 <_Thread_queue_Enqueue_priority+0x104><== NEVER TAKEN _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 10e2f4: 8b 40 04 mov 0x4(%eax),%eax restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e2f7: 39 f0 cmp %esi,%eax 10e2f9: 74 07 je 10e302 <_Thread_queue_Enqueue_priority+0xc6> search_priority = search_thread->current_priority; 10e2fb: 8b 48 14 mov 0x14(%eax),%ecx if ( priority >= search_priority ) 10e2fe: 39 ca cmp %ecx,%edx 10e300: 72 ea jb 10e2ec <_Thread_queue_Enqueue_priority+0xb0> 10e302: 89 fe mov %edi,%esi 10e304: 89 4d ec mov %ecx,-0x14(%ebp) 10e307: 8b 7d f0 mov -0x10(%ebp),%edi restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 10e30a: 89 f3 mov %esi,%ebx } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 10e30c: 8b 4d 08 mov 0x8(%ebp),%ecx 10e30f: 83 79 30 01 cmpl $0x1,0x30(%ecx) 10e313: 75 a9 jne 10e2be <_Thread_queue_Enqueue_priority+0x82> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e315: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e31c: 3b 55 ec cmp -0x14(%ebp),%edx 10e31f: 74 56 je 10e377 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 10e321: 8b 10 mov (%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = next_node; 10e323: 89 17 mov %edx,(%edi) the_node->previous = search_node; 10e325: 89 47 04 mov %eax,0x4(%edi) search_node->next = the_node; 10e328: 89 38 mov %edi,(%eax) next_node->previous = the_node; 10e32a: 89 7a 04 mov %edi,0x4(%edx) the_thread->Wait.queue = the_thread_queue; 10e32d: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e330: 56 push %esi 10e331: 9d popf 10e332: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e337: 83 c4 08 add $0x8,%esp 10e33a: 5b pop %ebx 10e33b: 5e pop %esi 10e33c: 5f pop %edi 10e33d: c9 leave 10e33e: c3 ret 10e33f: 90 nop if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e340: 57 push %edi <== NOT EXECUTED 10e341: 9d popf <== NOT EXECUTED goto restart_reverse_search; 10e342: eb 93 jmp 10e2d7 <_Thread_queue_Enqueue_priority+0x9b><== NOT EXECUTED if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 10e344: 56 push %esi <== NOT EXECUTED 10e345: 9d popf <== NOT EXECUTED goto restart_forward_search; 10e346: e9 34 ff ff ff jmp 10e27f <_Thread_queue_Enqueue_priority+0x43><== NOT EXECUTED 10e34b: 90 nop <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 10e34c: c7 41 30 00 00 00 00 movl $0x0,0x30(%ecx) if ( priority == search_priority ) 10e353: 3b 55 f0 cmp -0x10(%ebp),%edx 10e356: 74 1f je 10e377 <_Thread_queue_Enqueue_priority+0x13b> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 10e358: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e35b: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e35d: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e360: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e362: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e365: 89 4f 44 mov %ecx,0x44(%edi) _ISR_Enable( level ); 10e368: 56 push %esi 10e369: 9d popf 10e36a: b8 01 00 00 00 mov $0x1,%eax * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 10e36f: 83 c4 08 add $0x8,%esp 10e372: 5b pop %ebx 10e373: 5e pop %esi 10e374: 5f pop %edi 10e375: c9 leave 10e376: c3 ret 10e377: 83 c0 3c add $0x3c,%eax _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 10e37a: 8b 50 04 mov 0x4(%eax),%edx the_node = (Chain_Node *) the_thread; the_node->next = search_node; 10e37d: 89 07 mov %eax,(%edi) the_node->previous = previous_node; 10e37f: 89 57 04 mov %edx,0x4(%edi) previous_node->next = the_node; 10e382: 89 3a mov %edi,(%edx) search_node->previous = the_node; 10e384: 89 78 04 mov %edi,0x4(%eax) the_thread->Wait.queue = the_thread_queue; 10e387: 8b 45 08 mov 0x8(%ebp),%eax 10e38a: 89 47 44 mov %eax,0x44(%edi) _ISR_Enable( level ); 10e38d: 53 push %ebx 10e38e: 9d popf 10e38f: b8 01 00 00 00 mov $0x1,%eax return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 10e394: e9 30 ff ff ff jmp 10e2c9 <_Thread_queue_Enqueue_priority+0x8d> 10e399: 8b 7d ec mov -0x14(%ebp),%edi restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 10e39c: 89 f3 mov %esi,%ebx 10e39e: c7 45 f0 ff ff ff ff movl $0xffffffff,-0x10(%ebp) 10e3a5: e9 07 ff ff ff jmp 10e2b1 <_Thread_queue_Enqueue_priority+0x75> =============================================================================== 00112724 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 112724: 55 push %ebp 112725: 89 e5 mov %esp,%ebp 112727: 83 ec 08 sub $0x8,%esp 11272a: 8b 45 08 mov 0x8(%ebp),%eax 11272d: 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 ) 112730: 83 78 34 01 cmpl $0x1,0x34(%eax) 112734: 74 0e je 112744 <_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 ); 112736: 89 55 0c mov %edx,0xc(%ebp) 112739: 89 45 08 mov %eax,0x8(%ebp) } 11273c: 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 ); 11273d: e9 b2 27 00 00 jmp 114ef4 <_Thread_queue_Extract_fifo> 112742: 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 ); 112744: 51 push %ecx 112745: 6a 00 push $0x0 112747: 52 push %edx 112748: 50 push %eax 112749: e8 06 00 00 00 call 112754 <_Thread_queue_Extract_priority_helper> 11274e: 83 c4 10 add $0x10,%esp else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); } 112751: c9 leave 112752: c3 ret =============================================================================== 00114ef4 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 114ef4: 55 push %ebp 114ef5: 89 e5 mov %esp,%ebp 114ef7: 53 push %ebx 114ef8: 83 ec 04 sub $0x4,%esp 114efb: 8b 5d 0c mov 0xc(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 114efe: 9c pushf 114eff: fa cli 114f00: 58 pop %eax if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 114f01: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 114f08: 74 2e je 114f38 <_Thread_queue_Extract_fifo+0x44> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 114f0a: 8b 0b mov (%ebx),%ecx previous = the_node->previous; 114f0c: 8b 53 04 mov 0x4(%ebx),%edx next->previous = previous; 114f0f: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 114f12: 89 0a mov %ecx,(%edx) return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 114f14: c7 43 44 00 00 00 00 movl $0x0,0x44(%ebx) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 114f1b: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 114f1f: 74 1f je 114f40 <_Thread_queue_Extract_fifo+0x4c> _ISR_Enable( level ); 114f21: 50 push %eax 114f22: 9d popf RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 114f23: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 114f2a: 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 } 114f2d: 8b 5d fc mov -0x4(%ebp),%ebx 114f30: c9 leave 114f31: e9 8e 89 ff ff jmp 10d8c4 <_Thread_Clear_state> 114f36: 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 ); 114f38: 50 push %eax 114f39: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 114f3a: 8b 5d fc mov -0x4(%ebp),%ebx 114f3d: c9 leave 114f3e: c3 ret 114f3f: 90 nop 114f40: 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 ); 114f47: 50 push %eax 114f48: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 114f49: 83 ec 0c sub $0xc,%esp 114f4c: 8d 43 48 lea 0x48(%ebx),%eax 114f4f: 50 push %eax 114f50: e8 c3 9d ff ff call 10ed18 <_Watchdog_Remove> 114f55: 83 c4 10 add $0x10,%esp 114f58: eb c9 jmp 114f23 <_Thread_queue_Extract_fifo+0x2f> =============================================================================== 00112754 <_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 ) { 112754: 55 push %ebp 112755: 89 e5 mov %esp,%ebp 112757: 57 push %edi 112758: 56 push %esi 112759: 53 push %ebx 11275a: 83 ec 1c sub $0x1c,%esp 11275d: 8b 5d 0c mov 0xc(%ebp),%ebx 112760: 8a 45 10 mov 0x10(%ebp),%al 112763: 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 ); 112766: 9c pushf 112767: fa cli 112768: 8f 45 e4 popl -0x1c(%ebp) if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 11276b: f7 43 10 e0 be 03 00 testl $0x3bee0,0x10(%ebx) 112772: 74 6c je 1127e0 <_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; 112774: 8b 13 mov (%ebx),%edx previous_node = the_node->previous; 112776: 8b 4b 04 mov 0x4(%ebx),%ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 112779: 8b 43 38 mov 0x38(%ebx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11277c: 8d 73 3c lea 0x3c(%ebx),%esi 11277f: 39 f0 cmp %esi,%eax 112781: 74 69 je 1127ec <_Thread_queue_Extract_priority_helper+0x98> if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 112783: 8b 7b 40 mov 0x40(%ebx),%edi new_second_node = new_first_node->next; 112786: 8b 30 mov (%eax),%esi previous_node->next = new_first_node; 112788: 89 01 mov %eax,(%ecx) next_node->previous = new_first_node; 11278a: 89 42 04 mov %eax,0x4(%edx) new_first_node->next = next_node; 11278d: 89 10 mov %edx,(%eax) new_first_node->previous = previous_node; 11278f: 89 48 04 mov %ecx,0x4(%eax) if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 112792: 8b 53 38 mov 0x38(%ebx),%edx 112795: 3b 53 40 cmp 0x40(%ebx),%edx 112798: 74 11 je 1127ab <_Thread_queue_Extract_priority_helper+0x57> /* > two threads on 2-n */ new_second_node->previous = 11279a: 8d 50 38 lea 0x38(%eax),%edx 11279d: 89 56 04 mov %edx,0x4(%esi) _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 1127a0: 89 70 38 mov %esi,0x38(%eax) new_first_thread->Wait.Block2n.last = last_node; 1127a3: 89 78 40 mov %edi,0x40(%eax) last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 1127a6: 83 c0 3c add $0x3c,%eax 1127a9: 89 07 mov %eax,(%edi) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 1127ab: 80 7d e3 00 cmpb $0x0,-0x1d(%ebp) 1127af: 75 23 jne 1127d4 <_Thread_queue_Extract_priority_helper+0x80> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 1127b1: 83 7b 50 02 cmpl $0x2,0x50(%ebx) 1127b5: 74 3d je 1127f4 <_Thread_queue_Extract_priority_helper+0xa0> _ISR_Enable( level ); 1127b7: ff 75 e4 pushl -0x1c(%ebp) 1127ba: 9d popf 1127bb: c7 45 0c f8 ff 03 10 movl $0x1003fff8,0xc(%ebp) 1127c2: 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 } 1127c5: 8d 65 f4 lea -0xc(%ebp),%esp 1127c8: 5b pop %ebx 1127c9: 5e pop %esi 1127ca: 5f pop %edi 1127cb: c9 leave 1127cc: e9 f3 b0 ff ff jmp 10d8c4 <_Thread_Clear_state> 1127d1: 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 ); 1127d4: ff 75 e4 pushl -0x1c(%ebp) 1127d7: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1127d8: 8d 65 f4 lea -0xc(%ebp),%esp 1127db: 5b pop %ebx 1127dc: 5e pop %esi 1127dd: 5f pop %edi 1127de: c9 leave 1127df: 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 ); 1127e0: ff 75 e4 pushl -0x1c(%ebp) 1127e3: 9d popf #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 1127e4: 8d 65 f4 lea -0xc(%ebp),%esp 1127e7: 5b pop %ebx 1127e8: 5e pop %esi 1127e9: 5f pop %edi 1127ea: c9 leave 1127eb: c3 ret new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 1127ec: 89 11 mov %edx,(%ecx) next_node->previous = previous_node; 1127ee: 89 4a 04 mov %ecx,0x4(%edx) 1127f1: eb b8 jmp 1127ab <_Thread_queue_Extract_priority_helper+0x57> 1127f3: 90 nop 1127f4: 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 ); 1127fb: ff 75 e4 pushl -0x1c(%ebp) 1127fe: 9d popf (void) _Watchdog_Remove( &the_thread->Timer ); 1127ff: 83 ec 0c sub $0xc,%esp 112802: 8d 43 48 lea 0x48(%ebx),%eax 112805: 50 push %eax 112806: e8 0d c5 ff ff call 10ed18 <_Watchdog_Remove> 11280b: 83 c4 10 add $0x10,%esp 11280e: eb ab jmp 1127bb <_Thread_queue_Extract_priority_helper+0x67> =============================================================================== 0010e3ac <_Thread_queue_Extract_with_proxy>: */ bool _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 10e3ac: 55 push %ebp 10e3ad: 89 e5 mov %esp,%ebp 10e3af: 83 ec 08 sub $0x8,%esp 10e3b2: 8b 45 08 mov 0x8(%ebp),%eax States_Control state; state = the_thread->current_state; 10e3b5: f7 40 10 e0 be 03 00 testl $0x3bee0,0x10(%eax) 10e3bc: 75 06 jne 10e3c4 <_Thread_queue_Extract_with_proxy+0x18> 10e3be: 31 c0 xor %eax,%eax _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); return true; } return false; } 10e3c0: c9 leave 10e3c1: c3 ret 10e3c2: 66 90 xchg %ax,%ax if ( proxy_extract_callout ) (*proxy_extract_callout)( the_thread ); } #endif _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 10e3c4: 83 ec 08 sub $0x8,%esp 10e3c7: 50 push %eax 10e3c8: ff 70 44 pushl 0x44(%eax) 10e3cb: e8 54 43 00 00 call 112724 <_Thread_queue_Extract> 10e3d0: b0 01 mov $0x1,%al return true; 10e3d2: 83 c4 10 add $0x10,%esp } return false; } 10e3d5: c9 leave 10e3d6: c3 ret =============================================================================== 001101f8 <_Thread_queue_First>: */ Thread_Control *_Thread_queue_First( Thread_queue_Control *the_thread_queue ) { 1101f8: 55 push %ebp 1101f9: 89 e5 mov %esp,%ebp 1101fb: 83 ec 08 sub $0x8,%esp 1101fe: 8b 45 08 mov 0x8(%ebp),%eax Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 110201: 83 78 34 01 cmpl $0x1,0x34(%eax) 110205: 74 0d je 110214 <_Thread_queue_First+0x1c> 110207: ba ac 46 11 00 mov $0x1146ac,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 11020c: 89 45 08 mov %eax,0x8(%ebp) } 11020f: 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 ); 110210: ff e2 jmp *%edx 110212: 66 90 xchg %ax,%ax Thread_queue_Control *the_thread_queue ) { Thread_Control * (*first_p)(Thread_queue_Control *); if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) 110214: ba 20 02 11 00 mov $0x110220,%edx first_p = _Thread_queue_First_priority; else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ first_p = _Thread_queue_First_fifo; return (*first_p)( the_thread_queue ); 110219: 89 45 08 mov %eax,0x8(%ebp) } 11021c: 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 ); 11021d: ff e2 jmp *%edx =============================================================================== 001146ac <_Thread_queue_First_fifo>: */ Thread_Control *_Thread_queue_First_fifo( Thread_queue_Control *the_thread_queue ) { 1146ac: 55 push %ebp 1146ad: 89 e5 mov %esp,%ebp 1146af: 8b 55 08 mov 0x8(%ebp),%edx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1146b2: 8b 02 mov (%edx),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1146b4: 83 c2 04 add $0x4,%edx 1146b7: 39 d0 cmp %edx,%eax 1146b9: 74 05 je 1146c0 <_Thread_queue_First_fifo+0x14> if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) return (Thread_Control *) the_thread_queue->Queues.Fifo.first; return NULL; } 1146bb: c9 leave 1146bc: c3 ret 1146bd: 8d 76 00 lea 0x0(%esi),%esi 1146c0: 31 c0 xor %eax,%eax 1146c2: c9 leave 1146c3: c3 ret =============================================================================== 0010e3d8 <_Thread_queue_Flush>: #else Thread_queue_Flush_callout remote_extract_callout __attribute__((unused)), #endif uint32_t status ) { 10e3d8: 55 push %ebp 10e3d9: 89 e5 mov %esp,%ebp 10e3db: 56 push %esi 10e3dc: 53 push %ebx 10e3dd: 8b 5d 08 mov 0x8(%ebp),%ebx 10e3e0: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e3e3: eb 06 jmp 10e3eb <_Thread_queue_Flush+0x13> 10e3e5: 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; 10e3e8: 89 70 34 mov %esi,0x34(%eax) uint32_t status ) { Thread_Control *the_thread; while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) { 10e3eb: 83 ec 0c sub $0xc,%esp 10e3ee: 53 push %ebx 10e3ef: e8 94 fc ff ff call 10e088 <_Thread_queue_Dequeue> 10e3f4: 83 c4 10 add $0x10,%esp 10e3f7: 85 c0 test %eax,%eax 10e3f9: 75 ed jne 10e3e8 <_Thread_queue_Flush+0x10> ( *remote_extract_callout )( the_thread ); else #endif the_thread->Wait.return_code = status; } } 10e3fb: 8d 65 f8 lea -0x8(%ebp),%esp 10e3fe: 5b pop %ebx 10e3ff: 5e pop %esi 10e400: c9 leave 10e401: c3 ret =============================================================================== 00112810 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 112810: 55 push %ebp 112811: 89 e5 mov %esp,%ebp 112813: 83 ec 08 sub $0x8,%esp 112816: 8b 45 08 mov 0x8(%ebp),%eax Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 112819: 8b 50 44 mov 0x44(%eax),%edx * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 11281c: 8b 4a 30 mov 0x30(%edx),%ecx 11281f: 85 c9 test %ecx,%ecx 112821: 74 08 je 11282b <_Thread_queue_Process_timeout+0x1b> 112823: 3b 05 78 95 12 00 cmp 0x129578,%eax 112829: 74 19 je 112844 <_Thread_queue_Process_timeout+0x34><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 11282b: 8b 52 3c mov 0x3c(%edx),%edx 11282e: 89 50 34 mov %edx,0x34(%eax) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 112831: 83 ec 08 sub $0x8,%esp 112834: 50 push %eax 112835: ff 70 44 pushl 0x44(%eax) 112838: e8 e7 fe ff ff call 112724 <_Thread_queue_Extract> 11283d: 83 c4 10 add $0x10,%esp } } 112840: c9 leave 112841: c3 ret 112842: 66 90 xchg %ax,%ax * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 112844: 83 f9 03 cmp $0x3,%ecx 112847: 74 f7 je 112840 <_Thread_queue_Process_timeout+0x30> the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 112849: 8b 4a 3c mov 0x3c(%edx),%ecx 11284c: 89 48 34 mov %ecx,0x34(%eax) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 11284f: c7 42 30 02 00 00 00 movl $0x2,0x30(%edx) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 112856: c9 leave 112857: c3 ret =============================================================================== 0010e454 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 10e454: 55 push %ebp 10e455: 89 e5 mov %esp,%ebp 10e457: 57 push %edi 10e458: 56 push %esi 10e459: 53 push %ebx 10e45a: 83 ec 1c sub $0x1c,%esp 10e45d: 8b 75 08 mov 0x8(%ebp),%esi 10e460: 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 ) 10e463: 85 f6 test %esi,%esi 10e465: 74 06 je 10e46d <_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 ) { 10e467: 83 7e 34 01 cmpl $0x1,0x34(%esi) 10e46b: 74 0b je 10e478 <_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 ); } } 10e46d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10e470: 5b pop %ebx <== NOT EXECUTED 10e471: 5e pop %esi <== NOT EXECUTED 10e472: 5f pop %edi <== NOT EXECUTED 10e473: c9 leave <== NOT EXECUTED 10e474: c3 ret <== NOT EXECUTED 10e475: 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 ); 10e478: 9c pushf 10e479: fa cli 10e47a: 5b pop %ebx if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 10e47b: f7 47 10 e0 be 03 00 testl $0x3bee0,0x10(%edi) 10e482: 75 0c jne 10e490 <_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 ); 10e484: 53 push %ebx 10e485: 9d popf } } 10e486: 8d 65 f4 lea -0xc(%ebp),%esp 10e489: 5b pop %ebx 10e48a: 5e pop %esi 10e48b: 5f pop %edi 10e48c: c9 leave 10e48d: c3 ret 10e48e: 66 90 xchg %ax,%ax 10e490: 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 ); 10e497: 50 push %eax 10e498: 6a 01 push $0x1 10e49a: 57 push %edi 10e49b: 56 push %esi 10e49c: e8 b3 42 00 00 call 112754 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 10e4a1: 83 c4 0c add $0xc,%esp 10e4a4: 8d 45 e4 lea -0x1c(%ebp),%eax 10e4a7: 50 push %eax 10e4a8: 57 push %edi 10e4a9: 56 push %esi 10e4aa: e8 8d fd ff ff call 10e23c <_Thread_queue_Enqueue_priority> 10e4af: 83 c4 10 add $0x10,%esp 10e4b2: eb d0 jmp 10e484 <_Thread_queue_Requeue+0x30> =============================================================================== 0010e4b4 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 10e4b4: 55 push %ebp 10e4b5: 89 e5 mov %esp,%ebp 10e4b7: 83 ec 20 sub $0x20,%esp Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10e4ba: 8d 45 f4 lea -0xc(%ebp),%eax 10e4bd: 50 push %eax 10e4be: ff 75 08 pushl 0x8(%ebp) 10e4c1: e8 ca f7 ff ff call 10dc90 <_Thread_Get> switch ( location ) { 10e4c6: 83 c4 10 add $0x10,%esp 10e4c9: 8b 55 f4 mov -0xc(%ebp),%edx 10e4cc: 85 d2 test %edx,%edx 10e4ce: 75 17 jne 10e4e7 <_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 ); 10e4d0: 83 ec 0c sub $0xc,%esp 10e4d3: 50 push %eax 10e4d4: e8 37 43 00 00 call 112810 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 10e4d9: a1 b8 94 12 00 mov 0x1294b8,%eax 10e4de: 48 dec %eax 10e4df: a3 b8 94 12 00 mov %eax,0x1294b8 10e4e4: 83 c4 10 add $0x10,%esp _Thread_Unnest_dispatch(); break; } } 10e4e7: c9 leave 10e4e8: c3 ret =============================================================================== 0011982c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 11982c: 55 push %ebp 11982d: 89 e5 mov %esp,%ebp 11982f: 57 push %edi 119830: 56 push %esi 119831: 53 push %ebx 119832: 83 ec 4c sub $0x4c,%esp 119835: 8b 5d 08 mov 0x8(%ebp),%ebx 119838: 8d 45 e0 lea -0x20(%ebp),%eax 11983b: 89 45 b4 mov %eax,-0x4c(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 11983e: 89 45 dc mov %eax,-0x24(%ebp) the_chain->permanent_null = NULL; 119841: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_chain->last = _Chain_Head(the_chain); 119848: 8d 4d dc lea -0x24(%ebp),%ecx 11984b: 89 4d e4 mov %ecx,-0x1c(%ebp) */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11984e: 8d 7d d0 lea -0x30(%ebp),%edi 119851: 8d 45 d4 lea -0x2c(%ebp),%eax 119854: 89 45 b0 mov %eax,-0x50(%ebp) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 119857: 89 45 d0 mov %eax,-0x30(%ebp) the_chain->permanent_null = NULL; 11985a: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) the_chain->last = _Chain_Head(the_chain); 119861: 89 7d d8 mov %edi,-0x28(%ebp) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119864: 8d 73 30 lea 0x30(%ebx),%esi /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 119867: 8d 4b 68 lea 0x68(%ebx),%ecx 11986a: 89 4d c4 mov %ecx,-0x3c(%ebp) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 11986d: 8d 43 08 lea 0x8(%ebx),%eax 119870: 89 45 bc mov %eax,-0x44(%ebp) static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 119873: 8d 53 40 lea 0x40(%ebx),%edx 119876: 89 55 c0 mov %edx,-0x40(%ebp) 119879: 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; 11987c: 8d 4d dc lea -0x24(%ebp),%ecx 11987f: 89 4b 78 mov %ecx,0x78(%ebx) 119882: 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; 119884: a1 64 42 14 00 mov 0x144264,%eax /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 119889: 8b 53 3c mov 0x3c(%ebx),%edx watchdogs->last_snapshot = snapshot; 11988c: 89 43 3c mov %eax,0x3c(%ebx) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 11988f: 51 push %ecx 119890: 57 push %edi 119891: 29 d0 sub %edx,%eax 119893: 50 push %eax 119894: 56 push %esi 119895: e8 be 3c 00 00 call 11d558 <_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(); 11989a: a1 8c 41 14 00 mov 0x14418c,%eax Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 11989f: 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 ) { 1198a2: 83 c4 10 add $0x10,%esp 1198a5: 39 d0 cmp %edx,%eax 1198a7: 77 63 ja 11990c <_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 ) { 1198a9: 72 7d jb 119928 <_Timer_server_Body+0xfc> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 1198ab: 89 43 74 mov %eax,0x74(%ebx) 1198ae: 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 ); 1198b0: 8b 43 78 mov 0x78(%ebx),%eax 1198b3: 83 ec 0c sub $0xc,%esp 1198b6: 50 push %eax 1198b7: e8 9c 08 00 00 call 11a158 <_Chain_Get> if ( timer == NULL ) { 1198bc: 83 c4 10 add $0x10,%esp 1198bf: 85 c0 test %eax,%eax 1198c1: 74 35 je 1198f8 <_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 ) { 1198c3: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED 1198c6: 83 fa 01 cmp $0x1,%edx <== NOT EXECUTED 1198c9: 74 19 je 1198e4 <_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 ) { 1198cb: 83 fa 03 cmp $0x3,%edx <== NOT EXECUTED 1198ce: 75 e0 jne 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 1198d0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198d3: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198d6: 50 push %eax <== NOT EXECUTED 1198d7: ff 75 c4 pushl -0x3c(%ebp) <== NOT EXECUTED 1198da: e8 11 3d 00 00 call 11d5f0 <_Watchdog_Insert> <== NOT EXECUTED 1198df: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198e2: eb cc jmp 1198b0 <_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 ); 1198e4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1198e7: 83 c0 10 add $0x10,%eax <== NOT EXECUTED 1198ea: 50 push %eax <== NOT EXECUTED 1198eb: 56 push %esi <== NOT EXECUTED 1198ec: e8 ff 3c 00 00 call 11d5f0 <_Watchdog_Insert> <== NOT EXECUTED 1198f1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1198f4: eb ba jmp 1198b0 <_Timer_server_Body+0x84><== NOT EXECUTED 1198f6: 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 ); 1198f8: 9c pushf 1198f9: fa cli 1198fa: 58 pop %eax if ( _Chain_Is_empty( insert_chain ) ) { 1198fb: 8b 55 b4 mov -0x4c(%ebp),%edx 1198fe: 3b 55 dc cmp -0x24(%ebp),%edx 119901: 74 41 je 119944 <_Timer_server_Body+0x118><== ALWAYS TAKEN ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 119903: 50 push %eax <== NOT EXECUTED 119904: 9d popf <== NOT EXECUTED 119905: e9 7a ff ff ff jmp 119884 <_Timer_server_Body+0x58><== NOT EXECUTED 11990a: 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 ); 11990c: 51 push %ecx 11990d: 57 push %edi 11990e: 89 c1 mov %eax,%ecx 119910: 29 d1 sub %edx,%ecx 119912: 51 push %ecx 119913: ff 75 c4 pushl -0x3c(%ebp) 119916: 89 45 b8 mov %eax,-0x48(%ebp) 119919: e8 3a 3c 00 00 call 11d558 <_Watchdog_Adjust_to_chain> 11991e: 83 c4 10 add $0x10,%esp 119921: 8b 45 b8 mov -0x48(%ebp),%eax 119924: eb 85 jmp 1198ab <_Timer_server_Body+0x7f> 119926: 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 ); 119928: 51 push %ecx 119929: 29 c2 sub %eax,%edx 11992b: 52 push %edx 11992c: 6a 01 push $0x1 11992e: ff 75 c4 pushl -0x3c(%ebp) 119931: 89 45 b8 mov %eax,-0x48(%ebp) 119934: e8 a7 3b 00 00 call 11d4e0 <_Watchdog_Adjust> 119939: 83 c4 10 add $0x10,%esp 11993c: 8b 45 b8 mov -0x48(%ebp),%eax 11993f: e9 67 ff ff ff jmp 1198ab <_Timer_server_Body+0x7f> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 119944: c7 43 78 00 00 00 00 movl $0x0,0x78(%ebx) _ISR_Enable( level ); 11994b: 50 push %eax 11994c: 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 ) ) { 11994d: 8b 4d b0 mov -0x50(%ebp),%ecx 119950: 3b 4d d0 cmp -0x30(%ebp),%ecx 119953: 75 23 jne 119978 <_Timer_server_Body+0x14c> 119955: eb 33 jmp 11998a <_Timer_server_Body+0x15e> 119957: 90 nop { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 119958: 8b 10 mov (%eax),%edx the_chain->first = new_first; 11995a: 89 55 d0 mov %edx,-0x30(%ebp) new_first->previous = _Chain_Head(the_chain); 11995d: 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; 119960: c7 40 08 00 00 00 00 movl $0x0,0x8(%eax) _ISR_Enable( level ); 119967: 51 push %ecx 119968: 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 ); 119969: 83 ec 08 sub $0x8,%esp 11996c: ff 70 24 pushl 0x24(%eax) 11996f: ff 70 20 pushl 0x20(%eax) 119972: ff 50 1c call *0x1c(%eax) } 119975: 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 ); 119978: 9c pushf 119979: fa cli 11997a: 59 pop %ecx */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11997b: 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)) 11997e: 39 45 b0 cmp %eax,-0x50(%ebp) 119981: 75 d5 jne 119958 <_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 ); 119983: 51 push %ecx 119984: 9d popf 119985: e9 f2 fe ff ff jmp 11987c <_Timer_server_Body+0x50> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 11998a: c6 43 7c 00 movb $0x0,0x7c(%ebx) 11998e: a1 f8 40 14 00 mov 0x1440f8,%eax 119993: 40 inc %eax 119994: a3 f8 40 14 00 mov %eax,0x1440f8 /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 119999: 83 ec 08 sub $0x8,%esp 11999c: 6a 08 push $0x8 11999e: ff 33 pushl (%ebx) 1199a0: e8 4b 33 00 00 call 11ccf0 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 1199a5: 89 d8 mov %ebx,%eax 1199a7: e8 e0 fd ff ff call 11978c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 1199ac: 89 d8 mov %ebx,%eax 1199ae: e8 29 fe ff ff call 1197dc <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 1199b3: e8 04 29 00 00 call 11c2bc <_Thread_Enable_dispatch> ts->active = true; 1199b8: 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 ); 1199bc: 58 pop %eax 1199bd: ff 75 bc pushl -0x44(%ebp) 1199c0: e8 63 3d 00 00 call 11d728 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1199c5: 59 pop %ecx 1199c6: ff 75 c0 pushl -0x40(%ebp) 1199c9: e8 5a 3d 00 00 call 11d728 <_Watchdog_Remove> 1199ce: 83 c4 10 add $0x10,%esp 1199d1: e9 a6 fe ff ff jmp 11987c <_Timer_server_Body+0x50> =============================================================================== 001199d8 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 1199d8: 55 push %ebp 1199d9: 89 e5 mov %esp,%ebp 1199db: 57 push %edi 1199dc: 56 push %esi 1199dd: 53 push %ebx 1199de: 83 ec 2c sub $0x2c,%esp 1199e1: 8b 5d 08 mov 0x8(%ebp),%ebx 1199e4: 8b 45 0c mov 0xc(%ebp),%eax if ( ts->insert_chain == NULL ) { 1199e7: 8b 53 78 mov 0x78(%ebx),%edx 1199ea: 85 d2 test %edx,%edx 1199ec: 74 16 je 119a04 <_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 ); 1199ee: 8b 53 78 mov 0x78(%ebx),%edx <== NOT EXECUTED 1199f1: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 1199f4: 89 55 08 mov %edx,0x8(%ebp) <== NOT EXECUTED } } 1199f7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1199fa: 5b pop %ebx <== NOT EXECUTED 1199fb: 5e pop %esi <== NOT EXECUTED 1199fc: 5f pop %edi <== NOT EXECUTED 1199fd: 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 ); 1199fe: e9 19 07 00 00 jmp 11a11c <_Chain_Append> <== NOT EXECUTED 119a03: 90 nop <== NOT EXECUTED 119a04: 8b 15 f8 40 14 00 mov 0x1440f8,%edx 119a0a: 42 inc %edx 119a0b: 89 15 f8 40 14 00 mov %edx,0x1440f8 * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 119a11: 8b 50 38 mov 0x38(%eax),%edx 119a14: 83 fa 01 cmp $0x1,%edx 119a17: 74 77 je 119a90 <_Timer_server_Schedule_operation_method+0xb8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 119a19: 83 fa 03 cmp $0x3,%edx 119a1c: 74 0e je 119a2c <_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 ); } } 119a1e: 8d 65 f4 lea -0xc(%ebp),%esp 119a21: 5b pop %ebx 119a22: 5e pop %esi 119a23: 5f pop %edi 119a24: c9 leave if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 119a25: e9 92 28 00 00 jmp 11c2bc <_Thread_Enable_dispatch> 119a2a: 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 ); 119a2c: 9c pushf 119a2d: fa cli 119a2e: 8f 45 e4 popl -0x1c(%ebp) snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119a31: 8b 0d 8c 41 14 00 mov 0x14418c,%ecx last_snapshot = ts->TOD_watchdogs.last_snapshot; 119a37: 8b 73 74 mov 0x74(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a3a: 8b 53 68 mov 0x68(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119a3d: 8d 7b 6c lea 0x6c(%ebx),%edi 119a40: 39 fa cmp %edi,%edx 119a42: 74 22 je 119a66 <_Timer_server_Schedule_operation_method+0x8e> if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 119a44: 8b 7a 10 mov 0x10(%edx),%edi 119a47: 89 7d d4 mov %edi,-0x2c(%ebp) if ( snapshot > last_snapshot ) { 119a4a: 39 f1 cmp %esi,%ecx 119a4c: 0f 86 9e 00 00 00 jbe 119af0 <_Timer_server_Schedule_operation_method+0x118> /* * We advanced in time. */ delta = snapshot - last_snapshot; 119a52: 89 cf mov %ecx,%edi 119a54: 29 f7 sub %esi,%edi 119a56: 89 fe mov %edi,%esi if (delta_interval > delta) { 119a58: 39 7d d4 cmp %edi,-0x2c(%ebp) 119a5b: 0f 87 9b 00 00 00 ja 119afc <_Timer_server_Schedule_operation_method+0x124><== ALWAYS TAKEN 119a61: 31 ff xor %edi,%edi <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 119a63: 89 7a 10 mov %edi,0x10(%edx) } ts->TOD_watchdogs.last_snapshot = snapshot; 119a66: 89 4b 74 mov %ecx,0x74(%ebx) _ISR_Enable( level ); 119a69: ff 75 e4 pushl -0x1c(%ebp) 119a6c: 9d popf _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 119a6d: 83 ec 08 sub $0x8,%esp 119a70: 83 c0 10 add $0x10,%eax 119a73: 50 push %eax 119a74: 8d 43 68 lea 0x68(%ebx),%eax 119a77: 50 push %eax 119a78: e8 73 3b 00 00 call 11d5f0 <_Watchdog_Insert> if ( !ts->active ) { 119a7d: 8a 43 7c mov 0x7c(%ebx),%al 119a80: 83 c4 10 add $0x10,%esp 119a83: 84 c0 test %al,%al 119a85: 75 97 jne 119a1e <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_tod_system_watchdog( ts ); 119a87: 89 d8 mov %ebx,%eax 119a89: e8 4e fd ff ff call 1197dc <_Timer_server_Reset_tod_system_watchdog> 119a8e: eb 8e jmp 119a1e <_Timer_server_Schedule_operation_method+0x46> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 119a90: 9c pushf 119a91: fa cli 119a92: 8f 45 e4 popl -0x1c(%ebp) snapshot = _Watchdog_Ticks_since_boot; 119a95: 8b 0d 64 42 14 00 mov 0x144264,%ecx last_snapshot = ts->Interval_watchdogs.last_snapshot; 119a9b: 8b 73 3c mov 0x3c(%ebx),%esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 119a9e: 8b 53 30 mov 0x30(%ebx),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 119aa1: 8d 7b 34 lea 0x34(%ebx),%edi 119aa4: 39 fa cmp %edi,%edx 119aa6: 74 12 je 119aba <_Timer_server_Schedule_operation_method+0xe2> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 119aa8: 89 cf mov %ecx,%edi 119aaa: 29 f7 sub %esi,%edi 119aac: 89 fe mov %edi,%esi delta_interval = first_watchdog->delta_interval; 119aae: 8b 7a 10 mov 0x10(%edx),%edi if (delta_interval > delta) { 119ab1: 39 fe cmp %edi,%esi 119ab3: 72 37 jb 119aec <_Timer_server_Schedule_operation_method+0x114> 119ab5: 31 ff xor %edi,%edi delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 119ab7: 89 7a 10 mov %edi,0x10(%edx) } ts->Interval_watchdogs.last_snapshot = snapshot; 119aba: 89 4b 3c mov %ecx,0x3c(%ebx) _ISR_Enable( level ); 119abd: ff 75 e4 pushl -0x1c(%ebp) 119ac0: 9d popf _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 119ac1: 83 ec 08 sub $0x8,%esp 119ac4: 83 c0 10 add $0x10,%eax 119ac7: 50 push %eax 119ac8: 8d 43 30 lea 0x30(%ebx),%eax 119acb: 50 push %eax 119acc: e8 1f 3b 00 00 call 11d5f0 <_Watchdog_Insert> if ( !ts->active ) { 119ad1: 8a 43 7c mov 0x7c(%ebx),%al 119ad4: 83 c4 10 add $0x10,%esp 119ad7: 84 c0 test %al,%al 119ad9: 0f 85 3f ff ff ff jne 119a1e <_Timer_server_Schedule_operation_method+0x46> _Timer_server_Reset_interval_system_watchdog( ts ); 119adf: 89 d8 mov %ebx,%eax 119ae1: e8 a6 fc ff ff call 11978c <_Timer_server_Reset_interval_system_watchdog> 119ae6: e9 33 ff ff ff jmp 119a1e <_Timer_server_Schedule_operation_method+0x46> 119aeb: 90 nop */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; 119aec: 29 f7 sub %esi,%edi 119aee: eb c7 jmp 119ab7 <_Timer_server_Schedule_operation_method+0xdf> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 119af0: 8b 7d d4 mov -0x2c(%ebp),%edi 119af3: 01 f7 add %esi,%edi delta_interval += delta; 119af5: 29 cf sub %ecx,%edi 119af7: e9 67 ff ff ff jmp 119a63 <_Timer_server_Schedule_operation_method+0x8b> /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; 119afc: 8b 7d d4 mov -0x2c(%ebp),%edi 119aff: 29 f7 sub %esi,%edi 119b01: e9 5d ff ff ff jmp 119a63 <_Timer_server_Schedule_operation_method+0x8b> =============================================================================== 00121608 <_Timespec_Is_valid>: #include bool _Timespec_Is_valid( const struct timespec *time ) { 121608: 55 push %ebp 121609: 89 e5 mov %esp,%ebp 12160b: 8b 45 08 mov 0x8(%ebp),%eax if ( !time ) 12160e: 85 c0 test %eax,%eax 121610: 74 1a je 12162c <_Timespec_Is_valid+0x24> return false; if ( time->tv_sec < 0 ) 121612: 8b 10 mov (%eax),%edx 121614: 85 d2 test %edx,%edx 121616: 78 14 js 12162c <_Timespec_Is_valid+0x24> return false; if ( time->tv_nsec < 0 ) 121618: 8b 40 04 mov 0x4(%eax),%eax 12161b: 85 c0 test %eax,%eax 12161d: 78 0d js 12162c <_Timespec_Is_valid+0x24> #include #include #include bool _Timespec_Is_valid( 12161f: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 121624: 0f 96 c0 setbe %al if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 121627: c9 leave 121628: c3 ret 121629: 8d 76 00 lea 0x0(%esi),%esi #include #include #include bool _Timespec_Is_valid( 12162c: 31 c0 xor %eax,%eax if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return false; return true; } 12162e: c9 leave 12162f: c3 ret =============================================================================== 00112a3c <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 112a3c: 55 push %ebp 112a3d: 89 e5 mov %esp,%ebp 112a3f: 56 push %esi 112a40: 53 push %ebx 112a41: 8b 5d 08 mov 0x8(%ebp),%ebx uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 112a44: 8b 33 mov (%ebx),%esi 112a46: 85 f6 test %esi,%esi 112a48: 75 07 jne 112a51 <_Timespec_To_ticks+0x15> 112a4a: 8b 43 04 mov 0x4(%ebx),%eax 112a4d: 85 c0 test %eax,%eax 112a4f: 74 37 je 112a88 <_Timespec_To_ticks+0x4c> return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 112a51: e8 8a 23 00 00 call 114de0 112a56: 89 c1 mov %eax,%ecx 112a58: 0f af ce imul %esi,%ecx ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); 112a5b: a1 ec 52 12 00 mov 0x1252ec,%eax 112a60: 8d 04 80 lea (%eax,%eax,4),%eax 112a63: 8d 04 80 lea (%eax,%eax,4),%eax 112a66: 8d 34 80 lea (%eax,%eax,4),%esi 112a69: c1 e6 03 shl $0x3,%esi 112a6c: 8b 43 04 mov 0x4(%ebx),%eax 112a6f: 31 d2 xor %edx,%edx 112a71: f7 f6 div %esi if (ticks) 112a73: 01 c8 add %ecx,%eax 112a75: 74 05 je 112a7c <_Timespec_To_ticks+0x40> return ticks; return 1; } 112a77: 5b pop %ebx 112a78: 5e pop %esi 112a79: c9 leave 112a7a: c3 ret 112a7b: 90 nop ticks = time->tv_sec * TOD_TICKS_PER_SECOND; ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick(); if (ticks) 112a7c: b8 01 00 00 00 mov $0x1,%eax return ticks; return 1; } 112a81: 5b pop %ebx 112a82: 5e pop %esi 112a83: c9 leave 112a84: c3 ret 112a85: 8d 76 00 lea 0x0(%esi),%esi const struct timespec *time ) { uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 112a88: 31 c0 xor %eax,%eax if (ticks) return ticks; return 1; } 112a8a: 5b pop %ebx 112a8b: 5e pop %esi 112a8c: c9 leave 112a8d: c3 ret =============================================================================== 0010ea88 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 10ea88: 55 push %ebp 10ea89: 89 e5 mov %esp,%ebp 10ea8b: 57 push %edi 10ea8c: 56 push %esi 10ea8d: 53 push %ebx 10ea8e: 83 ec 1c sub $0x1c,%esp 10ea91: 8b 75 08 mov 0x8(%ebp),%esi 10ea94: 8b 7d 10 mov 0x10(%ebp),%edi 10ea97: 8a 45 0c mov 0xc(%ebp),%al Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ea9a: 8b 1d 14 97 12 00 mov 0x129714,%ebx 10eaa0: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx 10eaa6: 74 25 je 10eacd <_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 ); 10eaa8: 0f b6 c0 movzbl %al,%eax 10eaab: 89 45 e4 mov %eax,-0x1c(%ebp) 10eaae: 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 ) 10eab0: 8b 43 30 mov 0x30(%ebx),%eax 10eab3: 85 c0 test %eax,%eax 10eab5: 74 0b je 10eac2 <_User_extensions_Fatal+0x3a> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 10eab7: 52 push %edx 10eab8: 57 push %edi 10eab9: ff 75 e4 pushl -0x1c(%ebp) 10eabc: 56 push %esi 10eabd: ff d0 call *%eax 10eabf: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10eac2: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10eac5: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx 10eacb: 75 e3 jne 10eab0 <_User_extensions_Fatal+0x28> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 10eacd: 8d 65 f4 lea -0xc(%ebp),%esp 10ead0: 5b pop %ebx 10ead1: 5e pop %esi 10ead2: 5f pop %edi 10ead3: c9 leave 10ead4: c3 ret =============================================================================== 0010e94c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 10e94c: 55 push %ebp 10e94d: 89 e5 mov %esp,%ebp 10e94f: 57 push %edi 10e950: 56 push %esi 10e951: 53 push %ebx 10e952: 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; 10e955: a1 18 53 12 00 mov 0x125318,%eax 10e95a: 89 45 dc mov %eax,-0x24(%ebp) initial_extensions = Configuration.User_extension_table; 10e95d: 8b 35 1c 53 12 00 mov 0x12531c,%esi */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e963: c7 05 0c 97 12 00 10 movl $0x129710,0x12970c 10e96a: 97 12 00 the_chain->permanent_null = NULL; 10e96d: c7 05 10 97 12 00 00 movl $0x0,0x129710 10e974: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e977: c7 05 14 97 12 00 0c movl $0x12970c,0x129714 10e97e: 97 12 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 10e981: c7 05 bc 94 12 00 c0 movl $0x1294c0,0x1294bc 10e988: 94 12 00 the_chain->permanent_null = NULL; 10e98b: c7 05 c0 94 12 00 00 movl $0x0,0x1294c0 10e992: 00 00 00 the_chain->last = _Chain_Head(the_chain); 10e995: c7 05 c4 94 12 00 bc movl $0x1294bc,0x1294c4 10e99c: 94 12 00 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 10e99f: 85 f6 test %esi,%esi 10e9a1: 74 64 je 10ea07 <_User_extensions_Handler_initialization+0xbb> extension = (User_extensions_Control *) 10e9a3: 89 c2 mov %eax,%edx 10e9a5: 8d 04 40 lea (%eax,%eax,2),%eax 10e9a8: 8d 0c 82 lea (%edx,%eax,4),%ecx 10e9ab: c1 e1 02 shl $0x2,%ecx 10e9ae: 83 ec 0c sub $0xc,%esp 10e9b1: 51 push %ecx 10e9b2: 89 4d d8 mov %ecx,-0x28(%ebp) 10e9b5: e8 36 04 00 00 call 10edf0 <_Workspace_Allocate_or_fatal_error> 10e9ba: 89 c3 mov %eax,%ebx _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 10e9bc: 31 c0 xor %eax,%eax 10e9be: 8b 4d d8 mov -0x28(%ebp),%ecx 10e9c1: 89 df mov %ebx,%edi 10e9c3: f3 aa rep stos %al,%es:(%edi) extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e9c5: 83 c4 10 add $0x10,%esp 10e9c8: 8b 45 dc mov -0x24(%ebp),%eax 10e9cb: 85 c0 test %eax,%eax 10e9cd: 74 38 je 10ea07 <_User_extensions_Handler_initialization+0xbb><== NEVER TAKEN 10e9cf: 89 75 e4 mov %esi,-0x1c(%ebp) 10e9d2: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) 10e9d9: 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; 10e9dc: 8d 7b 14 lea 0x14(%ebx),%edi 10e9df: 8b 75 e4 mov -0x1c(%ebp),%esi 10e9e2: b9 08 00 00 00 mov $0x8,%ecx 10e9e7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10e9e9: 83 ec 0c sub $0xc,%esp 10e9ec: 53 push %ebx 10e9ed: e8 9e 40 00 00 call 112a90 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 10e9f2: 83 c3 34 add $0x34,%ebx extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 10e9f5: ff 45 e0 incl -0x20(%ebp) 10e9f8: 83 45 e4 20 addl $0x20,-0x1c(%ebp) 10e9fc: 83 c4 10 add $0x10,%esp 10e9ff: 8b 45 e0 mov -0x20(%ebp),%eax 10ea02: 39 45 dc cmp %eax,-0x24(%ebp) 10ea05: 77 d5 ja 10e9dc <_User_extensions_Handler_initialization+0x90> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 10ea07: 8d 65 f4 lea -0xc(%ebp),%esp 10ea0a: 5b pop %ebx 10ea0b: 5e pop %esi 10ea0c: 5f pop %edi 10ea0d: c9 leave 10ea0e: c3 ret =============================================================================== 0010ffc0 <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 10ffc0: 55 push %ebp 10ffc1: 89 e5 mov %esp,%ebp 10ffc3: 53 push %ebx 10ffc4: 83 ec 10 sub $0x10,%esp 10ffc7: 8b 5d 08 mov 0x8(%ebp),%ebx _Chain_Extract( &the_extension->Node ); 10ffca: 53 push %ebx 10ffcb: e8 80 d9 ff ff call 10d950 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 10ffd0: 83 c4 10 add $0x10,%esp 10ffd3: 8b 43 24 mov 0x24(%ebx),%eax 10ffd6: 85 c0 test %eax,%eax 10ffd8: 74 12 je 10ffec <_User_extensions_Remove_set+0x2c> _Chain_Extract( &the_extension->Switch.Node ); 10ffda: 83 c3 08 add $0x8,%ebx 10ffdd: 89 5d 08 mov %ebx,0x8(%ebp) } 10ffe0: 8b 5d fc mov -0x4(%ebp),%ebx 10ffe3: c9 leave /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 10ffe4: e9 67 d9 ff ff jmp 10d950 <_Chain_Extract> 10ffe9: 8d 76 00 lea 0x0(%esi),%esi } 10ffec: 8b 5d fc mov -0x4(%ebp),%ebx 10ffef: c9 leave 10fff0: c3 ret =============================================================================== 0010ea10 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 10ea10: 55 push %ebp 10ea11: 89 e5 mov %esp,%ebp 10ea13: 56 push %esi 10ea14: 53 push %ebx 10ea15: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea18: 8b 1d 0c 97 12 00 mov 0x12970c,%ebx 10ea1e: 81 fb 10 97 12 00 cmp $0x129710,%ebx 10ea24: 74 1c je 10ea42 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN 10ea26: 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 ) 10ea28: 8b 43 28 mov 0x28(%ebx),%eax 10ea2b: 85 c0 test %eax,%eax 10ea2d: 74 09 je 10ea38 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 10ea2f: 83 ec 0c sub $0xc,%esp 10ea32: 56 push %esi 10ea33: ff d0 call *%eax 10ea35: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10ea38: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10ea3a: 81 fb 10 97 12 00 cmp $0x129710,%ebx 10ea40: 75 e6 jne 10ea28 <_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 ); } } 10ea42: 8d 65 f8 lea -0x8(%ebp),%esp 10ea45: 5b pop %ebx 10ea46: 5e pop %esi 10ea47: c9 leave 10ea48: c3 ret =============================================================================== 0010ead8 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 10ead8: 55 push %ebp 10ead9: 89 e5 mov %esp,%ebp 10eadb: 56 push %esi 10eadc: 53 push %ebx 10eadd: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10eae0: 8b 1d 0c 97 12 00 mov 0x12970c,%ebx 10eae6: 81 fb 10 97 12 00 cmp $0x129710,%ebx 10eaec: 74 26 je 10eb14 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN 10eaee: 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 ) { 10eaf0: 8b 43 14 mov 0x14(%ebx),%eax 10eaf3: 85 c0 test %eax,%eax 10eaf5: 74 13 je 10eb0a <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 10eaf7: 83 ec 08 sub $0x8,%esp 10eafa: 56 push %esi 10eafb: ff 35 78 95 12 00 pushl 0x129578 10eb01: ff d0 call *%eax _Thread_Executing, the_thread ); if ( !status ) 10eb03: 83 c4 10 add $0x10,%esp 10eb06: 84 c0 test %al,%al 10eb08: 74 0c je 10eb16 <_User_extensions_Thread_create+0x3e> User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10eb0a: 8b 1b mov (%ebx),%ebx { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 10eb0c: 81 fb 10 97 12 00 cmp $0x129710,%ebx 10eb12: 75 dc jne 10eaf0 <_User_extensions_Thread_create+0x18> 10eb14: b0 01 mov $0x1,%al return false; } } return true; } 10eb16: 8d 65 f8 lea -0x8(%ebp),%esp 10eb19: 5b pop %ebx 10eb1a: 5e pop %esi 10eb1b: c9 leave 10eb1c: c3 ret =============================================================================== 0010eb20 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 10eb20: 55 push %ebp 10eb21: 89 e5 mov %esp,%ebp 10eb23: 56 push %esi 10eb24: 53 push %ebx 10eb25: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10eb28: 8b 1d 14 97 12 00 mov 0x129714,%ebx 10eb2e: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx 10eb34: 74 23 je 10eb59 <_User_extensions_Thread_delete+0x39><== NEVER TAKEN 10eb36: 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 ) 10eb38: 8b 43 20 mov 0x20(%ebx),%eax 10eb3b: 85 c0 test %eax,%eax 10eb3d: 74 0f je 10eb4e <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 10eb3f: 83 ec 08 sub $0x8,%esp 10eb42: 56 push %esi 10eb43: ff 35 78 95 12 00 pushl 0x129578 10eb49: ff d0 call *%eax 10eb4b: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10eb4e: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10eb51: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx 10eb57: 75 df jne 10eb38 <_User_extensions_Thread_delete+0x18> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 10eb59: 8d 65 f8 lea -0x8(%ebp),%esp 10eb5c: 5b pop %ebx 10eb5d: 5e pop %esi 10eb5e: c9 leave 10eb5f: c3 ret =============================================================================== 0010ea4c <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 10ea4c: 55 push %ebp 10ea4d: 89 e5 mov %esp,%ebp 10ea4f: 56 push %esi 10ea50: 53 push %ebx 10ea51: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ea54: 8b 1d 14 97 12 00 mov 0x129714,%ebx 10ea5a: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx 10ea60: 74 1d je 10ea7f <_User_extensions_Thread_exitted+0x33><== NEVER TAKEN 10ea62: 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 ) 10ea64: 8b 43 2c mov 0x2c(%ebx),%eax 10ea67: 85 c0 test %eax,%eax 10ea69: 74 09 je 10ea74 <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 10ea6b: 83 ec 0c sub $0xc,%esp 10ea6e: 56 push %esi 10ea6f: ff d0 call *%eax 10ea71: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 10ea74: 8b 5b 04 mov 0x4(%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 10ea77: 81 fb 0c 97 12 00 cmp $0x12970c,%ebx 10ea7d: 75 e5 jne 10ea64 <_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 ); } } 10ea7f: 8d 65 f8 lea -0x8(%ebp),%esp 10ea82: 5b pop %ebx 10ea83: 5e pop %esi 10ea84: c9 leave 10ea85: c3 ret =============================================================================== 0010f714 <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 10f714: 55 push %ebp 10f715: 89 e5 mov %esp,%ebp 10f717: 56 push %esi 10f718: 53 push %ebx 10f719: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f71c: 8b 1d 0c b5 12 00 mov 0x12b50c,%ebx 10f722: 81 fb 10 b5 12 00 cmp $0x12b510,%ebx 10f728: 74 22 je 10f74c <_User_extensions_Thread_restart+0x38><== NEVER TAKEN 10f72a: 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 ) 10f72c: 8b 43 1c mov 0x1c(%ebx),%eax 10f72f: 85 c0 test %eax,%eax 10f731: 74 0f je 10f742 <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 10f733: 83 ec 08 sub $0x8,%esp 10f736: 56 push %esi 10f737: ff 35 78 b3 12 00 pushl 0x12b378 10f73d: ff d0 call *%eax 10f73f: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10f742: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10f744: 81 fb 10 b5 12 00 cmp $0x12b510,%ebx 10f74a: 75 e0 jne 10f72c <_User_extensions_Thread_restart+0x18> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 10f74c: 8d 65 f8 lea -0x8(%ebp),%esp 10f74f: 5b pop %ebx 10f750: 5e pop %esi 10f751: c9 leave 10f752: c3 ret =============================================================================== 0010eb60 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 10eb60: 55 push %ebp 10eb61: 89 e5 mov %esp,%ebp 10eb63: 56 push %esi 10eb64: 53 push %ebx 10eb65: 8b 75 08 mov 0x8(%ebp),%esi Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10eb68: 8b 1d 0c 97 12 00 mov 0x12970c,%ebx 10eb6e: 81 fb 10 97 12 00 cmp $0x129710,%ebx 10eb74: 74 22 je 10eb98 <_User_extensions_Thread_start+0x38><== NEVER TAKEN 10eb76: 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 ) 10eb78: 8b 43 18 mov 0x18(%ebx),%eax 10eb7b: 85 c0 test %eax,%eax 10eb7d: 74 0f je 10eb8e <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 10eb7f: 83 ec 08 sub $0x8,%esp 10eb82: 56 push %esi 10eb83: ff 35 78 95 12 00 pushl 0x129578 10eb89: ff d0 call *%eax 10eb8b: 83 c4 10 add $0x10,%esp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 10eb8e: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.first ; 10eb90: 81 fb 10 97 12 00 cmp $0x129710,%ebx 10eb96: 75 e0 jne 10eb78 <_User_extensions_Thread_start+0x18> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 10eb98: 8d 65 f8 lea -0x8(%ebp),%esp 10eb9b: 5b pop %ebx 10eb9c: 5e pop %esi 10eb9d: c9 leave 10eb9e: c3 ret =============================================================================== 0010eba0 <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 10eba0: 55 push %ebp 10eba1: 89 e5 mov %esp,%ebp 10eba3: 57 push %edi 10eba4: 56 push %esi 10eba5: 53 push %ebx 10eba6: 83 ec 0c sub $0xc,%esp 10eba9: 8b 7d 08 mov 0x8(%ebp),%edi 10ebac: 8b 75 0c mov 0xc(%ebp),%esi Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ebaf: 8b 1d bc 94 12 00 mov 0x1294bc,%ebx 10ebb5: 81 fb c0 94 12 00 cmp $0x1294c0,%ebx 10ebbb: 74 18 je 10ebd5 <_User_extensions_Thread_switch+0x35><== NEVER TAKEN 10ebbd: 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 ); 10ebc0: 83 ec 08 sub $0x8,%esp 10ebc3: 56 push %esi 10ebc4: 57 push %edi 10ebc5: ff 53 08 call *0x8(%ebx) Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 10ebc8: 8b 1b mov (%ebx),%ebx ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _User_extensions_Switches_list.first ; 10ebca: 83 c4 10 add $0x10,%esp 10ebcd: 81 fb c0 94 12 00 cmp $0x1294c0,%ebx 10ebd3: 75 eb jne 10ebc0 <_User_extensions_Thread_switch+0x20> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 10ebd5: 8d 65 f4 lea -0xc(%ebp),%esp 10ebd8: 5b pop %ebx 10ebd9: 5e pop %esi 10ebda: 5f pop %edi 10ebdb: c9 leave 10ebdc: c3 ret =============================================================================== 001105c0 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 1105c0: 55 push %ebp 1105c1: 89 e5 mov %esp,%ebp 1105c3: 57 push %edi 1105c4: 56 push %esi 1105c5: 53 push %ebx 1105c6: 83 ec 1c sub $0x1c,%esp 1105c9: 8b 75 08 mov 0x8(%ebp),%esi 1105cc: 8b 4d 0c mov 0xc(%ebp),%ecx 1105cf: 8b 5d 10 mov 0x10(%ebp),%ebx ISR_Level level; _ISR_Disable( level ); 1105d2: 9c pushf 1105d3: fa cli 1105d4: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 1105d5: 8b 16 mov (%esi),%edx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 1105d7: 8d 7e 04 lea 0x4(%esi),%edi 1105da: 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 ) ) { 1105dd: 39 fa cmp %edi,%edx 1105df: 74 3d je 11061e <_Watchdog_Adjust+0x5e> switch ( direction ) { 1105e1: 85 c9 test %ecx,%ecx 1105e3: 75 43 jne 110628 <_Watchdog_Adjust+0x68> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 1105e5: 85 db test %ebx,%ebx 1105e7: 74 35 je 11061e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 1105e9: 8b 7a 10 mov 0x10(%edx),%edi 1105ec: 39 fb cmp %edi,%ebx 1105ee: 73 0f jae 1105ff <_Watchdog_Adjust+0x3f> <== ALWAYS TAKEN 1105f0: eb 3e jmp 110630 <_Watchdog_Adjust+0x70> <== NOT EXECUTED 1105f2: 66 90 xchg %ax,%ax <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 1105f4: 29 fb sub %edi,%ebx 1105f6: 74 26 je 11061e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 1105f8: 8b 7a 10 mov 0x10(%edx),%edi 1105fb: 39 df cmp %ebx,%edi 1105fd: 77 31 ja 110630 <_Watchdog_Adjust+0x70> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 1105ff: c7 42 10 01 00 00 00 movl $0x1,0x10(%edx) _ISR_Enable( level ); 110606: 50 push %eax 110607: 9d popf _Watchdog_Tickle( header ); 110608: 83 ec 0c sub $0xc,%esp 11060b: 56 push %esi 11060c: e8 cb 01 00 00 call 1107dc <_Watchdog_Tickle> _ISR_Disable( level ); 110611: 9c pushf 110612: fa cli 110613: 58 pop %eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110614: 8b 16 mov (%esi),%edx if ( _Chain_Is_empty( header ) ) 110616: 83 c4 10 add $0x10,%esp 110619: 39 55 e4 cmp %edx,-0x1c(%ebp) 11061c: 75 d6 jne 1105f4 <_Watchdog_Adjust+0x34> } break; } } _ISR_Enable( level ); 11061e: 50 push %eax 11061f: 9d popf } 110620: 8d 65 f4 lea -0xc(%ebp),%esp 110623: 5b pop %ebx 110624: 5e pop %esi 110625: 5f pop %edi 110626: c9 leave 110627: c3 ret * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 110628: 49 dec %ecx 110629: 75 f3 jne 11061e <_Watchdog_Adjust+0x5e> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 11062b: 01 5a 10 add %ebx,0x10(%edx) break; 11062e: eb ee jmp 11061e <_Watchdog_Adjust+0x5e> case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 110630: 29 df sub %ebx,%edi 110632: 89 7a 10 mov %edi,0x10(%edx) break; 110635: eb e7 jmp 11061e <_Watchdog_Adjust+0x5e> =============================================================================== 0011d558 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 11d558: 55 push %ebp 11d559: 89 e5 mov %esp,%ebp 11d55b: 57 push %edi 11d55c: 56 push %esi 11d55d: 53 push %ebx 11d55e: 83 ec 0c sub $0xc,%esp 11d561: 8b 75 08 mov 0x8(%ebp),%esi 11d564: 8b 55 0c mov 0xc(%ebp),%edx 11d567: 8b 5d 10 mov 0x10(%ebp),%ebx Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { 11d56a: 85 d2 test %edx,%edx 11d56c: 74 63 je 11d5d1 <_Watchdog_Adjust_to_chain+0x79> return; } _ISR_Disable( level ); 11d56e: 9c pushf 11d56f: fa cli 11d570: 8f 45 ec popl -0x14(%ebp) 11d573: 8b 06 mov (%esi),%eax */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d575: 8d 4e 04 lea 0x4(%esi),%ecx 11d578: 89 4d f0 mov %ecx,-0x10(%ebp) 11d57b: 8d 7b 04 lea 0x4(%ebx),%edi 11d57e: 89 55 e8 mov %edx,-0x18(%ebp) 11d581: 8d 76 00 lea 0x0(%esi),%esi while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { 11d584: 39 45 f0 cmp %eax,-0x10(%ebp) 11d587: 74 44 je 11d5cd <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { 11d589: 8b 50 10 mov 0x10(%eax),%edx 11d58c: 3b 55 e8 cmp -0x18(%ebp),%edx 11d58f: 77 57 ja 11d5e8 <_Watchdog_Adjust_to_chain+0x90> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; 11d591: 29 55 e8 sub %edx,-0x18(%ebp) first->delta_interval = 0; 11d594: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 11d59b: 90 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 11d59c: 8b 08 mov (%eax),%ecx previous = the_node->previous; 11d59e: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 11d5a1: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 11d5a4: 89 0a mov %ecx,(%edx) Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 11d5a6: 89 38 mov %edi,(%eax) old_last_node = the_chain->last; 11d5a8: 8b 53 08 mov 0x8(%ebx),%edx the_chain->last = the_node; 11d5ab: 89 43 08 mov %eax,0x8(%ebx) old_last_node->next = the_node; 11d5ae: 89 02 mov %eax,(%edx) the_node->previous = old_last_node; 11d5b0: 89 50 04 mov %edx,0x4(%eax) while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); 11d5b3: ff 75 ec pushl -0x14(%ebp) 11d5b6: 9d popf 11d5b7: fa cli */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11d5b8: 8b 06 mov (%esi),%eax if ( _Chain_Is_empty( header ) ) 11d5ba: 39 45 f0 cmp %eax,-0x10(%ebp) 11d5bd: 74 1d je 11d5dc <_Watchdog_Adjust_to_chain+0x84> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) 11d5bf: 8b 50 10 mov 0x10(%eax),%edx 11d5c2: 85 d2 test %edx,%edx 11d5c4: 74 d6 je 11d59c <_Watchdog_Adjust_to_chain+0x44> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d5c6: 8b 4d e8 mov -0x18(%ebp),%ecx 11d5c9: 85 c9 test %ecx,%ecx 11d5cb: 75 b7 jne 11d584 <_Watchdog_Adjust_to_chain+0x2c> if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level ); 11d5cd: ff 75 ec pushl -0x14(%ebp) 11d5d0: 9d popf } 11d5d1: 83 c4 0c add $0xc,%esp 11d5d4: 5b pop %ebx 11d5d5: 5e pop %esi 11d5d6: 5f pop %edi 11d5d7: c9 leave 11d5d8: c3 ret 11d5d9: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 11d5dc: 8b 45 f0 mov -0x10(%ebp),%eax } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { 11d5df: 8b 4d e8 mov -0x18(%ebp),%ecx 11d5e2: 85 c9 test %ecx,%ecx 11d5e4: 75 9e jne 11d584 <_Watchdog_Adjust_to_chain+0x2c> 11d5e6: eb e5 jmp 11d5cd <_Watchdog_Adjust_to_chain+0x75> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; 11d5e8: 2b 55 e8 sub -0x18(%ebp),%edx 11d5eb: 89 50 10 mov %edx,0x10(%eax) break; 11d5ee: eb dd jmp 11d5cd <_Watchdog_Adjust_to_chain+0x75> =============================================================================== 0010ebe0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 10ebe0: 55 push %ebp 10ebe1: 89 e5 mov %esp,%ebp 10ebe3: 57 push %edi 10ebe4: 56 push %esi 10ebe5: 53 push %ebx 10ebe6: 83 ec 04 sub $0x4,%esp 10ebe9: 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; 10ebec: 8b 3d 54 95 12 00 mov 0x129554,%edi _ISR_Disable( level ); 10ebf2: 9c pushf 10ebf3: fa cli 10ebf4: 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 ) { 10ebf7: 8b 43 08 mov 0x8(%ebx),%eax 10ebfa: 85 c0 test %eax,%eax 10ebfc: 0f 85 9e 00 00 00 jne 10eca0 <_Watchdog_Insert+0xc0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 10ec02: c7 43 08 01 00 00 00 movl $0x1,0x8(%ebx) _Watchdog_Sync_count++; 10ec09: a1 20 96 12 00 mov 0x129620,%eax 10ec0e: 40 inc %eax 10ec0f: a3 20 96 12 00 mov %eax,0x129620 restart: delta_interval = the_watchdog->initial; 10ec14: 8b 43 0c mov 0xc(%ebx),%eax * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 10ec17: 8b 4d 08 mov 0x8(%ebp),%ecx 10ec1a: 8b 11 mov (%ecx),%edx ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10ec1c: 85 c0 test %eax,%eax 10ec1e: 74 5d je 10ec7d <_Watchdog_Insert+0x9d> 10ec20: 8b 32 mov (%edx),%esi 10ec22: 85 f6 test %esi,%esi 10ec24: 74 57 je 10ec7d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10ec26: 8b 4a 10 mov 0x10(%edx),%ecx 10ec29: 39 c8 cmp %ecx,%eax 10ec2b: 73 22 jae 10ec4f <_Watchdog_Insert+0x6f> 10ec2d: eb 49 jmp 10ec78 <_Watchdog_Insert+0x98> 10ec2f: 90 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 10ec30: 8b 35 74 95 12 00 mov 0x129574,%esi 10ec36: 39 f7 cmp %esi,%edi 10ec38: 72 72 jb 10ecac <_Watchdog_Insert+0xcc> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 10ec3a: 29 c8 sub %ecx,%eax RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10ec3c: 8b 12 mov (%edx),%edx */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 10ec3e: 85 c0 test %eax,%eax 10ec40: 74 3b je 10ec7d <_Watchdog_Insert+0x9d> 10ec42: 8b 0a mov (%edx),%ecx 10ec44: 85 c9 test %ecx,%ecx 10ec46: 74 35 je 10ec7d <_Watchdog_Insert+0x9d> break; if ( delta_interval < after->delta_interval ) { 10ec48: 8b 4a 10 mov 0x10(%edx),%ecx 10ec4b: 39 c1 cmp %eax,%ecx 10ec4d: 77 29 ja 10ec78 <_Watchdog_Insert+0x98> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 10ec4f: ff 75 f0 pushl -0x10(%ebp) 10ec52: 9d popf 10ec53: fa cli if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 10ec54: 83 7b 08 01 cmpl $0x1,0x8(%ebx) 10ec58: 74 d6 je 10ec30 <_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; 10ec5a: 89 3d 74 95 12 00 mov %edi,0x129574 _Watchdog_Sync_count--; 10ec60: a1 20 96 12 00 mov 0x129620,%eax 10ec65: 48 dec %eax 10ec66: a3 20 96 12 00 mov %eax,0x129620 _ISR_Enable( level ); 10ec6b: ff 75 f0 pushl -0x10(%ebp) 10ec6e: 9d popf } 10ec6f: 58 pop %eax 10ec70: 5b pop %ebx 10ec71: 5e pop %esi 10ec72: 5f pop %edi 10ec73: c9 leave 10ec74: c3 ret 10ec75: 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; 10ec78: 29 c1 sub %eax,%ecx 10ec7a: 89 4a 10 mov %ecx,0x10(%edx) RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 10ec7d: c7 43 08 02 00 00 00 movl $0x2,0x8(%ebx) } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 10ec84: 89 43 10 mov %eax,0x10(%ebx) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 10ec87: 8b 42 04 mov 0x4(%edx),%eax Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 10ec8a: 89 43 04 mov %eax,0x4(%ebx) before_node = after_node->next; 10ec8d: 8b 10 mov (%eax),%edx after_node->next = the_node; 10ec8f: 89 18 mov %ebx,(%eax) the_node->next = before_node; 10ec91: 89 13 mov %edx,(%ebx) before_node->previous = the_node; 10ec93: 89 5a 04 mov %ebx,0x4(%edx) the_watchdog->start_time = _Watchdog_Ticks_since_boot; 10ec96: a1 24 96 12 00 mov 0x129624,%eax 10ec9b: 89 43 14 mov %eax,0x14(%ebx) 10ec9e: eb ba jmp 10ec5a <_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 ); 10eca0: ff 75 f0 pushl -0x10(%ebp) 10eca3: 9d popf exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 10eca4: 58 pop %eax 10eca5: 5b pop %ebx 10eca6: 5e pop %esi 10eca7: 5f pop %edi 10eca8: c9 leave 10eca9: c3 ret 10ecaa: 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; 10ecac: 89 3d 74 95 12 00 mov %edi,0x129574 goto restart; 10ecb2: e9 5d ff ff ff jmp 10ec14 <_Watchdog_Insert+0x34> =============================================================================== 0010ed18 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 10ed18: 55 push %ebp 10ed19: 89 e5 mov %esp,%ebp 10ed1b: 56 push %esi 10ed1c: 53 push %ebx 10ed1d: 8b 55 08 mov 0x8(%ebp),%edx ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 10ed20: 9c pushf 10ed21: fa cli 10ed22: 59 pop %ecx previous_state = the_watchdog->state; 10ed23: 8b 42 08 mov 0x8(%edx),%eax switch ( previous_state ) { 10ed26: 83 f8 01 cmp $0x1,%eax 10ed29: 74 4d je 10ed78 <_Watchdog_Remove+0x60> 10ed2b: 73 0f jae 10ed3c <_Watchdog_Remove+0x24> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 10ed2d: 8b 1d 24 96 12 00 mov 0x129624,%ebx 10ed33: 89 5a 18 mov %ebx,0x18(%edx) _ISR_Enable( level ); 10ed36: 51 push %ecx 10ed37: 9d popf return( previous_state ); } 10ed38: 5b pop %ebx 10ed39: 5e pop %esi 10ed3a: c9 leave 10ed3b: c3 ret Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 10ed3c: 83 f8 03 cmp $0x3,%eax 10ed3f: 77 ec ja 10ed2d <_Watchdog_Remove+0x15> <== NEVER TAKEN break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 10ed41: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 10ed48: 8b 1a mov (%edx),%ebx next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 10ed4a: 8b 33 mov (%ebx),%esi 10ed4c: 85 f6 test %esi,%esi 10ed4e: 74 06 je 10ed56 <_Watchdog_Remove+0x3e> next_watchdog->delta_interval += the_watchdog->delta_interval; 10ed50: 8b 72 10 mov 0x10(%edx),%esi 10ed53: 01 73 10 add %esi,0x10(%ebx) if ( _Watchdog_Sync_count ) 10ed56: 8b 35 20 96 12 00 mov 0x129620,%esi 10ed5c: 85 f6 test %esi,%esi 10ed5e: 74 0c je 10ed6c <_Watchdog_Remove+0x54> _Watchdog_Sync_level = _ISR_Nest_level; 10ed60: 8b 35 54 95 12 00 mov 0x129554,%esi 10ed66: 89 35 74 95 12 00 mov %esi,0x129574 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 10ed6c: 8b 72 04 mov 0x4(%edx),%esi next->previous = previous; 10ed6f: 89 73 04 mov %esi,0x4(%ebx) previous->next = next; 10ed72: 89 1e mov %ebx,(%esi) 10ed74: eb b7 jmp 10ed2d <_Watchdog_Remove+0x15> 10ed76: 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; 10ed78: c7 42 08 00 00 00 00 movl $0x0,0x8(%edx) break; 10ed7f: eb ac jmp 10ed2d <_Watchdog_Remove+0x15> =============================================================================== 001101a4 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { 1101a4: 55 push %ebp 1101a5: 89 e5 mov %esp,%ebp 1101a7: 57 push %edi 1101a8: 56 push %esi 1101a9: 53 push %ebx 1101aa: 83 ec 2c sub $0x2c,%esp 1101ad: 8b 55 08 mov 0x8(%ebp),%edx 1101b0: 8b 45 0c mov 0xc(%ebp),%eax printk( 1101b3: 8b 78 24 mov 0x24(%eax),%edi 1101b6: 8b 70 20 mov 0x20(%eax),%esi 1101b9: 8b 58 1c mov 0x1c(%eax),%ebx 1101bc: 8b 48 0c mov 0xc(%eax),%ecx 1101bf: 89 4d d4 mov %ecx,-0x2c(%ebp) 1101c2: 8b 48 10 mov 0x10(%eax),%ecx 1101c5: 89 4d e0 mov %ecx,-0x20(%ebp) 1101c8: 85 d2 test %edx,%edx 1101ca: 74 2c je 1101f8 <_Watchdog_Report+0x54> 1101cc: b9 43 46 12 00 mov $0x124643,%ecx 1101d1: 83 ec 0c sub $0xc,%esp 1101d4: 57 push %edi 1101d5: 56 push %esi 1101d6: 53 push %ebx 1101d7: 50 push %eax 1101d8: ff 75 d4 pushl -0x2c(%ebp) 1101db: ff 75 e0 pushl -0x20(%ebp) 1101de: 51 push %ecx 1101df: 52 push %edx 1101e0: 68 46 50 12 00 push $0x125046 1101e5: e8 ae 9d ff ff call 109f98 1101ea: 83 c4 30 add $0x30,%esp watch, watch->routine, watch->id, watch->user_data ); } 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 void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { printk( 1101f8: b9 95 4e 12 00 mov $0x124e95,%ecx 1101fd: 89 ca mov %ecx,%edx 1101ff: eb d0 jmp 1101d1 <_Watchdog_Report+0x2d> =============================================================================== 00110134 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 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 20 sub $0x20,%esp 11013d: 8b 7d 08 mov 0x8(%ebp),%edi 110140: 8b 75 0c mov 0xc(%ebp),%esi ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 110143: 9c pushf 110144: fa cli 110145: 8f 45 e4 popl -0x1c(%ebp) printk( "Watchdog Chain: %s %p\n", name, header ); 110148: 56 push %esi 110149: 57 push %edi 11014a: 68 10 50 12 00 push $0x125010 11014f: e8 44 9e ff ff call 109f98 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 110154: 8b 1e mov (%esi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 110156: 83 c6 04 add $0x4,%esi if ( !_Chain_Is_empty( header ) ) { 110159: 83 c4 10 add $0x10,%esp 11015c: 39 f3 cmp %esi,%ebx 11015e: 74 31 je 110191 <_Watchdog_Report_chain+0x5d> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 110160: 83 ec 08 sub $0x8,%esp 110163: 53 push %ebx 110164: 6a 00 push $0x0 110166: e8 39 00 00 00 call 1101a4 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; node != _Chain_Tail(header) ; node = node->next ) 11016b: 8b 1b mov (%ebx),%ebx Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = header->first ; 11016d: 83 c4 10 add $0x10,%esp 110170: 39 f3 cmp %esi,%ebx 110172: 75 ec jne 110160 <_Watchdog_Report_chain+0x2c><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 110174: 83 ec 08 sub $0x8,%esp 110177: 57 push %edi 110178: 68 27 50 12 00 push $0x125027 11017d: e8 16 9e ff ff call 109f98 110182: 83 c4 10 add $0x10,%esp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 110185: ff 75 e4 pushl -0x1c(%ebp) 110188: 9d popf } 110189: 8d 65 f4 lea -0xc(%ebp),%esp 11018c: 5b pop %ebx 11018d: 5e pop %esi 11018e: 5f pop %edi 11018f: c9 leave 110190: c3 ret _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 110191: 83 ec 0c sub $0xc,%esp 110194: 68 36 50 12 00 push $0x125036 110199: e8 fa 9d ff ff call 109f98 11019e: 83 c4 10 add $0x10,%esp 1101a1: eb e2 jmp 110185 <_Watchdog_Report_chain+0x51> =============================================================================== 0010ed84 <_Watchdog_Tickle>: */ void _Watchdog_Tickle( Chain_Control *header ) { 10ed84: 55 push %ebp 10ed85: 89 e5 mov %esp,%ebp 10ed87: 57 push %edi 10ed88: 56 push %esi 10ed89: 53 push %ebx 10ed8a: 83 ec 1c sub $0x1c,%esp 10ed8d: 8b 7d 08 mov 0x8(%ebp),%edi * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 10ed90: 9c pushf 10ed91: fa cli 10ed92: 5e pop %esi */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 10ed93: 8b 1f mov (%edi),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10ed95: 8d 47 04 lea 0x4(%edi),%eax 10ed98: 89 45 e4 mov %eax,-0x1c(%ebp) if ( _Chain_Is_empty( header ) ) 10ed9b: 39 c3 cmp %eax,%ebx 10ed9d: 74 11 je 10edb0 <_Watchdog_Tickle+0x2c> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 10ed9f: 8b 43 10 mov 0x10(%ebx),%eax 10eda2: 85 c0 test %eax,%eax 10eda4: 74 34 je 10edda <_Watchdog_Tickle+0x56> the_watchdog->delta_interval--; 10eda6: 48 dec %eax 10eda7: 89 43 10 mov %eax,0x10(%ebx) if ( the_watchdog->delta_interval != 0 ) 10edaa: 85 c0 test %eax,%eax 10edac: 74 2c je 10edda <_Watchdog_Tickle+0x56> 10edae: 66 90 xchg %ax,%ax the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 10edb0: 56 push %esi 10edb1: 9d popf } 10edb2: 8d 65 f4 lea -0xc(%ebp),%esp 10edb5: 5b pop %ebx 10edb6: 5e pop %esi 10edb7: 5f pop %edi 10edb8: c9 leave 10edb9: c3 ret _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 10edba: 83 ec 08 sub $0x8,%esp 10edbd: ff 73 24 pushl 0x24(%ebx) 10edc0: ff 73 20 pushl 0x20(%ebx) 10edc3: ff 53 1c call *0x1c(%ebx) 10edc6: 83 c4 10 add $0x10,%esp case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 10edc9: 9c pushf 10edca: fa cli 10edcb: 5e pop %esi RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 10edcc: 8b 1f mov (%edi),%ebx the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 10edce: 39 5d e4 cmp %ebx,-0x1c(%ebp) 10edd1: 74 dd je 10edb0 <_Watchdog_Tickle+0x2c> 10edd3: 8b 43 10 mov 0x10(%ebx),%eax 10edd6: 85 c0 test %eax,%eax 10edd8: 75 d6 jne 10edb0 <_Watchdog_Tickle+0x2c> if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 10edda: 83 ec 0c sub $0xc,%esp 10eddd: 53 push %ebx 10edde: e8 35 ff ff ff call 10ed18 <_Watchdog_Remove> _ISR_Enable( level ); 10ede3: 56 push %esi 10ede4: 9d popf switch( watchdog_state ) { 10ede5: 83 c4 10 add $0x10,%esp 10ede8: 83 f8 02 cmp $0x2,%eax 10edeb: 75 dc jne 10edc9 <_Watchdog_Tickle+0x45> <== NEVER TAKEN 10eded: eb cb jmp 10edba <_Watchdog_Tickle+0x36> =============================================================================== 0010ee50 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) { 10ee50: 55 push %ebp 10ee51: 89 e5 mov %esp,%ebp 10ee53: 57 push %edi 10ee54: 53 push %ebx uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; 10ee55: 8b 1d e0 52 12 00 mov 0x1252e0,%ebx uintptr_t size = Configuration.work_space_size; 10ee5b: 8b 15 e4 52 12 00 mov 0x1252e4,%edx if ( Configuration.do_zero_of_workspace ) 10ee61: 80 3d 08 53 12 00 00 cmpb $0x0,0x125308 10ee68: 75 1e jne 10ee88 <_Workspace_Handler_initialization+0x38> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 10ee6a: 6a 04 push $0x4 10ee6c: 52 push %edx 10ee6d: 53 push %ebx 10ee6e: 68 e0 94 12 00 push $0x1294e0 10ee73: e8 14 dd ff ff call 10cb8c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 10ee78: 83 c4 10 add $0x10,%esp 10ee7b: 85 c0 test %eax,%eax 10ee7d: 74 13 je 10ee92 <_Workspace_Handler_initialization+0x42> _Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } 10ee7f: 8d 65 f8 lea -0x8(%ebp),%esp 10ee82: 5b pop %ebx 10ee83: 5f pop %edi 10ee84: c9 leave 10ee85: c3 ret 10ee86: 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 ); 10ee88: 31 c0 xor %eax,%eax 10ee8a: 89 df mov %ebx,%edi 10ee8c: 89 d1 mov %edx,%ecx 10ee8e: f3 aa rep stos %al,%es:(%edi) 10ee90: eb d8 jmp 10ee6a <_Workspace_Handler_initialization+0x1a> size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 10ee92: 52 push %edx 10ee93: 6a 03 push $0x3 10ee95: 6a 01 push $0x1 10ee97: 6a 00 push $0x0 10ee99: e8 12 e0 ff ff call 10ceb0 <_Internal_error_Occurred> =============================================================================== 00120814 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 120814: 55 push %ebp 120815: 89 e5 mov %esp,%ebp 120817: 83 ec 08 sub $0x8,%esp 12081a: e8 be 06 00 00 call 120edd <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 12081f: e8 88 ff ff ff call 1207ac rtems_shutdown_executive(status); 120824: 83 ec 0c sub $0xc,%esp 120827: ff 75 08 pushl 0x8(%ebp) 12082a: e8 fd 00 00 00 call 12092c 12082f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 120832: eb fe jmp 120832 <_exit+0x1e> <== NOT EXECUTED =============================================================================== 0010912c <_fcntl_r>: struct _reent *ptr __attribute__((unused)), int fd, int cmd, int arg ) { 10912c: 55 push %ebp <== NOT EXECUTED 10912d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10912f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109132: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 109135: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED return fcntl( fd, cmd, arg ); 109138: 8b 4d 14 mov 0x14(%ebp),%ecx <== NOT EXECUTED 10913b: 89 4d 10 mov %ecx,0x10(%ebp) <== NOT EXECUTED 10913e: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 109141: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 109144: c9 leave <== NOT EXECUTED int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 109145: e9 4a fe ff ff jmp 108f94 <== NOT EXECUTED =============================================================================== 00110cdc <_getpid_r>: #include pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { 110cdc: 55 push %ebp <== NOT EXECUTED 110cdd: 89 e5 mov %esp,%ebp <== NOT EXECUTED return getpid(); } 110cdf: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 110ce4: c9 leave <== NOT EXECUTED 110ce5: c3 ret <== NOT EXECUTED =============================================================================== 00108664 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { 108664: 55 push %ebp <== NOT EXECUTED 108665: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108667: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return gettimeofday( tp, tzp ); } 10866a: c9 leave <== NOT EXECUTED int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 10866b: e9 90 ff ff ff jmp 108600 <== NOT EXECUTED =============================================================================== 0010988c <_link_r>: int _link_r( struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { 10988c: 55 push %ebp <== NOT EXECUTED 10988d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10988f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109892: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return link( existing, new ); 109895: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 109898: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10989b: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10989e: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 10989f: e9 30 fe ff ff jmp 1096d4 <== NOT EXECUTED =============================================================================== 001208f4 <_realloc_r>: void *_realloc_r( struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { 1208f4: 55 push %ebp <== NOT EXECUTED 1208f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1208f7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1208fa: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return realloc( ptr, size ); 1208fd: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 120900: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 120903: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 120906: c9 leave <== NOT EXECUTED struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 120907: e9 48 00 00 00 jmp 120954 <== NOT EXECUTED =============================================================================== 0010bf60 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 10bf60: 55 push %ebp 10bf61: 89 e5 mov %esp,%ebp 10bf63: 57 push %edi 10bf64: 56 push %esi 10bf65: 53 push %ebx 10bf66: 83 ec 78 sub $0x78,%esp 10bf69: 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 ); 10bf6c: 53 push %ebx 10bf6d: e8 4a e9 ff ff call 10a8bc if ( old_parent_pathlen == 0 ) 10bf72: 83 c4 10 add $0x10,%esp 10bf75: 85 c0 test %eax,%eax 10bf77: 0f 85 b7 01 00 00 jne 10c134 <_rename_r+0x1d4> <== NEVER TAKEN rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 10bf7d: 56 push %esi 10bf7e: 8d 45 b8 lea -0x48(%ebp),%eax 10bf81: 89 45 94 mov %eax,-0x6c(%ebp) 10bf84: 50 push %eax 10bf85: 8d 45 e4 lea -0x1c(%ebp),%eax 10bf88: 50 push %eax 10bf89: 53 push %ebx 10bf8a: e8 a1 05 00 00 call 10c530 10bf8f: 31 d2 xor %edx,%edx 10bf91: c6 45 93 00 movb $0x0,-0x6d(%ebp) 10bf95: 83 c4 10 add $0x10,%esp /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 10bf98: 8d 7d cc lea -0x34(%ebp),%edi 10bf9b: b9 05 00 00 00 mov $0x5,%ecx 10bfa0: 8b 75 94 mov -0x6c(%ebp),%esi 10bfa3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = old + old_parent_pathlen; 10bfa5: 01 d3 add %edx,%ebx 10bfa7: 89 5d e0 mov %ebx,-0x20(%ebp) name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10bfaa: be ff ff ff ff mov $0xffffffff,%esi 10bfaf: 89 f1 mov %esi,%ecx 10bfb1: 89 df mov %ebx,%edi 10bfb3: 31 c0 xor %eax,%eax 10bfb5: f2 ae repnz scas %es:(%edi),%al 10bfb7: f7 d1 not %ecx 10bfb9: 49 dec %ecx 10bfba: 83 ec 08 sub $0x8,%esp 10bfbd: 51 push %ecx 10bfbe: 53 push %ebx 10bfbf: e8 a8 e8 ff ff call 10a86c 10bfc4: 01 c3 add %eax,%ebx 10bfc6: 89 5d e0 mov %ebx,-0x20(%ebp) result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10bfc9: 89 f1 mov %esi,%ecx 10bfcb: 89 df mov %ebx,%edi 10bfcd: 31 c0 xor %eax,%eax 10bfcf: f2 ae repnz scas %es:(%edi),%al 10bfd1: 89 ce mov %ecx,%esi 10bfd3: f7 d6 not %esi 10bfd5: 4e dec %esi 10bfd6: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10bfdd: 8d 7d cc lea -0x34(%ebp),%edi 10bfe0: 57 push %edi 10bfe1: 6a 00 push $0x0 10bfe3: 56 push %esi 10bfe4: 53 push %ebx 10bfe5: e8 1a e9 ff ff call 10a904 0, &old_loc, false ); if ( result != 0 ) { 10bfea: 83 c4 20 add $0x20,%esp 10bfed: 85 c0 test %eax,%eax 10bfef: 0f 85 23 01 00 00 jne 10c118 <_rename_r+0x1b8> <== NEVER TAKEN /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 10bff5: 51 push %ecx 10bff6: 8d 5d a4 lea -0x5c(%ebp),%ebx 10bff9: 53 push %ebx 10bffa: 8d 45 e4 lea -0x1c(%ebp),%eax 10bffd: 50 push %eax 10bffe: ff 75 10 pushl 0x10(%ebp) 10c001: e8 2a 05 00 00 call 10c530 if ( !new_parent_loc.ops->evalformake_h ) { 10c006: 8b 45 b0 mov -0x50(%ebp),%eax 10c009: 8b 40 04 mov 0x4(%eax),%eax 10c00c: 83 c4 10 add $0x10,%esp 10c00f: 85 c0 test %eax,%eax 10c011: 0f 84 b5 01 00 00 je 10c1cc <_rename_r+0x26c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 10c017: 52 push %edx 10c018: 8d 55 e0 lea -0x20(%ebp),%edx 10c01b: 52 push %edx 10c01c: 53 push %ebx 10c01d: 8b 55 10 mov 0x10(%ebp),%edx 10c020: 03 55 e4 add -0x1c(%ebp),%edx 10c023: 52 push %edx 10c024: ff d0 call *%eax if ( result != 0 ) { 10c026: 83 c4 10 add $0x10,%esp 10c029: 85 c0 test %eax,%eax 10c02b: 0f 85 2f 01 00 00 jne 10c160 <_rename_r+0x200> /* * 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 ) { 10c031: 8b 45 c8 mov -0x38(%ebp),%eax 10c034: 3b 45 b4 cmp -0x4c(%ebp),%eax 10c037: 75 77 jne 10c0b0 <_rename_r+0x150> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { 10c039: 8b 55 b0 mov -0x50(%ebp),%edx 10c03c: 8b 42 40 mov 0x40(%edx),%eax 10c03f: 85 c0 test %eax,%eax 10c041: 0f 84 75 01 00 00 je 10c1bc <_rename_r+0x25c> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 10c047: ff 75 e0 pushl -0x20(%ebp) 10c04a: 53 push %ebx 10c04b: 57 push %edi 10c04c: ff 75 94 pushl -0x6c(%ebp) 10c04f: ff d0 call *%eax 10c051: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &new_parent_loc ); 10c053: 8b 45 b0 mov -0x50(%ebp),%eax 10c056: 83 c4 10 add $0x10,%esp 10c059: 85 c0 test %eax,%eax 10c05b: 74 10 je 10c06d <_rename_r+0x10d> <== NEVER TAKEN 10c05d: 8b 40 1c mov 0x1c(%eax),%eax 10c060: 85 c0 test %eax,%eax 10c062: 74 09 je 10c06d <_rename_r+0x10d> <== NEVER TAKEN 10c064: 83 ec 0c sub $0xc,%esp 10c067: 53 push %ebx 10c068: ff d0 call *%eax 10c06a: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10c06d: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c071: 74 19 je 10c08c <_rename_r+0x12c> rtems_filesystem_freenode( &old_parent_loc ); 10c073: 8b 45 c4 mov -0x3c(%ebp),%eax 10c076: 85 c0 test %eax,%eax 10c078: 74 12 je 10c08c <_rename_r+0x12c> <== NEVER TAKEN 10c07a: 8b 40 1c mov 0x1c(%eax),%eax 10c07d: 85 c0 test %eax,%eax 10c07f: 74 0b je 10c08c <_rename_r+0x12c> <== NEVER TAKEN 10c081: 83 ec 0c sub $0xc,%esp 10c084: ff 75 94 pushl -0x6c(%ebp) 10c087: ff d0 call *%eax 10c089: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c08c: 8b 45 d8 mov -0x28(%ebp),%eax 10c08f: 85 c0 test %eax,%eax 10c091: 74 10 je 10c0a3 <_rename_r+0x143> <== NEVER TAKEN 10c093: 8b 40 1c mov 0x1c(%eax),%eax 10c096: 85 c0 test %eax,%eax 10c098: 74 09 je 10c0a3 <_rename_r+0x143> <== NEVER TAKEN 10c09a: 83 ec 0c sub $0xc,%esp 10c09d: 57 push %edi 10c09e: ff d0 call *%eax 10c0a0: 83 c4 10 add $0x10,%esp return result; } 10c0a3: 89 f0 mov %esi,%eax 10c0a5: 8d 65 f4 lea -0xc(%ebp),%esp 10c0a8: 5b pop %ebx 10c0a9: 5e pop %esi 10c0aa: 5f pop %edi 10c0ab: c9 leave 10c0ac: c3 ret 10c0ad: 8d 76 00 lea 0x0(%esi),%esi * 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 ); 10c0b0: 8b 45 b0 mov -0x50(%ebp),%eax 10c0b3: 85 c0 test %eax,%eax 10c0b5: 74 10 je 10c0c7 <_rename_r+0x167> <== NEVER TAKEN 10c0b7: 8b 40 1c mov 0x1c(%eax),%eax 10c0ba: 85 c0 test %eax,%eax 10c0bc: 74 09 je 10c0c7 <_rename_r+0x167> <== NEVER TAKEN 10c0be: 83 ec 0c sub $0xc,%esp 10c0c1: 53 push %ebx 10c0c2: ff d0 call *%eax 10c0c4: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10c0c7: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c0cb: 74 19 je 10c0e6 <_rename_r+0x186> rtems_filesystem_freenode( &old_parent_loc ); 10c0cd: 8b 45 c4 mov -0x3c(%ebp),%eax 10c0d0: 85 c0 test %eax,%eax 10c0d2: 74 12 je 10c0e6 <_rename_r+0x186> <== NEVER TAKEN 10c0d4: 8b 40 1c mov 0x1c(%eax),%eax 10c0d7: 85 c0 test %eax,%eax 10c0d9: 74 0b je 10c0e6 <_rename_r+0x186> <== NEVER TAKEN 10c0db: 83 ec 0c sub $0xc,%esp 10c0de: ff 75 94 pushl -0x6c(%ebp) 10c0e1: ff d0 call *%eax 10c0e3: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c0e6: 8b 45 d8 mov -0x28(%ebp),%eax 10c0e9: 85 c0 test %eax,%eax 10c0eb: 74 10 je 10c0fd <_rename_r+0x19d> <== NEVER TAKEN 10c0ed: 8b 40 1c mov 0x1c(%eax),%eax 10c0f0: 85 c0 test %eax,%eax 10c0f2: 74 09 je 10c0fd <_rename_r+0x19d> <== NEVER TAKEN 10c0f4: 83 ec 0c sub $0xc,%esp 10c0f7: 57 push %edi 10c0f8: ff d0 call *%eax 10c0fa: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 10c0fd: e8 26 c0 00 00 call 118128 <__errno> 10c102: c7 00 12 00 00 00 movl $0x12,(%eax) 10c108: be ff ff ff ff mov $0xffffffff,%esi if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 10c10d: 89 f0 mov %esi,%eax 10c10f: 8d 65 f4 lea -0xc(%ebp),%esp 10c112: 5b pop %ebx 10c113: 5e pop %esi 10c114: 5f pop %edi 10c115: c9 leave 10c116: c3 ret 10c117: 90 nop 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 ) 10c118: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c11c: 0f 85 f5 00 00 00 jne 10c217 <_rename_r+0x2b7> <== ALWAYS TAKEN 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 ); rtems_filesystem_freenode( &old_loc ); 10c122: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED return result; } 10c127: 89 f0 mov %esi,%eax <== NOT EXECUTED 10c129: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10c12c: 5b pop %ebx <== NOT EXECUTED 10c12d: 5e pop %esi <== NOT EXECUTED 10c12e: 5f pop %edi <== NOT EXECUTED 10c12f: c9 leave <== NOT EXECUTED 10c130: c3 ret <== NOT EXECUTED 10c131: 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, 10c134: 83 ec 0c sub $0xc,%esp 10c137: 6a 00 push $0x0 10c139: 8d 4d b8 lea -0x48(%ebp),%ecx 10c13c: 89 4d 94 mov %ecx,-0x6c(%ebp) 10c13f: 51 push %ecx 10c140: 6a 02 push $0x2 10c142: 50 push %eax 10c143: 53 push %ebx 10c144: 89 45 8c mov %eax,-0x74(%ebp) 10c147: e8 8c e8 ff ff call 10a9d8 RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 10c14c: 83 c4 20 add $0x20,%esp 10c14f: 85 c0 test %eax,%eax 10c151: 8b 55 8c mov -0x74(%ebp),%edx 10c154: 75 cc jne 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c156: c6 45 93 01 movb $0x1,-0x6d(%ebp) 10c15a: e9 39 fe ff ff jmp 10bf98 <_rename_r+0x38> 10c15f: 90 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); if ( result != 0 ) { rtems_filesystem_freenode( &new_parent_loc ); 10c160: 8b 45 b0 mov -0x50(%ebp),%eax 10c163: 85 c0 test %eax,%eax 10c165: 74 10 je 10c177 <_rename_r+0x217> <== NEVER TAKEN 10c167: 8b 40 1c mov 0x1c(%eax),%eax 10c16a: 85 c0 test %eax,%eax 10c16c: 74 09 je 10c177 <_rename_r+0x217> <== NEVER TAKEN 10c16e: 83 ec 0c sub $0xc,%esp 10c171: 53 push %ebx 10c172: ff d0 call *%eax 10c174: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10c177: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c17b: 74 19 je 10c196 <_rename_r+0x236> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10c17d: 8b 45 c4 mov -0x3c(%ebp),%eax 10c180: 85 c0 test %eax,%eax 10c182: 74 12 je 10c196 <_rename_r+0x236> <== NEVER TAKEN 10c184: 8b 40 1c mov 0x1c(%eax),%eax 10c187: 85 c0 test %eax,%eax 10c189: 74 0b je 10c196 <_rename_r+0x236> <== NEVER TAKEN 10c18b: 83 ec 0c sub $0xc,%esp 10c18e: ff 75 94 pushl -0x6c(%ebp) 10c191: ff d0 call *%eax 10c193: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c196: 8b 45 d8 mov -0x28(%ebp),%eax 10c199: 85 c0 test %eax,%eax 10c19b: 74 85 je 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c19d: 8b 40 1c mov 0x1c(%eax),%eax 10c1a0: 85 c0 test %eax,%eax 10c1a2: 0f 84 7a ff ff ff je 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c1a8: 83 ec 0c sub $0xc,%esp 10c1ab: 57 push %edi 10c1ac: ff d0 call *%eax 10c1ae: 83 ce ff or $0xffffffff,%esi 10c1b1: 83 c4 10 add $0x10,%esp 10c1b4: e9 ea fe ff ff jmp 10c0a3 <_rename_r+0x143> 10c1b9: 8d 76 00 lea 0x0(%esi),%esi rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !new_parent_loc.ops->rename_h ) { rtems_filesystem_freenode( &new_parent_loc ); 10c1bc: 8b 42 1c mov 0x1c(%edx),%eax 10c1bf: 85 c0 test %eax,%eax 10c1c1: 74 09 je 10c1cc <_rename_r+0x26c> <== NEVER TAKEN 10c1c3: 83 ec 0c sub $0xc,%esp 10c1c6: 53 push %ebx 10c1c7: ff d0 call *%eax 10c1c9: 83 c4 10 add $0x10,%esp if ( free_old_parentloc ) 10c1cc: 80 7d 93 00 cmpb $0x0,-0x6d(%ebp) 10c1d0: 74 19 je 10c1eb <_rename_r+0x28b> <== NEVER TAKEN rtems_filesystem_freenode( &old_parent_loc ); 10c1d2: 8b 45 c4 mov -0x3c(%ebp),%eax 10c1d5: 85 c0 test %eax,%eax 10c1d7: 74 12 je 10c1eb <_rename_r+0x28b> <== NEVER TAKEN 10c1d9: 8b 40 1c mov 0x1c(%eax),%eax 10c1dc: 85 c0 test %eax,%eax 10c1de: 74 0b je 10c1eb <_rename_r+0x28b> <== NEVER TAKEN 10c1e0: 83 ec 0c sub $0xc,%esp 10c1e3: ff 75 94 pushl -0x6c(%ebp) 10c1e6: ff d0 call *%eax 10c1e8: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &old_loc ); 10c1eb: 8b 45 d8 mov -0x28(%ebp),%eax 10c1ee: 85 c0 test %eax,%eax 10c1f0: 74 10 je 10c202 <_rename_r+0x2a2> <== NEVER TAKEN 10c1f2: 8b 40 1c mov 0x1c(%eax),%eax 10c1f5: 85 c0 test %eax,%eax 10c1f7: 74 09 je 10c202 <_rename_r+0x2a2> <== NEVER TAKEN 10c1f9: 83 ec 0c sub $0xc,%esp 10c1fc: 57 push %edi 10c1fd: ff d0 call *%eax 10c1ff: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c202: e8 21 bf 00 00 call 118128 <__errno> 10c207: c7 00 86 00 00 00 movl $0x86,(%eax) 10c20d: be ff ff ff ff mov $0xffffffff,%esi 10c212: e9 8c fe ff ff jmp 10c0a3 <_rename_r+0x143> 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 ); 10c217: 8b 45 c4 mov -0x3c(%ebp),%eax 10c21a: 85 c0 test %eax,%eax 10c21c: 0f 84 00 ff ff ff je 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c222: 8b 40 1c mov 0x1c(%eax),%eax 10c225: 85 c0 test %eax,%eax 10c227: 0f 84 f5 fe ff ff je 10c122 <_rename_r+0x1c2> <== NEVER TAKEN 10c22d: 83 ec 0c sub $0xc,%esp 10c230: ff 75 94 pushl -0x6c(%ebp) 10c233: ff d0 call *%eax 10c235: 83 ce ff or $0xffffffff,%esi 10c238: 83 c4 10 add $0x10,%esp 10c23b: e9 63 fe ff ff jmp 10c0a3 <_rename_r+0x143> =============================================================================== 0010a670 <_stat_r>: int _STAT_R_NAME( struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { 10a670: 55 push %ebp <== NOT EXECUTED 10a671: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a673: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a676: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED return _STAT_NAME( path, buf ); 10a679: 8b 55 10 mov 0x10(%ebp),%edx <== NOT EXECUTED 10a67c: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 10a67f: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 10a682: c9 leave <== NOT EXECUTED struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 10a683: e9 18 ff ff ff jmp 10a5a0 <== NOT EXECUTED =============================================================================== 00114350 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { 114350: 55 push %ebp <== NOT EXECUTED 114351: 89 e5 mov %esp,%ebp <== NOT EXECUTED 114353: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED return unlink( path ); 114356: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 114359: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } 11435c: c9 leave <== NOT EXECUTED int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 11435d: e9 fa fd ff ff jmp 11415c <== NOT EXECUTED =============================================================================== 00109bf4 : int access( const char *path, int amode ) { 109bf4: 55 push %ebp 109bf5: 89 e5 mov %esp,%ebp 109bf7: 53 push %ebx 109bf8: 83 ec 5c sub $0x5c,%esp 109bfb: 8b 5d 0c mov 0xc(%ebp),%ebx struct stat statbuf; if ( stat(path, &statbuf) ) 109bfe: 8d 45 b0 lea -0x50(%ebp),%eax 109c01: 50 push %eax 109c02: ff 75 08 pushl 0x8(%ebp) 109c05: e8 f2 19 00 00 call 10b5fc 109c0a: 83 c4 10 add $0x10,%esp 109c0d: 85 c0 test %eax,%eax 109c0f: 75 1f jne 109c30 return -1; if ( amode & R_OK ) { 109c11: f6 c3 04 test $0x4,%bl 109c14: 75 12 jne 109c28 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { 109c16: f6 c3 02 test $0x2,%bl 109c19: 75 29 jne 109c44 if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { 109c1b: 83 e3 01 and $0x1,%ebx 109c1e: 75 1c jne 109c3c if ( !( statbuf.st_mode & S_IEXEC ) ) 109c20: 31 c0 xor %eax,%eax return -1; } return 0; } 109c22: 8b 5d fc mov -0x4(%ebp),%ebx 109c25: c9 leave 109c26: c3 ret 109c27: 90 nop if ( stat(path, &statbuf) ) return -1; if ( amode & R_OK ) { if (!( statbuf.st_mode & S_IREAD )) 109c28: f6 45 bd 01 testb $0x1,-0x43(%ebp) 109c2c: 75 e8 jne 109c16 109c2e: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 109c30: b8 ff ff ff ff mov $0xffffffff,%eax return -1; } return 0; } 109c35: 8b 5d fc mov -0x4(%ebp),%ebx 109c38: c9 leave 109c39: c3 ret 109c3a: 66 90 xchg %ax,%ax if ( !( statbuf.st_mode & S_IWRITE ) ) return -1; } if ( amode & X_OK ) { if ( !( statbuf.st_mode & S_IEXEC ) ) 109c3c: f6 45 bc 40 testb $0x40,-0x44(%ebp) 109c40: 75 de jne 109c20 109c42: eb ec jmp 109c30 if (!( statbuf.st_mode & S_IREAD )) return -1; } if ( amode & W_OK ) { if ( !( statbuf.st_mode & S_IWRITE ) ) 109c44: 80 7d bc 00 cmpb $0x0,-0x44(%ebp) 109c48: 78 d1 js 109c1b 109c4a: eb e4 jmp 109c30 =============================================================================== 0010bab8 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 10bab8: 55 push %ebp 10bab9: 89 e5 mov %esp,%ebp 10babb: 57 push %edi 10babc: 56 push %esi 10babd: 53 push %ebx 10babe: 83 ec 1c sub $0x1c,%esp 10bac1: 8b 5d 08 mov 0x8(%ebp),%ebx 10bac4: 8b 75 0c mov 0xc(%ebp),%esi long adjustment; /* * Simple validations */ if ( !delta ) 10bac7: 85 db test %ebx,%ebx 10bac9: 0f 84 f1 00 00 00 je 10bbc0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 10bacf: 8b 53 04 mov 0x4(%ebx),%edx 10bad2: 81 fa 3f 42 0f 00 cmp $0xf423f,%edx 10bad8: 0f 87 e2 00 00 00 ja 10bbc0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 10bade: 85 f6 test %esi,%esi 10bae0: 74 10 je 10baf2 olddelta->tv_sec = 0; 10bae2: c7 06 00 00 00 00 movl $0x0,(%esi) olddelta->tv_usec = 0; 10bae8: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 10baef: 8b 53 04 mov 0x4(%ebx),%edx } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 10baf2: 8b 03 mov (%ebx),%eax 10baf4: 8d 04 80 lea (%eax,%eax,4),%eax 10baf7: 8d 04 80 lea (%eax,%eax,4),%eax 10bafa: 8d 04 80 lea (%eax,%eax,4),%eax 10bafd: 8d 04 80 lea (%eax,%eax,4),%eax 10bb00: 8d 04 80 lea (%eax,%eax,4),%eax 10bb03: 8d 04 80 lea (%eax,%eax,4),%eax 10bb06: c1 e0 06 shl $0x6,%eax adjustment += delta->tv_usec; /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 10bb09: 8d 04 02 lea (%edx,%eax,1),%eax 10bb0c: 3b 05 0c 67 12 00 cmp 0x12670c,%eax 10bb12: 73 0c jae 10bb20 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 10bb14: 31 c0 xor %eax,%eax return 0; } 10bb16: 8d 65 f4 lea -0xc(%ebp),%esp 10bb19: 5b pop %ebx 10bb1a: 5e pop %esi 10bb1b: 5f pop %edi 10bb1c: c9 leave 10bb1d: c3 ret 10bb1e: 66 90 xchg %ax,%ax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bb20: a1 18 aa 12 00 mov 0x12aa18,%eax 10bb25: 40 inc %eax 10bb26: a3 18 aa 12 00 mov %eax,0x12aa18 * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 10bb2b: 83 ec 0c sub $0xc,%esp 10bb2e: 8d 7d e0 lea -0x20(%ebp),%edi 10bb31: 57 push %edi 10bb32: e8 89 17 00 00 call 10d2c0 <_TOD_Get> ts.tv_sec += delta->tv_sec; 10bb37: 8b 03 mov (%ebx),%eax 10bb39: 01 45 e0 add %eax,-0x20(%ebp) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 10bb3c: 8b 43 04 mov 0x4(%ebx),%eax 10bb3f: 8d 04 80 lea (%eax,%eax,4),%eax 10bb42: 8d 04 80 lea (%eax,%eax,4),%eax 10bb45: 8d 04 80 lea (%eax,%eax,4),%eax 10bb48: c1 e0 03 shl $0x3,%eax 10bb4b: 03 45 e4 add -0x1c(%ebp),%eax 10bb4e: 89 45 e4 mov %eax,-0x1c(%ebp) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 10bb51: 83 c4 10 add $0x10,%esp 10bb54: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10bb59: 76 18 jbe 10bb73 10bb5b: 8b 55 e0 mov -0x20(%ebp),%edx 10bb5e: 66 90 xchg %ax,%ax ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 10bb60: 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( 10bb65: 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 ) { 10bb66: 3d ff c9 9a 3b cmp $0x3b9ac9ff,%eax 10bb6b: 77 f3 ja 10bb60 <== NEVER TAKEN 10bb6d: 89 45 e4 mov %eax,-0x1c(%ebp) 10bb70: 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) ) { 10bb73: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10bb78: 77 19 ja 10bb93 <== NEVER TAKEN 10bb7a: 8b 55 e0 mov -0x20(%ebp),%edx 10bb7d: 8d 76 00 lea 0x0(%esi),%esi ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 10bb80: 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( 10bb85: 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) ) { 10bb86: 3d 00 36 65 c4 cmp $0xc4653600,%eax 10bb8b: 76 f3 jbe 10bb80 10bb8d: 89 45 e4 mov %eax,-0x1c(%ebp) 10bb90: 89 55 e0 mov %edx,-0x20(%ebp) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 10bb93: 83 ec 0c sub $0xc,%esp 10bb96: 57 push %edi 10bb97: e8 b0 17 00 00 call 10d34c <_TOD_Set> _Thread_Enable_dispatch(); 10bb9c: e8 73 29 00 00 call 10e514 <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 10bba1: 83 c4 10 add $0x10,%esp 10bba4: 85 f6 test %esi,%esi 10bba6: 0f 84 68 ff ff ff je 10bb14 <== NEVER TAKEN *olddelta = *delta; 10bbac: 8b 03 mov (%ebx),%eax 10bbae: 8b 53 04 mov 0x4(%ebx),%edx 10bbb1: 89 06 mov %eax,(%esi) 10bbb3: 89 56 04 mov %edx,0x4(%esi) 10bbb6: 31 c0 xor %eax,%eax return 0; } 10bbb8: 8d 65 f4 lea -0xc(%ebp),%esp 10bbbb: 5b pop %ebx 10bbbc: 5e pop %esi 10bbbd: 5f pop %edi 10bbbe: c9 leave 10bbbf: 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 ); 10bbc0: e8 47 9e 00 00 call 115a0c <__errno> 10bbc5: c7 00 16 00 00 00 movl $0x16,(%eax) 10bbcb: b8 ff ff ff ff mov $0xffffffff,%eax 10bbd0: e9 41 ff ff ff jmp 10bb16 =============================================================================== 0010836c : ) { register char *cptr; size_t length; MSBUMP(calloc_calls, 1); 10836c: 55 push %ebp 10836d: 89 e5 mov %esp,%ebp 10836f: 57 push %edi 108370: 53 push %ebx 108371: 8b 5d 0c mov 0xc(%ebp),%ebx 108374: ff 05 74 93 12 00 incl 0x129374 length = nelem * elsize; 10837a: 0f af 5d 08 imul 0x8(%ebp),%ebx cptr = malloc( length ); 10837e: 83 ec 0c sub $0xc,%esp 108381: 53 push %ebx 108382: e8 d5 04 00 00 call 10885c 108387: 89 c2 mov %eax,%edx if ( cptr ) 108389: 83 c4 10 add $0x10,%esp 10838c: 85 c0 test %eax,%eax 10838e: 74 08 je 108398 <== NEVER TAKEN memset( cptr, '\0', length ); 108390: 31 c0 xor %eax,%eax 108392: 89 d7 mov %edx,%edi 108394: 89 d9 mov %ebx,%ecx 108396: f3 aa rep stos %al,%es:(%edi) MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 108398: ff 0d 64 93 12 00 decl 0x129364 return cptr; } 10839e: 89 d0 mov %edx,%eax 1083a0: 8d 65 f8 lea -0x8(%ebp),%esp 1083a3: 5b pop %ebx 1083a4: 5f pop %edi 1083a5: c9 leave 1083a6: c3 ret =============================================================================== 001116b0 : #include int chdir( const char *pathname ) { 1116b0: 55 push %ebp 1116b1: 89 e5 mov %esp,%ebp 1116b3: 57 push %edi 1116b4: 56 push %esi 1116b5: 83 ec 20 sub $0x20,%esp 1116b8: 8b 55 08 mov 0x8(%ebp),%edx rtems_filesystem_location_info_t loc; int result; if ( !pathname ) 1116bb: 85 d2 test %edx,%edx 1116bd: 0f 84 9d 00 00 00 je 111760 rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 1116c3: 31 c0 xor %eax,%eax 1116c5: b9 ff ff ff ff mov $0xffffffff,%ecx 1116ca: 89 d7 mov %edx,%edi 1116cc: f2 ae repnz scas %es:(%edi),%al 1116ce: f7 d1 not %ecx 1116d0: 49 dec %ecx 1116d1: 83 ec 0c sub $0xc,%esp 1116d4: 6a 01 push $0x1 1116d6: 8d 75 e4 lea -0x1c(%ebp),%esi 1116d9: 56 push %esi 1116da: 6a 01 push $0x1 1116dc: 51 push %ecx 1116dd: 52 push %edx 1116de: e8 ad 71 ff ff call 108890 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 1116e3: 83 c4 20 add $0x20,%esp 1116e6: 85 c0 test %eax,%eax 1116e8: 75 6a jne 111754 return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 1116ea: 8b 55 f0 mov -0x10(%ebp),%edx 1116ed: 8b 42 10 mov 0x10(%edx),%eax 1116f0: 85 c0 test %eax,%eax 1116f2: 74 45 je 111739 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1116f4: 83 ec 0c sub $0xc,%esp 1116f7: 56 push %esi 1116f8: ff d0 call *%eax 1116fa: 83 c4 10 add $0x10,%esp 1116fd: 48 dec %eax 1116fe: 75 78 jne 111778 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 111700: 8b 3d 84 79 12 00 mov 0x127984,%edi 111706: 8b 47 10 mov 0x10(%edi),%eax 111709: 85 c0 test %eax,%eax 11170b: 74 19 je 111726 <== NEVER TAKEN 11170d: 8b 40 1c mov 0x1c(%eax),%eax 111710: 85 c0 test %eax,%eax 111712: 74 12 je 111726 <== NEVER TAKEN 111714: 83 ec 0c sub $0xc,%esp 111717: 83 c7 04 add $0x4,%edi 11171a: 57 push %edi 11171b: ff d0 call *%eax 11171d: 8b 3d 84 79 12 00 mov 0x127984,%edi 111723: 83 c4 10 add $0x10,%esp rtems_filesystem_current = loc; 111726: 83 c7 04 add $0x4,%edi 111729: b9 05 00 00 00 mov $0x5,%ecx 11172e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 111730: 31 c0 xor %eax,%eax return 0; } 111732: 8d 65 f8 lea -0x8(%ebp),%esp 111735: 5e pop %esi 111736: 5f pop %edi 111737: c9 leave 111738: c3 ret /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 111739: 8b 42 1c mov 0x1c(%edx),%eax 11173c: 85 c0 test %eax,%eax <== NOT EXECUTED 11173e: 74 09 je 111749 <== NOT EXECUTED 111740: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111743: 56 push %esi <== NOT EXECUTED 111744: ff d0 call *%eax <== NOT EXECUTED 111746: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 111749: e8 aa 41 00 00 call 1158f8 <__errno> <== NOT EXECUTED 11174e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 111754: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 111759: 8d 65 f8 lea -0x8(%ebp),%esp 11175c: 5e pop %esi 11175d: 5f pop %edi 11175e: c9 leave 11175f: c3 ret { rtems_filesystem_location_info_t loc; int result; if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 111760: e8 93 41 00 00 call 1158f8 <__errno> 111765: c7 00 0e 00 00 00 movl $0xe,(%eax) 11176b: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( &rtems_filesystem_current ); rtems_filesystem_current = loc; return 0; } 111770: 8d 65 f8 lea -0x8(%ebp),%esp 111773: 5e pop %esi 111774: 5f pop %edi 111775: c9 leave 111776: c3 ret 111777: 90 nop rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 111778: 8b 45 f0 mov -0x10(%ebp),%eax 11177b: 85 c0 test %eax,%eax 11177d: 74 10 je 11178f <== NEVER TAKEN 11177f: 8b 40 1c mov 0x1c(%eax),%eax 111782: 85 c0 test %eax,%eax 111784: 74 09 je 11178f <== NEVER TAKEN 111786: 83 ec 0c sub $0xc,%esp 111789: 56 push %esi 11178a: ff d0 call *%eax 11178c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 11178f: e8 64 41 00 00 call 1158f8 <__errno> 111794: c7 00 14 00 00 00 movl $0x14,(%eax) 11179a: b8 ff ff ff ff mov $0xffffffff,%eax 11179f: eb 91 jmp 111732 =============================================================================== 00109ea4 : int chmod( const char *path, mode_t mode ) { 109ea4: 55 push %ebp 109ea5: 89 e5 mov %esp,%ebp 109ea7: 57 push %edi 109ea8: 56 push %esi 109ea9: 53 push %ebx 109eaa: 83 ec 38 sub $0x38,%esp 109ead: 8b 55 08 mov 0x8(%ebp),%edx int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); 109eb0: 31 c0 xor %eax,%eax 109eb2: b9 ff ff ff ff mov $0xffffffff,%ecx 109eb7: 89 d7 mov %edx,%edi 109eb9: f2 ae repnz scas %es:(%edi),%al 109ebb: f7 d1 not %ecx 109ebd: 49 dec %ecx 109ebe: 6a 01 push $0x1 109ec0: 8d 5d d4 lea -0x2c(%ebp),%ebx 109ec3: 53 push %ebx 109ec4: 6a 00 push $0x0 109ec6: 51 push %ecx 109ec7: 52 push %edx 109ec8: e8 af 02 00 00 call 10a17c if ( status != 0 ) 109ecd: 83 c4 20 add $0x20,%esp 109ed0: 85 c0 test %eax,%eax 109ed2: 75 60 jne 109f34 return -1; if ( !loc.handlers ){ 109ed4: 8b 45 dc mov -0x24(%ebp),%eax 109ed7: 85 c0 test %eax,%eax 109ed9: 74 36 je 109f11 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 109edb: 8b 40 1c mov 0x1c(%eax),%eax 109ede: 85 c0 test %eax,%eax 109ee0: 74 62 je 109f44 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 109ee2: 83 ec 08 sub $0x8,%esp 109ee5: ff 75 0c pushl 0xc(%ebp) 109ee8: 53 push %ebx 109ee9: ff d0 call *%eax 109eeb: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 109eed: 8b 45 e0 mov -0x20(%ebp),%eax 109ef0: 83 c4 10 add $0x10,%esp 109ef3: 85 c0 test %eax,%eax 109ef5: 74 10 je 109f07 <== NEVER TAKEN 109ef7: 8b 40 1c mov 0x1c(%eax),%eax 109efa: 85 c0 test %eax,%eax 109efc: 74 09 je 109f07 <== NEVER TAKEN 109efe: 83 ec 0c sub $0xc,%esp 109f01: 53 push %ebx 109f02: ff d0 call *%eax 109f04: 83 c4 10 add $0x10,%esp return result; } 109f07: 89 f0 mov %esi,%eax 109f09: 8d 65 f4 lea -0xc(%ebp),%esp 109f0c: 5b pop %ebx 109f0d: 5e pop %esi 109f0e: 5f pop %edi 109f0f: c9 leave 109f10: c3 ret status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 109f11: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109f14: 85 c0 test %eax,%eax <== NOT EXECUTED 109f16: 74 10 je 109f28 <== NOT EXECUTED 109f18: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 109f1b: 85 c0 test %eax,%eax <== NOT EXECUTED 109f1d: 74 09 je 109f28 <== NOT EXECUTED 109f1f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109f22: 53 push %ebx <== NOT EXECUTED 109f23: ff d0 call *%eax <== NOT EXECUTED 109f25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 109f28: e8 9f d9 00 00 call 1178cc <__errno> <== NOT EXECUTED 109f2d: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 109f33: 90 nop <== NOT EXECUTED 109f34: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.handlers->fchmod_h)( &loc, mode ); rtems_filesystem_freenode( &loc ); return result; } 109f39: 89 f0 mov %esi,%eax 109f3b: 8d 65 f4 lea -0xc(%ebp),%esp 109f3e: 5b pop %ebx 109f3f: 5e pop %esi 109f40: 5f pop %edi 109f41: c9 leave 109f42: c3 ret 109f43: 90 nop rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 109f44: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109f47: 85 c0 test %eax,%eax <== NOT EXECUTED 109f49: 74 10 je 109f5b <== NOT EXECUTED 109f4b: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 109f4e: 85 c0 test %eax,%eax <== NOT EXECUTED 109f50: 74 09 je 109f5b <== NOT EXECUTED 109f52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109f55: 53 push %ebx <== NOT EXECUTED 109f56: ff d0 call *%eax <== NOT EXECUTED 109f58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109f5b: e8 6c d9 00 00 call 1178cc <__errno> <== NOT EXECUTED 109f60: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109f66: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 109f6b: eb 9a jmp 109f07 <== NOT EXECUTED =============================================================================== 00109f70 : int chown( const char *path, uid_t owner, gid_t group ) { 109f70: 55 push %ebp 109f71: 89 e5 mov %esp,%ebp 109f73: 57 push %edi 109f74: 56 push %esi 109f75: 53 push %ebx 109f76: 83 ec 38 sub $0x38,%esp 109f79: 8b 55 08 mov 0x8(%ebp),%edx 109f7c: 8b 75 0c mov 0xc(%ebp),%esi 109f7f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 109f82: 31 c0 xor %eax,%eax 109f84: b9 ff ff ff ff mov $0xffffffff,%ecx 109f89: 89 d7 mov %edx,%edi 109f8b: f2 ae repnz scas %es:(%edi),%al 109f8d: f7 d1 not %ecx 109f8f: 49 dec %ecx 109f90: 6a 01 push $0x1 109f92: 8d 7d d4 lea -0x2c(%ebp),%edi 109f95: 57 push %edi 109f96: 6a 00 push $0x0 109f98: 51 push %ecx 109f99: 52 push %edx 109f9a: e8 dd 01 00 00 call 10a17c 109f9f: 83 c4 20 add $0x20,%esp 109fa2: 85 c0 test %eax,%eax 109fa4: 75 5a jne 10a000 <== NEVER TAKEN return -1; if ( !loc.ops->chown_h ) { 109fa6: 8b 55 e0 mov -0x20(%ebp),%edx 109fa9: 8b 42 18 mov 0x18(%edx),%eax 109fac: 85 c0 test %eax,%eax 109fae: 74 34 je 109fe4 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 109fb0: 52 push %edx 109fb1: 0f b7 db movzwl %bx,%ebx 109fb4: 53 push %ebx 109fb5: 0f b7 f6 movzwl %si,%esi 109fb8: 56 push %esi 109fb9: 57 push %edi 109fba: ff d0 call *%eax 109fbc: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 109fbe: 8b 45 e0 mov -0x20(%ebp),%eax 109fc1: 83 c4 10 add $0x10,%esp 109fc4: 85 c0 test %eax,%eax 109fc6: 74 10 je 109fd8 <== NEVER TAKEN 109fc8: 8b 40 1c mov 0x1c(%eax),%eax 109fcb: 85 c0 test %eax,%eax 109fcd: 74 09 je 109fd8 <== NEVER TAKEN 109fcf: 83 ec 0c sub $0xc,%esp 109fd2: 57 push %edi 109fd3: ff d0 call *%eax 109fd5: 83 c4 10 add $0x10,%esp return result; } 109fd8: 89 d8 mov %ebx,%eax 109fda: 8d 65 f4 lea -0xc(%ebp),%esp 109fdd: 5b pop %ebx 109fde: 5e pop %esi 109fdf: 5f pop %edi 109fe0: c9 leave 109fe1: c3 ret 109fe2: 66 90 xchg %ax,%ax if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 109fe4: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 109fe7: 85 c0 test %eax,%eax <== NOT EXECUTED 109fe9: 74 09 je 109ff4 <== NOT EXECUTED 109feb: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109fee: 57 push %edi <== NOT EXECUTED 109fef: ff d0 call *%eax <== NOT EXECUTED 109ff1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109ff4: e8 d3 d8 00 00 call 1178cc <__errno> <== NOT EXECUTED 109ff9: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109fff: 90 nop <== NOT EXECUTED 10a000: bb ff ff ff ff mov $0xffffffff,%ebx result = (*loc.ops->chown_h)( &loc, owner, group ); rtems_filesystem_freenode( &loc ); return result; } 10a005: 89 d8 mov %ebx,%eax 10a007: 8d 65 f4 lea -0xc(%ebp),%esp 10a00a: 5b pop %ebx 10a00b: 5e pop %esi 10a00c: 5f pop %edi 10a00d: c9 leave 10a00e: c3 ret =============================================================================== 001085d8 : #include int chroot( const char *pathname ) { 1085d8: 55 push %ebp 1085d9: 89 e5 mov %esp,%ebp 1085db: 57 push %edi 1085dc: 56 push %esi 1085dd: 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) { 1085e0: 81 3d 84 79 12 00 60 cmpl $0x129c60,0x127984 1085e7: 9c 12 00 1085ea: 74 6c je 108658 <== ALWAYS TAKEN rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = chdir(pathname); 1085ec: 83 ec 0c sub $0xc,%esp 1085ef: ff 75 08 pushl 0x8(%ebp) 1085f2: e8 b9 90 00 00 call 1116b0 if (result) { 1085f7: 83 c4 10 add $0x10,%esp 1085fa: 85 c0 test %eax,%eax 1085fc: 75 7e jne 10867c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 1085fe: 83 ec 0c sub $0xc,%esp 108601: 6a 00 push $0x0 108603: 8d 75 e4 lea -0x1c(%ebp),%esi 108606: 56 push %esi 108607: 6a 00 push $0x0 108609: 6a 01 push $0x1 10860b: 68 f1 37 12 00 push $0x1237f1 108610: e8 7b 02 00 00 call 108890 108615: 83 c4 20 add $0x20,%esp 108618: 85 c0 test %eax,%eax 10861a: 75 60 jne 10867c <== 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); 10861c: 8b 3d 84 79 12 00 mov 0x127984,%edi 108622: 8b 47 24 mov 0x24(%edi),%eax 108625: 85 c0 test %eax,%eax 108627: 74 19 je 108642 <== NEVER TAKEN 108629: 8b 40 1c mov 0x1c(%eax),%eax 10862c: 85 c0 test %eax,%eax 10862e: 74 12 je 108642 <== NEVER TAKEN 108630: 83 ec 0c sub $0xc,%esp 108633: 83 c7 18 add $0x18,%edi 108636: 57 push %edi 108637: ff d0 call *%eax 108639: 8b 3d 84 79 12 00 mov 0x127984,%edi 10863f: 83 c4 10 add $0x10,%esp rtems_filesystem_root = loc; 108642: 83 c7 18 add $0x18,%edi 108645: b9 05 00 00 00 mov $0x5,%ecx 10864a: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10864c: 31 c0 xor %eax,%eax return 0; } 10864e: 8d 65 f8 lea -0x8(%ebp),%esp 108651: 5e pop %esi 108652: 5f pop %edi 108653: c9 leave 108654: c3 ret 108655: 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*/ 108658: e8 07 14 00 00 call 109a64 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 10865d: 81 3d 84 79 12 00 60 cmpl $0x129c60,0x127984 108664: 9c 12 00 108667: 75 83 jne 1085ec <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 108669: e8 8a d2 00 00 call 1158f8 <__errno> <== NOT EXECUTED 10866e: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 108674: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108677: eb d5 jmp 10864e <== NOT EXECUTED 108679: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 10867c: e8 77 d2 00 00 call 1158f8 <__errno> <== NOT EXECUTED 108681: 89 c6 mov %eax,%esi <== NOT EXECUTED 108683: e8 70 d2 00 00 call 1158f8 <__errno> <== NOT EXECUTED 108688: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10868a: 89 06 mov %eax,(%esi) <== NOT EXECUTED 10868c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108691: eb bb jmp 10864e <== NOT EXECUTED =============================================================================== 0010ba58 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 10ba58: 55 push %ebp 10ba59: 89 e5 mov %esp,%ebp 10ba5b: 83 ec 08 sub $0x8,%esp 10ba5e: 8b 45 08 mov 0x8(%ebp),%eax 10ba61: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10ba64: 85 d2 test %edx,%edx 10ba66: 74 14 je 10ba7c rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10ba68: 83 f8 01 cmp $0x1,%eax 10ba6b: 74 47 je 10bab4 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 10ba6d: 83 f8 04 cmp $0x4,%eax 10ba70: 74 32 je 10baa4 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 10ba72: 83 f8 02 cmp $0x2,%eax 10ba75: 74 2d je 10baa4 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 10ba77: 83 f8 03 cmp $0x3,%eax 10ba7a: 74 14 je 10ba90 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10ba7c: e8 27 a4 00 00 call 115ea8 <__errno> 10ba81: c7 00 16 00 00 00 movl $0x16,(%eax) 10ba87: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10ba8c: c9 leave 10ba8d: c3 ret 10ba8e: 66 90 xchg %ax,%ax } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 10ba90: e8 13 a4 00 00 call 115ea8 <__errno> 10ba95: c7 00 58 00 00 00 movl $0x58,(%eax) 10ba9b: b8 ff ff ff ff mov $0xffffffff,%eax #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10baa0: c9 leave 10baa1: c3 ret 10baa2: 66 90 xchg %ax,%ax } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 10baa4: 83 ec 0c sub $0xc,%esp 10baa7: 52 push %edx 10baa8: e8 9f 1e 00 00 call 10d94c <_TOD_Get_uptime_as_timespec> 10baad: 31 c0 xor %eax,%eax return 0; 10baaf: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10bab2: c9 leave 10bab3: c3 ret { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 10bab4: 83 ec 0c sub $0xc,%esp 10bab7: 52 push %edx 10bab8: e8 37 1e 00 00 call 10d8f4 <_TOD_Get> 10babd: 31 c0 xor %eax,%eax return 0; 10babf: 83 c4 10 add $0x10,%esp #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10bac2: c9 leave 10bac3: c3 ret =============================================================================== 0010bac4 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 10bac4: 55 push %ebp 10bac5: 89 e5 mov %esp,%ebp 10bac7: 83 ec 08 sub $0x8,%esp 10baca: 8b 45 08 mov 0x8(%ebp),%eax 10bacd: 8b 55 0c mov 0xc(%ebp),%edx if ( !tp ) 10bad0: 85 d2 test %edx,%edx 10bad2: 74 0f je 10bae3 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 10bad4: 83 f8 01 cmp $0x1,%eax 10bad7: 74 1f je 10baf8 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 10bad9: 83 f8 02 cmp $0x2,%eax 10badc: 74 42 je 10bb20 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 10bade: 83 f8 03 cmp $0x3,%eax 10bae1: 74 3d je 10bb20 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 10bae3: e8 c0 a3 00 00 call 115ea8 <__errno> 10bae8: c7 00 16 00 00 00 movl $0x16,(%eax) 10baee: b8 ff ff ff ff mov $0xffffffff,%eax return 0; } 10baf3: c9 leave 10baf4: c3 ret 10baf5: 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 ) 10baf8: 81 3a ff e4 da 21 cmpl $0x21dae4ff,(%edx) 10bafe: 76 e3 jbe 10bae3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bb00: a1 38 b3 12 00 mov 0x12b338,%eax 10bb05: 40 inc %eax 10bb06: a3 38 b3 12 00 mov %eax,0x12b338 rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 10bb0b: 83 ec 0c sub $0xc,%esp 10bb0e: 52 push %edx 10bb0f: e8 90 1e 00 00 call 10d9a4 <_TOD_Set> _Thread_Enable_dispatch(); 10bb14: e8 53 30 00 00 call 10eb6c <_Thread_Enable_dispatch> 10bb19: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 10bb1b: 83 c4 10 add $0x10,%esp } 10bb1e: c9 leave 10bb1f: 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 ); 10bb20: e8 83 a3 00 00 call 115ea8 <__errno> 10bb25: c7 00 58 00 00 00 movl $0x58,(%eax) 10bb2b: b8 ff ff ff ff mov $0xffffffff,%eax #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 10bb30: c9 leave 10bb31: c3 ret =============================================================================== 00110b58 : #include int close( int fd ) { 110b58: 55 push %ebp 110b59: 89 e5 mov %esp,%ebp 110b5b: 56 push %esi 110b5c: 53 push %ebx 110b5d: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); 110b60: 3b 1d 0c 52 12 00 cmp 0x12520c,%ebx 110b66: 73 58 jae 110bc0 iop = rtems_libio_iop(fd); 110b68: c1 e3 06 shl $0x6,%ebx 110b6b: 03 1d 40 93 12 00 add 0x129340,%ebx rtems_libio_check_is_open(iop); 110b71: f6 43 15 01 testb $0x1,0x15(%ebx) 110b75: 74 49 je 110bc0 rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 110b77: 8b 43 3c mov 0x3c(%ebx),%eax 110b7a: 8b 40 04 mov 0x4(%eax),%eax 110b7d: 85 c0 test %eax,%eax 110b7f: 74 3b je 110bbc <== NEVER TAKEN rc = (*iop->handlers->close_h)( iop ); 110b81: 83 ec 0c sub $0xc,%esp 110b84: 53 push %ebx 110b85: ff d0 call *%eax 110b87: 89 c6 mov %eax,%esi 110b89: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &iop->pathinfo ); 110b8c: 8b 43 24 mov 0x24(%ebx),%eax 110b8f: 85 c0 test %eax,%eax 110b91: 74 13 je 110ba6 <== NEVER TAKEN 110b93: 8b 40 1c mov 0x1c(%eax),%eax 110b96: 85 c0 test %eax,%eax 110b98: 74 0c je 110ba6 110b9a: 83 ec 0c sub $0xc,%esp 110b9d: 8d 53 18 lea 0x18(%ebx),%edx 110ba0: 52 push %edx 110ba1: ff d0 call *%eax 110ba3: 83 c4 10 add $0x10,%esp rtems_libio_free( iop ); 110ba6: 83 ec 0c sub $0xc,%esp 110ba9: 53 push %ebx 110baa: e8 41 02 00 00 call 110df0 return rc; 110baf: 83 c4 10 add $0x10,%esp } 110bb2: 89 f0 mov %esi,%eax 110bb4: 8d 65 f8 lea -0x8(%ebp),%esp 110bb7: 5b pop %ebx 110bb8: 5e pop %esi 110bb9: c9 leave 110bba: c3 ret 110bbb: 90 nop rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); rc = RTEMS_SUCCESSFUL; if ( iop->handlers->close_h ) 110bbc: 31 f6 xor %esi,%esi 110bbe: eb cc jmp 110b8c <== NOT EXECUTED rtems_libio_t *iop; rtems_status_code rc; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 110bc0: e8 a3 44 00 00 call 115068 <__errno> 110bc5: c7 00 09 00 00 00 movl $0x9,(%eax) 110bcb: be ff ff ff ff mov $0xffffffff,%esi 110bd0: eb e0 jmp 110bb2 =============================================================================== 0010f030 : #include "devfs.h" int devFS_close( rtems_libio_t *iop ) { 10f030: 55 push %ebp 10f031: 89 e5 mov %esp,%ebp 10f033: 83 ec 1c sub $0x1c,%esp 10f036: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 10f039: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 10f03c: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 10f03f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 10f046: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 10f04d: 8d 55 ec lea -0x14(%ebp),%edx 10f050: 52 push %edx 10f051: ff 70 0c pushl 0xc(%eax) 10f054: ff 70 08 pushl 0x8(%eax) 10f057: e8 90 12 00 00 call 1102ec np->major, np->minor, (void *) &args ); if ( status ) { 10f05c: 83 c4 10 add $0x10,%esp 10f05f: 85 c0 test %eax,%eax 10f061: 75 05 jne 10f068 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 10f063: c9 leave 10f064: c3 ret 10f065: 8d 76 00 lea 0x0(%esi),%esi np->major, np->minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 10f068: 83 ec 0c sub $0xc,%esp 10f06b: 50 push %eax 10f06c: e8 e7 00 00 00 call 10f158 10f071: 83 c4 10 add $0x10,%esp } return 0; } 10f074: c9 leave 10f075: c3 ret <== NOT EXECUTED =============================================================================== 0010f088 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 10f088: 55 push %ebp 10f089: 89 e5 mov %esp,%ebp 10f08b: 57 push %edi 10f08c: 56 push %esi 10f08d: 53 push %ebx 10f08e: 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 ) ) 10f091: f7 45 10 f8 ff ff ff testl $0xfffffff8,0x10(%ebp) 10f098: 0f 85 96 00 00 00 jne 10f134 <== 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; 10f09e: 8b 45 14 mov 0x14(%ebp),%eax 10f0a1: 8b 00 mov (%eax),%eax 10f0a3: 89 45 e4 mov %eax,-0x1c(%ebp) if (!device_name_table) 10f0a6: 85 c0 test %eax,%eax 10f0a8: 0f 84 98 00 00 00 je 10f146 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 10f0ae: 8b 15 90 0d 12 00 mov 0x120d90,%edx 10f0b4: 89 55 e0 mov %edx,-0x20(%ebp) 10f0b7: 85 d2 test %edx,%edx 10f0b9: 74 38 je 10f0f3 <== 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; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 10f0bb: 31 c0 xor %eax,%eax 10f0bd: 31 db xor %ebx,%ebx for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 10f0bf: 8d 04 80 lea (%eax,%eax,4),%eax 10f0c2: 8b 55 e4 mov -0x1c(%ebp),%edx 10f0c5: 8d 3c 82 lea (%edx,%eax,4),%edi 10f0c8: 8b 37 mov (%edi),%esi 10f0ca: 85 f6 test %esi,%esi 10f0cc: 74 1d je 10f0eb continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 10f0ce: 50 push %eax 10f0cf: ff 75 0c pushl 0xc(%ebp) 10f0d2: 56 push %esi 10f0d3: ff 75 08 pushl 0x8(%ebp) 10f0d6: e8 41 30 00 00 call 11211c 10f0db: 83 c4 10 add $0x10,%esp 10f0de: 85 c0 test %eax,%eax 10f0e0: 75 09 jne 10f0eb <== NEVER TAKEN continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 10f0e2: 8b 45 0c mov 0xc(%ebp),%eax 10f0e5: 80 3c 06 00 cmpb $0x0,(%esi,%eax,1) 10f0e9: 74 21 je 10f10c <== 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++) { 10f0eb: 43 inc %ebx 10f0ec: 89 d8 mov %ebx,%eax 10f0ee: 39 5d e0 cmp %ebx,-0x20(%ebp) 10f0f1: 77 cc ja 10f0bf pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 10f0f3: e8 68 24 00 00 call 111560 <__errno> 10f0f8: c7 00 02 00 00 00 movl $0x2,(%eax) 10f0fe: b8 ff ff ff ff mov $0xffffffff,%eax } 10f103: 8d 65 f4 lea -0xc(%ebp),%esp 10f106: 5b pop %ebx 10f107: 5e pop %esi 10f108: 5f pop %edi 10f109: c9 leave 10f10a: c3 ret 10f10b: 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]; 10f10c: 8b 55 14 mov 0x14(%ebp),%edx 10f10f: 89 3a mov %edi,(%edx) pathloc->handlers = &devFS_file_handlers; 10f111: c7 42 08 c0 2c 12 00 movl $0x122cc0,0x8(%edx) pathloc->ops = &devFS_ops; 10f118: c7 42 0c 60 2c 12 00 movl $0x122c60,0xc(%edx) pathloc->mt_entry = rtems_filesystem_root.mt_entry; 10f11f: a1 18 2d 12 00 mov 0x122d18,%eax 10f124: 8b 40 28 mov 0x28(%eax),%eax 10f127: 89 42 10 mov %eax,0x10(%edx) 10f12a: 31 c0 xor %eax,%eax return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); } 10f12c: 8d 65 f4 lea -0xc(%ebp),%esp 10f12f: 5b pop %ebx 10f130: 5e pop %esi 10f131: 5f pop %edi 10f132: c9 leave 10f133: 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 ); 10f134: e8 27 24 00 00 call 111560 <__errno> <== NOT EXECUTED 10f139: c7 00 01 00 00 00 movl $0x1,(%eax) <== NOT EXECUTED 10f13f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10f144: eb e6 jmp 10f12c <== 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 ); 10f146: e8 15 24 00 00 call 111560 <__errno> <== NOT EXECUTED 10f14b: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10f151: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 10f154: eb d6 jmp 10f12c <== NOT EXECUTED =============================================================================== 00107b8c : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 107b8c: 55 push %ebp 107b8d: 89 e5 mov %esp,%ebp 107b8f: 57 push %edi 107b90: 53 push %ebx 107b91: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 107b94: 83 ec 0c sub $0xc,%esp 107b97: a1 90 0d 12 00 mov 0x120d90,%eax 107b9c: 8d 04 80 lea (%eax,%eax,4),%eax 107b9f: c1 e0 02 shl $0x2,%eax 107ba2: 50 push %eax 107ba3: e8 f8 6f 00 00 call 10eba0 <_Workspace_Allocate> 107ba8: 89 c2 mov %eax,%edx sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 107baa: 83 c4 10 add $0x10,%esp 107bad: 85 c0 test %eax,%eax 107baf: 74 2b je 107bdc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); memset( 107bb1: a1 90 0d 12 00 mov 0x120d90,%eax 107bb6: 8d 0c 80 lea (%eax,%eax,4),%ecx 107bb9: c1 e1 02 shl $0x2,%ecx 107bbc: 31 c0 xor %eax,%eax 107bbe: 89 d7 mov %edx,%edi 107bc0: f3 aa rep stos %al,%es:(%edi) device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 107bc2: c7 43 24 c0 2c 12 00 movl $0x122cc0,0x24(%ebx) temp_mt_entry->mt_fs_root.ops = &devFS_ops; 107bc9: c7 43 28 60 2c 12 00 movl $0x122c60,0x28(%ebx) /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 107bd0: 89 53 1c mov %edx,0x1c(%ebx) 107bd3: 31 c0 xor %eax,%eax return 0; } 107bd5: 8d 65 f8 lea -0x8(%ebp),%esp 107bd8: 5b pop %ebx 107bd9: 5f pop %edi 107bda: c9 leave 107bdb: c3 ret sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) rtems_set_errno_and_return_minus_one( ENOMEM ); 107bdc: e8 7f 99 00 00 call 111560 <__errno> <== NOT EXECUTED 107be1: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107be7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107bec: eb e7 jmp 107bd5 <== NOT EXECUTED =============================================================================== 00107d48 : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 107d48: 55 push %ebp 107d49: 89 e5 mov %esp,%ebp 107d4b: 83 ec 1c sub $0x1c,%esp 107d4e: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107d51: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 107d54: 89 55 e8 mov %edx,-0x18(%ebp) args.command = command; 107d57: 8b 55 0c mov 0xc(%ebp),%edx 107d5a: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 107d5d: 8b 55 10 mov 0x10(%ebp),%edx 107d60: 89 55 f0 mov %edx,-0x10(%ebp) status = rtems_io_control( 107d63: 8d 55 e8 lea -0x18(%ebp),%edx 107d66: 52 push %edx 107d67: ff 70 0c pushl 0xc(%eax) 107d6a: ff 70 08 pushl 0x8(%eax) 107d6d: e8 4a 42 00 00 call 10bfbc np->major, np->minor, (void *) &args ); if ( status ) 107d72: 83 c4 10 add $0x10,%esp 107d75: 85 c0 test %eax,%eax 107d77: 75 07 jne 107d80 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 107d79: 8b 45 f4 mov -0xc(%ebp),%eax } 107d7c: c9 leave 107d7d: c3 ret 107d7e: 66 90 xchg %ax,%ax np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107d80: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107d83: 50 push %eax <== NOT EXECUTED 107d84: e8 cf 73 00 00 call 10f158 <== NOT EXECUTED 107d89: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 107d8c: c9 leave <== NOT EXECUTED 107d8d: c3 ret <== NOT EXECUTED =============================================================================== 00107bf0 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 107bf0: 55 push %ebp 107bf1: 89 e5 mov %esp,%ebp 107bf3: 57 push %edi 107bf4: 56 push %esi 107bf5: 53 push %ebx 107bf6: 83 ec 1c sub $0x1c,%esp 107bf9: 8b 7d 08 mov 0x8(%ebp),%edi 107bfc: 8b 4d 10 mov 0x10(%ebp),%ecx 107bff: 8b 55 14 mov 0x14(%ebp),%edx * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107c02: 80 3f 64 cmpb $0x64,(%edi) 107c05: 0f 84 dd 00 00 00 je 107ce8 <== ALWAYS TAKEN (path[2] == 'v') && (path[3] == '\0')) return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 107c0b: 8b 45 0c mov 0xc(%ebp),%eax 107c0e: 25 00 f0 00 00 and $0xf000,%eax 107c13: 3d 00 60 00 00 cmp $0x6000,%eax 107c18: 74 0b je 107c25 <== NEVER TAKEN 107c1a: 3d 00 20 00 00 cmp $0x2000,%eax 107c1f: 0f 85 e3 00 00 00 jne 107d08 <== NEVER TAKEN ) { union __rtems_dev_t temp; temp.device = device; return temp.__overlay.major; 107c25: 89 4d d8 mov %ecx,-0x28(%ebp) dev_t device ) { union __rtems_dev_t temp; temp.device = device; 107c28: 89 55 dc mov %edx,-0x24(%ebp) rtems_set_errno_and_return_minus_one( EINVAL ); else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 107c2b: 8b 45 18 mov 0x18(%ebp),%eax 107c2e: 8b 30 mov (%eax),%esi if (!device_name_table) 107c30: 85 f6 test %esi,%esi 107c32: 0f 84 f2 00 00 00 je 107d2a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c38: 8b 15 90 0d 12 00 mov 0x120d90,%edx 107c3e: 85 d2 test %edx,%edx 107c40: 0f 84 d4 00 00 00 je 107d1a <== NEVER TAKEN rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107c46: 31 c0 xor %eax,%eax 107c48: c7 45 e0 ff ff ff ff movl $0xffffffff,-0x20(%ebp) 107c4f: 31 db xor %ebx,%ebx 107c51: 89 7d e4 mov %edi,-0x1c(%ebp) 107c54: 89 d7 mov %edx,%edi 107c56: eb 1a jmp 107c72 for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 107c58: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107c5b: 50 push %eax <== NOT EXECUTED 107c5c: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 107c5f: e8 88 a3 00 00 call 111fec <== NOT EXECUTED 107c64: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107c67: 85 c0 test %eax,%eax <== NOT EXECUTED 107c69: 74 65 je 107cd0 <== NOT EXECUTED /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c6b: 43 inc %ebx <== NOT EXECUTED 107c6c: 89 d8 mov %ebx,%eax <== NOT EXECUTED 107c6e: 39 fb cmp %edi,%ebx <== NOT EXECUTED 107c70: 73 16 jae 107c88 <== NOT EXECUTED if (device_name_table[i].device_name == NULL) 107c72: 8d 04 80 lea (%eax,%eax,4),%eax 107c75: 8b 04 86 mov (%esi,%eax,4),%eax 107c78: 85 c0 test %eax,%eax 107c7a: 75 dc jne 107c58 <== NEVER TAKEN slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107c7c: 89 5d e0 mov %ebx,-0x20(%ebp) /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 107c7f: 43 inc %ebx 107c80: 89 d8 mov %ebx,%eax 107c82: 39 fb cmp %edi,%ebx 107c84: 72 ec jb 107c72 107c86: 66 90 xchg %ax,%ax 107c88: 8b 7d e4 mov -0x1c(%ebp),%edi else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 107c8b: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp) 107c8f: 0f 84 85 00 00 00 je 107d1a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); 107c95: 9c pushf 107c96: fa cli 107c97: 5b pop %ebx device_name_table[slot].device_name = (char *)path; 107c98: 8b 55 e0 mov -0x20(%ebp),%edx 107c9b: 8d 04 92 lea (%edx,%edx,4),%eax 107c9e: 8d 14 86 lea (%esi,%eax,4),%edx 107ca1: 89 3a mov %edi,(%edx) device_name_table[slot].device_name_length = strlen(path); 107ca3: 31 c0 xor %eax,%eax 107ca5: b9 ff ff ff ff mov $0xffffffff,%ecx 107caa: f2 ae repnz scas %es:(%edi),%al 107cac: f7 d1 not %ecx 107cae: 49 dec %ecx 107caf: 89 4a 04 mov %ecx,0x4(%edx) device_name_table[slot].major = major; 107cb2: 8b 45 d8 mov -0x28(%ebp),%eax 107cb5: 89 42 08 mov %eax,0x8(%edx) device_name_table[slot].minor = minor; 107cb8: 8b 45 dc mov -0x24(%ebp),%eax 107cbb: 89 42 0c mov %eax,0xc(%edx) device_name_table[slot].mode = mode; 107cbe: 8b 45 0c mov 0xc(%ebp),%eax 107cc1: 89 42 10 mov %eax,0x10(%edx) _ISR_Enable(level); 107cc4: 53 push %ebx 107cc5: 9d popf 107cc6: 31 c0 xor %eax,%eax return 0; } 107cc8: 8d 65 f4 lea -0xc(%ebp),%esp 107ccb: 5b pop %ebx 107ccc: 5e pop %esi 107ccd: 5f pop %edi 107cce: c9 leave 107ccf: c3 ret for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); 107cd0: e8 8b 98 00 00 call 111560 <__errno> <== NOT EXECUTED 107cd5: c7 00 11 00 00 00 movl $0x11,(%eax) <== NOT EXECUTED 107cdb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } 107ce0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 107ce3: 5b pop %ebx <== NOT EXECUTED 107ce4: 5e pop %esi <== NOT EXECUTED 107ce5: 5f pop %edi <== NOT EXECUTED 107ce6: c9 leave <== NOT EXECUTED 107ce7: c3 ret <== NOT EXECUTED * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 107ce8: 80 7f 01 65 cmpb $0x65,0x1(%edi) 107cec: 0f 85 19 ff ff ff jne 107c0b <== NEVER TAKEN (path[2] == 'v') && (path[3] == '\0')) 107cf2: 80 7f 02 76 cmpb $0x76,0x2(%edi) 107cf6: 0f 85 0f ff ff ff jne 107c0b <== NEVER TAKEN 107cfc: 80 7f 03 00 cmpb $0x0,0x3(%edi) 107d00: 0f 85 05 ff ff ff jne 107c0b 107d06: eb be jmp 107cc6 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) rtems_set_errno_and_return_minus_one( EINVAL ); 107d08: e8 53 98 00 00 call 111560 <__errno> <== NOT EXECUTED 107d0d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 107d13: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107d18: eb ae jmp 107cc8 <== NOT EXECUTED if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); 107d1a: e8 41 98 00 00 call 111560 <__errno> <== NOT EXECUTED 107d1f: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 107d25: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d28: eb 9e jmp 107cc8 <== NOT EXECUTED rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 107d2a: e8 31 98 00 00 call 111560 <__errno> <== NOT EXECUTED 107d2f: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107d35: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 107d38: eb 8e jmp 107cc8 <== NOT EXECUTED =============================================================================== 00107d90 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 107d90: 55 push %ebp 107d91: 89 e5 mov %esp,%ebp 107d93: 83 ec 1c sub $0x1c,%esp 107d96: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107d99: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107d9c: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 107d9f: 8b 40 14 mov 0x14(%eax),%eax 107da2: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 107da5: 8b 45 14 mov 0x14(%ebp),%eax 107da8: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 107dab: 8d 45 ec lea -0x14(%ebp),%eax 107dae: 50 push %eax 107daf: ff 72 0c pushl 0xc(%edx) 107db2: ff 72 08 pushl 0x8(%edx) 107db5: e8 16 43 00 00 call 10c0d0 np->major, np->minor, (void *) &args ); if ( status ) 107dba: 83 c4 10 add $0x10,%esp 107dbd: 85 c0 test %eax,%eax 107dbf: 75 03 jne 107dc4 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 107dc1: c9 leave 107dc2: c3 ret 107dc3: 90 nop np->major, np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107dc4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107dc7: 50 push %eax <== NOT EXECUTED 107dc8: e8 8b 73 00 00 call 10f158 <== NOT EXECUTED 107dcd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 107dd0: c9 leave <== NOT EXECUTED 107dd1: c3 ret <== NOT EXECUTED =============================================================================== 00107dd4 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 107dd4: 55 push %ebp <== NOT EXECUTED 107dd5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107dd7: 53 push %ebx <== NOT EXECUTED 107dd8: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 107ddb: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107dde: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 107de1: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 107de4: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 107de7: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 107dea: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 107ded: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 107df0: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 107df3: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 107df6: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 107df9: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 107dfc: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 107dff: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 107e02: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 107e09: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 107e0c: 50 push %eax <== NOT EXECUTED 107e0d: ff 72 0c pushl 0xc(%edx) <== NOT EXECUTED 107e10: ff 72 08 pushl 0x8(%edx) <== NOT EXECUTED 107e13: e8 04 43 00 00 call 10c11c <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 107e18: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 107e1b: 85 c0 test %eax,%eax <== NOT EXECUTED 107e1d: 75 09 jne 107e28 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107e1f: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 107e22: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e25: c9 leave <== NOT EXECUTED 107e26: c3 ret <== NOT EXECUTED 107e27: 90 nop <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107e28: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107e2b: 50 push %eax <== NOT EXECUTED 107e2c: e8 27 73 00 00 call 10f158 <== NOT EXECUTED 107e31: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107e34: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107e37: c9 leave <== NOT EXECUTED 107e38: c3 ret <== NOT EXECUTED =============================================================================== 00107e3c : int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 107e3c: 55 push %ebp 107e3d: 89 e5 mov %esp,%ebp 107e3f: 53 push %ebx 107e40: 83 ec 04 sub $0x4,%esp 107e43: 8b 55 0c mov 0xc(%ebp),%edx rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 107e46: 8b 45 08 mov 0x8(%ebp),%eax 107e49: 8b 00 mov (%eax),%eax if (!the_dev) 107e4b: 85 c0 test %eax,%eax 107e4d: 74 18 je 107e67 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 107e4f: 8b 48 0c mov 0xc(%eax),%ecx rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 107e52: 8b 58 08 mov 0x8(%eax),%ebx 107e55: 89 5a 18 mov %ebx,0x18(%edx) 107e58: 89 4a 1c mov %ecx,0x1c(%edx) buf->st_mode = the_dev->mode; 107e5b: 8b 40 10 mov 0x10(%eax),%eax 107e5e: 89 42 0c mov %eax,0xc(%edx) 107e61: 31 c0 xor %eax,%eax return 0; } 107e63: 5a pop %edx 107e64: 5b pop %ebx 107e65: c9 leave 107e66: c3 ret { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) rtems_set_errno_and_return_minus_one( EFAULT ); 107e67: e8 f4 96 00 00 call 111560 <__errno> <== NOT EXECUTED 107e6c: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 107e72: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 107e77: eb ea jmp 107e63 <== NOT EXECUTED =============================================================================== 00107e7c : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 107e7c: 55 push %ebp 107e7d: 89 e5 mov %esp,%ebp 107e7f: 53 push %ebx 107e80: 83 ec 28 sub $0x28,%esp 107e83: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->file_info; 107e86: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 107e89: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 107e8c: 8b 48 0c mov 0xc(%eax),%ecx 107e8f: 8b 58 10 mov 0x10(%eax),%ebx 107e92: 89 4d e0 mov %ecx,-0x20(%ebp) 107e95: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 107e98: 8b 4d 0c mov 0xc(%ebp),%ecx 107e9b: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 107e9e: 8b 4d 10 mov 0x10(%ebp),%ecx 107ea1: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 107ea4: 8b 40 14 mov 0x14(%eax),%eax 107ea7: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 107eaa: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 107eb1: 8d 45 dc lea -0x24(%ebp),%eax 107eb4: 50 push %eax 107eb5: ff 72 0c pushl 0xc(%edx) 107eb8: ff 72 08 pushl 0x8(%edx) 107ebb: e8 a8 42 00 00 call 10c168 np->major, np->minor, (void *) &args ); if ( status ) 107ec0: 83 c4 10 add $0x10,%esp 107ec3: 85 c0 test %eax,%eax 107ec5: 75 09 jne 107ed0 <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 107ec7: 8b 45 f4 mov -0xc(%ebp),%eax } 107eca: 8b 5d fc mov -0x4(%ebp),%ebx 107ecd: c9 leave 107ece: c3 ret 107ecf: 90 nop np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 107ed0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 107ed3: 50 push %eax <== NOT EXECUTED 107ed4: e8 7f 72 00 00 call 10f158 <== NOT EXECUTED 107ed9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 107edc: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 107edf: c9 leave <== NOT EXECUTED 107ee0: c3 ret <== NOT EXECUTED =============================================================================== 00113bd8 : */ int device_close( rtems_libio_t *iop ) { 113bd8: 55 push %ebp 113bd9: 89 e5 mov %esp,%ebp 113bdb: 83 ec 1c sub $0x1c,%esp 113bde: 8b 55 08 mov 0x8(%ebp),%edx rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113be1: 8b 42 38 mov 0x38(%edx),%eax args.iop = iop; 113be4: 89 55 ec mov %edx,-0x14(%ebp) args.flags = 0; 113be7: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp) args.mode = 0; 113bee: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_close( 113bf5: 8d 55 ec lea -0x14(%ebp),%edx 113bf8: 52 push %edx 113bf9: ff 70 54 pushl 0x54(%eax) 113bfc: ff 70 50 pushl 0x50(%eax) 113bff: e8 60 10 00 00 call 114c64 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 113c04: 83 c4 10 add $0x10,%esp 113c07: 85 c0 test %eax,%eax 113c09: 75 05 jne 113c10 <== NEVER TAKEN return rtems_deviceio_errno(status); } return 0; } 113c0b: c9 leave 113c0c: c3 ret 113c0d: 8d 76 00 lea 0x0(%esi),%esi the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 113c10: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113c13: 50 push %eax <== NOT EXECUTED 113c14: e8 43 13 00 00 call 114f5c <== NOT EXECUTED 113c19: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 113c1c: c9 leave <== NOT EXECUTED 113c1d: c3 ret <== NOT EXECUTED =============================================================================== 00113ac0 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 113ac0: 55 push %ebp 113ac1: 89 e5 mov %esp,%ebp 113ac3: 83 ec 1c sub $0x1c,%esp 113ac6: 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; 113ac9: 89 45 e8 mov %eax,-0x18(%ebp) args.command = command; 113acc: 8b 55 0c mov 0xc(%ebp),%edx 113acf: 89 55 ec mov %edx,-0x14(%ebp) args.buffer = buffer; 113ad2: 8b 55 10 mov 0x10(%ebp),%edx 113ad5: 89 55 f0 mov %edx,-0x10(%ebp) the_jnode = iop->file_info; 113ad8: 8b 40 38 mov 0x38(%eax),%eax status = rtems_io_control( 113adb: 8d 55 e8 lea -0x18(%ebp),%edx 113ade: 52 push %edx 113adf: ff 70 54 pushl 0x54(%eax) 113ae2: ff 70 50 pushl 0x50(%eax) 113ae5: e8 c6 11 00 00 call 114cb0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113aea: 83 c4 10 add $0x10,%esp 113aed: 85 c0 test %eax,%eax 113aef: 75 07 jne 113af8 <== NEVER TAKEN return rtems_deviceio_errno(status); return args.ioctl_return; 113af1: 8b 45 f4 mov -0xc(%ebp),%eax } 113af4: c9 leave 113af5: c3 ret 113af6: 66 90 xchg %ax,%ax the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113af8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113afb: 50 push %eax <== NOT EXECUTED 113afc: e8 5b 14 00 00 call 114f5c <== NOT EXECUTED 113b01: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return args.ioctl_return; } 113b04: c9 leave <== NOT EXECUTED 113b05: c3 ret <== NOT EXECUTED =============================================================================== 00113c20 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113c20: 55 push %ebp 113c21: 89 e5 mov %esp,%ebp 113c23: 83 ec 1c sub $0x1c,%esp 113c26: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113c29: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 113c2c: 89 45 ec mov %eax,-0x14(%ebp) args.flags = iop->flags; 113c2f: 8b 40 14 mov 0x14(%eax),%eax 113c32: 89 45 f0 mov %eax,-0x10(%ebp) args.mode = mode; 113c35: 8b 45 14 mov 0x14(%ebp),%eax 113c38: 89 45 f4 mov %eax,-0xc(%ebp) status = rtems_io_open( 113c3b: 8d 45 ec lea -0x14(%ebp),%eax 113c3e: 50 push %eax 113c3f: ff 72 54 pushl 0x54(%edx) 113c42: ff 72 50 pushl 0x50(%edx) 113c45: e8 b2 10 00 00 call 114cfc the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113c4a: 83 c4 10 add $0x10,%esp 113c4d: 85 c0 test %eax,%eax 113c4f: 75 03 jne 113c54 <== NEVER TAKEN return rtems_deviceio_errno(status); return 0; } 113c51: c9 leave 113c52: c3 ret 113c53: 90 nop the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113c54: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113c57: 50 push %eax <== NOT EXECUTED 113c58: e8 ff 12 00 00 call 114f5c <== NOT EXECUTED 113c5d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; } 113c60: c9 leave <== NOT EXECUTED 113c61: c3 ret <== NOT EXECUTED =============================================================================== 00113b70 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 113b70: 55 push %ebp <== NOT EXECUTED 113b71: 89 e5 mov %esp,%ebp <== NOT EXECUTED 113b73: 53 push %ebx <== NOT EXECUTED 113b74: 83 ec 28 sub $0x28,%esp <== NOT EXECUTED 113b77: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113b7a: 8b 50 38 mov 0x38(%eax),%edx <== NOT EXECUTED args.iop = iop; 113b7d: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED args.offset = iop->offset; 113b80: 8b 48 0c mov 0xc(%eax),%ecx <== NOT EXECUTED 113b83: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 113b86: 89 4d e0 mov %ecx,-0x20(%ebp) <== NOT EXECUTED 113b89: 89 5d e4 mov %ebx,-0x1c(%ebp) <== NOT EXECUTED args.buffer = buffer; 113b8c: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 113b8f: 89 4d e8 mov %ecx,-0x18(%ebp) <== NOT EXECUTED args.count = count; 113b92: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 113b95: 89 4d ec mov %ecx,-0x14(%ebp) <== NOT EXECUTED args.flags = iop->flags; 113b98: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 113b9b: 89 45 f0 mov %eax,-0x10(%ebp) <== NOT EXECUTED args.bytes_moved = 0; 113b9e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) <== NOT EXECUTED status = rtems_io_read( 113ba5: 8d 45 dc lea -0x24(%ebp),%eax <== NOT EXECUTED 113ba8: 50 push %eax <== NOT EXECUTED 113ba9: ff 72 54 pushl 0x54(%edx) <== NOT EXECUTED 113bac: ff 72 50 pushl 0x50(%edx) <== NOT EXECUTED 113baf: e8 94 11 00 00 call 114d48 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113bb4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113bb7: 85 c0 test %eax,%eax <== NOT EXECUTED 113bb9: 75 09 jne 113bc4 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 113bbb: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 113bbe: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113bc1: c9 leave <== NOT EXECUTED 113bc2: c3 ret <== NOT EXECUTED 113bc3: 90 nop <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113bc4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113bc7: 50 push %eax <== NOT EXECUTED 113bc8: e8 8f 13 00 00 call 114f5c <== NOT EXECUTED 113bcd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 113bd0: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113bd3: c9 leave <== NOT EXECUTED 113bd4: c3 ret <== NOT EXECUTED =============================================================================== 00113b08 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 113b08: 55 push %ebp 113b09: 89 e5 mov %esp,%ebp 113b0b: 53 push %ebx 113b0c: 83 ec 28 sub $0x28,%esp 113b0f: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113b12: 8b 50 38 mov 0x38(%eax),%edx args.iop = iop; 113b15: 89 45 dc mov %eax,-0x24(%ebp) args.offset = iop->offset; 113b18: 8b 48 0c mov 0xc(%eax),%ecx 113b1b: 8b 58 10 mov 0x10(%eax),%ebx 113b1e: 89 4d e0 mov %ecx,-0x20(%ebp) 113b21: 89 5d e4 mov %ebx,-0x1c(%ebp) args.buffer = (void *) buffer; 113b24: 8b 4d 0c mov 0xc(%ebp),%ecx 113b27: 89 4d e8 mov %ecx,-0x18(%ebp) args.count = count; 113b2a: 8b 4d 10 mov 0x10(%ebp),%ecx 113b2d: 89 4d ec mov %ecx,-0x14(%ebp) args.flags = iop->flags; 113b30: 8b 40 14 mov 0x14(%eax),%eax 113b33: 89 45 f0 mov %eax,-0x10(%ebp) args.bytes_moved = 0; 113b36: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) status = rtems_io_write( 113b3d: 8d 45 dc lea -0x24(%ebp),%eax 113b40: 50 push %eax 113b41: ff 72 54 pushl 0x54(%edx) 113b44: ff 72 50 pushl 0x50(%edx) 113b47: e8 48 12 00 00 call 114d94 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 113b4c: 83 c4 10 add $0x10,%esp 113b4f: 85 c0 test %eax,%eax 113b51: 75 09 jne 113b5c <== NEVER TAKEN return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 113b53: 8b 45 f4 mov -0xc(%ebp),%eax } 113b56: 8b 5d fc mov -0x4(%ebp),%ebx 113b59: c9 leave 113b5a: c3 ret 113b5b: 90 nop the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 113b5c: 83 ec 0c sub $0xc,%esp 113b5f: 50 push %eax <== NOT EXECUTED 113b60: e8 f7 13 00 00 call 114f5c <== NOT EXECUTED 113b65: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 113b68: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113b6b: c9 leave <== NOT EXECUTED 113b6c: c3 ret <== NOT EXECUTED =============================================================================== 0010a2c4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 10a2c4: 55 push %ebp 10a2c5: 89 e5 mov %esp,%ebp 10a2c7: 53 push %ebx 10a2c8: 83 ec 04 sub $0x4,%esp 10a2cb: 89 c3 mov %eax,%ebx rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 10a2cd: 8b 90 b4 00 00 00 mov 0xb4(%eax),%edx 10a2d3: 85 d2 test %edx,%edx 10a2d5: 74 4d je 10a324 rtems_interrupt_disable (level); 10a2d7: 9c pushf 10a2d8: fa cli 10a2d9: 58 pop %eax while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 10a2da: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 10a2e0: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a2e6: 39 d1 cmp %edx,%ecx 10a2e8: 74 38 je 10a322 10a2ea: 66 90 xchg %ax,%ax tty->rawOutBufState = rob_wait; 10a2ec: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 10a2f3: 00 00 00 rtems_interrupt_enable (level); 10a2f6: 50 push %eax 10a2f7: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 10a2f8: 50 push %eax 10a2f9: 6a 00 push $0x0 10a2fb: 6a 00 push $0x0 10a2fd: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10a303: e8 a0 19 00 00 call 10bca8 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10a308: 83 c4 10 add $0x10,%esp 10a30b: 85 c0 test %eax,%eax 10a30d: 75 1a jne 10a329 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 10a30f: 9c pushf 10a310: fa cli 10a311: 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) { 10a312: 8b 8b 84 00 00 00 mov 0x84(%ebx),%ecx 10a318: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 10a31e: 39 d1 cmp %edx,%ecx 10a320: 75 ca jne 10a2ec <== NEVER TAKEN RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 10a322: 50 push %eax 10a323: 9d popf } } 10a324: 8b 5d fc mov -0x4(%ebp),%ebx 10a327: c9 leave 10a328: c3 ret rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10a329: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a32c: 50 push %eax <== NOT EXECUTED 10a32d: e8 b2 1f 00 00 call 10c2e4 <== NOT EXECUTED =============================================================================== 00108d58 : int dup2( int fildes, int fildes2 ) { 108d58: 55 push %ebp 108d59: 89 e5 mov %esp,%ebp 108d5b: 57 push %edi 108d5c: 56 push %esi 108d5d: 53 push %ebx 108d5e: 83 ec 64 sub $0x64,%esp 108d61: 8b 75 08 mov 0x8(%ebp),%esi 108d64: 8b 7d 0c mov 0xc(%ebp),%edi /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 108d67: 8d 5d a0 lea -0x60(%ebp),%ebx 108d6a: 53 push %ebx 108d6b: 56 push %esi 108d6c: e8 87 05 00 00 call 1092f8 if ( status == -1 ) 108d71: 83 c4 10 add $0x10,%esp 108d74: 40 inc %eax 108d75: 75 0d jne 108d84 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108d77: b8 ff ff ff ff mov $0xffffffff,%eax } 108d7c: 8d 65 f4 lea -0xc(%ebp),%esp 108d7f: 5b pop %ebx 108d80: 5e pop %esi 108d81: 5f pop %edi 108d82: c9 leave 108d83: c3 ret /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 108d84: 83 ec 08 sub $0x8,%esp 108d87: 53 push %ebx 108d88: 57 push %edi 108d89: e8 6a 05 00 00 call 1092f8 if ( status == -1 ) 108d8e: 83 c4 10 add $0x10,%esp 108d91: 40 inc %eax 108d92: 74 e3 je 108d77 <== ALWAYS TAKEN /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 108d94: 50 push %eax 108d95: 57 push %edi 108d96: 6a 00 push $0x0 108d98: 56 push %esi <== NOT EXECUTED 108d99: e8 f6 01 00 00 call 108f94 <== NOT EXECUTED 108d9e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108da1: eb d9 jmp 108d7c <== NOT EXECUTED =============================================================================== 00109e38 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 109e38: 55 push %ebp <== NOT EXECUTED 109e39: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109e3b: 53 push %ebx <== NOT EXECUTED 109e3c: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109e3f: f6 42 3d 02 testb $0x2,0x3d(%edx) <== NOT EXECUTED 109e43: 74 1b je 109e60 <== NOT EXECUTED 109e45: 0f b6 c8 movzbl %al,%ecx <== NOT EXECUTED 109e48: 8b 1d e4 71 12 00 mov 0x1271e4,%ebx <== NOT EXECUTED 109e4e: f6 44 0b 01 20 testb $0x20,0x1(%ebx,%ecx,1) <== NOT EXECUTED 109e53: 74 0b je 109e60 <== NOT EXECUTED 109e55: 3c 09 cmp $0x9,%al <== NOT EXECUTED 109e57: 74 07 je 109e60 <== NOT EXECUTED 109e59: 3c 0a cmp $0xa,%al <== NOT EXECUTED 109e5b: 75 13 jne 109e70 <== NOT EXECUTED 109e5d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 109e60: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109e63: e8 94 fe ff ff call 109cfc <== NOT EXECUTED } } 109e68: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109e6b: c9 leave <== NOT EXECUTED 109e6c: c3 ret <== NOT EXECUTED 109e6d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { char echobuf[2]; echobuf[0] = '^'; 109e70: c6 45 f6 5e movb $0x5e,-0xa(%ebp) <== NOT EXECUTED echobuf[1] = c ^ 0x40; 109e74: 83 f0 40 xor $0x40,%eax <== NOT EXECUTED 109e77: 88 45 f7 mov %al,-0x9(%ebp) <== NOT EXECUTED rtems_termios_puts (echobuf, 2, tty); 109e7a: 50 push %eax <== NOT EXECUTED 109e7b: 52 push %edx <== NOT EXECUTED 109e7c: 6a 02 push $0x2 <== NOT EXECUTED 109e7e: 8d 45 f6 lea -0xa(%ebp),%eax <== NOT EXECUTED 109e81: 50 push %eax <== NOT EXECUTED 109e82: 89 55 e4 mov %edx,-0x1c(%ebp) <== NOT EXECUTED 109e85: e8 3e fd ff ff call 109bc8 <== NOT EXECUTED tty->column += 2; 109e8a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109e8d: 83 42 28 02 addl $0x2,0x28(%edx) <== NOT EXECUTED * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 109e91: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->column += 2; } else { oproc (c, tty); } } 109e94: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109e97: c9 leave <== NOT EXECUTED 109e98: c3 ret <== NOT EXECUTED =============================================================================== 00108730 : fclose(group_fp); group_fp = fopen("/etc/group", "r"); } void endgrent(void) { 108730: 55 push %ebp <== NOT EXECUTED 108731: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108733: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp != NULL) 108736: a1 44 a6 12 00 mov 0x12a644,%eax <== NOT EXECUTED 10873b: 85 c0 test %eax,%eax <== NOT EXECUTED 10873d: 74 0c je 10874b <== NOT EXECUTED fclose(group_fp); 10873f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108742: 50 push %eax <== NOT EXECUTED 108743: e8 2c d4 00 00 call 115b74 <== NOT EXECUTED 108748: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10874b: c9 leave <== NOT EXECUTED 10874c: c3 ret <== NOT EXECUTED =============================================================================== 00108750 : fclose(passwd_fp); passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { 108750: 55 push %ebp <== NOT EXECUTED 108751: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108753: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp != NULL) 108756: a1 44 a5 12 00 mov 0x12a544,%eax <== NOT EXECUTED 10875b: 85 c0 test %eax,%eax <== NOT EXECUTED 10875d: 74 0c je 10876b <== NOT EXECUTED fclose(passwd_fp); 10875f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108762: 50 push %eax <== NOT EXECUTED 108763: e8 0c d4 00 00 call 115b74 <== NOT EXECUTED 108768: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10876b: c9 leave <== NOT EXECUTED 10876c: c3 ret <== NOT EXECUTED =============================================================================== 00109e9c : * 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) { 109e9c: 55 push %ebp <== NOT EXECUTED 109e9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109e9f: 57 push %edi <== NOT EXECUTED 109ea0: 56 push %esi <== NOT EXECUTED 109ea1: 53 push %ebx <== NOT EXECUTED 109ea2: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 109ea5: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109ea7: 89 d7 mov %edx,%edi <== NOT EXECUTED if (tty->ccount == 0) 109ea9: 8b 48 20 mov 0x20(%eax),%ecx <== NOT EXECUTED 109eac: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109eae: 0f 84 84 00 00 00 je 109f38 <== NOT EXECUTED return; if (lineFlag) { 109eb4: 85 d2 test %edx,%edx <== NOT EXECUTED 109eb6: 0f 85 84 00 00 00 jne 109f40 <== NOT EXECUTED 109ebc: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109ebf: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109ec2: eb 1d jmp 109ee1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109ec4: 80 e6 02 and $0x2,%dh <== NOT EXECUTED 109ec7: 0f 85 37 01 00 00 jne 10a004 <== NOT EXECUTED 109ecd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 109ed0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109ed3: 85 d2 test %edx,%edx <== NOT EXECUTED 109ed5: 74 61 je 109f38 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 109ed7: 8b 4b 20 mov 0x20(%ebx),%ecx <== NOT EXECUTED 109eda: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109edc: 74 5a je 109f38 <== NOT EXECUTED 109ede: 8b 53 3c mov 0x3c(%ebx),%edx <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 109ee1: 8b 7b 1c mov 0x1c(%ebx),%edi <== NOT EXECUTED 109ee4: 49 dec %ecx <== NOT EXECUTED 109ee5: 89 4b 20 mov %ecx,0x20(%ebx) <== NOT EXECUTED 109ee8: 8a 04 0f mov (%edi,%ecx,1),%al <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 109eeb: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109eee: 74 e0 je 109ed0 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 109ef0: 8b 75 e4 mov -0x1c(%ebp),%esi <== NOT EXECUTED 109ef3: 85 f6 test %esi,%esi <== NOT EXECUTED 109ef5: 75 09 jne 109f00 <== NOT EXECUTED 109ef7: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109efa: 0f 84 f0 00 00 00 je 109ff0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 109f00: 3c 09 cmp $0x9,%al <== NOT EXECUTED 109f02: 74 58 je 109f5c <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 109f04: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109f07: 8d 70 01 lea 0x1(%eax),%esi <== NOT EXECUTED 109f0a: a1 e4 71 12 00 mov 0x1271e4,%eax <== NOT EXECUTED 109f0f: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 109f13: 75 af jne 109ec4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 109f15: 51 push %ecx <== NOT EXECUTED 109f16: 53 push %ebx <== NOT EXECUTED 109f17: 6a 03 push $0x3 <== NOT EXECUTED 109f19: 68 92 29 12 00 push $0x122992 <== NOT EXECUTED 109f1e: e8 a5 fc ff ff call 109bc8 <== NOT EXECUTED if (tty->column) 109f23: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109f26: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f29: 85 c0 test %eax,%eax <== NOT EXECUTED 109f2b: 74 a3 je 109ed0 <== NOT EXECUTED tty->column--; 109f2d: 48 dec %eax <== NOT EXECUTED 109f2e: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } } } if (!lineFlag) 109f31: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 109f34: 85 d2 test %edx,%edx <== NOT EXECUTED 109f36: 75 9f jne 109ed7 <== NOT EXECUTED break; } } 109f38: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f3b: 5b pop %ebx <== NOT EXECUTED 109f3c: 5e pop %esi <== NOT EXECUTED 109f3d: 5f pop %edi <== NOT EXECUTED 109f3e: c9 leave <== NOT EXECUTED 109f3f: c3 ret <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 109f40: 8b 50 3c mov 0x3c(%eax),%edx <== NOT EXECUTED 109f43: f6 c2 08 test $0x8,%dl <== NOT EXECUTED 109f46: 0f 84 94 00 00 00 je 109fe0 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 109f4c: f6 c2 10 test $0x10,%dl <== NOT EXECUTED 109f4f: 0f 84 eb 00 00 00 je 10a040 <== NOT EXECUTED 109f55: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 109f58: eb 87 jmp 109ee1 <== NOT EXECUTED 109f5a: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 109f5c: 8b 73 2c mov 0x2c(%ebx),%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109f5f: 85 c9 test %ecx,%ecx <== NOT EXECUTED 109f61: 74 46 je 109fa9 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 109f63: a1 e4 71 12 00 mov 0x1271e4,%eax <== NOT EXECUTED 109f68: 89 45 dc mov %eax,-0x24(%ebp) <== NOT EXECUTED 109f6b: 31 c0 xor %eax,%eax <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 109f6d: 81 e2 00 02 00 00 and $0x200,%edx <== NOT EXECUTED 109f73: 89 55 e0 mov %edx,-0x20(%ebp) <== NOT EXECUTED 109f76: 89 5d d8 mov %ebx,-0x28(%ebp) <== NOT EXECUTED 109f79: 8b 5d dc mov -0x24(%ebp),%ebx <== NOT EXECUTED 109f7c: eb 10 jmp 109f8e <== NOT EXECUTED 109f7e: 66 90 xchg %ax,%ax <== NOT EXECUTED 109f80: 8b 55 e0 mov -0x20(%ebp),%edx <== NOT EXECUTED 109f83: 85 d2 test %edx,%edx <== NOT EXECUTED 109f85: 74 03 je 109f8a <== NOT EXECUTED col += 2; 109f87: 83 c6 02 add $0x2,%esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109f8a: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 109f8c: 74 18 je 109fa6 <== NOT EXECUTED c = tty->cbuf[i++]; 109f8e: 8a 14 07 mov (%edi,%eax,1),%dl <== NOT EXECUTED 109f91: 40 inc %eax <== NOT EXECUTED if (c == '\t') { 109f92: 80 fa 09 cmp $0x9,%dl <== NOT EXECUTED 109f95: 74 41 je 109fd8 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 109f97: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 109f9a: f6 44 13 01 20 testb $0x20,0x1(%ebx,%edx,1) <== NOT EXECUTED 109f9f: 75 df jne 109f80 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) col += 2; } else { col++; 109fa1: 46 inc %esi <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 109fa2: 39 c1 cmp %eax,%ecx <== NOT EXECUTED 109fa4: 75 e8 jne 109f8e <== NOT EXECUTED 109fa6: 8b 5d d8 mov -0x28(%ebp),%ebx <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 109fa9: 3b 73 28 cmp 0x28(%ebx),%esi <== NOT EXECUTED 109fac: 0f 8d 1e ff ff ff jge 109ed0 <== NOT EXECUTED 109fb2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 109fb4: 50 push %eax <== NOT EXECUTED 109fb5: 53 push %ebx <== NOT EXECUTED 109fb6: 6a 01 push $0x1 <== NOT EXECUTED 109fb8: 68 94 29 12 00 push $0x122994 <== NOT EXECUTED 109fbd: e8 06 fc ff ff call 109bc8 <== NOT EXECUTED tty->column--; 109fc2: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 109fc5: 48 dec %eax <== NOT EXECUTED 109fc6: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 109fc9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109fcc: 39 c6 cmp %eax,%esi <== NOT EXECUTED 109fce: 7c e4 jl 109fb4 <== NOT EXECUTED 109fd0: e9 fb fe ff ff jmp 109ed0 <== NOT EXECUTED 109fd5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 109fd8: 83 ce 07 or $0x7,%esi <== NOT EXECUTED 109fdb: 46 inc %esi <== NOT EXECUTED 109fdc: eb ac jmp 109f8a <== NOT EXECUTED 109fde: 66 90 xchg %ax,%ax <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 109fe0: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED } } if (!lineFlag) break; } } 109fe7: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109fea: 5b pop %ebx <== NOT EXECUTED 109feb: 5e pop %esi <== NOT EXECUTED 109fec: 5f pop %edi <== NOT EXECUTED 109fed: c9 leave <== NOT EXECUTED 109fee: c3 ret <== NOT EXECUTED 109fef: 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); 109ff0: 0f b6 43 43 movzbl 0x43(%ebx),%eax <== NOT EXECUTED 109ff4: 89 da mov %ebx,%edx <== NOT EXECUTED } } if (!lineFlag) break; } } 109ff6: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109ff9: 5b pop %ebx <== NOT EXECUTED 109ffa: 5e pop %esi <== NOT EXECUTED 109ffb: 5f pop %edi <== NOT EXECUTED 109ffc: 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); 109ffd: e9 36 fe ff ff jmp 109e38 <== NOT EXECUTED 10a002: 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); 10a004: 57 push %edi <== NOT EXECUTED 10a005: 53 push %ebx <== NOT EXECUTED 10a006: 6a 03 push $0x3 <== NOT EXECUTED 10a008: 68 92 29 12 00 push $0x122992 <== NOT EXECUTED 10a00d: e8 b6 fb ff ff call 109bc8 <== NOT EXECUTED if (tty->column) 10a012: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10a015: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a018: 85 c0 test %eax,%eax <== NOT EXECUTED 10a01a: 74 04 je 10a020 <== NOT EXECUTED tty->column--; 10a01c: 48 dec %eax <== NOT EXECUTED 10a01d: 89 43 28 mov %eax,0x28(%ebx) <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 10a020: a1 e4 71 12 00 mov 0x1271e4,%eax <== NOT EXECUTED 10a025: f6 04 30 20 testb $0x20,(%eax,%esi,1) <== NOT EXECUTED 10a029: 0f 84 e6 fe ff ff je 109f15 <== NOT EXECUTED 10a02f: f6 43 3d 02 testb $0x2,0x3d(%ebx) <== NOT EXECUTED 10a033: 0f 85 dc fe ff ff jne 109f15 <== NOT EXECUTED 10a039: e9 92 fe ff ff jmp 109ed0 <== NOT EXECUTED 10a03e: 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; 10a040: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 10a047: 0f b6 40 44 movzbl 0x44(%eax),%eax <== NOT EXECUTED 10a04b: 89 da mov %ebx,%edx <== NOT EXECUTED 10a04d: e8 e6 fd ff ff call 109e38 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 10a052: f6 43 3c 20 testb $0x20,0x3c(%ebx) <== NOT EXECUTED 10a056: 0f 84 dc fe ff ff je 109f38 <== NOT EXECUTED echo ('\n', tty); 10a05c: 89 da mov %ebx,%edx <== NOT EXECUTED 10a05e: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10a063: eb 91 jmp 109ff6 <== NOT EXECUTED =============================================================================== 00108f94 : int fcntl( int fd, int cmd, ... ) { 108f94: 55 push %ebp 108f95: 89 e5 mov %esp,%ebp 108f97: 57 push %edi 108f98: 56 push %esi 108f99: 53 push %ebx 108f9a: 83 ec 1c sub $0x1c,%esp 108f9d: 8b 5d 08 mov 0x8(%ebp),%ebx 108fa0: 8b 55 0c mov 0xc(%ebp),%edx #include #include /* sigh. for the mode bits for open/creat */ extern int open _PARAMS ((const char *, int, ...)); extern int creat _PARAMS ((const char *, mode_t)); extern int fcntl _PARAMS ((int, int, ...)); 108fa3: 8d 7d 10 lea 0x10(%ebp),%edi int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 108fa6: 8b 35 ac 6e 12 00 mov 0x126eac,%esi 108fac: 39 f3 cmp %esi,%ebx 108fae: 0f 83 3c 01 00 00 jae 1090f0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 108fb4: a1 e0 af 12 00 mov 0x12afe0,%eax 108fb9: c1 e3 06 shl $0x6,%ebx 108fbc: 8d 1c 18 lea (%eax,%ebx,1),%ebx rtems_libio_check_is_open(iop); 108fbf: 8b 4b 14 mov 0x14(%ebx),%ecx 108fc2: f6 c5 01 test $0x1,%ch 108fc5: 0f 84 25 01 00 00 je 1090f0 <== NEVER TAKEN /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108fcb: 83 fa 09 cmp $0x9,%edx 108fce: 76 14 jbe 108fe4 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 108fd0: e8 0f d2 00 00 call 1161e4 <__errno> 108fd5: c7 00 16 00 00 00 movl $0x16,(%eax) 108fdb: be ff ff ff ff mov $0xffffffff,%esi 108fe0: eb 1a jmp 108ffc 108fe2: 66 90 xchg %ax,%ax /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 108fe4: ff 24 95 30 45 12 00 jmp *0x124530(,%edx,4) 108feb: 90 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 108fec: e8 f3 d1 00 00 call 1161e4 <__errno> 108ff1: c7 00 86 00 00 00 movl $0x86,(%eax) 108ff7: 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; } 108ffc: 89 f0 mov %esi,%eax 108ffe: 8d 65 f4 lea -0xc(%ebp),%esp 109001: 5b pop %ebx 109002: 5e pop %esi 109003: 5f pop %edi 109004: c9 leave 109005: c3 ret 109006: 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 ) ); 109008: 83 ec 0c sub $0xc,%esp 10900b: ff 37 pushl (%edi) 10900d: 89 55 e0 mov %edx,-0x20(%ebp) 109010: e8 03 07 00 00 call 109718 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 109015: 25 01 02 00 00 and $0x201,%eax 10901a: 8b 4b 14 mov 0x14(%ebx),%ecx 10901d: 81 e1 fe fd ff ff and $0xfffffdfe,%ecx 109023: 09 c8 or %ecx,%eax 109025: 89 43 14 mov %eax,0x14(%ebx) 109028: 31 f6 xor %esi,%esi 10902a: 83 c4 10 add $0x10,%esp 10902d: 8b 55 e0 mov -0x20(%ebp),%edx * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 109030: 8b 43 3c mov 0x3c(%ebx),%eax 109033: 8b 40 30 mov 0x30(%eax),%eax 109036: 85 c0 test %eax,%eax 109038: 74 c2 je 108ffc <== NEVER TAKEN int err = (*iop->handlers->fcntl_h)( cmd, iop ); 10903a: 83 ec 08 sub $0x8,%esp 10903d: 53 push %ebx 10903e: 52 push %edx 10903f: ff d0 call *%eax 109041: 89 c3 mov %eax,%ebx if (err) { 109043: 83 c4 10 add $0x10,%esp 109046: 85 c0 test %eax,%eax 109048: 74 b2 je 108ffc <== ALWAYS TAKEN errno = err; 10904a: e8 95 d1 00 00 call 1161e4 <__errno> <== NOT EXECUTED 10904f: 89 18 mov %ebx,(%eax) <== NOT EXECUTED 109051: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 109056: 89 f0 mov %esi,%eax <== NOT EXECUTED 109058: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10905b: 5b pop %ebx <== NOT EXECUTED 10905c: 5e pop %esi <== NOT EXECUTED 10905d: 5f pop %edi <== NOT EXECUTED 10905e: c9 leave <== NOT EXECUTED 10905f: c3 ret <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 109060: 83 ec 0c sub $0xc,%esp 109063: 51 push %ecx 109064: 89 55 e0 mov %edx,-0x20(%ebp) 109067: e8 c0 04 00 00 call 10952c 10906c: 89 c6 mov %eax,%esi 10906e: 83 c4 10 add $0x10,%esp 109071: 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) { 109074: 85 f6 test %esi,%esi 109076: 79 b8 jns 109030 <== ALWAYS TAKEN 109078: eb 82 jmp 108ffc <== NOT EXECUTED 10907a: 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 ) ) 10907c: 8b 07 mov (%edi),%eax 10907e: 85 c0 test %eax,%eax 109080: 74 52 je 1090d4 <== NEVER TAKEN iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 109082: 80 cd 08 or $0x8,%ch 109085: 89 4b 14 mov %ecx,0x14(%ebx) 109088: 31 f6 xor %esi,%esi 10908a: eb a4 jmp 109030 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); 10908c: 89 ce mov %ecx,%esi 10908e: c1 ee 0b shr $0xb,%esi 109091: 83 e6 01 and $0x1,%esi 109094: eb 9a jmp 109030 109096: 66 90 xchg %ax,%ax * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 109098: 8b 3f mov (%edi),%edi if ( fd2 ) 10909a: 85 ff test %edi,%edi 10909c: 74 6a je 109108 <== ALWAYS TAKEN diop = rtems_libio_iop( fd2 ); 10909e: 39 fe cmp %edi,%esi <== NOT EXECUTED 1090a0: 77 42 ja 1090e4 <== NOT EXECUTED 1090a2: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 1090a9: 31 ff xor %edi,%edi <== NOT EXECUTED ret = -1; break; } } diop->handlers = iop->handlers; 1090ab: 8b 73 3c mov 0x3c(%ebx),%esi 1090ae: 89 77 3c mov %esi,0x3c(%edi) diop->file_info = iop->file_info; 1090b1: 8b 73 38 mov 0x38(%ebx),%esi 1090b4: 89 77 38 mov %esi,0x38(%edi) diop->flags = iop->flags; 1090b7: 89 4f 14 mov %ecx,0x14(%edi) diop->pathinfo = iop->pathinfo; 1090ba: 83 c7 18 add $0x18,%edi 1090bd: 8d 73 18 lea 0x18(%ebx),%esi 1090c0: b9 05 00 00 00 mov $0x5,%ecx 1090c5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ret = (int) (diop - rtems_libio_iops); 1090c7: 8b 75 e4 mov -0x1c(%ebp),%esi 1090ca: 29 c6 sub %eax,%esi 1090cc: c1 fe 06 sar $0x6,%esi 1090cf: eb a3 jmp 109074 1090d1: 8d 76 00 lea 0x0(%esi),%esi */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 1090d4: 80 e5 f7 and $0xf7,%ch <== NOT EXECUTED 1090d7: 89 4b 14 mov %ecx,0x14(%ebx) <== NOT EXECUTED 1090da: 31 f6 xor %esi,%esi <== NOT EXECUTED 1090dc: e9 4f ff ff ff jmp 109030 <== NOT EXECUTED 1090e1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 1090e4: c1 e7 06 shl $0x6,%edi <== NOT EXECUTED 1090e7: 8d 3c 38 lea (%eax,%edi,1),%edi <== NOT EXECUTED 1090ea: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 1090ed: eb bc jmp 1090ab <== NOT EXECUTED 1090ef: 90 nop <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 1090f0: e8 ef d0 00 00 call 1161e4 <__errno> <== NOT EXECUTED 1090f5: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 1090fb: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 109100: e9 f7 fe ff ff jmp 108ffc <== NOT EXECUTED 109105: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 109108: 89 55 e0 mov %edx,-0x20(%ebp) 10910b: e8 7c 05 00 00 call 10968c 109110: 89 c7 mov %eax,%edi if ( diop == 0 ) { 109112: 85 c0 test %eax,%eax 109114: 8b 55 e0 mov -0x20(%ebp),%edx 109117: 0f 84 34 ff ff ff je 109051 <== NEVER TAKEN 10911d: 89 45 e4 mov %eax,-0x1c(%ebp) 109120: a1 e0 af 12 00 mov 0x12afe0,%eax 109125: 8b 4b 14 mov 0x14(%ebx),%ecx 109128: eb 81 jmp 1090ab =============================================================================== 0010914c : #include int fdatasync( int fd ) { 10914c: 55 push %ebp 10914d: 89 e5 mov %esp,%ebp 10914f: 83 ec 08 sub $0x8,%esp 109152: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 109155: 3b 05 ac 6e 12 00 cmp 0x126eac,%eax 10915b: 73 27 jae 109184 iop = rtems_libio_iop( fd ); 10915d: c1 e0 06 shl $0x6,%eax 109160: 03 05 e0 af 12 00 add 0x12afe0,%eax rtems_libio_check_is_open(iop); 109166: 8b 50 14 mov 0x14(%eax),%edx 109169: f6 c6 01 test $0x1,%dh 10916c: 74 16 je 109184 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10916e: 83 e2 04 and $0x4,%edx 109171: 74 25 je 109198 /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) 109173: 8b 50 3c mov 0x3c(%eax),%edx 109176: 8b 52 2c mov 0x2c(%edx),%edx 109179: 85 d2 test %edx,%edx 10917b: 74 28 je 1091a5 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 10917d: 89 45 08 mov %eax,0x8(%ebp) } 109180: c9 leave */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); 109181: ff e2 jmp *%edx 109183: 90 nop { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 109184: e8 5b d0 00 00 call 1161e4 <__errno> 109189: c7 00 09 00 00 00 movl $0x9,(%eax) if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fdatasync_h)( iop ); } 10918f: b8 ff ff ff ff mov $0xffffffff,%eax 109194: c9 leave 109195: c3 ret 109196: 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 ); 109198: e8 47 d0 00 00 call 1161e4 <__errno> 10919d: c7 00 16 00 00 00 movl $0x16,(%eax) 1091a3: eb ea jmp 10918f /* * Now process the fdatasync(). */ if ( !iop->handlers->fdatasync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1091a5: e8 3a d0 00 00 call 1161e4 <__errno> 1091aa: c7 00 86 00 00 00 movl $0x86,(%eax) 1091b0: eb dd jmp 10918f =============================================================================== 0010f834 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f834: 55 push %ebp 10f835: 89 e5 mov %esp,%ebp 10f837: 57 push %edi 10f838: 56 push %esi 10f839: 53 push %ebx 10f83a: 83 ec 30 sub $0x30,%esp 10f83d: 8b 75 08 mov 0x8(%ebp),%esi ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, 10f840: 6a 00 push $0x0 10f842: 6a 00 push $0x0 10f844: ff 35 08 91 12 00 pushl 0x129108 10f84a: e8 59 c4 ff ff call 10bca8 10f84f: 83 c4 10 add $0x10,%esp 10f852: 85 c0 test %eax,%eax 10f854: 74 12 je 10f868 <== NEVER TAKEN 10f856: bf fc ff ff ff mov $0xfffffffc,%edi return 0; out_error: pipe_release(pipep, iop); return err; } 10f85b: 89 f8 mov %edi,%eax 10f85d: 8d 65 f4 lea -0xc(%ebp),%esp 10f860: 5b pop %ebx 10f861: 5e pop %esi 10f862: 5f pop %edi 10f863: c9 leave 10f864: c3 ret 10f865: 8d 76 00 lea 0x0(%esi),%esi if (rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; 10f868: 8b 1e mov (%esi),%ebx <== NOT EXECUTED if (pipe == NULL) { 10f86a: 85 db test %ebx,%ebx <== NOT EXECUTED 10f86c: 74 7a je 10f8e8 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 10f86e: 52 push %edx <== NOT EXECUTED 10f86f: 6a 00 push $0x0 <== NOT EXECUTED 10f871: 6a 00 push $0x0 <== NOT EXECUTED 10f873: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f876: e8 2d c4 ff ff call 10bca8 <== NOT EXECUTED 10f87b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f87e: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f881: 19 ff sbb %edi,%edi <== NOT EXECUTED 10f883: f7 d7 not %edi <== NOT EXECUTED 10f885: 83 e7 fc and $0xfffffffc,%edi <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { 10f888: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10f88a: 85 c0 test %eax,%eax <== NOT EXECUTED 10f88c: 0f 84 b2 02 00 00 je 10fb44 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 10f892: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f895: ff 35 08 91 12 00 pushl 0x129108 <== NOT EXECUTED 10f89b: e8 04 c5 ff ff call 10bda4 <== NOT EXECUTED pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 10f8a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8a3: 85 ff test %edi,%edi <== NOT EXECUTED 10f8a5: 75 b4 jne 10f85b <== NOT EXECUTED return err; pipe = *pipep; 10f8a7: 8b 1e mov (%esi),%ebx <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { 10f8a9: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f8ac: 8b 42 14 mov 0x14(%edx),%eax <== NOT EXECUTED 10f8af: 83 e0 06 and $0x6,%eax <== NOT EXECUTED 10f8b2: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10f8b5: 0f 84 11 02 00 00 je 10facc <== NOT EXECUTED 10f8bb: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10f8be: 0f 84 c8 01 00 00 je 10fa8c <== NOT EXECUTED 10f8c4: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10f8c7: 0f 84 37 01 00 00 je 10fa04 <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); 10f8cd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f8d0: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f8d3: e8 cc c4 ff ff call 10bda4 <== NOT EXECUTED 10f8d8: 31 ff xor %edi,%edi <== NOT EXECUTED return 0; 10f8da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_error: pipe_release(pipep, iop); return err; } 10f8dd: 89 f8 mov %edi,%eax <== NOT EXECUTED 10f8df: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f8e2: 5b pop %ebx <== NOT EXECUTED 10f8e3: 5e pop %esi <== NOT EXECUTED 10f8e4: 5f pop %edi <== NOT EXECUTED 10f8e5: c9 leave <== NOT EXECUTED 10f8e6: c3 ret <== NOT EXECUTED 10f8e7: 90 nop <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 10f8e8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f8eb: 6a 34 push $0x34 <== NOT EXECUTED 10f8ed: e8 6a 8f ff ff call 10885c <== NOT EXECUTED 10f8f2: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10f8f4: 89 45 d4 mov %eax,-0x2c(%ebp) <== NOT EXECUTED if (pipe == NULL) 10f8f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f8fa: 85 c0 test %eax,%eax <== NOT EXECUTED 10f8fc: 0f 84 46 03 00 00 je 10fc48 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); 10f902: b9 34 00 00 00 mov $0x34,%ecx <== NOT EXECUTED 10f907: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f909: 89 df mov %ebx,%edi <== NOT EXECUTED 10f90b: f3 aa rep stos %al,%es:(%edi) <== NOT EXECUTED pipe->Size = PIPE_BUF; 10f90d: c7 43 04 00 02 00 00 movl $0x200,0x4(%ebx) <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); 10f914: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f917: 68 00 02 00 00 push $0x200 <== NOT EXECUTED 10f91c: e8 3b 8f ff ff call 10885c <== NOT EXECUTED 10f921: 89 03 mov %eax,(%ebx) <== NOT EXECUTED if (! pipe->Buffer) 10f923: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f926: 85 c0 test %eax,%eax <== NOT EXECUTED 10f928: 0f 84 0c 03 00 00 je 10fc3a <== NOT EXECUTED goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 10f92e: 8d 43 2c lea 0x2c(%ebx),%eax <== NOT EXECUTED 10f931: 50 push %eax <== NOT EXECUTED 10f932: 6a 00 push $0x0 <== NOT EXECUTED 10f934: 6a 00 push $0x0 <== NOT EXECUTED 10f936: 0f be 05 08 71 12 00 movsbl 0x127108,%eax <== NOT EXECUTED 10f93d: 0d 00 72 49 50 or $0x50497200,%eax <== NOT EXECUTED 10f942: 50 push %eax <== NOT EXECUTED 10f943: e8 88 1f 00 00 call 1118d0 <== NOT EXECUTED 10f948: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f94b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f94d: 0f 85 d7 02 00 00 jne 10fc2a <== NOT EXECUTED rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( 10f953: 8d 43 30 lea 0x30(%ebx),%eax <== NOT EXECUTED 10f956: 50 push %eax <== NOT EXECUTED 10f957: 6a 00 push $0x0 <== NOT EXECUTED 10f959: 6a 00 push $0x0 <== NOT EXECUTED 10f95b: 0f be 05 08 71 12 00 movsbl 0x127108,%eax <== NOT EXECUTED 10f962: 0d 00 77 49 50 or $0x50497700,%eax <== NOT EXECUTED 10f967: 50 push %eax <== NOT EXECUTED 10f968: e8 63 1f 00 00 call 1118d0 <== NOT EXECUTED 10f96d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f970: 85 c0 test %eax,%eax <== NOT EXECUTED 10f972: 0f 85 a1 02 00 00 jne 10fc19 <== NOT EXECUTED rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( 10f978: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f97b: 8d 43 28 lea 0x28(%ebx),%eax <== NOT EXECUTED 10f97e: 50 push %eax <== NOT EXECUTED 10f97f: 6a 00 push $0x0 <== NOT EXECUTED 10f981: 6a 10 push $0x10 <== NOT EXECUTED 10f983: 6a 01 push $0x1 <== NOT EXECUTED 10f985: 0f be 05 08 71 12 00 movsbl 0x127108,%eax <== NOT EXECUTED 10f98c: 0d 00 73 49 50 or $0x50497300,%eax <== NOT EXECUTED 10f991: 50 push %eax <== NOT EXECUTED 10f992: e8 99 c0 ff ff call 10ba30 <== NOT EXECUTED 10f997: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f99a: 85 c0 test %eax,%eax <== NOT EXECUTED 10f99c: 0f 85 66 02 00 00 jne 10fc08 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 10f9a2: 51 push %ecx <== NOT EXECUTED 10f9a3: 8d 7d e0 lea -0x20(%ebp),%edi <== NOT EXECUTED 10f9a6: 57 push %edi <== NOT EXECUTED 10f9a7: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f9aa: 68 80 9e 12 00 push $0x129e80 <== NOT EXECUTED 10f9af: e8 44 da ff ff call 10d3f8 <_Objects_Get> <== NOT EXECUTED /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 10f9b4: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10f9bb: e8 ac e2 ff ff call 10dc6c <_Thread_Enable_dispatch><== NOT EXECUTED 10f9c0: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f9c3: 57 push %edi <== NOT EXECUTED 10f9c4: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f9c7: 68 80 9e 12 00 push $0x129e80 <== NOT EXECUTED 10f9cc: e8 27 da ff ff call 10d3f8 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state 10f9d1: 81 48 4c 00 00 00 10 orl $0x10000000,0x4c(%eax) <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); 10f9d8: e8 8f e2 ff ff call 10dc6c <_Thread_Enable_dispatch><== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 10f9dd: a0 08 71 12 00 mov 0x127108,%al <== NOT EXECUTED 10f9e2: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10f9e5: 88 15 08 71 12 00 mov %dl,0x127108 <== NOT EXECUTED 10f9eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f9ee: 3c 7a cmp $0x7a,%al <== NOT EXECUTED 10f9f0: 0f 85 78 fe ff ff jne 10f86e <== NOT EXECUTED c = 'a'; 10f9f6: c6 05 08 71 12 00 61 movb $0x61,0x127108 <== NOT EXECUTED 10f9fd: e9 6c fe ff ff jmp 10f86e <== NOT EXECUTED 10fa02: 66 90 xchg %ax,%ax <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; 10fa04: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10fa07: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10fa0a: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10fa0d: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10fa10: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa12: 0f 84 90 01 00 00 je 10fba8 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); if (pipe->Writers == 0) { 10fa18: 8b 7b 14 mov 0x14(%ebx),%edi <== NOT EXECUTED 10fa1b: 85 ff test %edi,%edi <== NOT EXECUTED 10fa1d: 0f 85 aa fe ff ff jne 10f8cd <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) 10fa23: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10fa26: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10fa2a: 0f 85 9d fe ff ff jne 10f8cd <== NOT EXECUTED break; prevCounter = pipe->writerCounter; 10fa30: 8b 7b 24 mov 0x24(%ebx),%edi <== NOT EXECUTED 10fa33: eb 20 jmp 10fa55 <== NOT EXECUTED 10fa35: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 10fa38: 50 push %eax <== NOT EXECUTED 10fa39: 6a 00 push $0x0 <== NOT EXECUTED 10fa3b: 6a 00 push $0x0 <== NOT EXECUTED 10fa3d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fa40: e8 63 c2 ff ff call 10bca8 <== NOT EXECUTED 10fa45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa48: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa4a: 75 27 jne 10fa73 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); 10fa4c: 39 7b 24 cmp %edi,0x24(%ebx) <== NOT EXECUTED 10fa4f: 0f 85 78 fe ff ff jne 10f8cd <== NOT EXECUTED prevCounter = pipe->writerCounter; err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 10fa55: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fa58: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fa5b: e8 44 c3 ff ff call 10bda4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10fa60: 5a pop %edx <== NOT EXECUTED 10fa61: 59 pop %ecx <== NOT EXECUTED 10fa62: 6a 00 push $0x0 <== NOT EXECUTED 10fa64: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fa67: e8 40 20 00 00 call 111aac <== NOT EXECUTED 10fa6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa6f: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa71: 74 c5 je 10fa38 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); break; } PIPE_UNLOCK(pipe); return 0; 10fa73: bf fc ff ff ff mov $0xfffffffc,%edi <== NOT EXECUTED out_error: pipe_release(pipep, iop); 10fa78: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fa7b: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 10fa7e: 56 push %esi <== NOT EXECUTED 10fa7f: e8 9c fc ff ff call 10f720 <== NOT EXECUTED return err; 10fa84: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fa87: e9 cf fd ff ff jmp 10f85b <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 10fa8c: ff 43 20 incl 0x20(%ebx) <== NOT EXECUTED if (pipe->Readers ++ == 0) 10fa8f: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10fa92: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10fa95: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED 10fa98: 85 c0 test %eax,%eax <== NOT EXECUTED 10fa9a: 0f 84 38 01 00 00 je 10fbd8 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; 10faa0: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10faa3: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10faa6: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10faa9: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10faac: 85 c0 test %eax,%eax <== NOT EXECUTED 10faae: 0f 85 19 fe ff ff jne 10f8cd <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10fab4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fab7: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10faba: 50 push %eax <== NOT EXECUTED 10fabb: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fabe: e8 85 1f 00 00 call 111a48 <== NOT EXECUTED 10fac3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fac6: e9 02 fe ff ff jmp 10f8cd <== NOT EXECUTED 10facb: 90 nop <== NOT EXECUTED } while (prevCounter == pipe->writerCounter); } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 10facc: ff 43 24 incl 0x24(%ebx) <== NOT EXECUTED if (pipe->Writers ++ == 0) 10facf: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10fad2: 8d 50 01 lea 0x1(%eax),%edx <== NOT EXECUTED 10fad5: 89 53 14 mov %edx,0x14(%ebx) <== NOT EXECUTED 10fad8: 85 c0 test %eax,%eax <== NOT EXECUTED 10fada: 0f 84 e0 00 00 00 je 10fbc0 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 10fae0: 8b 7b 10 mov 0x10(%ebx),%edi <== NOT EXECUTED 10fae3: 85 ff test %edi,%edi <== NOT EXECUTED 10fae5: 0f 85 e2 fd ff ff jne 10f8cd <== NOT EXECUTED 10faeb: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10faee: f6 42 14 01 testb $0x1,0x14(%edx) <== NOT EXECUTED 10faf2: 0f 85 f8 00 00 00 jne 10fbf0 <== NOT EXECUTED err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 10faf8: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 10fafb: eb 24 jmp 10fb21 <== NOT EXECUTED 10fafd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) goto out_error; if (! PIPE_LOCK(pipe)) 10fb00: 50 push %eax <== NOT EXECUTED 10fb01: 6a 00 push $0x0 <== NOT EXECUTED 10fb03: 6a 00 push $0x0 <== NOT EXECUTED 10fb05: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fb08: e8 9b c1 ff ff call 10bca8 <== NOT EXECUTED 10fb0d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb10: 85 c0 test %eax,%eax <== NOT EXECUTED 10fb12: 0f 85 5b ff ff ff jne 10fa73 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); 10fb18: 39 7b 20 cmp %edi,0x20(%ebx) <== NOT EXECUTED 10fb1b: 0f 85 ac fd ff ff jne 10f8cd <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 10fb21: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb24: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fb27: e8 78 c2 ff ff call 10bda4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10fb2c: 5a pop %edx <== NOT EXECUTED 10fb2d: 59 pop %ecx <== NOT EXECUTED 10fb2e: 6a 00 push $0x0 <== NOT EXECUTED 10fb30: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fb33: e8 74 1f 00 00 call 111aac <== NOT EXECUTED 10fb38: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb3b: 85 c0 test %eax,%eax <== NOT EXECUTED 10fb3d: 74 c1 je 10fb00 <== NOT EXECUTED 10fb3f: e9 2f ff ff ff jmp 10fa73 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) 10fb44: 85 ff test %edi,%edi <== NOT EXECUTED 10fb46: 75 18 jne 10fb60 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; 10fb48: 89 1e mov %ebx,(%esi) <== NOT EXECUTED } out: rtems_semaphore_release(rtems_pipe_semaphore); 10fb4a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb4d: ff 35 08 91 12 00 pushl 0x129108 <== NOT EXECUTED 10fb53: e8 4c c2 ff ff call 10bda4 <== NOT EXECUTED 10fb58: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fb5b: e9 47 fd ff ff jmp 10f8a7 <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 10fb60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb63: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fb66: e8 4d 1e 00 00 call 1119b8 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10fb6b: 59 pop %ecx <== NOT EXECUTED 10fb6c: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fb6f: e8 44 1e 00 00 call 1119b8 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10fb74: 5a pop %edx <== NOT EXECUTED 10fb75: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fb78: e8 87 c0 ff ff call 10bc04 <== NOT EXECUTED free(pipe->Buffer); 10fb7d: 58 pop %eax <== NOT EXECUTED 10fb7e: ff 33 pushl (%ebx) <== NOT EXECUTED 10fb80: e8 ff 89 ff ff call 108584 <== NOT EXECUTED free(pipe); 10fb85: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10fb88: e8 f7 89 ff ff call 108584 <== NOT EXECUTED 10fb8d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); 10fb90: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fb93: ff 35 08 91 12 00 pushl 0x129108 <== NOT EXECUTED 10fb99: e8 06 c2 ff ff call 10bda4 <== NOT EXECUTED 10fb9e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fba1: e9 b5 fc ff ff jmp 10f85b <== NOT EXECUTED 10fba6: 66 90 xchg %ax,%ax <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 10fba8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fbab: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fbae: 50 push %eax <== NOT EXECUTED 10fbaf: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fbb2: e8 91 1e 00 00 call 111a48 <== NOT EXECUTED 10fbb7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbba: e9 59 fe ff ff jmp 10fa18 <== NOT EXECUTED 10fbbf: 90 nop <== NOT EXECUTED case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); 10fbc0: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fbc3: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fbc6: 50 push %eax <== NOT EXECUTED 10fbc7: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10fbca: e8 79 1e 00 00 call 111a48 <== NOT EXECUTED 10fbcf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbd2: e9 09 ff ff ff jmp 10fae0 <== NOT EXECUTED 10fbd7: 90 nop <== NOT EXECUTED break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); 10fbd8: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10fbdb: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10fbde: 50 push %eax <== NOT EXECUTED 10fbdf: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10fbe2: e8 61 1e 00 00 call 111a48 <== NOT EXECUTED 10fbe7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fbea: e9 b1 fe ff ff jmp 10faa0 <== NOT EXECUTED 10fbef: 90 nop <== NOT EXECUTED if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { PIPE_UNLOCK(pipe); 10fbf0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fbf3: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10fbf6: e8 a9 c1 ff ff call 10bda4 <== NOT EXECUTED 10fbfb: bf fa ff ff ff mov $0xfffffffa,%edi <== NOT EXECUTED err = -ENXIO; goto out_error; 10fc00: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fc03: e9 70 fe ff ff jmp 10fa78 <== NOT EXECUTED if (c ++ == 'z') c = 'a'; return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 10fc08: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc0b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fc0e: ff 70 30 pushl 0x30(%eax) <== NOT EXECUTED 10fc11: e8 a2 1d 00 00 call 1119b8 <== NOT EXECUTED 10fc16: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); 10fc19: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc1c: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED 10fc1f: ff 72 2c pushl 0x2c(%edx) <== NOT EXECUTED 10fc22: e8 91 1d 00 00 call 1119b8 <== NOT EXECUTED 10fc27: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_rbar: free(pipe->Buffer); 10fc2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc2d: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10fc30: ff 30 pushl (%eax) <== NOT EXECUTED 10fc32: e8 4d 89 ff ff call 108584 <== NOT EXECUTED 10fc37: 83 c4 10 add $0x10,%esp <== NOT EXECUTED err_buf: free(pipe); 10fc3a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10fc3d: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10fc40: e8 3f 89 ff ff call 108584 <== NOT EXECUTED 10fc45: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10fc48: bf f4 ff ff ff mov $0xfffffff4,%edi <== NOT EXECUTED 10fc4d: e9 3e ff ff ff jmp 10fb90 <== NOT EXECUTED =============================================================================== 00110f0c : const char *type; rtems_filesystem_fsmount_me_t mount_h; } find_arg; static bool find_handler(const rtems_filesystem_table_t *entry, void *arg) { 110f0c: 55 push %ebp 110f0d: 89 e5 mov %esp,%ebp 110f0f: 56 push %esi 110f10: 53 push %ebx 110f11: 8b 75 08 mov 0x8(%ebp),%esi 110f14: 8b 5d 0c mov 0xc(%ebp),%ebx find_arg *fa = arg; if ( strcmp( entry->type, fa->type ) != 0 ) { 110f17: 83 ec 08 sub $0x8,%esp 110f1a: ff 33 pushl (%ebx) 110f1c: ff 36 pushl (%esi) 110f1e: e8 0d 4c 00 00 call 115b30 110f23: 83 c4 10 add $0x10,%esp 110f26: 85 c0 test %eax,%eax 110f28: 75 12 jne 110f3c return false; } else { fa->mount_h = entry->mount_h; 110f2a: 8b 46 04 mov 0x4(%esi),%eax 110f2d: 89 43 04 mov %eax,0x4(%ebx) 110f30: b0 01 mov $0x1,%al return true; } } 110f32: 8d 65 f8 lea -0x8(%ebp),%esp 110f35: 5b pop %ebx 110f36: 5e pop %esi 110f37: c9 leave 110f38: c3 ret 110f39: 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 ) { 110f3c: 31 c0 xor %eax,%eax } else { fa->mount_h = entry->mount_h; return true; } } 110f3e: 8d 65 f8 lea -0x8(%ebp),%esp 110f41: 5b pop %ebx 110f42: 5e pop %esi 110f43: c9 leave 110f44: c3 ret =============================================================================== 001091b4 : long fpathconf( int fd, int name ) { 1091b4: 55 push %ebp 1091b5: 89 e5 mov %esp,%ebp 1091b7: 83 ec 08 sub $0x8,%esp 1091ba: 8b 45 08 mov 0x8(%ebp),%eax 1091bd: 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); 1091c0: 3b 05 ac 6e 12 00 cmp 0x126eac,%eax 1091c6: 0f 83 9c 00 00 00 jae 109268 iop = rtems_libio_iop(fd); 1091cc: c1 e0 06 shl $0x6,%eax 1091cf: 03 05 e0 af 12 00 add 0x12afe0,%eax rtems_libio_check_is_open(iop); 1091d5: 8b 48 14 mov 0x14(%eax),%ecx 1091d8: f6 c5 01 test $0x1,%ch 1091db: 0f 84 87 00 00 00 je 109268 <== NEVER TAKEN rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 1091e1: 83 e1 02 and $0x2,%ecx 1091e4: 74 08 je 1091ee <== NEVER TAKEN /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 1091e6: 8b 40 28 mov 0x28(%eax),%eax switch ( name ) { 1091e9: 83 fa 0b cmp $0xb,%edx 1091ec: 76 12 jbe 109200 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 1091ee: e8 f1 cf 00 00 call 1161e4 <__errno> 1091f3: c7 00 16 00 00 00 movl $0x16,(%eax) 1091f9: b8 ff ff ff ff mov $0xffffffff,%eax break; } return return_value; } 1091fe: c9 leave 1091ff: c3 ret * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 109200: ff 24 95 58 45 12 00 jmp *0x124558(,%edx,4) 109207: 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; 109208: 8b 40 5c mov 0x5c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10920b: c9 leave 10920c: c3 ret 10920d: 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; 109210: 8b 40 50 mov 0x50(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109213: c9 leave 109214: c3 ret 109215: 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; 109218: 8b 40 64 mov 0x64(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10921b: c9 leave 10921c: c3 ret 10921d: 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; 109220: 8b 40 58 mov 0x58(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109223: c9 leave 109224: c3 ret 109225: 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; 109228: 8b 40 54 mov 0x54(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10922b: c9 leave 10922c: c3 ret 10922d: 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; 109230: 8b 40 4c mov 0x4c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109233: c9 leave 109234: c3 ret 109235: 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; 109238: 8b 40 48 mov 0x48(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10923b: c9 leave 10923c: c3 ret 10923d: 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; 109240: 8b 40 44 mov 0x44(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109243: c9 leave 109244: c3 ret 109245: 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; 109248: 8b 40 40 mov 0x40(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10924b: c9 leave 10924c: c3 ret 10924d: 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; 109250: 8b 40 3c mov 0x3c(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109253: c9 leave 109254: c3 ret 109255: 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; 109258: 8b 40 38 mov 0x38(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 10925b: c9 leave 10925c: c3 ret 10925d: 8d 76 00 lea 0x0(%esi),%esi break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 109260: 8b 40 60 mov 0x60(%eax),%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109263: c9 leave 109264: c3 ret 109265: 8d 76 00 lea 0x0(%esi),%esi 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); 109268: e8 77 cf 00 00 call 1161e4 <__errno> 10926d: c7 00 09 00 00 00 movl $0x9,(%eax) 109273: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( EINVAL ); break; } return return_value; } 109278: c9 leave 109279: c3 ret =============================================================================== 00108584 : void free( void *ptr ) { MSBUMP(free_calls, 1); 108584: 55 push %ebp 108585: 89 e5 mov %esp,%ebp 108587: 53 push %ebx 108588: 83 ec 04 sub $0x4,%esp 10858b: 8b 5d 08 mov 0x8(%ebp),%ebx 10858e: ff 05 6c 93 12 00 incl 0x12936c if ( !ptr ) 108594: 85 db test %ebx,%ebx 108596: 74 4b je 1085e3 /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 108598: 83 3d 80 96 12 00 03 cmpl $0x3,0x129680 10859f: 74 47 je 1085e8 <== ALWAYS TAKEN #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1085a1: a1 08 77 12 00 mov 0x127708,%eax 1085a6: 85 c0 test %eax,%eax 1085a8: 74 0a je 1085b4 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_free)(ptr); 1085aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1085ad: 53 push %ebx <== NOT EXECUTED 1085ae: ff 50 08 call *0x8(%eax) <== NOT EXECUTED 1085b1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 1085b4: 83 ec 08 sub $0x8,%esp 1085b7: 53 push %ebx 1085b8: ff 35 18 52 12 00 pushl 0x125218 1085be: e8 35 51 00 00 call 10d6f8 <_Protected_heap_Free> 1085c3: 83 c4 10 add $0x10,%esp 1085c6: 84 c0 test %al,%al 1085c8: 75 19 jne 1085e3 <== ALWAYS TAKEN printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end 1085ca: a1 18 52 12 00 mov 0x125218,%eax <== NOT EXECUTED */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_free)(ptr); if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 1085cf: ff 70 1c pushl 0x1c(%eax) <== NOT EXECUTED 1085d2: ff 70 18 pushl 0x18(%eax) <== NOT EXECUTED 1085d5: 53 push %ebx <== NOT EXECUTED 1085d6: 68 10 29 12 00 push $0x122910 <== NOT EXECUTED 1085db: e8 d8 0d 00 00 call 1093b8 <== NOT EXECUTED 1085e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1085e3: 8b 5d fc mov -0x4(%ebp),%ebx 1085e6: c9 leave 1085e7: c3 ret /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 1085e8: e8 3f 01 00 00 call 10872c 1085ed: 84 c0 test %al,%al 1085ef: 75 b0 jne 1085a1 <== ALWAYS TAKEN !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1085f1: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 1085f4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1085f7: c9 leave <== NOT EXECUTED * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 1085f8: e9 6f 01 00 00 jmp 10876c <== NOT EXECUTED =============================================================================== 00109970 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 109970: 55 push %ebp <== NOT EXECUTED 109971: 89 e5 mov %esp,%ebp <== NOT EXECUTED 109973: 53 push %ebx <== NOT EXECUTED 109974: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 109977: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 10997a: 81 fb 60 9c 12 00 cmp $0x129c60,%ebx <== NOT EXECUTED 109980: 74 42 je 1099c4 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 109982: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 109985: 85 c0 test %eax,%eax <== NOT EXECUTED 109987: 74 13 je 10999c <== NOT EXECUTED 109989: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10998c: 85 c0 test %eax,%eax <== NOT EXECUTED 10998e: 74 0c je 10999c <== NOT EXECUTED 109990: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109993: 8d 53 04 lea 0x4(%ebx),%edx <== NOT EXECUTED 109996: 52 push %edx <== NOT EXECUTED 109997: ff d0 call *%eax <== NOT EXECUTED 109999: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 10999c: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 10999f: 85 c0 test %eax,%eax <== NOT EXECUTED 1099a1: 74 13 je 1099b6 <== NOT EXECUTED 1099a3: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1099a6: 85 c0 test %eax,%eax <== NOT EXECUTED 1099a8: 74 0c je 1099b6 <== NOT EXECUTED 1099aa: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1099ad: 8d 53 18 lea 0x18(%ebx),%edx <== NOT EXECUTED 1099b0: 52 push %edx <== NOT EXECUTED 1099b1: ff d0 call *%eax <== NOT EXECUTED 1099b3: 83 c4 10 add $0x10,%esp <== NOT EXECUTED free(env); 1099b6: 89 5d 08 mov %ebx,0x8(%ebp) <== NOT EXECUTED } } 1099b9: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1099bc: c9 leave <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 1099bd: e9 3e ef ff ff jmp 108900 <== NOT EXECUTED 1099c2: 66 90 xchg %ax,%ax <== NOT EXECUTED } } 1099c4: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 1099c7: c9 leave <== NOT EXECUTED 1099c8: c3 ret <== NOT EXECUTED =============================================================================== 001205b4 : int fstat( int fd, struct stat *sbuf ) { 1205b4: 55 push %ebp 1205b5: 89 e5 mov %esp,%ebp 1205b7: 57 push %edi 1205b8: 53 push %ebx 1205b9: 8b 55 08 mov 0x8(%ebp),%edx 1205bc: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 1205bf: 85 db test %ebx,%ebx 1205c1: 74 66 je 120629 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 1205c3: 3b 15 0c 52 12 00 cmp 0x12520c,%edx 1205c9: 73 3d jae 120608 1205cb: c1 e2 06 shl $0x6,%edx 1205ce: 03 15 40 93 12 00 add 0x129340,%edx rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 1205d4: f6 42 15 01 testb $0x1,0x15(%edx) 1205d8: 74 2e je 120608 <== NEVER TAKEN if ( !iop->handlers ) 1205da: 8b 42 3c mov 0x3c(%edx),%eax 1205dd: 85 c0 test %eax,%eax 1205df: 74 27 je 120608 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 1205e1: 8b 40 18 mov 0x18(%eax),%eax 1205e4: 85 c0 test %eax,%eax 1205e6: 74 34 je 12061c <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 1205e8: b9 48 00 00 00 mov $0x48,%ecx 1205ed: 31 c0 xor %eax,%eax 1205ef: 89 df mov %ebx,%edi 1205f1: f3 aa rep stos %al,%es:(%edi) return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 1205f3: 8b 42 3c mov 0x3c(%edx),%eax 1205f6: 89 5d 0c mov %ebx,0xc(%ebp) 1205f9: 83 c2 18 add $0x18,%edx 1205fc: 89 55 08 mov %edx,0x8(%ebp) 1205ff: 8b 40 18 mov 0x18(%eax),%eax } 120602: 5b pop %ebx 120603: 5f pop %edi 120604: c9 leave * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 120605: ff e0 jmp *%eax 120607: 90 nop iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 120608: e8 5b 4a ff ff call 115068 <__errno> 12060d: c7 00 09 00 00 00 movl $0x9,(%eax) * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); } 120613: b8 ff ff ff ff mov $0xffffffff,%eax 120618: 5b pop %ebx 120619: 5f pop %edi 12061a: c9 leave 12061b: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 12061c: e8 47 4a ff ff call 115068 <__errno> <== NOT EXECUTED 120621: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 120627: eb ea jmp 120613 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 120629: e8 3a 4a ff ff call 115068 <__errno> 12062e: c7 00 0e 00 00 00 movl $0xe,(%eax) 120634: eb dd jmp 120613 =============================================================================== 00109394 : #include int fsync( int fd ) { 109394: 55 push %ebp 109395: 89 e5 mov %esp,%ebp 109397: 83 ec 08 sub $0x8,%esp 10939a: 8b 45 08 mov 0x8(%ebp),%eax rtems_libio_t *iop; rtems_libio_check_fd( fd ); 10939d: 3b 05 ac 6e 12 00 cmp 0x126eac,%eax 1093a3: 73 2b jae 1093d0 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 1093a5: c1 e0 06 shl $0x6,%eax 1093a8: 03 05 e0 af 12 00 add 0x12afe0,%eax rtems_libio_check_is_open(iop); 1093ae: 8b 50 14 mov 0x14(%eax),%edx 1093b1: f6 c6 01 test $0x1,%dh 1093b4: 74 1a je 1093d0 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 1093b6: 83 e2 04 and $0x4,%edx 1093b9: 74 29 je 1093e4 /* * Now process the fsync(). */ if ( !iop->handlers ) 1093bb: 8b 50 3c mov 0x3c(%eax),%edx 1093be: 85 d2 test %edx,%edx 1093c0: 74 0e je 1093d0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 1093c2: 8b 52 28 mov 0x28(%edx),%edx 1093c5: 85 d2 test %edx,%edx 1093c7: 74 28 je 1093f1 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 1093c9: 89 45 08 mov %eax,0x8(%ebp) } 1093cc: c9 leave rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 1093cd: ff e2 jmp *%edx 1093cf: 90 nop /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 1093d0: e8 0f ce 00 00 call 1161e4 <__errno> 1093d5: c7 00 09 00 00 00 movl $0x9,(%eax) if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); } 1093db: b8 ff ff ff ff mov $0xffffffff,%eax 1093e0: c9 leave 1093e1: c3 ret 1093e2: 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 ); 1093e4: e8 fb cd 00 00 call 1161e4 <__errno> 1093e9: c7 00 16 00 00 00 movl $0x16,(%eax) 1093ef: eb ea jmp 1093db if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1093f1: e8 ee cd 00 00 call 1161e4 <__errno> 1093f6: c7 00 86 00 00 00 movl $0x86,(%eax) 1093fc: eb dd jmp 1093db =============================================================================== 00110be8 : int ftruncate( int fd, off_t length ) { 110be8: 55 push %ebp 110be9: 89 e5 mov %esp,%ebp 110beb: 57 push %edi 110bec: 56 push %esi 110bed: 53 push %ebx 110bee: 83 ec 3c sub $0x3c,%esp 110bf1: 8b 5d 08 mov 0x8(%ebp),%ebx 110bf4: 8b 45 0c mov 0xc(%ebp),%eax 110bf7: 8b 55 10 mov 0x10(%ebp),%edx 110bfa: 89 45 c0 mov %eax,-0x40(%ebp) 110bfd: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 110c00: 3b 1d 0c 52 12 00 cmp 0x12520c,%ebx 110c06: 73 5c jae 110c64 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 110c08: c1 e3 06 shl $0x6,%ebx 110c0b: 03 1d 40 93 12 00 add 0x129340,%ebx rtems_libio_check_is_open(iop); 110c11: f6 43 15 01 testb $0x1,0x15(%ebx) 110c15: 74 4d je 110c64 <== NEVER TAKEN /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 110c17: 8d 45 d4 lea -0x2c(%ebp),%eax 110c1a: 8d 73 18 lea 0x18(%ebx),%esi 110c1d: b9 05 00 00 00 mov $0x5,%ecx 110c22: 89 c7 mov %eax,%edi 110c24: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 110c26: 8b 55 e0 mov -0x20(%ebp),%edx 110c29: 8b 52 10 mov 0x10(%edx),%edx 110c2c: 85 d2 test %edx,%edx 110c2e: 74 5c je 110c8c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 110c30: 83 ec 0c sub $0xc,%esp 110c33: 50 push %eax 110c34: ff d2 call *%edx 110c36: 83 c4 10 add $0x10,%esp 110c39: 48 dec %eax 110c3a: 74 62 je 110c9e rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110c3c: f6 43 14 04 testb $0x4,0x14(%ebx) 110c40: 74 36 je 110c78 <== NEVER TAKEN if ( !iop->handlers->ftruncate_h ) 110c42: 8b 43 3c mov 0x3c(%ebx),%eax 110c45: 8b 40 20 mov 0x20(%eax),%eax 110c48: 85 c0 test %eax,%eax 110c4a: 74 40 je 110c8c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 110c4c: 52 push %edx 110c4d: ff 75 c4 pushl -0x3c(%ebp) 110c50: ff 75 c0 pushl -0x40(%ebp) 110c53: 53 push %ebx 110c54: ff d0 call *%eax 110c56: 83 c4 10 add $0x10,%esp } 110c59: 8d 65 f4 lea -0xc(%ebp),%esp 110c5c: 5b pop %ebx 110c5d: 5e pop %esi 110c5e: 5f pop %edi 110c5f: c9 leave 110c60: c3 ret 110c61: 8d 76 00 lea 0x0(%esi),%esi 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); 110c64: e8 ff 43 00 00 call 115068 <__errno> <== NOT EXECUTED 110c69: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 110c6f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110c74: eb e3 jmp 110c59 <== NOT EXECUTED 110c76: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 110c78: e8 eb 43 00 00 call 115068 <__errno> <== NOT EXECUTED 110c7d: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110c83: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110c88: eb cf jmp 110c59 <== NOT EXECUTED 110c8a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 110c8c: e8 d7 43 00 00 call 115068 <__errno> <== NOT EXECUTED 110c91: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 110c97: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110c9c: eb bb jmp 110c59 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 110c9e: e8 c5 43 00 00 call 115068 <__errno> 110ca3: c7 00 15 00 00 00 movl $0x15,(%eax) 110ca9: b8 ff ff ff ff mov $0xffffffff,%eax 110cae: eb a9 jmp 110c59 =============================================================================== 00122158 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 122158: 55 push %ebp 122159: 89 e5 mov %esp,%ebp 12215b: 57 push %edi 12215c: 56 push %esi 12215d: 53 push %ebx 12215e: 83 ec 2c sub $0x2c,%esp 122161: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 122164: 3b 1d ec 7e 12 00 cmp 0x127eec,%ebx 12216a: 72 48 jb 1221b4 <== ALWAYS TAKEN 12216c: 31 db xor %ebx,%ebx /* * Make sure we are working on a directory */ loc = iop->pathinfo; 12216e: 8d 45 d4 lea -0x2c(%ebp),%eax 122171: 8d 73 18 lea 0x18(%ebx),%esi 122174: b9 05 00 00 00 mov $0x5,%ecx 122179: 89 c7 mov %eax,%edi 12217b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !loc.ops->node_type_h ) 12217d: 8b 55 e0 mov -0x20(%ebp),%edx 122180: 8b 52 10 mov 0x10(%edx),%edx 122183: 85 d2 test %edx,%edx 122185: 74 4d je 1221d4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 122187: 83 ec 0c sub $0xc,%esp 12218a: 50 push %eax 12218b: ff d2 call *%edx 12218d: 83 c4 10 add $0x10,%esp 122190: 48 dec %eax 122191: 75 2d jne 1221c0 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 122193: 8b 43 3c mov 0x3c(%ebx),%eax 122196: 8b 40 08 mov 0x8(%eax),%eax 122199: 85 c0 test %eax,%eax 12219b: 74 37 je 1221d4 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 12219d: 52 push %edx 12219e: ff 75 10 pushl 0x10(%ebp) 1221a1: ff 75 0c pushl 0xc(%ebp) 1221a4: 53 push %ebx 1221a5: ff d0 call *%eax 1221a7: 83 c4 10 add $0x10,%esp } 1221aa: 8d 65 f4 lea -0xc(%ebp),%esp 1221ad: 5b pop %ebx 1221ae: 5e pop %esi 1221af: 5f pop %edi 1221b0: c9 leave 1221b1: c3 ret 1221b2: 66 90 xchg %ax,%ax /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 1221b4: c1 e3 06 shl $0x6,%ebx 1221b7: 03 1d 60 c1 12 00 add 0x12c160,%ebx 1221bd: eb af jmp 12216e 1221bf: 90 nop loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 1221c0: e8 df 40 ff ff call 1162a4 <__errno> 1221c5: c7 00 14 00 00 00 movl $0x14,(%eax) 1221cb: b8 ff ff ff ff mov $0xffffffff,%eax 1221d0: eb d8 jmp 1221aa 1221d2: 66 90 xchg %ax,%ax * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1221d4: e8 cb 40 ff ff call 1162a4 <__errno> <== NOT EXECUTED 1221d9: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1221df: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1221e4: eb c4 jmp 1221aa <== NOT EXECUTED =============================================================================== 00108ca4 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 108ca4: 55 push %ebp 108ca5: 89 e5 mov %esp,%ebp 108ca7: 57 push %edi 108ca8: 56 push %esi 108ca9: 53 push %ebx 108caa: 83 ec 1c sub $0x1c,%esp 108cad: 89 c3 mov %eax,%ebx 108caf: 89 55 e4 mov %edx,-0x1c(%ebp) 108cb2: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108cb4: e8 af fe ff ff call 108b68 if ((fp = fopen("/etc/group", "r")) == NULL) { 108cb9: 83 ec 08 sub $0x8,%esp 108cbc: 68 43 29 12 00 push $0x122943 108cc1: 68 f9 3d 12 00 push $0x123df9 108cc6: e8 0d d5 00 00 call 1161d8 108ccb: 89 c7 mov %eax,%edi 108ccd: 83 c4 10 add $0x10,%esp 108cd0: 85 c0 test %eax,%eax 108cd2: 75 22 jne 108cf6 <== ALWAYS TAKEN 108cd4: e9 8b 00 00 00 jmp 108d64 <== NOT EXECUTED 108cd9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 108cdc: 83 ec 08 sub $0x8,%esp 108cdf: 53 push %ebx 108ce0: ff 36 pushl (%esi) 108ce2: e8 8d e2 00 00 call 116f74 108ce7: 83 c4 10 add $0x10,%esp 108cea: 85 c0 test %eax,%eax 108cec: 0f 94 c0 sete %al 108cef: 0f b6 c0 movzbl %al,%eax } else { match = (grp->gr_gid == gid); } if (match) { 108cf2: 85 c0 test %eax,%eax 108cf4: 75 2e jne 108d24 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 108cf6: 83 ec 0c sub $0xc,%esp 108cf9: ff 75 0c pushl 0xc(%ebp) 108cfc: 8b 4d 08 mov 0x8(%ebp),%ecx 108cff: 89 f2 mov %esi,%edx 108d01: 89 f8 mov %edi,%eax 108d03: e8 d4 fb ff ff call 1088dc 108d08: 83 c4 10 add $0x10,%esp 108d0b: 85 c0 test %eax,%eax 108d0d: 74 31 je 108d40 <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 108d0f: 85 db test %ebx,%ebx 108d11: 75 c9 jne 108cdc <== ALWAYS TAKEN match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 108d13: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 108d17: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 108d1a: 0f 94 c0 sete %al <== NOT EXECUTED 108d1d: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 108d20: 85 c0 test %eax,%eax <== NOT EXECUTED 108d22: 74 d2 je 108cf6 <== NOT EXECUTED fclose(fp); 108d24: 83 ec 0c sub $0xc,%esp 108d27: 57 push %edi 108d28: e8 47 ce 00 00 call 115b74 *result = grp; 108d2d: 8b 45 10 mov 0x10(%ebp),%eax 108d30: 89 30 mov %esi,(%eax) 108d32: 31 c0 xor %eax,%eax return 0; 108d34: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 108d37: 8d 65 f4 lea -0xc(%ebp),%esp 108d3a: 5b pop %ebx 108d3b: 5e pop %esi 108d3c: 5f pop %edi 108d3d: c9 leave 108d3e: c3 ret 108d3f: 90 nop errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 108d40: e8 e3 cc 00 00 call 115a28 <__errno> <== NOT EXECUTED 108d45: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 108d4b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d4e: 57 push %edi <== NOT EXECUTED 108d4f: e8 20 ce 00 00 call 115b74 <== NOT EXECUTED 108d54: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 108d59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 108d5c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108d5f: 5b pop %ebx <== NOT EXECUTED 108d60: 5e pop %esi <== NOT EXECUTED 108d61: 5f pop %edi <== NOT EXECUTED 108d62: c9 leave <== NOT EXECUTED 108d63: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 108d64: e8 bf cc 00 00 call 115a28 <__errno> <== NOT EXECUTED 108d69: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108d6f: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 108d72: eb c3 jmp 108d37 <== NOT EXECUTED =============================================================================== 001089f4 : return NULL; return p; } struct group *getgrent(void) { 1089f4: 55 push %ebp <== NOT EXECUTED 1089f5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1089f7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (group_fp == NULL) 1089fa: a1 44 a6 12 00 mov 0x12a644,%eax <== NOT EXECUTED 1089ff: 85 c0 test %eax,%eax <== NOT EXECUTED 108a01: 75 05 jne 108a08 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 108a03: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &grent; } 108a05: c9 leave <== NOT EXECUTED 108a06: c3 ret <== NOT EXECUTED 108a07: 90 nop <== NOT EXECUTED struct group *getgrent(void) { if (group_fp == NULL) return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 108a08: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108a0b: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 108a10: b9 60 a6 12 00 mov $0x12a660,%ecx <== NOT EXECUTED 108a15: ba 28 a7 12 00 mov $0x12a728,%edx <== NOT EXECUTED 108a1a: e8 bd fe ff ff call 1088dc <== NOT EXECUTED 108a1f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108a22: 85 c0 test %eax,%eax <== NOT EXECUTED 108a24: 74 dd je 108a03 <== NOT EXECUTED 108a26: b8 28 a7 12 00 mov $0x12a728,%eax <== NOT EXECUTED return NULL; return &grent; } 108a2b: c9 leave <== NOT EXECUTED 108a2c: c3 ret <== NOT EXECUTED =============================================================================== 00108da0 : } struct group *getgrgid( gid_t gid ) { 108da0: 55 push %ebp <== NOT EXECUTED 108da1: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108da3: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 108da6: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 108da9: 50 push %eax <== NOT EXECUTED 108daa: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 108daf: 68 60 a6 12 00 push $0x12a660 <== NOT EXECUTED 108db4: 68 28 a7 12 00 push $0x12a728 <== NOT EXECUTED 108db9: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 108dbd: 50 push %eax <== NOT EXECUTED 108dbe: e8 b1 ff ff ff call 108d74 <== NOT EXECUTED 108dc3: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 108dc6: 85 c0 test %eax,%eax <== NOT EXECUTED 108dc8: 75 06 jne 108dd0 <== NOT EXECUTED return NULL; return p; 108dca: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 108dcd: c9 leave <== NOT EXECUTED 108dce: c3 ret <== NOT EXECUTED 108dcf: 90 nop <== NOT EXECUTED gid_t gid ) { struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 108dd0: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 108dd2: c9 leave <== NOT EXECUTED 108dd3: c3 ret <== NOT EXECUTED =============================================================================== 00108d74 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 108d74: 55 push %ebp <== NOT EXECUTED 108d75: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108d77: 53 push %ebx <== NOT EXECUTED 108d78: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 108d7b: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 108d7e: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 108d81: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 108d85: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 108d88: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 108d8b: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 108d8e: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 108d91: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 108d94: 31 c0 xor %eax,%eax <== NOT EXECUTED } 108d96: 5b pop %ebx <== NOT EXECUTED 108d97: 5b pop %ebx <== NOT EXECUTED 108d98: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct group **result ) { return getgr_r(NULL, gid, grp, buffer, bufsize, result); 108d99: e9 06 ff ff ff jmp 108ca4 <== NOT EXECUTED =============================================================================== 00108e00 : } struct group *getgrnam( const char *name ) { 108e00: 55 push %ebp 108e01: 89 e5 mov %esp,%ebp 108e03: 83 ec 24 sub $0x24,%esp struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 108e06: 8d 45 f4 lea -0xc(%ebp),%eax 108e09: 50 push %eax 108e0a: 68 c8 00 00 00 push $0xc8 108e0f: 68 60 a6 12 00 push $0x12a660 108e14: 68 28 a7 12 00 push $0x12a728 108e19: ff 75 08 pushl 0x8(%ebp) 108e1c: e8 b3 ff ff ff call 108dd4 108e21: 83 c4 20 add $0x20,%esp 108e24: 85 c0 test %eax,%eax 108e26: 75 08 jne 108e30 <== NEVER TAKEN return NULL; return p; 108e28: 8b 45 f4 mov -0xc(%ebp),%eax } 108e2b: c9 leave 108e2c: c3 ret 108e2d: 8d 76 00 lea 0x0(%esi),%esi const char *name ) { struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 108e30: 31 c0 xor %eax,%eax return NULL; return p; } 108e32: c9 leave <== NOT EXECUTED 108e33: c3 ret <== NOT EXECUTED =============================================================================== 0010b838 : int getitimer( int which, struct itimerval *value ) { 10b838: 55 push %ebp 10b839: 89 e5 mov %esp,%ebp 10b83b: 83 ec 08 sub $0x8,%esp if ( !value ) 10b83e: 8b 45 0c mov 0xc(%ebp),%eax 10b841: 85 c0 test %eax,%eax 10b843: 74 2f je 10b874 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b845: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b849: 76 15 jbe 10b860 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b84b: e8 34 9f 00 00 call 115784 <__errno> 10b850: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b856: b8 ff ff ff ff mov $0xffffffff,%eax 10b85b: c9 leave 10b85c: c3 ret 10b85d: 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 ); 10b860: e8 1f 9f 00 00 call 115784 <__errno> 10b865: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b86b: b8 ff ff ff ff mov $0xffffffff,%eax 10b870: c9 leave 10b871: c3 ret 10b872: 66 90 xchg %ax,%ax int which, struct itimerval *value ) { if ( !value ) rtems_set_errno_and_return_minus_one( EFAULT ); 10b874: e8 0b 9f 00 00 call 115784 <__errno> 10b879: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b87f: eb d5 jmp 10b856 =============================================================================== 00108e70 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 108e70: 55 push %ebp 108e71: 89 e5 mov %esp,%ebp 108e73: 57 push %edi 108e74: 56 push %esi 108e75: 53 push %ebx 108e76: 83 ec 1c sub $0x1c,%esp 108e79: 89 c3 mov %eax,%ebx 108e7b: 89 55 e4 mov %edx,-0x1c(%ebp) 108e7e: 89 ce mov %ecx,%esi FILE *fp; int match; init_etc_passwd_group(); 108e80: e8 e3 fc ff ff call 108b68 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 108e85: 83 ec 08 sub $0x8,%esp 108e88: 68 43 29 12 00 push $0x122943 108e8d: 68 ed 3d 12 00 push $0x123ded 108e92: e8 41 d3 00 00 call 1161d8 108e97: 89 c7 mov %eax,%edi 108e99: 83 c4 10 add $0x10,%esp 108e9c: 85 c0 test %eax,%eax 108e9e: 75 22 jne 108ec2 <== ALWAYS TAKEN 108ea0: e9 8b 00 00 00 jmp 108f30 <== NOT EXECUTED 108ea5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 108ea8: 83 ec 08 sub $0x8,%esp 108eab: 53 push %ebx 108eac: ff 36 pushl (%esi) 108eae: e8 c1 e0 00 00 call 116f74 108eb3: 83 c4 10 add $0x10,%esp 108eb6: 85 c0 test %eax,%eax 108eb8: 0f 94 c0 sete %al 108ebb: 0f b6 c0 movzbl %al,%eax } else { match = (pwd->pw_uid == uid); } if (match) { 108ebe: 85 c0 test %eax,%eax 108ec0: 75 2e jne 108ef0 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 108ec2: 83 ec 0c sub $0xc,%esp 108ec5: ff 75 0c pushl 0xc(%ebp) 108ec8: 8b 4d 08 mov 0x8(%ebp),%ecx 108ecb: 89 f2 mov %esi,%edx 108ecd: 89 f8 mov %edi,%eax 108ecf: e8 5c fb ff ff call 108a30 108ed4: 83 c4 10 add $0x10,%esp 108ed7: 85 c0 test %eax,%eax 108ed9: 74 31 je 108f0c <== NEVER TAKEN errno = EINVAL; fclose(fp); return -1; } if (name) { 108edb: 85 db test %ebx,%ebx 108edd: 75 c9 jne 108ea8 <== ALWAYS TAKEN match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 108edf: 0f b7 46 08 movzwl 0x8(%esi),%eax <== NOT EXECUTED 108ee3: 3b 45 e4 cmp -0x1c(%ebp),%eax <== NOT EXECUTED 108ee6: 0f 94 c0 sete %al <== NOT EXECUTED 108ee9: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED } if (match) { 108eec: 85 c0 test %eax,%eax <== NOT EXECUTED 108eee: 74 d2 je 108ec2 <== NOT EXECUTED fclose(fp); 108ef0: 83 ec 0c sub $0xc,%esp 108ef3: 57 push %edi 108ef4: e8 7b cc 00 00 call 115b74 *result = pwd; 108ef9: 8b 45 10 mov 0x10(%ebp),%eax 108efc: 89 30 mov %esi,(%eax) 108efe: 31 c0 xor %eax,%eax return 0; 108f00: 83 c4 10 add $0x10,%esp } } fclose(fp); errno = EINVAL; return -1; } 108f03: 8d 65 f4 lea -0xc(%ebp),%esp 108f06: 5b pop %ebx 108f07: 5e pop %esi 108f08: 5f pop %edi 108f09: c9 leave 108f0a: c3 ret 108f0b: 90 nop errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 108f0c: e8 17 cb 00 00 call 115a28 <__errno> <== NOT EXECUTED 108f11: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED fclose(fp); 108f17: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108f1a: 57 push %edi <== NOT EXECUTED 108f1b: e8 54 cc 00 00 call 115b74 <== NOT EXECUTED 108f20: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 108f25: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 108f28: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108f2b: 5b pop %ebx <== NOT EXECUTED 108f2c: 5e pop %esi <== NOT EXECUTED 108f2d: 5f pop %edi <== NOT EXECUTED 108f2e: c9 leave <== NOT EXECUTED 108f2f: c3 ret <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 108f30: e8 f3 ca 00 00 call 115a28 <__errno> <== NOT EXECUTED 108f35: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108f3b: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED return -1; 108f3e: eb c3 jmp 108f03 <== NOT EXECUTED =============================================================================== 00108b2c : return NULL; return p; } struct passwd *getpwent(void) { 108b2c: 55 push %ebp <== NOT EXECUTED 108b2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108b2f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED if (passwd_fp == NULL) 108b32: a1 44 a5 12 00 mov 0x12a544,%eax <== NOT EXECUTED 108b37: 85 c0 test %eax,%eax <== NOT EXECUTED 108b39: 75 05 jne 108b40 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 108b3b: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return &pwent; } 108b3d: c9 leave <== NOT EXECUTED 108b3e: c3 ret <== NOT EXECUTED 108b3f: 90 nop <== NOT EXECUTED struct passwd *getpwent(void) { if (passwd_fp == NULL) return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 108b40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108b43: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 108b48: b9 60 a5 12 00 mov $0x12a560,%ecx <== NOT EXECUTED 108b4d: ba 28 a6 12 00 mov $0x12a628,%edx <== NOT EXECUTED 108b52: e8 d9 fe ff ff call 108a30 <== NOT EXECUTED 108b57: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108b5a: 85 c0 test %eax,%eax <== NOT EXECUTED 108b5c: 74 dd je 108b3b <== NOT EXECUTED 108b5e: b8 28 a6 12 00 mov $0x12a628,%eax <== NOT EXECUTED return NULL; return &pwent; } 108b63: c9 leave <== NOT EXECUTED 108b64: c3 ret <== NOT EXECUTED =============================================================================== 00108fcc : } struct passwd *getpwnam( const char *name ) { 108fcc: 55 push %ebp 108fcd: 89 e5 mov %esp,%ebp 108fcf: 83 ec 24 sub $0x24,%esp struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108fd2: 8d 45 f4 lea -0xc(%ebp),%eax 108fd5: 50 push %eax 108fd6: 68 c8 00 00 00 push $0xc8 108fdb: 68 60 a5 12 00 push $0x12a560 108fe0: 68 28 a6 12 00 push $0x12a628 108fe5: ff 75 08 pushl 0x8(%ebp) 108fe8: e8 b3 ff ff ff call 108fa0 108fed: 83 c4 20 add $0x20,%esp 108ff0: 85 c0 test %eax,%eax 108ff2: 75 08 jne 108ffc <== NEVER TAKEN return NULL; return p; 108ff4: 8b 45 f4 mov -0xc(%ebp),%eax } 108ff7: c9 leave 108ff8: c3 ret 108ff9: 8d 76 00 lea 0x0(%esi),%esi const char *name ) { struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 108ffc: 31 c0 xor %eax,%eax return NULL; return p; } 108ffe: c9 leave <== NOT EXECUTED 108fff: c3 ret <== NOT EXECUTED =============================================================================== 00108f6c : } struct passwd *getpwuid( uid_t uid ) { 108f6c: 55 push %ebp <== NOT EXECUTED 108f6d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108f6f: 83 ec 24 sub $0x24,%esp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 108f72: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 108f75: 50 push %eax <== NOT EXECUTED 108f76: 68 c8 00 00 00 push $0xc8 <== NOT EXECUTED 108f7b: 68 60 a5 12 00 push $0x12a560 <== NOT EXECUTED 108f80: 68 28 a6 12 00 push $0x12a628 <== NOT EXECUTED 108f85: 0f b7 45 08 movzwl 0x8(%ebp),%eax <== NOT EXECUTED 108f89: 50 push %eax <== NOT EXECUTED 108f8a: e8 b1 ff ff ff call 108f40 <== NOT EXECUTED 108f8f: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 108f92: 85 c0 test %eax,%eax <== NOT EXECUTED 108f94: 75 06 jne 108f9c <== NOT EXECUTED return NULL; return p; 108f96: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED } 108f99: c9 leave <== NOT EXECUTED 108f9a: c3 ret <== NOT EXECUTED 108f9b: 90 nop <== NOT EXECUTED uid_t uid ) { struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 108f9c: 31 c0 xor %eax,%eax <== NOT EXECUTED return NULL; return p; } 108f9e: c9 leave <== NOT EXECUTED 108f9f: c3 ret <== NOT EXECUTED =============================================================================== 00108f40 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 108f40: 55 push %ebp <== NOT EXECUTED 108f41: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108f43: 53 push %ebx <== NOT EXECUTED 108f44: 83 ec 04 sub $0x4,%esp <== NOT EXECUTED 108f47: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 108f4a: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 108f4d: 0f b7 55 08 movzwl 0x8(%ebp),%edx <== NOT EXECUTED 108f51: 8b 5d 18 mov 0x18(%ebp),%ebx <== NOT EXECUTED 108f54: 89 5d 10 mov %ebx,0x10(%ebp) <== NOT EXECUTED 108f57: 8b 5d 14 mov 0x14(%ebp),%ebx <== NOT EXECUTED 108f5a: 89 5d 0c mov %ebx,0xc(%ebp) <== NOT EXECUTED 108f5d: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 108f60: 31 c0 xor %eax,%eax <== NOT EXECUTED } 108f62: 5b pop %ebx <== NOT EXECUTED 108f63: 5b pop %ebx <== NOT EXECUTED 108f64: c9 leave <== NOT EXECUTED char *buffer, size_t bufsize, struct passwd **result ) { return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 108f65: e9 06 ff ff ff jmp 108e70 <== NOT EXECUTED =============================================================================== 00108600 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 108600: 55 push %ebp 108601: 89 e5 mov %esp,%ebp 108603: 56 push %esi 108604: 53 push %ebx 108605: 83 ec 20 sub $0x20,%esp 108608: 8b 5d 08 mov 0x8(%ebp),%ebx /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 10860b: 85 db test %ebx,%ebx 10860d: 74 42 je 108651 <== NEVER TAKEN { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10860f: 9c pushf 108610: fa cli 108611: 5e pop %esi _TOD_Get( &now ); 108612: 83 ec 0c sub $0xc,%esp 108615: 8d 45 f0 lea -0x10(%ebp),%eax 108618: 50 push %eax 108619: e8 66 44 00 00 call 10ca84 <_TOD_Get> _ISR_Enable(level); 10861e: 56 push %esi 10861f: 9d popf useconds = (suseconds_t)now.tv_nsec; 108620: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 108623: 8b 45 f0 mov -0x10(%ebp),%eax 108626: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 108628: be d3 4d 62 10 mov $0x10624dd3,%esi 10862d: 89 c8 mov %ecx,%eax 10862f: f7 ee imul %esi 108631: 89 45 e0 mov %eax,-0x20(%ebp) 108634: 89 55 e4 mov %edx,-0x1c(%ebp) 108637: 8b 75 e4 mov -0x1c(%ebp),%esi 10863a: c1 fe 06 sar $0x6,%esi 10863d: 89 c8 mov %ecx,%eax 10863f: 99 cltd 108640: 29 d6 sub %edx,%esi 108642: 89 73 04 mov %esi,0x4(%ebx) 108645: 31 c0 xor %eax,%eax * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 108647: 83 c4 10 add $0x10,%esp } 10864a: 8d 65 f8 lea -0x8(%ebp),%esp 10864d: 5b pop %ebx 10864e: 5e pop %esi 10864f: c9 leave 108650: c3 ret void * __tz __attribute__((unused)) ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 108651: e8 12 ca 00 00 call 115068 <__errno> <== NOT EXECUTED 108656: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10865c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED return -1; 108661: eb e7 jmp 10864a <== NOT EXECUTED =============================================================================== 00113c64 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113c64: 55 push %ebp 113c65: 89 e5 mov %esp,%ebp 113c67: 8b 45 08 mov 0x8(%ebp),%eax IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; 113c6a: 8b 50 38 mov 0x38(%eax),%edx 113c6d: 83 7a 4c 01 cmpl $0x1,0x4c(%edx) 113c71: 74 09 je 113c7c <== ALWAYS TAKEN 113c73: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 113c78: c9 leave <== NOT EXECUTED 113c79: c3 ret <== NOT EXECUTED 113c7a: 66 90 xchg %ax,%ax <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 113c7c: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 113c83: c7 40 10 00 00 00 00 movl $0x0,0x10(%eax) 113c8a: 31 c0 xor %eax,%eax return 0; } 113c8c: c9 leave 113c8d: c3 ret =============================================================================== 00113e9c : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 113e9c: 55 push %ebp 113e9d: 89 e5 mov %esp,%ebp 113e9f: 57 push %edi 113ea0: 56 push %esi 113ea1: 53 push %ebx 113ea2: 81 ec 4c 01 00 00 sub $0x14c,%esp int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 113ea8: 8b 55 08 mov 0x8(%ebp),%edx 113eab: 8b 42 38 mov 0x38(%edx),%eax */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 113eae: 8b 58 50 mov 0x50(%eax),%ebx */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 113eb1: 83 c0 54 add $0x54,%eax 113eb4: 89 85 cc fe ff ff mov %eax,-0x134(%ebp) the_chain = &the_jnode->info.directory.Entries; if ( rtems_chain_is_empty( the_chain ) ) 113eba: 39 c3 cmp %eax,%ebx 113ebc: 0f 84 2a 01 00 00 je 113fec /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 113ec2: 8b 45 08 mov 0x8(%ebp),%eax 113ec5: 8b 40 0c mov 0xc(%eax),%eax 113ec8: 89 85 d0 fe ff ff mov %eax,-0x130(%ebp) /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 113ece: ba f1 f0 f0 f0 mov $0xf0f0f0f1,%edx 113ed3: 8b 45 10 mov 0x10(%ebp),%eax 113ed6: f7 e2 mul %edx 113ed8: c1 ea 08 shr $0x8,%edx 113edb: 89 d0 mov %edx,%eax 113edd: c1 e0 04 shl $0x4,%eax 113ee0: c1 e2 08 shl $0x8,%edx 113ee3: 8d 14 10 lea (%eax,%edx,1),%edx 113ee6: 03 95 d0 fe ff ff add -0x130(%ebp),%edx 113eec: 89 95 d4 fe ff ff mov %edx,-0x12c(%ebp) /* The directory was not empty so try to move to the desired entry in chain*/ for ( 113ef2: 85 d2 test %edx,%edx 113ef4: 0f 8e f2 00 00 00 jle 113fec <== NEVER TAKEN 113efa: 31 d2 xor %edx,%edx 113efc: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 113f03: 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 ); 113f06: 8d 85 d8 fe ff ff lea -0x128(%ebp),%eax 113f0c: 89 85 b4 fe ff ff mov %eax,-0x14c(%ebp) 113f12: eb 20 jmp 113f34 ); iop->offset = iop->offset + sizeof(struct dirent); bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 113f14: 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( 113f16: 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 ( 113f1c: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 113f22: 0f 8d b4 00 00 00 jge 113fdc <== 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 ) ){ 113f28: 3b 9d cc fe ff ff cmp -0x134(%ebp),%ebx 113f2e: 0f 84 a8 00 00 00 je 113fdc /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 113f34: 39 95 d0 fe ff ff cmp %edx,-0x130(%ebp) 113f3a: 7f d8 jg 113f14 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 113f3c: 89 95 dc fe ff ff mov %edx,-0x124(%ebp) 113f42: 89 d0 mov %edx,%eax 113f44: c1 f8 1f sar $0x1f,%eax 113f47: 89 85 e0 fe ff ff mov %eax,-0x120(%ebp) tmp_dirent.d_reclen = sizeof( struct dirent ); 113f4d: 66 c7 85 e4 fe ff ff movw $0x110,-0x11c(%ebp) 113f54: 10 01 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 113f56: 8b 43 38 mov 0x38(%ebx),%eax 113f59: 89 85 d8 fe ff ff mov %eax,-0x128(%ebp) tmp_dirent.d_namlen = strlen( the_jnode->name ); 113f5f: 8d 73 0c lea 0xc(%ebx),%esi 113f62: 31 c0 xor %eax,%eax 113f64: b9 ff ff ff ff mov $0xffffffff,%ecx 113f69: 89 f7 mov %esi,%edi 113f6b: f2 ae repnz scas %es:(%edi),%al 113f6d: f7 d1 not %ecx 113f6f: 49 dec %ecx 113f70: 66 89 8d e6 fe ff ff mov %cx,-0x11a(%ebp) strcpy( tmp_dirent.d_name, the_jnode->name ); 113f77: 83 ec 08 sub $0x8,%esp 113f7a: 56 push %esi 113f7b: 8d 85 e8 fe ff ff lea -0x118(%ebp),%eax 113f81: 50 push %eax 113f82: 89 95 c4 fe ff ff mov %edx,-0x13c(%ebp) 113f88: e8 fb 1b 00 00 call 115b88 memcpy( 113f8d: 8b 45 0c mov 0xc(%ebp),%eax 113f90: 03 85 c8 fe ff ff add -0x138(%ebp),%eax 113f96: b9 44 00 00 00 mov $0x44,%ecx 113f9b: 89 c7 mov %eax,%edi 113f9d: 8b b5 b4 fe ff ff mov -0x14c(%ebp),%esi 113fa3: f3 a5 rep movsl %ds:(%esi),%es:(%edi) buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 113fa5: 8b 45 08 mov 0x8(%ebp),%eax 113fa8: 81 40 0c 10 01 00 00 addl $0x110,0xc(%eax) 113faf: 83 50 10 00 adcl $0x0,0x10(%eax) bytes_transferred = bytes_transferred + sizeof( struct dirent ); 113fb3: 81 85 c8 fe ff ff 10 addl $0x110,-0x138(%ebp) 113fba: 01 00 00 113fbd: 83 c4 10 add $0x10,%esp 113fc0: 8b 95 c4 fe ff ff mov -0x13c(%ebp),%edx } the_node = the_node->next; 113fc6: 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( 113fc8: 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 ( 113fce: 3b 95 d4 fe ff ff cmp -0x12c(%ebp),%edx 113fd4: 0f 8c 4e ff ff ff jl 113f28 <== NEVER TAKEN 113fda: 66 90 xchg %ax,%ax the_node = the_node->next; } /* Success */ return bytes_transferred; } 113fdc: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 113fe2: 8d 65 f4 lea -0xc(%ebp),%esp 113fe5: 5b pop %ebx 113fe6: 5e pop %esi 113fe7: 5f pop %edi 113fe8: c9 leave 113fe9: c3 ret 113fea: 66 90 xchg %ax,%ax /* 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 ( 113fec: c7 85 c8 fe ff ff 00 movl $0x0,-0x138(%ebp) 113ff3: 00 00 00 the_node = the_node->next; } /* Success */ return bytes_transferred; } 113ff6: 8b 85 c8 fe ff ff mov -0x138(%ebp),%eax 113ffc: 8d 65 f4 lea -0xc(%ebp),%esp 113fff: 5b pop %ebx 114000: 5e pop %esi 114001: 5f pop %edi 114002: c9 leave 114003: c3 ret =============================================================================== 00113dc0 : int imfs_dir_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 113dc0: 55 push %ebp 113dc1: 89 e5 mov %esp,%ebp 113dc3: 56 push %esi 113dc4: 53 push %ebx 113dc5: 83 ec 10 sub $0x10,%esp 113dc8: 8b 75 0c mov 0xc(%ebp),%esi IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 113dcb: 8b 1e mov (%esi),%ebx 113dcd: 8d 43 54 lea 0x54(%ebx),%eax 113dd0: 39 43 50 cmp %eax,0x50(%ebx) 113dd3: 0f 85 8f 00 00 00 jne 113e68 /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 113dd9: 8b 46 10 mov 0x10(%esi),%eax 113ddc: 3b 58 1c cmp 0x1c(%eax),%ebx 113ddf: 0f 84 97 00 00 00 je 113e7c /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 113de5: 8b 43 5c mov 0x5c(%ebx),%eax 113de8: 85 c0 test %eax,%eax 113dea: 0f 85 8c 00 00 00 jne 113e7c <== NEVER TAKEN /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 113df0: 8b 4b 08 mov 0x8(%ebx),%ecx 113df3: 85 c9 test %ecx,%ecx 113df5: 74 13 je 113e0a 113df7: 83 ec 0c sub $0xc,%esp 113dfa: 53 push %ebx 113dfb: e8 e4 87 ff ff call 10c5e4 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 113e00: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 113e07: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 113e0a: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 113e0e: 83 ec 08 sub $0x8,%esp 113e11: 6a 00 push $0x0 113e13: 8d 45 f0 lea -0x10(%ebp),%eax 113e16: 50 push %eax 113e17: e8 e4 47 ff ff call 108600 113e1c: 8b 45 f0 mov -0x10(%ebp),%eax 113e1f: 89 43 48 mov %eax,0x48(%ebx) /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 113e22: 89 1c 24 mov %ebx,(%esp) 113e25: e8 fe ce ff ff call 110d28 113e2a: 83 c4 10 add $0x10,%esp 113e2d: 85 c0 test %eax,%eax 113e2f: 75 2b jne 113e5c 113e31: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 113e36: 75 24 jne 113e5c /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 113e38: a1 e4 70 12 00 mov 0x1270e4,%eax 113e3d: 8b 50 04 mov 0x4(%eax),%edx 113e40: 3b 16 cmp (%esi),%edx 113e42: 74 4c je 113e90 <== NEVER TAKEN /* * Free memory associated with a memory file. */ free( the_jnode ); 113e44: 83 ec 0c sub $0xc,%esp 113e47: 53 push %ebx 113e48: e8 37 47 ff ff call 108584 113e4d: 31 c0 xor %eax,%eax 113e4f: 83 c4 10 add $0x10,%esp } return 0; } 113e52: 8d 65 f8 lea -0x8(%ebp),%esp 113e55: 5b pop %ebx 113e56: 5e pop %esi 113e57: c9 leave 113e58: c3 ret 113e59: 8d 76 00 lea 0x0(%esi),%esi /* * Free memory associated with a memory file. */ free( the_jnode ); 113e5c: 31 c0 xor %eax,%eax } return 0; } 113e5e: 8d 65 f8 lea -0x8(%ebp),%esp 113e61: 5b pop %ebx 113e62: 5e pop %esi 113e63: c9 leave 113e64: c3 ret 113e65: 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 ); 113e68: e8 fb 11 00 00 call 115068 <__errno> 113e6d: c7 00 5a 00 00 00 movl $0x5a,(%eax) 113e73: b8 ff ff ff ff mov $0xffffffff,%eax 113e78: eb e4 jmp 113e5e 113e7a: 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 ); 113e7c: e8 e7 11 00 00 call 115068 <__errno> 113e81: c7 00 10 00 00 00 movl $0x10,(%eax) 113e87: b8 ff ff ff ff mov $0xffffffff,%eax 113e8c: eb d0 jmp 113e5e 113e8e: 66 90 xchg %ax,%ax /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) rtems_filesystem_current.node_access = NULL; 113e90: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) <== NOT EXECUTED 113e97: eb ab jmp 113e44 <== NOT EXECUTED =============================================================================== 00108b68 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 108b68: 55 push %ebp 108b69: 89 e5 mov %esp,%ebp 108b6b: 53 push %ebx 108b6c: 83 ec 04 sub $0x4,%esp FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 108b6f: 80 3d 40 a5 12 00 00 cmpb $0x0,0x12a540 108b76: 74 08 je 108b80 fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 108b78: 8b 5d fc mov -0x4(%ebp),%ebx 108b7b: c9 leave 108b7c: c3 ret 108b7d: 8d 76 00 lea 0x0(%esi),%esi FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 108b80: c6 05 40 a5 12 00 01 movb $0x1,0x12a540 mkdir("/etc", 0777); 108b87: 83 ec 08 sub $0x8,%esp 108b8a: 68 ff 01 00 00 push $0x1ff 108b8f: 68 e8 3d 12 00 push $0x123de8 108b94: e8 83 07 00 00 call 10931c /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 108b99: 59 pop %ecx 108b9a: 5b pop %ebx 108b9b: 68 43 29 12 00 push $0x122943 108ba0: 68 ed 3d 12 00 push $0x123ded 108ba5: e8 2e d6 00 00 call 1161d8 108baa: 83 c4 10 add $0x10,%esp 108bad: 85 c0 test %eax,%eax 108baf: 74 77 je 108c28 <== ALWAYS TAKEN fclose(fp); 108bb1: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108bb4: 50 push %eax <== NOT EXECUTED 108bb5: e8 ba cf 00 00 call 115b74 <== NOT EXECUTED 108bba: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 108bbd: 83 ec 08 sub $0x8,%esp 108bc0: 68 43 29 12 00 push $0x122943 108bc5: 68 f9 3d 12 00 push $0x123df9 108bca: e8 09 d6 00 00 call 1161d8 108bcf: 83 c4 10 add $0x10,%esp 108bd2: 85 c0 test %eax,%eax 108bd4: 74 12 je 108be8 <== ALWAYS TAKEN fclose(fp); 108bd6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108bd9: 50 push %eax <== NOT EXECUTED 108bda: e8 95 cf 00 00 call 115b74 <== NOT EXECUTED 108bdf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); } } 108be2: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108be5: c9 leave <== NOT EXECUTED 108be6: c3 ret <== NOT EXECUTED 108be7: 90 nop <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 108be8: 83 ec 08 sub $0x8,%esp 108beb: 68 14 28 12 00 push $0x122814 108bf0: 68 f9 3d 12 00 push $0x123df9 108bf5: e8 de d5 00 00 call 1161d8 108bfa: 89 c3 mov %eax,%ebx 108bfc: 83 c4 10 add $0x10,%esp 108bff: 85 c0 test %eax,%eax 108c01: 0f 84 71 ff ff ff je 108b78 <== NEVER TAKEN fprintf( fp, "root:x:0:root\n" 108c07: 50 push %eax 108c08: 6a 2a push $0x2a 108c0a: 6a 01 push $0x1 108c0c: 68 6c 3e 12 00 push $0x123e6c 108c11: e8 ba dd 00 00 call 1169d0 "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 108c16: 89 1c 24 mov %ebx,(%esp) 108c19: e8 56 cf 00 00 call 115b74 108c1e: 83 c4 10 add $0x10,%esp 108c21: e9 52 ff ff ff jmp 108b78 108c26: 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) { 108c28: 83 ec 08 sub $0x8,%esp 108c2b: 68 14 28 12 00 push $0x122814 108c30: 68 ed 3d 12 00 push $0x123ded 108c35: e8 9e d5 00 00 call 1161d8 108c3a: 89 c3 mov %eax,%ebx 108c3c: 83 c4 10 add $0x10,%esp 108c3f: 85 c0 test %eax,%eax 108c41: 0f 84 76 ff ff ff je 108bbd <== NEVER TAKEN fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 108c47: 50 push %eax 108c48: 6a 66 push $0x66 108c4a: 6a 01 push $0x1 108c4c: 68 04 3e 12 00 push $0x123e04 108c51: e8 7a dd 00 00 call 1169d0 "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 108c56: 89 1c 24 mov %ebx,(%esp) 108c59: e8 16 cf 00 00 call 115b74 108c5e: 83 c4 10 add $0x10,%esp 108c61: e9 57 ff ff ff jmp 108bbd =============================================================================== 0010b818 : int ioctl( int fd, ioctl_command_t command, ... ) { 10b818: 55 push %ebp 10b819: 89 e5 mov %esp,%ebp 10b81b: 83 ec 08 sub $0x8,%esp 10b81e: 8b 45 08 mov 0x8(%ebp),%eax va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 10b821: 3b 05 0c 8f 12 00 cmp 0x128f0c,%eax 10b827: 73 2f jae 10b858 iop = rtems_libio_iop( fd ); 10b829: c1 e0 06 shl $0x6,%eax 10b82c: 03 05 80 d1 12 00 add 0x12d180,%eax rtems_libio_check_is_open(iop); 10b832: f6 40 15 01 testb $0x1,0x15(%eax) 10b836: 74 20 je 10b858 <== NEVER TAKEN va_start(ap, command); buffer = va_arg(ap, void *); 10b838: 8b 4d 10 mov 0x10(%ebp),%ecx /* * Now process the ioctl(). */ if ( !iop->handlers ) 10b83b: 8b 50 3c mov 0x3c(%eax),%edx 10b83e: 85 d2 test %edx,%edx 10b840: 74 16 je 10b858 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 10b842: 8b 52 10 mov 0x10(%edx),%edx 10b845: 85 d2 test %edx,%edx 10b847: 74 21 je 10b86a <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 10b849: 83 ec 04 sub $0x4,%esp 10b84c: 51 push %ecx 10b84d: ff 75 0c pushl 0xc(%ebp) 10b850: 50 push %eax 10b851: ff d2 call *%edx return rc; 10b853: 83 c4 10 add $0x10,%esp } 10b856: c9 leave 10b857: c3 ret /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 10b858: e8 1f d6 00 00 call 118e7c <__errno> 10b85d: c7 00 09 00 00 00 movl $0x9,(%eax) 10b863: b8 ff ff ff ff mov $0xffffffff,%eax rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b868: c9 leave 10b869: c3 ret if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b86a: e8 0d d6 00 00 call 118e7c <__errno> <== NOT EXECUTED 10b86f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b875: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); return rc; } 10b87a: c9 leave <== NOT EXECUTED 10b87b: c3 ret <== NOT EXECUTED =============================================================================== 0010a068 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 10a068: 55 push %ebp <== NOT EXECUTED 10a069: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a06b: 56 push %esi <== NOT EXECUTED 10a06c: 53 push %ebx <== NOT EXECUTED 10a06d: 89 d6 mov %edx,%esi <== NOT EXECUTED 10a06f: 88 c3 mov %al,%bl <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 10a071: 8b 42 30 mov 0x30(%edx),%eax <== NOT EXECUTED 10a074: a8 20 test $0x20,%al <== NOT EXECUTED 10a076: 74 03 je 10a07b <== NOT EXECUTED c &= 0x7f; 10a078: 83 e3 7f and $0x7f,%ebx <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 10a07b: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 10a07e: 74 18 je 10a098 <== NOT EXECUTED c = tolower (c); 10a080: 0f b6 db movzbl %bl,%ebx <== NOT EXECUTED 10a083: 8b 15 e4 71 12 00 mov 0x1271e4,%edx <== NOT EXECUTED 10a089: 0f be 54 1a 01 movsbl 0x1(%edx,%ebx,1),%edx <== NOT EXECUTED 10a08e: 83 e2 03 and $0x3,%edx <== NOT EXECUTED 10a091: 4a dec %edx <== NOT EXECUTED 10a092: 0f 84 98 00 00 00 je 10a130 <== NOT EXECUTED if (c == '\r') { 10a098: 80 fb 0d cmp $0xd,%bl <== NOT EXECUTED 10a09b: 74 33 je 10a0d0 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a09d: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 10a0a0: 0f 84 82 00 00 00 je 10a128 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a0a6: 84 db test %bl,%bl <== NOT EXECUTED 10a0a8: 75 3a jne 10a0e4 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 10a0aa: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a0ad: 8b 15 d4 70 12 00 mov 0x1270d4,%edx <== NOT EXECUTED 10a0b3: 4a dec %edx <== NOT EXECUTED 10a0b4: 39 d0 cmp %edx,%eax <== NOT EXECUTED 10a0b6: 7d 1c jge 10a0d4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10a0b8: f6 46 3c 08 testb $0x8,0x3c(%esi) <== NOT EXECUTED 10a0bc: 75 7a jne 10a138 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a0be: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a0c1: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a0c4: 40 inc %eax <== NOT EXECUTED 10a0c5: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a0c8: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10a0ca: 5b pop %ebx <== NOT EXECUTED 10a0cb: 5e pop %esi <== NOT EXECUTED 10a0cc: c9 leave <== NOT EXECUTED 10a0cd: c3 ret <== NOT EXECUTED 10a0ce: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 10a0d0: 84 c0 test %al,%al <== NOT EXECUTED 10a0d2: 79 08 jns 10a0dc <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a0d4: 31 c0 xor %eax,%eax <== NOT EXECUTED } return 0; } 10a0d6: 5b pop %ebx <== NOT EXECUTED 10a0d7: 5e pop %esi <== NOT EXECUTED 10a0d8: c9 leave <== NOT EXECUTED 10a0d9: c3 ret <== NOT EXECUTED 10a0da: 66 90 xchg %ax,%ax <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 10a0dc: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 10a0df: 74 03 je 10a0e4 <== NOT EXECUTED 10a0e1: b3 0a mov $0xa,%bl <== NOT EXECUTED 10a0e3: 90 nop <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 10a0e4: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 10a0e7: a8 02 test $0x2,%al <== NOT EXECUTED 10a0e9: 74 bf je 10a0aa <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 10a0eb: 38 5e 43 cmp %bl,0x43(%esi) <== NOT EXECUTED 10a0ee: 0f 84 a0 00 00 00 je 10a194 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 10a0f4: 38 5e 44 cmp %bl,0x44(%esi) <== NOT EXECUTED 10a0f7: 74 5f je 10a158 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 10a0f9: 38 5e 45 cmp %bl,0x45(%esi) <== NOT EXECUTED 10a0fc: 74 20 je 10a11e <== NOT EXECUTED return 1; } else if (c == '\n') { 10a0fe: 80 fb 0a cmp $0xa,%bl <== NOT EXECUTED 10a101: 74 69 je 10a16c <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 10a103: 38 5e 4c cmp %bl,0x4c(%esi) <== NOT EXECUTED 10a106: 74 05 je 10a10d <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 10a108: 38 5e 51 cmp %bl,0x51(%esi) <== NOT EXECUTED 10a10b: 75 9d jne 10a0aa <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 10a10d: a8 08 test $0x8,%al <== NOT EXECUTED 10a10f: 75 3b jne 10a14c <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 10a111: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a114: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a117: 88 1c 02 mov %bl,(%edx,%eax,1) <== NOT EXECUTED 10a11a: 40 inc %eax <== NOT EXECUTED 10a11b: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a11e: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 10a123: eb a5 jmp 10a0ca <== NOT EXECUTED 10a125: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 10a128: a8 40 test $0x40,%al <== NOT EXECUTED 10a12a: 74 b8 je 10a0e4 <== NOT EXECUTED 10a12c: b3 0d mov $0xd,%bl <== NOT EXECUTED 10a12e: eb b4 jmp 10a0e4 <== NOT EXECUTED iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); 10a130: 83 c3 20 add $0x20,%ebx <== NOT EXECUTED 10a133: e9 60 ff ff ff jmp 10a098 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a138: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a13b: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a13d: e8 f6 fc ff ff call 109e38 <== NOT EXECUTED 10a142: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a145: e9 74 ff ff ff jmp 10a0be <== NOT EXECUTED 10a14a: 66 90 xchg %ax,%ax <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 10a14c: 0f b6 c3 movzbl %bl,%eax <== NOT EXECUTED 10a14f: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a151: e8 e2 fc ff ff call 109e38 <== NOT EXECUTED 10a156: eb b9 jmp 10a111 <== 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); 10a158: ba 01 00 00 00 mov $0x1,%edx <== NOT EXECUTED 10a15d: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a15f: e8 38 fd ff ff call 109e9c <== NOT EXECUTED 10a164: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10a166: e9 5f ff ff ff jmp 10a0ca <== NOT EXECUTED 10a16b: 90 nop <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 10a16c: a8 48 test $0x48,%al <== NOT EXECUTED 10a16e: 74 0c je 10a17c <== NOT EXECUTED echo (c, tty); 10a170: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a172: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED 10a177: e8 bc fc ff ff call 109e38 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 10a17c: 8b 46 20 mov 0x20(%esi),%eax <== NOT EXECUTED 10a17f: 8b 56 1c mov 0x1c(%esi),%edx <== NOT EXECUTED 10a182: c6 04 02 0a movb $0xa,(%edx,%eax,1) <== NOT EXECUTED 10a186: 40 inc %eax <== NOT EXECUTED 10a187: 89 46 20 mov %eax,0x20(%esi) <== NOT EXECUTED 10a18a: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED return 1; 10a18f: e9 36 ff ff ff jmp 10a0ca <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 10a194: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a196: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a198: e8 ff fc ff ff call 109e9c <== NOT EXECUTED 10a19d: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10a19f: e9 26 ff ff ff jmp 10a0ca <== NOT EXECUTED =============================================================================== 00114450 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 114450: 55 push %ebp 114451: 89 e5 mov %esp,%ebp 114453: 57 push %edi 114454: 56 push %esi 114455: 53 push %ebx 114456: 83 ec 3c sub $0x3c,%esp 114459: 8b 75 0c mov 0xc(%ebp),%esi 11445c: 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() ) 11445f: e8 6c c8 ff ff call 110cd0 114464: 3b 45 08 cmp 0x8(%ebp),%eax 114467: 0f 85 2f 02 00 00 jne 11469c rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 11446d: 85 f6 test %esi,%esi 11446f: 0f 84 3c 02 00 00 je 1146b1 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 114475: 8d 4e ff lea -0x1(%esi),%ecx rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 114478: 83 f9 1f cmp $0x1f,%ecx 11447b: 0f 87 30 02 00 00 ja 1146b1 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 ) 114481: 8d 04 76 lea (%esi,%esi,2),%eax 114484: 83 3c 85 a8 9a 12 00 cmpl $0x1,0x129aa8(,%eax,4) 11448b: 01 11448c: 0f 84 cf 00 00 00 je 114561 /* * 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 ) ) 114492: 83 fe 08 cmp $0x8,%esi 114495: 0f 84 d1 00 00 00 je 11456c 11449b: 83 fe 04 cmp $0x4,%esi 11449e: 0f 84 c8 00 00 00 je 11456c 1144a4: 83 fe 0b cmp $0xb,%esi 1144a7: 0f 84 bf 00 00 00 je 11456c static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 1144ad: bb 01 00 00 00 mov $0x1,%ebx 1144b2: d3 e3 shl %cl,%ebx /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 1144b4: 89 75 dc mov %esi,-0x24(%ebp) siginfo->si_code = SI_USER; 1144b7: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) if ( !value ) { 1144be: 85 ff test %edi,%edi 1144c0: 0f 84 ca 01 00 00 je 114690 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 1144c6: 8b 07 mov (%edi),%eax 1144c8: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1144cb: a1 b8 94 12 00 mov 0x1294b8,%eax 1144d0: 40 inc %eax 1144d1: a3 b8 94 12 00 mov %eax,0x1294b8 /* * 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; 1144d6: 8b 0d 78 95 12 00 mov 0x129578,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1144dc: 8b 81 f8 00 00 00 mov 0xf8(%ecx),%eax 1144e2: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 1144e8: f7 d0 not %eax 1144ea: 85 c3 test %eax,%ebx 1144ec: 75 34 jne 114522 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 1144ee: a1 40 9c 12 00 mov 0x129c40,%eax 1144f3: 3d 44 9c 12 00 cmp $0x129c44,%eax 1144f8: 75 1b jne 114515 1144fa: e9 89 00 00 00 jmp 114588 1144ff: 90 nop /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 114500: 8b 92 cc 00 00 00 mov 0xcc(%edx),%edx 114506: f7 d2 not %edx 114508: 85 d3 test %edx,%ebx 11450a: 75 16 jne 114522 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 11450c: 8b 00 mov (%eax),%eax /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = the_chain->first ; 11450e: 3d 44 9c 12 00 cmp $0x129c44,%eax 114513: 74 73 je 114588 <== ALWAYS TAKEN !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 114515: 89 c1 mov %eax,%ecx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 114517: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 11451d: 85 58 30 test %ebx,0x30(%eax) 114520: 74 de je 114500 * thread needs to do the post context switch extension so it can * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 114522: c6 41 74 01 movb $0x1,0x74(%ecx) /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { 114526: 50 push %eax 114527: 8d 45 dc lea -0x24(%ebp),%eax 11452a: 50 push %eax 11452b: 56 push %esi 11452c: 51 push %ecx 11452d: e8 6e 03 00 00 call 1148a0 <_POSIX_signals_Unblock_thread> 114532: 83 c4 10 add $0x10,%esp 114535: 84 c0 test %al,%al 114537: 0f 85 47 01 00 00 jne 114684 /* * 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 ); 11453d: 83 ec 0c sub $0xc,%esp 114540: 53 push %ebx 114541: e8 36 03 00 00 call 11487c <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 114546: 8d 1c 76 lea (%esi,%esi,2),%ebx 114549: c1 e3 02 shl $0x2,%ebx 11454c: 83 c4 10 add $0x10,%esp 11454f: 83 bb a0 9a 12 00 02 cmpl $0x2,0x129aa0(%ebx) 114556: 0f 84 ec 00 00 00 je 114648 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 11455c: e8 0b 97 ff ff call 10dc6c <_Thread_Enable_dispatch> 114561: 31 c0 xor %eax,%eax return 0; } 114563: 8d 65 f4 lea -0xc(%ebp),%esp 114566: 5b pop %ebx 114567: 5e pop %esi 114568: 5f pop %edi 114569: c9 leave 11456a: c3 ret 11456b: 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 ); 11456c: e8 93 05 00 00 call 114b04 114571: 83 ec 08 sub $0x8,%esp 114574: 56 push %esi 114575: 50 push %eax 114576: e8 c1 04 00 00 call 114a3c 11457b: 83 c4 10 add $0x10,%esp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 11457e: 8d 65 f4 lea -0xc(%ebp),%esp 114581: 5b pop %ebx 114582: 5e pop %esi 114583: 5f pop %edi 114584: c9 leave 114585: c3 ret 114586: 66 90 xchg %ax,%ax * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 114588: 0f b6 05 d4 52 12 00 movzbl 0x1252d4,%eax 11458f: 40 inc %eax 114590: 89 45 d4 mov %eax,-0x2c(%ebp) 114593: c7 45 c8 00 00 00 00 movl $0x0,-0x38(%ebp) 11459a: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) 1145a1: 89 5d cc mov %ebx,-0x34(%ebp) 1145a4: 89 75 c0 mov %esi,-0x40(%ebp) for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 1145a7: 8b 55 d0 mov -0x30(%ebp),%edx 1145aa: 8b 04 95 8c 94 12 00 mov 0x12948c(,%edx,4),%eax 1145b1: 85 c0 test %eax,%eax 1145b3: 74 6c je 114621 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 1145b5: 8b 40 04 mov 0x4(%eax),%eax */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 1145b8: 0f b7 70 10 movzwl 0x10(%eax),%esi object_table = the_info->local_table; 1145bc: 8b 78 1c mov 0x1c(%eax),%edi for ( index = 1 ; index <= maximum ; index++ ) { 1145bf: 85 f6 test %esi,%esi 1145c1: 74 5e je 114621 1145c3: b8 01 00 00 00 mov $0x1,%eax the_thread = (Thread_Control *) object_table[ index ]; 1145c8: 8b 14 87 mov (%edi,%eax,4),%edx if ( !the_thread ) 1145cb: 85 d2 test %edx,%edx 1145cd: 74 4d je 11461c /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 1145cf: 8b 4a 14 mov 0x14(%edx),%ecx 1145d2: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1145d5: 77 45 ja 11461c DEBUG_STEP("2"); /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 1145d7: 8b 9a f8 00 00 00 mov 0xf8(%edx),%ebx 1145dd: 8b 9b cc 00 00 00 mov 0xcc(%ebx),%ebx 1145e3: f7 d3 not %ebx 1145e5: 85 5d cc test %ebx,-0x34(%ebp) 1145e8: 74 32 je 11461c * * 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 ) { 1145ea: 3b 4d d4 cmp -0x2c(%ebp),%ecx 1145ed: 72 25 jb 114614 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( !_States_Is_ready( interested->current_state ) ) { 1145ef: 8b 5d c8 mov -0x38(%ebp),%ebx 1145f2: 8b 5b 10 mov 0x10(%ebx),%ebx 1145f5: 89 5d c4 mov %ebx,-0x3c(%ebp) 1145f8: 85 db test %ebx,%ebx 1145fa: 74 20 je 11461c <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 1145fc: 8b 5a 10 mov 0x10(%edx),%ebx 1145ff: 85 db test %ebx,%ebx 114601: 74 11 je 114614 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 114603: f7 45 c4 00 00 00 10 testl $0x10000000,-0x3c(%ebp) 11460a: 75 10 jne 11461c DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 11460c: 81 e3 00 00 00 10 and $0x10000000,%ebx 114612: 74 08 je 11461c 114614: 89 4d d4 mov %ecx,-0x2c(%ebp) 114617: 89 55 c8 mov %edx,-0x38(%ebp) 11461a: 66 90 xchg %ax,%ax #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 11461c: 40 inc %eax 11461d: 39 c6 cmp %eax,%esi 11461f: 73 a7 jae 1145c8 * + 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++) { 114621: ff 45 d0 incl -0x30(%ebp) 114624: 83 7d d0 05 cmpl $0x5,-0x30(%ebp) 114628: 0f 85 79 ff ff ff jne 1145a7 11462e: 8b 5d cc mov -0x34(%ebp),%ebx 114631: 8b 75 c0 mov -0x40(%ebp),%esi } } } } if ( interested ) { 114634: 8b 55 c8 mov -0x38(%ebp),%edx 114637: 85 d2 test %edx,%edx 114639: 0f 84 fe fe ff ff je 11453d 11463f: 8b 4d c8 mov -0x38(%ebp),%ecx 114642: e9 db fe ff ff jmp 114522 114647: 90 nop */ _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 114648: 83 ec 0c sub $0xc,%esp 11464b: 68 20 9c 12 00 push $0x129c20 114650: e8 a7 7f ff ff call 10c5fc <_Chain_Get> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 114655: 83 c4 10 add $0x10,%esp 114658: 85 c0 test %eax,%eax 11465a: 74 6a je 1146c6 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 11465c: 8d 78 08 lea 0x8(%eax),%edi 11465f: 8d 75 dc lea -0x24(%ebp),%esi 114662: b9 03 00 00 00 mov $0x3,%ecx 114667: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 114669: 83 ec 08 sub $0x8,%esp 11466c: 50 push %eax 11466d: 81 c3 c0 9c 12 00 add $0x129cc0,%ebx 114673: 53 push %ebx 114674: e8 47 7f ff ff call 10c5c0 <_Chain_Append> 114679: 83 c4 10 add $0x10,%esp 11467c: e9 db fe ff ff jmp 11455c 114681: 8d 76 00 lea 0x0(%esi),%esi /* * Returns true if the signal was synchronously given to a thread * blocked waiting for the signal. */ if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) { _Thread_Enable_dispatch(); 114684: e8 e3 95 ff ff call 10dc6c <_Thread_Enable_dispatch> 114689: 31 c0 xor %eax,%eax return 0; 11468b: e9 ee fe ff ff jmp 11457e */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 114690: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 114697: e9 2f fe ff ff jmp 1144cb /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 11469c: e8 c7 09 00 00 call 115068 <__errno> 1146a1: c7 00 03 00 00 00 movl $0x3,(%eax) 1146a7: b8 ff ff ff ff mov $0xffffffff,%eax 1146ac: e9 cd fe ff ff jmp 11457e */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1146b1: e8 b2 09 00 00 call 115068 <__errno> 1146b6: c7 00 16 00 00 00 movl $0x16,(%eax) 1146bc: b8 ff ff ff ff mov $0xffffffff,%eax 1146c1: e9 b8 fe ff ff jmp 11457e 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(); 1146c6: e8 a1 95 ff ff call 10dc6c <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 1146cb: e8 98 09 00 00 call 115068 <__errno> 1146d0: c7 00 0b 00 00 00 movl $0xb,(%eax) 1146d6: 83 c8 ff or $0xffffffff,%eax 1146d9: e9 a0 fe ff ff jmp 11457e =============================================================================== 001207ac : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 1207ac: 55 push %ebp 1207ad: 89 e5 mov %esp,%ebp 1207af: 53 push %ebx 1207b0: 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())) 1207b3: 83 3d 80 96 12 00 03 cmpl $0x3,0x129680 1207ba: 74 08 je 1207c4 */ fclose (stdin); fclose (stdout); fclose (stderr); } 1207bc: 8b 5d fc mov -0x4(%ebp),%ebx 1207bf: c9 leave 1207c0: c3 ret 1207c1: 8d 76 00 lea 0x0(%esi),%esi /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { 1207c4: 8b 1d e0 37 12 00 mov 0x1237e0,%ebx 1207ca: 39 1d 00 72 12 00 cmp %ebx,0x127200 1207d0: 74 12 je 1207e4 _wrapup_reent(_global_impure_ptr); 1207d2: 83 ec 0c sub $0xc,%esp 1207d5: 53 push %ebx 1207d6: e8 f5 04 00 00 call 120cd0 <_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; 1207db: 89 1d 00 72 12 00 mov %ebx,0x127200 1207e1: 83 c4 10 add $0x10,%esp * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 1207e4: 83 ec 0c sub $0xc,%esp 1207e7: ff 73 04 pushl 0x4(%ebx) 1207ea: e8 c5 49 ff ff call 1151b4 fclose (stdout); 1207ef: 5a pop %edx 1207f0: a1 00 72 12 00 mov 0x127200,%eax 1207f5: ff 70 08 pushl 0x8(%eax) 1207f8: e8 b7 49 ff ff call 1151b4 fclose (stderr); 1207fd: 58 pop %eax 1207fe: a1 00 72 12 00 mov 0x127200,%eax 120803: ff 70 0c pushl 0xc(%eax) 120806: e8 a9 49 ff ff call 1151b4 12080b: 83 c4 10 add $0x10,%esp } 12080e: 8b 5d fc mov -0x4(%ebp),%ebx 120811: c9 leave 120812: c3 ret =============================================================================== 001096d4 : int link( const char *existing, const char *new ) { 1096d4: 55 push %ebp 1096d5: 89 e5 mov %esp,%ebp 1096d7: 57 push %edi 1096d8: 56 push %esi 1096d9: 53 push %ebx 1096da: 83 ec 48 sub $0x48,%esp 1096dd: 8b 55 08 mov 0x8(%ebp),%edx 1096e0: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 1096e3: 31 c0 xor %eax,%eax 1096e5: b9 ff ff ff ff mov $0xffffffff,%ecx 1096ea: 89 d7 mov %edx,%edi 1096ec: f2 ae repnz scas %es:(%edi),%al 1096ee: f7 d1 not %ecx 1096f0: 49 dec %ecx 1096f1: 6a 01 push $0x1 1096f3: 8d 75 cc lea -0x34(%ebp),%esi 1096f6: 56 push %esi 1096f7: 6a 00 push $0x0 1096f9: 51 push %ecx 1096fa: 52 push %edx 1096fb: e8 98 fb ff ff call 109298 0, &existing_loc, true ); if ( result != 0 ) 109700: 83 c4 20 add $0x20,%esp 109703: 85 c0 test %eax,%eax 109705: 74 11 je 109718 rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 109707: bb ff ff ff ff mov $0xffffffff,%ebx rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); return result; } 10970c: 89 d8 mov %ebx,%eax 10970e: 8d 65 f4 lea -0xc(%ebp),%esp 109711: 5b pop %ebx 109712: 5e pop %esi 109713: 5f pop %edi 109714: c9 leave 109715: c3 ret 109716: 66 90 xchg %ax,%ax /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 109718: 57 push %edi 109719: 8d 7d b8 lea -0x48(%ebp),%edi 10971c: 57 push %edi 10971d: 8d 45 e4 lea -0x1c(%ebp),%eax 109720: 50 push %eax 109721: 53 push %ebx 109722: e8 09 0f 00 00 call 10a630 if ( !parent_loc.ops->evalformake_h ) { 109727: 8b 45 c4 mov -0x3c(%ebp),%eax 10972a: 8b 40 04 mov 0x4(%eax),%eax 10972d: 83 c4 10 add $0x10,%esp 109730: 85 c0 test %eax,%eax 109732: 0f 84 e8 00 00 00 je 109820 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 109738: 51 push %ecx 109739: 8d 55 e0 lea -0x20(%ebp),%edx 10973c: 52 push %edx 10973d: 57 push %edi 10973e: 03 5d e4 add -0x1c(%ebp),%ebx 109741: 53 push %ebx 109742: ff d0 call *%eax 109744: 89 c3 mov %eax,%ebx if ( result != 0 ) { 109746: 83 c4 10 add $0x10,%esp 109749: 85 c0 test %eax,%eax 10974b: 0f 85 a7 00 00 00 jne 1097f8 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 109751: 8b 45 c8 mov -0x38(%ebp),%eax 109754: 3b 45 dc cmp -0x24(%ebp),%eax 109757: 75 5b jne 1097b4 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 109759: 8b 55 c4 mov -0x3c(%ebp),%edx 10975c: 8b 42 08 mov 0x8(%edx),%eax 10975f: 85 c0 test %eax,%eax 109761: 0f 84 e0 00 00 00 je 109847 <== NEVER TAKEN rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 109767: 52 push %edx 109768: ff 75 e0 pushl -0x20(%ebp) 10976b: 57 push %edi 10976c: 56 push %esi 10976d: ff d0 call *%eax 10976f: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &existing_loc ); 109771: 8b 45 d8 mov -0x28(%ebp),%eax 109774: 83 c4 10 add $0x10,%esp 109777: 85 c0 test %eax,%eax 109779: 74 10 je 10978b <== NEVER TAKEN 10977b: 8b 40 1c mov 0x1c(%eax),%eax 10977e: 85 c0 test %eax,%eax 109780: 74 09 je 10978b <== NEVER TAKEN 109782: 83 ec 0c sub $0xc,%esp 109785: 56 push %esi 109786: ff d0 call *%eax 109788: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 10978b: 8b 45 c4 mov -0x3c(%ebp),%eax 10978e: 85 c0 test %eax,%eax 109790: 0f 84 76 ff ff ff je 10970c <== NEVER TAKEN 109796: 8b 40 1c mov 0x1c(%eax),%eax 109799: 85 c0 test %eax,%eax 10979b: 0f 84 6b ff ff ff je 10970c <== NEVER TAKEN 1097a1: 83 ec 0c sub $0xc,%esp 1097a4: 57 push %edi 1097a5: ff d0 call *%eax 1097a7: 83 c4 10 add $0x10,%esp return result; } 1097aa: 89 d8 mov %ebx,%eax 1097ac: 8d 65 f4 lea -0xc(%ebp),%esp 1097af: 5b pop %ebx 1097b0: 5e pop %esi 1097b1: 5f pop %edi 1097b2: c9 leave 1097b3: c3 ret * 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 ); 1097b4: 8b 45 d8 mov -0x28(%ebp),%eax 1097b7: 85 c0 test %eax,%eax 1097b9: 74 10 je 1097cb <== NEVER TAKEN 1097bb: 8b 40 1c mov 0x1c(%eax),%eax 1097be: 85 c0 test %eax,%eax 1097c0: 74 09 je 1097cb <== NEVER TAKEN 1097c2: 83 ec 0c sub $0xc,%esp 1097c5: 56 push %esi 1097c6: ff d0 call *%eax 1097c8: 83 c4 10 add $0x10,%esp rtems_filesystem_freenode( &parent_loc ); 1097cb: 8b 45 c4 mov -0x3c(%ebp),%eax 1097ce: 85 c0 test %eax,%eax 1097d0: 74 10 je 1097e2 <== NEVER TAKEN 1097d2: 8b 40 1c mov 0x1c(%eax),%eax 1097d5: 85 c0 test %eax,%eax 1097d7: 74 09 je 1097e2 <== NEVER TAKEN 1097d9: 83 ec 0c sub $0xc,%esp 1097dc: 57 push %edi 1097dd: ff d0 call *%eax 1097df: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EXDEV ); 1097e2: e8 bd ca 00 00 call 1162a4 <__errno> 1097e7: c7 00 12 00 00 00 movl $0x12,(%eax) 1097ed: bb ff ff ff ff mov $0xffffffff,%ebx 1097f2: e9 15 ff ff ff jmp 10970c 1097f7: 90 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 1097f8: 8b 45 d8 mov -0x28(%ebp),%eax 1097fb: 85 c0 test %eax,%eax 1097fd: 74 10 je 10980f <== NEVER TAKEN 1097ff: 8b 40 1c mov 0x1c(%eax),%eax 109802: 85 c0 test %eax,%eax 109804: 74 09 je 10980f <== NEVER TAKEN 109806: 83 ec 0c sub $0xc,%esp 109809: 56 push %esi 10980a: ff d0 call *%eax 10980c: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( result ); 10980f: e8 90 ca 00 00 call 1162a4 <__errno> 109814: 89 18 mov %ebx,(%eax) 109816: bb ff ff ff ff mov $0xffffffff,%ebx 10981b: e9 ec fe ff ff jmp 10970c */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 109820: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 109823: 85 c0 test %eax,%eax <== NOT EXECUTED 109825: 74 10 je 109837 <== NOT EXECUTED 109827: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10982a: 85 c0 test %eax,%eax <== NOT EXECUTED 10982c: 74 09 je 109837 <== NOT EXECUTED 10982e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109831: 56 push %esi <== NOT EXECUTED 109832: ff d0 call *%eax <== NOT EXECUTED 109834: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109837: e8 68 ca 00 00 call 1162a4 <__errno> <== NOT EXECUTED 10983c: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109842: e9 c0 fe ff ff jmp 109707 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 109847: 8b 45 d8 mov -0x28(%ebp),%eax <== NOT EXECUTED 10984a: 85 c0 test %eax,%eax <== NOT EXECUTED 10984c: 74 13 je 109861 <== NOT EXECUTED 10984e: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 109851: 85 c0 test %eax,%eax <== NOT EXECUTED 109853: 74 0c je 109861 <== NOT EXECUTED 109855: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109858: 56 push %esi <== NOT EXECUTED 109859: ff d0 call *%eax <== NOT EXECUTED 10985b: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 10985e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 109861: 85 d2 test %edx,%edx <== NOT EXECUTED 109863: 74 10 je 109875 <== NOT EXECUTED 109865: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 109868: 85 c0 test %eax,%eax <== NOT EXECUTED 10986a: 74 09 je 109875 <== NOT EXECUTED 10986c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10986f: 57 push %edi <== NOT EXECUTED 109870: ff d0 call *%eax <== NOT EXECUTED 109872: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 109875: e8 2a ca 00 00 call 1162a4 <__errno> <== NOT EXECUTED 10987a: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109880: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 109885: e9 82 fe ff ff jmp 10970c <== NOT EXECUTED =============================================================================== 00120664 : off_t lseek( int fd, off_t offset, int whence ) { 120664: 55 push %ebp 120665: 89 e5 mov %esp,%ebp 120667: 57 push %edi 120668: 56 push %esi 120669: 53 push %ebx 12066a: 83 ec 2c sub $0x2c,%esp 12066d: 8b 5d 08 mov 0x8(%ebp),%ebx 120670: 8b 75 0c mov 0xc(%ebp),%esi 120673: 8b 7d 10 mov 0x10(%ebp),%edi 120676: 8b 45 14 mov 0x14(%ebp),%eax rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 120679: 3b 1d 0c 52 12 00 cmp 0x12520c,%ebx 12067f: 0f 83 b7 00 00 00 jae 12073c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 120685: c1 e3 06 shl $0x6,%ebx 120688: 03 1d 40 93 12 00 add 0x129340,%ebx rtems_libio_check_is_open(iop); 12068e: f6 43 15 01 testb $0x1,0x15(%ebx) 120692: 0f 84 a4 00 00 00 je 12073c <== NEVER TAKEN /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 120698: 8b 53 3c mov 0x3c(%ebx),%edx 12069b: 89 55 d4 mov %edx,-0x2c(%ebp) 12069e: 8b 52 14 mov 0x14(%edx),%edx 1206a1: 85 d2 test %edx,%edx 1206a3: 0f 84 aa 00 00 00 je 120753 <== NEVER TAKEN /* * Now process the lseek(). */ old_offset = iop->offset; 1206a9: 8b 53 0c mov 0xc(%ebx),%edx 1206ac: 8b 4b 10 mov 0x10(%ebx),%ecx 1206af: 89 55 e0 mov %edx,-0x20(%ebp) 1206b2: 89 4d e4 mov %ecx,-0x1c(%ebp) switch ( whence ) { 1206b5: 83 f8 01 cmp $0x1,%eax 1206b8: 74 6e je 120728 1206ba: 83 f8 02 cmp $0x2,%eax 1206bd: 74 35 je 1206f4 1206bf: 85 c0 test %eax,%eax 1206c1: 75 45 jne 120708 case SEEK_SET: iop->offset = offset; 1206c3: 89 73 0c mov %esi,0xc(%ebx) 1206c6: 89 7b 10 mov %edi,0x10(%ebx) /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 1206c9: 50 push %eax 1206ca: 57 push %edi 1206cb: 56 push %esi 1206cc: 53 push %ebx 1206cd: 8b 4d d4 mov -0x2c(%ebp),%ecx 1206d0: ff 51 14 call *0x14(%ecx) if ( status == (off_t) -1 ) 1206d3: 83 c4 10 add $0x10,%esp 1206d6: 89 c1 mov %eax,%ecx 1206d8: 21 d1 and %edx,%ecx 1206da: 41 inc %ecx 1206db: 75 0c jne 1206e9 iop->offset = old_offset; 1206dd: 8b 75 e0 mov -0x20(%ebp),%esi 1206e0: 8b 7d e4 mov -0x1c(%ebp),%edi 1206e3: 89 73 0c mov %esi,0xc(%ebx) 1206e6: 89 7b 10 mov %edi,0x10(%ebx) /* * So if the operation failed, we have to restore iop->offset. */ return status; } 1206e9: 8d 65 f4 lea -0xc(%ebp),%esp 1206ec: 5b pop %ebx 1206ed: 5e pop %esi 1206ee: 5f pop %edi 1206ef: c9 leave 1206f0: c3 ret 1206f1: 8d 76 00 lea 0x0(%esi),%esi case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 1206f4: 89 f2 mov %esi,%edx 1206f6: 89 f9 mov %edi,%ecx 1206f8: 03 53 04 add 0x4(%ebx),%edx 1206fb: 13 4b 08 adc 0x8(%ebx),%ecx 1206fe: 89 53 0c mov %edx,0xc(%ebx) 120701: 89 4b 10 mov %ecx,0x10(%ebx) break; 120704: eb c3 jmp 1206c9 120706: 66 90 xchg %ax,%ax default: rtems_set_errno_and_return_minus_one( EINVAL ); 120708: e8 5b 49 ff ff call 115068 <__errno> 12070d: c7 00 16 00 00 00 movl $0x16,(%eax) 120713: b8 ff ff ff ff mov $0xffffffff,%eax 120718: ba ff ff ff ff mov $0xffffffff,%edx /* * So if the operation failed, we have to restore iop->offset. */ return status; } 12071d: 8d 65 f4 lea -0xc(%ebp),%esp 120720: 5b pop %ebx 120721: 5e pop %esi 120722: 5f pop %edi 120723: c9 leave 120724: c3 ret 120725: 8d 76 00 lea 0x0(%esi),%esi case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 120728: 8b 55 e0 mov -0x20(%ebp),%edx 12072b: 8b 4d e4 mov -0x1c(%ebp),%ecx 12072e: 01 f2 add %esi,%edx 120730: 11 f9 adc %edi,%ecx 120732: 89 53 0c mov %edx,0xc(%ebx) 120735: 89 4b 10 mov %ecx,0x10(%ebx) break; 120738: eb 8f jmp 1206c9 12073a: 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); 12073c: e8 27 49 ff ff call 115068 <__errno> <== NOT EXECUTED 120741: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 120747: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 12074c: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 120751: eb 96 jmp 1206e9 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 120753: e8 10 49 ff ff call 115068 <__errno> <== NOT EXECUTED 120758: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 12075e: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 120763: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 120768: e9 7c ff ff ff jmp 1206e9 <== NOT EXECUTED =============================================================================== 0010885c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 10885c: 55 push %ebp 10885d: 89 e5 mov %esp,%ebp 10885f: 57 push %edi 108860: 56 push %esi 108861: 53 push %ebx 108862: 83 ec 0c sub $0xc,%esp 108865: 8b 75 08 mov 0x8(%ebp),%esi 108868: ff 05 64 93 12 00 incl 0x129364 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 10886e: e8 11 ff ff ff call 108784 /* * Validate the parameters */ if ( !size ) 108873: 85 f6 test %esi,%esi 108875: 74 65 je 1088dc <== NEVER TAKEN return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 108877: 83 3d 80 96 12 00 03 cmpl $0x3,0x129680 10887e: 74 50 je 1088d0 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 108880: 6a 00 push $0x0 108882: 6a 00 push $0x0 108884: 56 push %esi 108885: ff 35 18 52 12 00 pushl 0x125218 10888b: e8 30 4e 00 00 call 10d6c0 <_Protected_heap_Allocate_aligned_with_boundary> 108890: 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 ) { 108892: 83 c4 10 add $0x10,%esp 108895: 85 c0 test %eax,%eax 108897: 74 5b je 1088f4 if (rtems_malloc_sbrk_helpers) return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 108899: 89 c7 mov %eax,%edi } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 10889b: a1 10 77 12 00 mov 0x127710,%eax 1088a0: 85 c0 test %eax,%eax 1088a2: 74 0a je 1088ae <== ALWAYS TAKEN (*rtems_malloc_dirty_helper)( return_this, size ); 1088a4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1088a7: 56 push %esi <== NOT EXECUTED 1088a8: 57 push %edi <== NOT EXECUTED 1088a9: ff d0 call *%eax <== NOT EXECUTED 1088ab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1088ae: a1 08 77 12 00 mov 0x127708,%eax 1088b3: 85 c0 test %eax,%eax 1088b5: 74 31 je 1088e8 <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1088b7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1088ba: 57 push %edi <== NOT EXECUTED 1088bb: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 1088be: 89 fb mov %edi,%ebx <== NOT EXECUTED 1088c0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1088c3: 89 d8 mov %ebx,%eax 1088c5: 8d 65 f4 lea -0xc(%ebp),%esp 1088c8: 5b pop %ebx 1088c9: 5e pop %esi 1088ca: 5f pop %edi 1088cb: c9 leave 1088cc: c3 ret 1088cd: 8d 76 00 lea 0x0(%esi),%esi return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 1088d0: e8 57 fe ff ff call 10872c 1088d5: 84 c0 test %al,%al 1088d7: 75 a7 jne 108880 <== ALWAYS TAKEN 1088d9: 8d 76 00 lea 0x0(%esi),%esi /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 1088dc: 31 db xor %ebx,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1088de: 89 d8 mov %ebx,%eax <== NOT EXECUTED 1088e0: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1088e3: 5b pop %ebx <== NOT EXECUTED 1088e4: 5e pop %esi <== NOT EXECUTED 1088e5: 5f pop %edi <== NOT EXECUTED 1088e6: c9 leave <== NOT EXECUTED 1088e7: c3 ret <== NOT EXECUTED (*rtems_malloc_dirty_helper)( return_this, size ); /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 1088e8: 89 fb mov %edi,%ebx if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 1088ea: 89 d8 mov %ebx,%eax 1088ec: 8d 65 f4 lea -0xc(%ebp),%esp 1088ef: 5b pop %ebx 1088f0: 5e pop %esi 1088f1: 5f pop %edi 1088f2: c9 leave 1088f3: c3 ret */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 1088f4: a1 0c 77 12 00 mov 0x12770c,%eax 1088f9: 85 c0 test %eax,%eax 1088fb: 74 10 je 10890d <== ALWAYS TAKEN return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 1088fd: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108900: 56 push %esi <== NOT EXECUTED 108901: ff 50 04 call *0x4(%eax) <== NOT EXECUTED 108904: 89 c7 mov %eax,%edi <== NOT EXECUTED if ( !return_this ) { 108906: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108909: 85 c0 test %eax,%eax <== NOT EXECUTED 10890b: 75 8e jne 10889b <== NOT EXECUTED errno = ENOMEM; 10890d: e8 56 c7 00 00 call 115068 <__errno> 108912: c7 00 0c 00 00 00 movl $0xc,(%eax) return (void *) 0; 108918: eb a9 jmp 1088c3 =============================================================================== 0010876c : } void malloc_deferred_free( void *pointer ) { 10876c: 55 push %ebp <== NOT EXECUTED 10876d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10876f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 108772: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 108775: 68 4c 93 12 00 push $0x12934c <== NOT EXECUTED 10877a: e8 41 3e 00 00 call 10c5c0 <_Chain_Append> <== NOT EXECUTED 10877f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); } 108782: c9 leave <== NOT EXECUTED 108783: c3 ret <== NOT EXECUTED =============================================================================== 00108784 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 108784: 55 push %ebp 108785: 89 e5 mov %esp,%ebp 108787: 83 ec 08 sub $0x8,%esp rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 10878a: eb 0c jmp 108798 free(to_be_freed); 10878c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10878f: 50 push %eax <== NOT EXECUTED 108790: e8 ef fd ff ff call 108584 <== NOT EXECUTED 108795: 83 c4 10 add $0x10,%esp <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 108798: 83 ec 0c sub $0xc,%esp 10879b: 68 4c 93 12 00 push $0x12934c 1087a0: e8 57 3e 00 00 call 10c5fc <_Chain_Get> rtems_chain_node *to_be_freed; /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) 1087a5: 83 c4 10 add $0x10,%esp 1087a8: 85 c0 test %eax,%eax 1087aa: 75 e0 jne 10878c <== NEVER TAKEN free(to_be_freed); } 1087ac: c9 leave 1087ad: c3 ret =============================================================================== 0010872c : #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { 10872c: 55 push %ebp 10872d: 89 e5 mov %esp,%ebp if ( _Thread_Dispatch_disable_level > 0 ) 10872f: a1 b8 94 12 00 mov 0x1294b8,%eax 108734: 85 c0 test %eax,%eax 108736: 75 0c jne 108744 <== NEVER TAKEN return false; if ( _ISR_Nest_level > 0 ) 108738: a1 54 95 12 00 mov 0x129554,%eax #include "malloc_p.h" rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) 10873d: 85 c0 test %eax,%eax 10873f: 0f 94 c0 sete %al if ( _ISR_Nest_level > 0 ) return false; return true; } 108742: c9 leave 108743: c3 ret rtems_chain_control RTEMS_Malloc_GC_list; bool malloc_is_system_state_OK(void) { if ( _Thread_Dispatch_disable_level > 0 ) 108744: 31 c0 xor %eax,%eax if ( _ISR_Nest_level > 0 ) return false; return true; } 108746: c9 leave <== NOT EXECUTED 108747: c3 ret <== NOT EXECUTED =============================================================================== 00112af0 : */ int memfile_blocks_allocated = 0; void *memfile_alloc_block(void) { 112af0: 55 push %ebp 112af1: 89 e5 mov %esp,%ebp 112af3: 83 ec 10 sub $0x10,%esp void *memory; memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK); 112af6: ff 35 f8 8f 12 00 pushl 0x128ff8 112afc: 6a 01 push $0x1 112afe: e8 69 58 ff ff call 10836c if ( memory ) 112b03: 83 c4 10 add $0x10,%esp 112b06: 85 c0 test %eax,%eax 112b08: 74 06 je 112b10 <== NEVER TAKEN memfile_blocks_allocated++; 112b0a: ff 05 0c 91 12 00 incl 0x12910c return memory; } 112b10: c9 leave 112b11: c3 ret =============================================================================== 00112f64 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 112f64: 55 push %ebp 112f65: 89 e5 mov %esp,%ebp 112f67: 53 push %ebx 112f68: 83 ec 10 sub $0x10,%esp 112f6b: 8b 5d 08 mov 0x8(%ebp),%ebx /* * The file cannot be open and the link must be less than 1 to free. */ if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) { 112f6e: 53 push %ebx 112f6f: e8 b4 dd ff ff call 110d28 112f74: 83 c4 10 add $0x10,%esp 112f77: 85 c0 test %eax,%eax 112f79: 75 2f jne 112faa 112f7b: 66 83 7b 34 00 cmpw $0x0,0x34(%ebx) 112f80: 75 28 jne 112faa <== NEVER TAKEN /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 112f82: a1 e4 70 12 00 mov 0x1270e4,%eax 112f87: 39 58 04 cmp %ebx,0x4(%eax) 112f8a: 74 28 je 112fb4 <== NEVER TAKEN rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 112f8c: 83 7b 4c 06 cmpl $0x6,0x4c(%ebx) 112f90: 74 0c je 112f9e <== NEVER TAKEN IMFS_memfile_remove( the_jnode ); 112f92: 83 ec 0c sub $0xc,%esp 112f95: 53 push %ebx 112f96: e8 21 fe ff ff call 112dbc 112f9b: 83 c4 10 add $0x10,%esp free( the_jnode ); 112f9e: 83 ec 0c sub $0xc,%esp 112fa1: 53 push %ebx 112fa2: e8 dd 55 ff ff call 108584 112fa7: 83 c4 10 add $0x10,%esp } return 0; } 112faa: 31 c0 xor %eax,%eax 112fac: 8b 5d fc mov -0x4(%ebp),%ebx 112faf: c9 leave 112fb0: c3 ret 112fb1: 8d 76 00 lea 0x0(%esi),%esi /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) rtems_filesystem_current.node_access = NULL; 112fb4: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 112fbb: eb cf jmp 112f8c <== NOT EXECUTED =============================================================================== 00112cf4 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 112cf4: 55 push %ebp 112cf5: 89 e5 mov %esp,%ebp 112cf7: 57 push %edi 112cf8: 56 push %esi 112cf9: 53 push %ebx 112cfa: 83 ec 0c sub $0xc,%esp 112cfd: 8b 7d 0c mov 0xc(%ebp),%edi /* * Perform internal consistency checks */ assert( block_table ); 112d00: 8b 45 08 mov 0x8(%ebp),%eax 112d03: 85 c0 test %eax,%eax 112d05: 74 4e je 112d55 <== NEVER TAKEN /* * Now go through all the slots in the table and free the memory. */ b = *block_table; 112d07: 8b 45 08 mov 0x8(%ebp),%eax 112d0a: 8b 30 mov (%eax),%esi for ( i=0 ; i<== NEVER TAKEN 112d10: 31 db xor %ebx,%ebx 112d12: 66 90 xchg %ax,%ax if ( b[i] ) { 112d14: 8b 04 9e mov (%esi,%ebx,4),%eax 112d17: 85 c0 test %eax,%eax 112d19: 74 13 je 112d2e memfile_free_block( b[i] ); 112d1b: 83 ec 0c sub $0xc,%esp 112d1e: 50 push %eax 112d1f: e8 b0 fd ff ff call 112ad4 b[i] = 0; 112d24: c7 04 9e 00 00 00 00 movl $0x0,(%esi,%ebx,4) 112d2b: 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 112d33: 8b 45 08 mov 0x8(%ebp),%eax 112d36: 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 ); 112d38: 83 ec 0c sub $0xc,%esp 112d3b: 56 push %esi 112d3c: e8 93 fd ff ff call 112ad4 *block_table = 0; 112d41: 8b 45 08 mov 0x8(%ebp),%eax 112d44: c7 00 00 00 00 00 movl $0x0,(%eax) 112d4a: 83 c4 10 add $0x10,%esp } 112d4d: 8d 65 f4 lea -0xc(%ebp),%esp 112d50: 5b pop %ebx 112d51: 5e pop %esi 112d52: 5f pop %edi 112d53: c9 leave 112d54: c3 ret /* * Perform internal consistency checks */ assert( block_table ); 112d55: 68 76 32 12 00 push $0x123276 <== NOT EXECUTED 112d5a: 68 ac 33 12 00 push $0x1233ac <== NOT EXECUTED 112d5f: 68 b3 01 00 00 push $0x1b3 <== NOT EXECUTED 112d64: 68 98 32 12 00 push $0x123298 <== NOT EXECUTED 112d69: e8 d6 54 ff ff call 108244 <__assert_func> <== NOT EXECUTED =============================================================================== 00113218 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 113218: 55 push %ebp 113219: 89 e5 mov %esp,%ebp 11321b: 53 push %ebx 11321c: 83 ec 14 sub $0x14,%esp 11321f: 8b 4d 08 mov 0x8(%ebp),%ecx 113222: 8b 45 0c mov 0xc(%ebp),%eax 113225: 8b 55 10 mov 0x10(%ebp),%edx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113228: 8b 59 38 mov 0x38(%ecx),%ebx * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 11322b: 39 53 54 cmp %edx,0x54(%ebx) 11322e: 7f 19 jg 113249 <== NEVER TAKEN 113230: 7d 12 jge 113244 <== ALWAYS TAKEN return IMFS_memfile_extend( the_jnode, length ); 113232: 51 push %ecx <== NOT EXECUTED 113233: 52 push %edx <== NOT EXECUTED 113234: 50 push %eax <== NOT EXECUTED 113235: 53 push %ebx <== NOT EXECUTED 113236: e8 79 fe ff ff call 1130b4 <== NOT EXECUTED 11323b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 11323e: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 113241: c9 leave <== NOT EXECUTED 113242: c3 ret <== NOT EXECUTED 113243: 90 nop <== NOT EXECUTED * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 113244: 39 43 50 cmp %eax,0x50(%ebx) 113247: 72 e9 jb 113232 <== NEVER TAKEN * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 113249: 89 43 50 mov %eax,0x50(%ebx) 11324c: 89 53 54 mov %edx,0x54(%ebx) iop->size = the_jnode->info.file.size; 11324f: 89 41 04 mov %eax,0x4(%ecx) 113252: 89 51 08 mov %edx,0x8(%ecx) IMFS_update_atime( the_jnode ); 113255: 83 ec 08 sub $0x8,%esp 113258: 6a 00 push $0x0 11325a: 8d 45 f0 lea -0x10(%ebp),%eax 11325d: 50 push %eax 11325e: e8 9d 53 ff ff call 108600 113263: 8b 45 f0 mov -0x10(%ebp),%eax 113266: 89 43 40 mov %eax,0x40(%ebx) 113269: 31 c0 xor %eax,%eax return 0; 11326b: 83 c4 10 add $0x10,%esp } 11326e: 8b 5d fc mov -0x4(%ebp),%ebx 113271: c9 leave 113272: c3 ret =============================================================================== 00113274 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 113274: 55 push %ebp 113275: 89 e5 mov %esp,%ebp 113277: 57 push %edi 113278: 56 push %esi 113279: 53 push %ebx 11327a: 83 ec 0c sub $0xc,%esp 11327d: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113280: 8b 73 38 mov 0x38(%ebx),%esi if (the_jnode->type == IMFS_LINEAR_FILE) { 113283: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 113287: 74 2f je 1132b8 <== NEVER TAKEN if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 113289: 57 push %edi 11328a: ff 73 10 pushl 0x10(%ebx) 11328d: ff 73 0c pushl 0xc(%ebx) 113290: 56 push %esi 113291: e8 1e fe ff ff call 1130b4 113296: 83 c4 10 add $0x10,%esp 113299: 85 c0 test %eax,%eax 11329b: 75 4d jne 1132ea <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 11329d: 8b 46 50 mov 0x50(%esi),%eax 1132a0: 8b 56 54 mov 0x54(%esi),%edx 1132a3: 89 43 04 mov %eax,0x4(%ebx) 1132a6: 89 53 08 mov %edx,0x8(%ebx) 1132a9: 8b 43 0c mov 0xc(%ebx),%eax 1132ac: 8b 53 10 mov 0x10(%ebx),%edx } return iop->offset; } 1132af: 8d 65 f4 lea -0xc(%ebp),%esp 1132b2: 5b pop %ebx 1132b3: 5e pop %esi 1132b4: 5f pop %edi 1132b5: c9 leave 1132b6: c3 ret 1132b7: 90 nop IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 1132b8: 8b 7b 0c mov 0xc(%ebx),%edi <== NOT EXECUTED 1132bb: 8b 4b 10 mov 0x10(%ebx),%ecx <== NOT EXECUTED 1132be: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED 1132c1: 8b 56 54 mov 0x54(%esi),%edx <== NOT EXECUTED 1132c4: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 1132c6: 7f 14 jg 1132dc <== NOT EXECUTED 1132c8: 7d 0e jge 1132d8 <== NOT EXECUTED 1132ca: 89 f8 mov %edi,%eax <== NOT EXECUTED 1132cc: 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; } 1132ce: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1132d1: 5b pop %ebx <== NOT EXECUTED 1132d2: 5e pop %esi <== NOT EXECUTED 1132d3: 5f pop %edi <== NOT EXECUTED 1132d4: c9 leave <== NOT EXECUTED 1132d5: c3 ret <== NOT EXECUTED 1132d6: 66 90 xchg %ax,%ax <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 1132d8: 39 c7 cmp %eax,%edi <== NOT EXECUTED 1132da: 76 ee jbe 1132ca <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 1132dc: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED 1132df: 89 53 10 mov %edx,0x10(%ebx) <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; } return iop->offset; } 1132e2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1132e5: 5b pop %ebx <== NOT EXECUTED 1132e6: 5e pop %esi <== NOT EXECUTED 1132e7: 5f pop %edi <== NOT EXECUTED 1132e8: c9 leave <== NOT EXECUTED 1132e9: c3 ret <== NOT EXECUTED if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 1132ea: e8 79 1d 00 00 call 115068 <__errno> <== NOT EXECUTED 1132ef: c7 00 1c 00 00 00 movl $0x1c,(%eax) <== NOT EXECUTED 1132f5: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1132fa: ba ff ff ff ff mov $0xffffffff,%edx <== NOT EXECUTED 1132ff: eb ae jmp 1132af <== NOT EXECUTED =============================================================================== 00113590 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 113590: 55 push %ebp 113591: 89 e5 mov %esp,%ebp 113593: 56 push %esi 113594: 53 push %ebx 113595: 8b 5d 08 mov 0x8(%ebp),%ebx IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 113598: 8b 73 38 mov 0x38(%ebx),%esi /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 11359b: 8b 43 14 mov 0x14(%ebx),%eax 11359e: a9 04 02 00 00 test $0x204,%eax 1135a3: 74 06 je 1135ab && (the_jnode->type == IMFS_LINEAR_FILE)) { 1135a5: 83 7e 4c 06 cmpl $0x6,0x4c(%esi) 1135a9: 74 2d je 1135d8 <== NEVER TAKEN the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 1135ab: 8b 56 50 mov 0x50(%esi),%edx 1135ae: 8b 4e 54 mov 0x54(%esi),%ecx && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 1135b1: f6 c4 02 test $0x2,%ah 1135b4: 75 12 jne 1135c8 iop->offset = the_jnode->info.file.size; iop->size = the_jnode->info.file.size; 1135b6: 89 53 04 mov %edx,0x4(%ebx) 1135b9: 89 4b 08 mov %ecx,0x8(%ebx) 1135bc: 31 c0 xor %eax,%eax return 0; } 1135be: 8d 65 f8 lea -0x8(%ebp),%esp 1135c1: 5b pop %ebx 1135c2: 5e pop %esi 1135c3: c9 leave 1135c4: c3 ret 1135c5: 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; 1135c8: 89 53 0c mov %edx,0xc(%ebx) 1135cb: 89 4b 10 mov %ecx,0x10(%ebx) 1135ce: 8b 56 50 mov 0x50(%esi),%edx 1135d1: 8b 4e 54 mov 0x54(%esi),%ecx 1135d4: eb e0 jmp 1135b6 1135d6: 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; 1135d8: 8b 46 50 mov 0x50(%esi),%eax <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 1135db: 8b 56 58 mov 0x58(%esi),%edx <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 1135de: c7 46 4c 05 00 00 00 movl $0x5,0x4c(%esi) <== NOT EXECUTED the_jnode->info.file.size = 0; 1135e5: c7 46 50 00 00 00 00 movl $0x0,0x50(%esi) <== NOT EXECUTED 1135ec: c7 46 54 00 00 00 00 movl $0x0,0x54(%esi) <== NOT EXECUTED the_jnode->info.file.indirect = 0; 1135f3: c7 46 58 00 00 00 00 movl $0x0,0x58(%esi) <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 1135fa: c7 46 5c 00 00 00 00 movl $0x0,0x5c(%esi) <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 113601: c7 46 60 00 00 00 00 movl $0x0,0x60(%esi) <== NOT EXECUTED if ((count != 0) 113608: 85 c0 test %eax,%eax <== NOT EXECUTED 11360a: 75 09 jne 113615 <== NOT EXECUTED 11360c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 11360f: 31 d2 xor %edx,%edx <== NOT EXECUTED 113611: 31 c9 xor %ecx,%ecx <== NOT EXECUTED 113613: eb 9c jmp 1135b1 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 113615: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113618: 50 push %eax <== NOT EXECUTED 113619: 52 push %edx <== NOT EXECUTED 11361a: 6a 00 push $0x0 <== NOT EXECUTED 11361c: 6a 00 push $0x0 <== NOT EXECUTED 11361e: 56 push %esi <== NOT EXECUTED 11361f: e8 e0 fc ff ff call 113304 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 113624: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 113627: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 11362a: 74 92 je 1135be <== NOT EXECUTED 11362c: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 11362f: e9 77 ff ff ff jmp 1135ab <== NOT EXECUTED =============================================================================== 00112fc0 : int memfile_rmnod( rtems_filesystem_location_info_t *parent_pathloc, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN */ ) { 112fc0: 55 push %ebp 112fc1: 89 e5 mov %esp,%ebp 112fc3: 53 push %ebx 112fc4: 83 ec 14 sub $0x14,%esp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 112fc7: 8b 45 0c mov 0xc(%ebp),%eax 112fca: 8b 18 mov (%eax),%ebx /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 112fcc: 8b 4b 08 mov 0x8(%ebx),%ecx 112fcf: 85 c9 test %ecx,%ecx 112fd1: 74 13 je 112fe6 <== NEVER TAKEN 112fd3: 83 ec 0c sub $0xc,%esp 112fd6: 53 push %ebx 112fd7: e8 08 96 ff ff call 10c5e4 <_Chain_Extract> rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 112fdc: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 112fe3: 83 c4 10 add $0x10,%esp /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 112fe6: 66 ff 4b 34 decw 0x34(%ebx) IMFS_update_ctime( the_jnode ); 112fea: 83 ec 08 sub $0x8,%esp 112fed: 6a 00 push $0x0 112fef: 8d 45 f0 lea -0x10(%ebp),%eax 112ff2: 50 push %eax 112ff3: e8 08 56 ff ff call 108600 112ff8: 8b 45 f0 mov -0x10(%ebp),%eax 112ffb: 89 43 48 mov %eax,0x48(%ebx) return memfile_check_rmnod( the_jnode ); 112ffe: 89 1c 24 mov %ebx,(%esp) 113001: e8 5e ff ff ff call 112f64 } 113006: 8b 5d fc mov -0x4(%ebp),%ebx 113009: c9 leave 11300a: c3 ret =============================================================================== 00108938 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 108938: 55 push %ebp 108939: 89 e5 mov %esp,%ebp 10893b: 57 push %edi 10893c: 56 push %esi 10893d: 53 push %ebx 10893e: 83 ec 3c sub $0x3c,%esp 108941: 8b 7d 08 mov 0x8(%ebp),%edi 108944: 8b 75 0c mov 0xc(%ebp),%esi 108947: 8b 45 10 mov 0x10(%ebp),%eax 10894a: 8b 55 14 mov 0x14(%ebp),%edx 10894d: 89 45 c0 mov %eax,-0x40(%ebp) 108950: 89 55 c4 mov %edx,-0x3c(%ebp) rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 108953: f7 c6 00 f0 00 00 test $0xf000,%esi 108959: 0f 84 9d 00 00 00 je 1089fc <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 10895f: 51 push %ecx 108960: 8d 5d cc lea -0x34(%ebp),%ebx 108963: 53 push %ebx 108964: 8d 45 e4 lea -0x1c(%ebp),%eax 108967: 50 push %eax 108968: 57 push %edi 108969: e8 62 0a 00 00 call 1093d0 if ( !temp_loc.ops->evalformake_h ) { 10896e: 8b 45 d8 mov -0x28(%ebp),%eax 108971: 8b 40 04 mov 0x4(%eax),%eax 108974: 83 c4 10 add $0x10,%esp 108977: 85 c0 test %eax,%eax 108979: 74 65 je 1089e0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 10897b: 52 push %edx 10897c: 8d 55 e0 lea -0x20(%ebp),%edx 10897f: 52 push %edx 108980: 53 push %ebx 108981: 03 7d e4 add -0x1c(%ebp),%edi 108984: 57 push %edi 108985: ff d0 call *%eax &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 108987: 83 c4 10 add $0x10,%esp 10898a: 85 c0 test %eax,%eax 10898c: 75 5d jne 1089eb return -1; if ( !temp_loc.ops->mknod_h ) { 10898e: 8b 55 d8 mov -0x28(%ebp),%edx 108991: 8b 42 14 mov 0x14(%edx),%eax 108994: 85 c0 test %eax,%eax 108996: 74 36 je 1089ce <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 108998: 83 ec 0c sub $0xc,%esp 10899b: 53 push %ebx 10899c: ff 75 c4 pushl -0x3c(%ebp) 10899f: ff 75 c0 pushl -0x40(%ebp) 1089a2: 56 push %esi 1089a3: ff 75 e0 pushl -0x20(%ebp) 1089a6: ff d0 call *%eax 1089a8: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &temp_loc ); 1089aa: 8b 45 d8 mov -0x28(%ebp),%eax 1089ad: 83 c4 20 add $0x20,%esp 1089b0: 85 c0 test %eax,%eax 1089b2: 74 10 je 1089c4 <== NEVER TAKEN 1089b4: 8b 40 1c mov 0x1c(%eax),%eax 1089b7: 85 c0 test %eax,%eax 1089b9: 74 09 je 1089c4 1089bb: 83 ec 0c sub $0xc,%esp 1089be: 53 push %ebx 1089bf: ff d0 call *%eax 1089c1: 83 c4 10 add $0x10,%esp return result; } 1089c4: 89 f0 mov %esi,%eax 1089c6: 8d 65 f4 lea -0xc(%ebp),%esp 1089c9: 5b pop %ebx 1089ca: 5e pop %esi 1089cb: 5f pop %edi 1089cc: c9 leave 1089cd: c3 ret ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 1089ce: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1089d1: 85 c0 test %eax,%eax <== NOT EXECUTED 1089d3: 74 0b je 1089e0 <== NOT EXECUTED 1089d5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1089d8: 53 push %ebx <== NOT EXECUTED 1089d9: ff d0 call *%eax <== NOT EXECUTED 1089db: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1089de: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1089e0: e8 83 c6 00 00 call 115068 <__errno> <== NOT EXECUTED 1089e5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1089eb: be ff ff ff ff mov $0xffffffff,%esi result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 1089f0: 89 f0 mov %esi,%eax 1089f2: 8d 65 f4 lea -0xc(%ebp),%esp 1089f5: 5b pop %ebx 1089f6: 5e pop %esi 1089f7: 5f pop %edi 1089f8: c9 leave 1089f9: c3 ret 1089fa: 66 90 xchg %ax,%ax int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 1089fc: e8 67 c6 00 00 call 115068 <__errno> <== NOT EXECUTED 108a01: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 108a07: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 108a0c: eb b6 jmp 1089c4 <== NOT EXECUTED =============================================================================== 00108a94 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 108a94: 55 push %ebp 108a95: 89 e5 mov %esp,%ebp 108a97: 57 push %edi 108a98: 56 push %esi 108a99: 53 push %ebx 108a9a: 83 ec 4c sub $0x4c,%esp /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 108a9d: 83 7d 14 01 cmpl $0x1,0x14(%ebp) 108aa1: 0f 87 61 02 00 00 ja 108d08 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 108aa7: 83 ec 0c sub $0xc,%esp 108aaa: ff 75 10 pushl 0x10(%ebp) 108aad: e8 ee 85 00 00 call 1110a0 108ab2: 89 45 c0 mov %eax,-0x40(%ebp) if ( !mount_h ) 108ab5: 83 c4 10 add $0x10,%esp 108ab8: 85 c0 test %eax,%eax 108aba: 0f 84 48 02 00 00 je 108d08 { 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; 108ac0: 8b 5d 0c mov 0xc(%ebp),%ebx 108ac3: 85 db test %ebx,%ebx const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108ac5: 0f 95 45 bf setne -0x41(%ebp) 108ac9: 0f 84 25 02 00 00 je 108cf4 * 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( 108acf: 31 c0 xor %eax,%eax 108ad1: b9 ff ff ff ff mov $0xffffffff,%ecx 108ad6: 8b 7d 0c mov 0xc(%ebp),%edi 108ad9: f2 ae repnz scas %es:(%edi),%al 108adb: f7 d1 not %ecx 108add: 49 dec %ecx 108ade: 89 4d b8 mov %ecx,-0x48(%ebp) 108ae1: 8b 45 0c mov 0xc(%ebp),%eax 108ae4: 89 45 b4 mov %eax,-0x4c(%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; 108ae7: ba ff ff ff ff mov $0xffffffff,%edx 108aec: 31 c0 xor %eax,%eax 108aee: 89 d1 mov %edx,%ecx 108af0: 8b 7d 10 mov 0x10(%ebp),%edi 108af3: f2 ae repnz scas %es:(%edi),%al 108af5: f7 d1 not %ecx 108af7: 89 4d c4 mov %ecx,-0x3c(%ebp) size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 108afa: 8b 4d 08 mov 0x8(%ebp),%ecx 108afd: 85 c9 test %ecx,%ecx 108aff: 0f 84 e7 01 00 00 je 108cec 108b05: 89 d1 mov %edx,%ecx 108b07: 8b 7d 08 mov 0x8(%ebp),%edi 108b0a: f2 ae repnz scas %es:(%edi),%al 108b0c: 89 ce mov %ecx,%esi 108b0e: f7 d6 not %esi size_t target_length = strlen( target ); size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 108b10: 83 ec 08 sub $0x8,%esp 108b13: 8b 4d b8 mov -0x48(%ebp),%ecx 108b16: 8b 55 c4 mov -0x3c(%ebp),%edx 108b19: 8d 44 11 75 lea 0x75(%ecx,%edx,1),%eax 108b1d: 01 f0 add %esi,%eax 108b1f: 50 push %eax 108b20: 6a 01 push $0x1 108b22: e8 45 f8 ff ff call 10836c 108b27: 89 c3 mov %eax,%ebx if ( mt_entry != NULL ) { 108b29: 83 c4 10 add $0x10,%esp 108b2c: 85 c0 test %eax,%eax 108b2e: 0f 84 a0 01 00 00 je 108cd4 <== NEVER TAKEN char *str = (char *) mt_entry + sizeof( *mt_entry ); 108b34: 8d 78 74 lea 0x74(%eax),%edi strcpy( str, filesystemtype ); 108b37: 83 ec 08 sub $0x8,%esp 108b3a: ff 75 10 pushl 0x10(%ebp) 108b3d: 57 push %edi 108b3e: e8 45 d0 00 00 call 115b88 mt_entry->type = str; 108b43: 89 7b 6c mov %edi,0x6c(%ebx) str += filesystemtype_size; 108b46: 03 7d c4 add -0x3c(%ebp),%edi if ( source_or_null != NULL ) { 108b49: 83 c4 10 add $0x10,%esp 108b4c: 8b 45 08 mov 0x8(%ebp),%eax 108b4f: 85 c0 test %eax,%eax 108b51: 74 14 je 108b67 strcpy( str, source_or_null ); 108b53: 83 ec 08 sub $0x8,%esp 108b56: ff 75 08 pushl 0x8(%ebp) 108b59: 57 push %edi 108b5a: e8 29 d0 00 00 call 115b88 mt_entry->dev = str; 108b5f: 89 7b 70 mov %edi,0x70(%ebx) str += source_size; 108b62: 01 f7 add %esi,%edi 108b64: 83 c4 10 add $0x10,%esp } strcpy( str, target ); 108b67: 83 ec 08 sub $0x8,%esp 108b6a: ff 75 b4 pushl -0x4c(%ebp) 108b6d: 57 push %edi 108b6e: e8 15 d0 00 00 call 115b88 mt_entry->target = str; 108b73: 89 7b 68 mov %edi,0x68(%ebx) &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 108b76: 89 5b 2c mov %ebx,0x2c(%ebx) mt_entry->options = options; 108b79: 8b 45 14 mov 0x14(%ebp),%eax 108b7c: 89 43 30 mov %eax,0x30(%ebx) mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 108b7f: 8d 7b 38 lea 0x38(%ebx),%edi 108b82: be 60 29 12 00 mov $0x122960,%esi 108b87: b9 0c 00 00 00 mov $0xc,%ecx 108b8c: 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 ) { 108b8e: 83 c4 10 add $0x10,%esp 108b91: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 108b95: 75 7d jne 108c14 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 108b97: 81 3d c4 70 12 00 c8 cmpl $0x1270c8,0x1270c4 108b9e: 70 12 00 108ba1: 0f 85 a9 01 00 00 jne 108d50 <== NEVER TAKEN 108ba7: 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 ) ) { 108ba9: 83 ec 08 sub $0x8,%esp 108bac: ff 75 18 pushl 0x18(%ebp) 108baf: 53 push %ebx 108bb0: ff 55 c0 call *-0x40(%ebp) 108bb3: 83 c4 10 add $0x10,%esp 108bb6: 85 c0 test %eax,%eax 108bb8: 0f 85 62 01 00 00 jne 108d20 <== 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 ); 108bbe: 56 push %esi 108bbf: 6a 00 push $0x0 108bc1: 6a 00 push $0x0 108bc3: ff 35 48 93 12 00 pushl 0x129348 108bc9: e8 da 30 00 00 call 10bca8 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 108bce: 5a pop %edx 108bcf: 59 pop %ecx 108bd0: 53 push %ebx 108bd1: 68 c4 70 12 00 push $0x1270c4 108bd6: e8 e5 39 00 00 call 10c5c0 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108bdb: 58 pop %eax 108bdc: ff 35 48 93 12 00 pushl 0x129348 108be2: e8 bd 31 00 00 call 10bda4 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 108be7: 83 c4 10 add $0x10,%esp 108bea: 80 7d bf 00 cmpb $0x0,-0x41(%ebp) 108bee: 74 0c je 108bfc rtems_filesystem_root = mt_entry->mt_fs_root; 108bf0: 31 c0 xor %eax,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108bf2: 8d 65 f4 lea -0xc(%ebp),%esp 108bf5: 5b pop %ebx 108bf6: 5e pop %esi 108bf7: 5f pop %edi 108bf8: c9 leave 108bf9: c3 ret 108bfa: 66 90 xchg %ax,%ax 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; 108bfc: 8b 3d e4 70 12 00 mov 0x1270e4,%edi 108c02: 83 c7 18 add $0x18,%edi 108c05: 8d 73 1c lea 0x1c(%ebx),%esi 108c08: b9 05 00 00 00 mov $0x5,%ecx 108c0d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 108c0f: eb df jmp 108bf0 108c11: 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( 108c14: 83 ec 0c sub $0xc,%esp 108c17: 6a 01 push $0x1 108c19: 8d 75 d4 lea -0x2c(%ebp),%esi 108c1c: 56 push %esi 108c1d: 6a 07 push $0x7 108c1f: ff 75 b8 pushl -0x48(%ebp) 108c22: ff 75 0c pushl 0xc(%ebp) 108c25: e8 ea f8 ff ff call 108514 108c2a: 83 c4 20 add $0x20,%esp 108c2d: 40 inc %eax 108c2e: 0f 84 27 01 00 00 je 108d5b <== NEVER TAKEN /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 108c34: 8b 45 e0 mov -0x20(%ebp),%eax 108c37: 8b 40 10 mov 0x10(%eax),%eax 108c3a: 85 c0 test %eax,%eax 108c3c: 0f 84 52 01 00 00 je 108d94 <== NEVER TAKEN /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 108c42: 83 ec 0c sub $0xc,%esp 108c45: 56 push %esi 108c46: ff d0 call *%eax 108c48: 83 c4 10 add $0x10,%esp 108c4b: 48 dec %eax 108c4c: 0f 85 22 01 00 00 jne 108d74 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 108c52: 83 ec 08 sub $0x8,%esp 108c55: ff 75 d4 pushl -0x2c(%ebp) 108c58: 68 10 8a 10 00 push $0x108a10 108c5d: e8 c2 fd ff ff call 108a24 108c62: 83 c4 10 add $0x10,%esp 108c65: 84 c0 test %al,%al 108c67: 0f 85 17 01 00 00 jne 108d84 * 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; 108c6d: 8b 45 d4 mov -0x2c(%ebp),%eax 108c70: 89 43 08 mov %eax,0x8(%ebx) mt_entry->mt_point_node.handlers = loc.handlers; 108c73: 8b 45 dc mov -0x24(%ebp),%eax 108c76: 89 43 10 mov %eax,0x10(%ebx) mt_entry->mt_point_node.ops = loc.ops; 108c79: 8b 45 e0 mov -0x20(%ebp),%eax 108c7c: 89 43 14 mov %eax,0x14(%ebx) mt_entry->mt_point_node.mt_entry = loc.mt_entry; 108c7f: 8b 55 e4 mov -0x1c(%ebp),%edx 108c82: 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 ){ 108c85: 8b 40 20 mov 0x20(%eax),%eax 108c88: 85 c0 test %eax,%eax 108c8a: 0f 84 04 01 00 00 je 108d94 <== NEVER TAKEN errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( mt_entry ) ) { 108c90: 83 ec 0c sub $0xc,%esp 108c93: 53 push %ebx 108c94: ff d0 call *%eax 108c96: 83 c4 10 add $0x10,%esp 108c99: 85 c0 test %eax,%eax 108c9b: 0f 84 08 ff ff ff je 108ba9 <== ALWAYS TAKEN return 0; cleanup_and_bail: free( mt_entry ); 108ca1: 83 ec 0c sub $0xc,%esp 108ca4: 53 push %ebx 108ca5: e8 da f8 ff ff call 108584 108caa: 83 c4 10 add $0x10,%esp if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 108cad: 8b 46 0c mov 0xc(%esi),%eax 108cb0: 85 c0 test %eax,%eax 108cb2: 0f 84 8f 00 00 00 je 108d47 <== NEVER TAKEN 108cb8: 8b 40 1c mov 0x1c(%eax),%eax 108cbb: 85 c0 test %eax,%eax 108cbd: 0f 84 84 00 00 00 je 108d47 <== NEVER TAKEN 108cc3: 83 ec 0c sub $0xc,%esp 108cc6: 56 push %esi 108cc7: ff d0 call *%eax 108cc9: 83 c8 ff or $0xffffffff,%eax 108ccc: 83 c4 10 add $0x10,%esp 108ccf: e9 1e ff ff ff jmp 108bf2 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 108cd4: e8 8f c3 00 00 call 115068 <__errno> <== NOT EXECUTED 108cd9: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 108cdf: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108ce4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108ce7: 5b pop %ebx <== NOT EXECUTED 108ce8: 5e pop %esi <== NOT EXECUTED 108ce9: 5f pop %edi <== NOT EXECUTED 108cea: c9 leave <== NOT EXECUTED 108ceb: c3 ret <== NOT EXECUTED ) { 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; 108cec: 31 f6 xor %esi,%esi 108cee: e9 1d fe ff ff jmp 108b10 108cf3: 90 nop const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 108cf4: c7 45 b8 01 00 00 00 movl $0x1,-0x48(%ebp) 108cfb: c7 45 b4 07 29 12 00 movl $0x122907,-0x4c(%ebp) 108d02: e9 e0 fd ff ff jmp 108ae7 108d07: 90 nop /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); if ( !mount_h ) rtems_set_errno_and_return_minus_one( EINVAL ); 108d08: e8 5b c3 00 00 call 115068 <__errno> 108d0d: c7 00 16 00 00 00 movl $0x16,(%eax) 108d13: b8 ff ff ff ff mov $0xffffffff,%eax if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 108d18: 8d 65 f4 lea -0xc(%ebp),%esp 108d1b: 5b pop %ebx 108d1c: 5e pop %esi 108d1d: 5f pop %edi 108d1e: c9 leave 108d1f: c3 ret if ( (*mount_h)( mt_entry, data ) ) { /* * Try to undo the mount operation */ if ( loc.ops->unmount_h ) { 108d20: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108d23: 8b 40 28 mov 0x28(%eax),%eax <== NOT EXECUTED 108d26: 85 c0 test %eax,%eax <== NOT EXECUTED 108d28: 74 09 je 108d33 <== NOT EXECUTED loc.ops->unmount_h( mt_entry ); 108d2a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d2d: 53 push %ebx <== NOT EXECUTED 108d2e: ff d0 call *%eax <== NOT EXECUTED 108d30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108d33: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d36: 53 push %ebx <== NOT EXECUTED 108d37: e8 48 f8 ff ff call 108584 <== NOT EXECUTED if ( loc_to_free ) 108d3c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d3f: 85 f6 test %esi,%esi <== NOT EXECUTED 108d41: 0f 85 66 ff ff ff jne 108cad <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 108d47: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 108d4a: e9 a3 fe ff ff jmp 108bf2 <== NOT EXECUTED 108d4f: 90 nop <== NOT EXECUTED } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; 108d50: e8 13 c3 00 00 call 115068 <__errno> <== NOT EXECUTED 108d55: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 108d5b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108d5e: 53 push %ebx <== NOT EXECUTED 108d5f: e8 20 f8 ff ff call 108584 <== NOT EXECUTED 108d64: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108d69: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108d6c: e9 81 fe ff ff jmp 108bf2 <== NOT EXECUTED 108d71: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { errno = ENOTDIR; 108d74: e8 ef c2 00 00 call 115068 <__errno> 108d79: c7 00 14 00 00 00 movl $0x14,(%eax) goto cleanup_and_bail; 108d7f: e9 1d ff ff ff jmp 108ca1 /* * 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; 108d84: e8 df c2 00 00 call 115068 <__errno> 108d89: c7 00 10 00 00 00 movl $0x10,(%eax) goto cleanup_and_bail; 108d8f: e9 0d ff ff ff jmp 108ca1 * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 108d94: e8 cf c2 00 00 call 115068 <__errno> <== NOT EXECUTED 108d99: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED goto cleanup_and_bail; 108d9f: e9 fd fe ff ff jmp 108ca1 <== NOT EXECUTED =============================================================================== 0010ffa4 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 10ffa4: 55 push %ebp 10ffa5: 89 e5 mov %esp,%ebp 10ffa7: 53 push %ebx 10ffa8: 83 ec 14 sub $0x14,%esp 10ffab: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 10ffae: 85 db test %ebx,%ebx 10ffb0: 74 54 je 110006 <== NEVER TAKEN RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 10ffb2: 51 push %ecx 10ffb3: 8d 45 f4 lea -0xc(%ebp),%eax 10ffb6: 50 push %eax 10ffb7: ff 75 08 pushl 0x8(%ebp) 10ffba: 68 c0 26 13 00 push $0x1326c0 10ffbf: e8 1c 32 00 00 call 1131e0 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 10ffc4: 83 c4 10 add $0x10,%esp 10ffc7: 8b 55 f4 mov -0xc(%ebp),%edx 10ffca: 85 d2 test %edx,%edx 10ffcc: 75 26 jne 10fff4 case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; 10ffce: 8b 50 10 mov 0x10(%eax),%edx * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 10ffd1: 8b 40 14 mov 0x14(%eax),%eax 10ffd4: 89 03 mov %eax,(%ebx) mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 10ffd6: 8b 42 68 mov 0x68(%edx),%eax 10ffd9: 89 43 08 mov %eax,0x8(%ebx) mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 10ffdc: 8b 42 60 mov 0x60(%edx),%eax 10ffdf: 89 43 04 mov %eax,0x4(%ebx) mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 10ffe2: 8b 42 64 mov 0x64(%edx),%eax 10ffe5: 89 43 0c mov %eax,0xc(%ebx) _Thread_Enable_dispatch(); 10ffe8: e8 b7 3a 00 00 call 113aa4 <_Thread_Enable_dispatch> 10ffed: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 10ffef: 8b 5d fc mov -0x4(%ebp),%ebx 10fff2: c9 leave 10fff3: c3 ret #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 10fff4: e8 c7 b0 00 00 call 11b0c0 <__errno> 10fff9: c7 00 09 00 00 00 movl $0x9,(%eax) 10ffff: b8 ff ff ff ff mov $0xffffffff,%eax 110004: eb e9 jmp 10ffef POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 110006: e8 b5 b0 00 00 call 11b0c0 <__errno> 11000b: c7 00 16 00 00 00 movl $0x16,(%eax) 110011: b8 ff ff ff ff mov $0xffffffff,%eax 110016: eb d7 jmp 10ffef =============================================================================== 001100fc : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 1100fc: 55 push %ebp 1100fd: 89 e5 mov %esp,%ebp 1100ff: 57 push %edi 110100: 56 push %esi 110101: 53 push %ebx 110102: 83 ec 2c sub $0x2c,%esp 110105: 8b 75 0c mov 0xc(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 110108: a1 58 21 13 00 mov 0x132158,%eax 11010d: 40 inc %eax 11010e: a3 58 21 13 00 mov %eax,0x132158 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 110113: 89 f0 mov %esi,%eax 110115: 25 00 02 00 00 and $0x200,%eax 11011a: 89 45 d4 mov %eax,-0x2c(%ebp) 11011d: 0f 85 c9 00 00 00 jne 1101ec 110123: 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 *) 11012a: 83 ec 0c sub $0xc,%esp 11012d: 68 c0 26 13 00 push $0x1326c0 110132: e8 f9 2b 00 00 call 112d30 <_Objects_Allocate> 110137: 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 ) { 110139: 83 c4 10 add $0x10,%esp 11013c: 85 c0 test %eax,%eax 11013e: 0f 84 b4 00 00 00 je 1101f8 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq_fd->oflag = oflag; 110144: 89 70 14 mov %esi,0x14(%eax) status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 110147: 83 ec 08 sub $0x8,%esp 11014a: 8d 45 e4 lea -0x1c(%ebp),%eax 11014d: 50 push %eax 11014e: ff 75 08 pushl 0x8(%ebp) 110151: e8 aa 72 00 00 call 117400 <_POSIX_Message_queue_Name_to_id> 110156: 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 ) { 110158: 83 c4 10 add $0x10,%esp 11015b: 85 c0 test %eax,%eax 11015d: 75 59 jne 1101b8 } else { /* name -> ID translation succeeded */ /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 11015f: 81 e6 00 0a 00 00 and $0xa00,%esi 110165: 81 fe 00 0a 00 00 cmp $0xa00,%esi 11016b: 0f 84 a7 00 00 00 je 110218 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 110171: 50 push %eax 110172: 8d 45 dc lea -0x24(%ebp),%eax 110175: 50 push %eax 110176: ff 75 e4 pushl -0x1c(%ebp) 110179: 68 20 25 13 00 push $0x132520 11017e: e8 5d 30 00 00 call 1131e0 <_Objects_Get> /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 110183: 89 45 e0 mov %eax,-0x20(%ebp) the_mq->open_count += 1; 110186: ff 40 18 incl 0x18(%eax) the_mq_fd->Queue = the_mq; 110189: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11018c: 0f b7 53 08 movzwl 0x8(%ebx),%edx 110190: a1 dc 26 13 00 mov 0x1326dc,%eax 110195: 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; 110198: 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(); 11019f: e8 00 39 00 00 call 113aa4 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 1101a4: e8 fb 38 00 00 call 113aa4 <_Thread_Enable_dispatch> return (mqd_t)the_mq_fd->Object.id; 1101a9: 8b 43 08 mov 0x8(%ebx),%eax 1101ac: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 1101af: 8d 65 f4 lea -0xc(%ebp),%esp 1101b2: 5b pop %ebx 1101b3: 5e pop %esi 1101b4: 5f pop %edi 1101b5: c9 leave 1101b6: c3 ret 1101b7: 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) ) ) { 1101b8: 83 f8 02 cmp $0x2,%eax 1101bb: 0f 84 87 00 00 00 je 110248 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 ); 1101c1: 83 ec 08 sub $0x8,%esp 1101c4: 53 push %ebx 1101c5: 68 c0 26 13 00 push $0x1326c0 1101ca: e8 e1 2e 00 00 call 1130b0 <_Objects_Free> _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); 1101cf: e8 d0 38 00 00 call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 1101d4: e8 e7 ae 00 00 call 11b0c0 <__errno> 1101d9: 89 38 mov %edi,(%eax) 1101db: b8 ff ff ff ff mov $0xffffffff,%eax 1101e0: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 1101e3: 8d 65 f4 lea -0xc(%ebp),%esp 1101e6: 5b pop %ebx 1101e7: 5e pop %esi 1101e8: 5f pop %edi 1101e9: c9 leave 1101ea: c3 ret 1101eb: 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 * ); 1101ec: 8b 45 14 mov 0x14(%ebp),%eax 1101ef: 89 45 d0 mov %eax,-0x30(%ebp) 1101f2: e9 33 ff ff ff jmp 11012a 1101f7: 90 nop va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); 1101f8: e8 a7 38 00 00 call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENFILE ); 1101fd: e8 be ae 00 00 call 11b0c0 <__errno> 110202: c7 00 17 00 00 00 movl $0x17,(%eax) 110208: b8 ff ff ff ff mov $0xffffffff,%eax ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 11020d: 8d 65 f4 lea -0xc(%ebp),%esp 110210: 5b pop %ebx 110211: 5e pop %esi 110212: 5f pop %edi 110213: c9 leave 110214: c3 ret 110215: 8d 76 00 lea 0x0(%esi),%esi 110218: 83 ec 08 sub $0x8,%esp 11021b: 53 push %ebx 11021c: 68 c0 26 13 00 push $0x1326c0 110221: e8 8a 2e 00 00 call 1130b0 <_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(); 110226: e8 79 38 00 00 call 113aa4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 11022b: e8 90 ae 00 00 call 11b0c0 <__errno> 110230: c7 00 11 00 00 00 movl $0x11,(%eax) 110236: b8 ff ff ff ff mov $0xffffffff,%eax 11023b: 83 c4 10 add $0x10,%esp ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; } 11023e: 8d 65 f4 lea -0xc(%ebp),%esp 110241: 5b pop %ebx 110242: 5e pop %esi 110243: 5f pop %edi 110244: c9 leave 110245: c3 ret 110246: 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) ) ) { 110248: 8b 55 d4 mov -0x2c(%ebp),%edx 11024b: 85 d2 test %edx,%edx 11024d: 0f 84 6e ff ff ff je 1101c1 /* * 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( 110253: 8d 45 e0 lea -0x20(%ebp),%eax 110256: 50 push %eax 110257: ff 75 d0 pushl -0x30(%ebp) 11025a: 6a 01 push $0x1 11025c: ff 75 08 pushl 0x8(%ebp) 11025f: e8 08 70 00 00 call 11726c <_POSIX_Message_queue_Create_support> ); /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 110264: 83 c4 10 add $0x10,%esp 110267: 40 inc %eax 110268: 74 26 je 110290 _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return (mqd_t) -1; } the_mq_fd->Queue = the_mq; 11026a: 8b 45 e0 mov -0x20(%ebp),%eax 11026d: 89 43 10 mov %eax,0x10(%ebx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 110270: 0f b7 53 08 movzwl 0x8(%ebx),%edx 110274: a1 dc 26 13 00 mov 0x1326dc,%eax 110279: 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; 11027c: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); 110283: e8 1c 38 00 00 call 113aa4 <_Thread_Enable_dispatch> return (mqd_t) the_mq_fd->Object.id; 110288: 8b 43 08 mov 0x8(%ebx),%eax 11028b: e9 1f ff ff ff jmp 1101af 110290: 83 ec 08 sub $0x8,%esp 110293: 53 push %ebx 110294: 68 c0 26 13 00 push $0x1326c0 110299: e8 12 2e 00 00 call 1130b0 <_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(); 11029e: e8 01 38 00 00 call 113aa4 <_Thread_Enable_dispatch> 1102a3: b8 ff ff ff ff mov $0xffffffff,%eax return (mqd_t) -1; 1102a8: 83 c4 10 add $0x10,%esp 1102ab: e9 ff fe ff ff jmp 1101af =============================================================================== 0012146c : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 12146c: 55 push %ebp 12146d: 89 e5 mov %esp,%ebp 12146f: 56 push %esi 121470: 53 push %ebx 121471: 8b 5d 08 mov 0x8(%ebp),%ebx 121474: 8b 75 0c mov 0xc(%ebp),%esi Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 121477: 83 ec 0c sub $0xc,%esp 12147a: 53 push %ebx 12147b: e8 88 01 00 00 call 121608 <_Timespec_Is_valid> 121480: 83 c4 10 add $0x10,%esp 121483: 84 c0 test %al,%al 121485: 0f 84 e1 00 00 00 je 12156c * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 12148b: 8b 13 mov (%ebx),%edx 12148d: 85 d2 test %edx,%edx 12148f: 0f 88 d7 00 00 00 js 12156c <== NEVER TAKEN 121495: 8b 43 04 mov 0x4(%ebx),%eax 121498: 85 c0 test %eax,%eax 12149a: 0f 88 cc 00 00 00 js 12156c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 1214a0: 83 ec 0c sub $0xc,%esp 1214a3: 53 push %ebx 1214a4: e8 f3 19 ff ff call 112e9c <_Timespec_To_ticks> 1214a9: 89 c3 mov %eax,%ebx * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 1214ab: 83 c4 10 add $0x10,%esp 1214ae: 85 c0 test %eax,%eax 1214b0: 75 36 jne 1214e8 1214b2: a1 58 94 12 00 mov 0x129458,%eax 1214b7: 40 inc %eax 1214b8: a3 58 94 12 00 mov %eax,0x129458 _Thread_Disable_dispatch(); _Thread_Yield_processor(); 1214bd: e8 8e d7 fe ff call 10ec50 <_Thread_Yield_processor> _Thread_Enable_dispatch(); 1214c2: e8 85 cb fe ff call 10e04c <_Thread_Enable_dispatch> if ( rmtp ) { 1214c7: 85 f6 test %esi,%esi 1214c9: 0f 84 93 00 00 00 je 121562 rmtp->tv_sec = 0; 1214cf: c7 06 00 00 00 00 movl $0x0,(%esi) rmtp->tv_nsec = 0; 1214d5: c7 46 04 00 00 00 00 movl $0x0,0x4(%esi) 1214dc: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINTR ); #endif } return 0; } 1214de: 8d 65 f8 lea -0x8(%ebp),%esp 1214e1: 5b pop %ebx 1214e2: 5e pop %esi 1214e3: c9 leave 1214e4: c3 ret 1214e5: 8d 76 00 lea 0x0(%esi),%esi 1214e8: a1 58 94 12 00 mov 0x129458,%eax 1214ed: 40 inc %eax 1214ee: a3 58 94 12 00 mov %eax,0x129458 /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 1214f3: 83 ec 08 sub $0x8,%esp 1214f6: 68 08 00 00 10 push $0x10000008 1214fb: ff 35 18 95 12 00 pushl 0x129518 121501: e8 32 d4 fe ff call 10e938 <_Thread_Set_state> STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 121506: 8b 15 18 95 12 00 mov 0x129518,%edx _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 12150c: 8b 42 08 mov 0x8(%edx),%eax Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12150f: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 121516: c7 42 64 b4 de 10 00 movl $0x10deb4,0x64(%edx) the_watchdog->id = id; 12151d: 89 42 68 mov %eax,0x68(%edx) the_watchdog->user_data = user_data; 121520: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 121527: 89 5a 54 mov %ebx,0x54(%edx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12152a: 58 pop %eax 12152b: 59 pop %ecx 12152c: 83 c2 48 add $0x48,%edx 12152f: 52 push %edx 121530: 68 38 95 12 00 push $0x129538 121535: e8 fe da fe ff call 10f038 <_Watchdog_Insert> _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); 12153a: e8 0d cb fe ff call 10e04c <_Thread_Enable_dispatch> /* calculate time remaining */ if ( rmtp ) { 12153f: 83 c4 10 add $0x10,%esp 121542: 85 f6 test %esi,%esi 121544: 74 1c je 121562 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; 121546: a1 18 95 12 00 mov 0x129518,%eax _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 12154b: 03 58 5c add 0x5c(%eax),%ebx 12154e: 2b 58 60 sub 0x60(%eax),%ebx _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 121551: 83 ec 08 sub $0x8,%esp 121554: 56 push %esi 121555: 53 push %ebx 121556: e8 65 00 00 00 call 1215c0 <_Timespec_From_ticks> */ #if defined(RTEMS_POSIX_API) /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 12155b: 83 c4 10 add $0x10,%esp 12155e: 85 db test %ebx,%ebx 121560: 75 1f jne 121581 rtems_set_errno_and_return_minus_one( EINTR ); 121562: 31 c0 xor %eax,%eax #endif } return 0; } 121564: 8d 65 f8 lea -0x8(%ebp),%esp 121567: 5b pop %ebx 121568: 5e pop %esi 121569: c9 leave 12156a: c3 ret 12156b: 90 nop * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); 12156c: e8 77 3f ff ff call 1154e8 <__errno> 121571: c7 00 16 00 00 00 movl $0x16,(%eax) 121577: b8 ff ff ff ff mov $0xffffffff,%eax 12157c: e9 5d ff ff ff jmp 1214de #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 ); 121581: e8 62 3f ff ff call 1154e8 <__errno> 121586: c7 00 04 00 00 00 movl $0x4,(%eax) 12158c: b8 ff ff ff ff mov $0xffffffff,%eax 121591: e9 48 ff ff ff jmp 1214de =============================================================================== 00108e78 : */ bool newlib_create_hook( rtems_tcb *current_task __attribute__((unused)), rtems_tcb *creating_task ) { 108e78: 55 push %ebp 108e79: 89 e5 mov %esp,%ebp 108e7b: 57 push %edi 108e7c: 56 push %esi 108e7d: 53 push %ebx 108e7e: 83 ec 0c sub $0xc,%esp struct _reent *ptr; if (_Thread_libc_reent == 0) 108e81: a1 44 95 12 00 mov 0x129544,%eax 108e86: 85 c0 test %eax,%eax 108e88: 0f 84 52 02 00 00 je 1090e0 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)); 108e8e: 83 ec 0c sub $0xc,%esp 108e91: 68 24 04 00 00 push $0x424 108e96: e8 81 5f 00 00 call 10ee1c <_Workspace_Allocate> 108e9b: 89 c2 mov %eax,%edx #endif if (ptr) { 108e9d: 83 c4 10 add $0x10,%esp 108ea0: 85 c0 test %eax,%eax 108ea2: 0f 84 2c 02 00 00 je 1090d4 _REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */ 108ea8: c7 00 00 00 00 00 movl $0x0,(%eax) 108eae: 8d 98 ec 02 00 00 lea 0x2ec(%eax),%ebx 108eb4: 89 58 04 mov %ebx,0x4(%eax) 108eb7: 8d 80 54 03 00 00 lea 0x354(%eax),%eax 108ebd: 89 42 08 mov %eax,0x8(%edx) 108ec0: 8d 82 bc 03 00 00 lea 0x3bc(%edx),%eax 108ec6: 89 42 0c mov %eax,0xc(%edx) 108ec9: c7 42 10 00 00 00 00 movl $0x0,0x10(%edx) 108ed0: 8d 72 14 lea 0x14(%edx),%esi 108ed3: 31 c0 xor %eax,%eax 108ed5: b9 19 00 00 00 mov $0x19,%ecx 108eda: 89 f7 mov %esi,%edi 108edc: f3 aa rep stos %al,%es:(%edi) 108ede: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) 108ee5: c7 42 34 8a 26 12 00 movl $0x12268a,0x34(%edx) 108eec: c7 42 38 00 00 00 00 movl $0x0,0x38(%edx) 108ef3: c7 42 3c 00 00 00 00 movl $0x0,0x3c(%edx) 108efa: c7 42 40 00 00 00 00 movl $0x0,0x40(%edx) 108f01: c7 42 44 00 00 00 00 movl $0x0,0x44(%edx) 108f08: c7 42 48 00 00 00 00 movl $0x0,0x48(%edx) 108f0f: c7 42 4c 00 00 00 00 movl $0x0,0x4c(%edx) 108f16: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) 108f1d: c7 42 54 00 00 00 00 movl $0x0,0x54(%edx) 108f24: c7 42 58 00 00 00 00 movl $0x0,0x58(%edx) 108f2b: c7 42 5c 00 00 00 00 movl $0x0,0x5c(%edx) 108f32: c6 42 60 00 movb $0x0,0x60(%edx) 108f36: 8d 72 7c lea 0x7c(%edx),%esi 108f39: b1 24 mov $0x24,%cl 108f3b: 89 f7 mov %esi,%edi 108f3d: f3 aa rep stos %al,%es:(%edi) 108f3f: c7 82 a0 00 00 00 00 movl $0x0,0xa0(%edx) 108f46: 00 00 00 108f49: c7 82 a4 00 00 00 01 movl $0x1,0xa4(%edx) 108f50: 00 00 00 108f53: c7 82 a8 00 00 00 00 movl $0x0,0xa8(%edx) 108f5a: 00 00 00 108f5d: 66 c7 82 ac 00 00 00 movw $0x330e,0xac(%edx) 108f64: 0e 33 108f66: 66 c7 82 ae 00 00 00 movw $0xabcd,0xae(%edx) 108f6d: cd ab 108f6f: 66 c7 82 b0 00 00 00 movw $0x1234,0xb0(%edx) 108f76: 34 12 108f78: 66 c7 82 b2 00 00 00 movw $0xe66d,0xb2(%edx) 108f7f: 6d e6 108f81: 66 c7 82 b4 00 00 00 movw $0xdeec,0xb4(%edx) 108f88: ec de 108f8a: 66 c7 82 b6 00 00 00 movw $0x5,0xb6(%edx) 108f91: 05 00 108f93: 66 c7 82 b8 00 00 00 movw $0xb,0xb8(%edx) 108f9a: 0b 00 108f9c: c7 82 bc 00 00 00 00 movl $0x0,0xbc(%edx) 108fa3: 00 00 00 108fa6: c7 82 c0 00 00 00 00 movl $0x0,0xc0(%edx) 108fad: 00 00 00 108fb0: c7 82 c4 00 00 00 00 movl $0x0,0xc4(%edx) 108fb7: 00 00 00 108fba: c7 82 c8 00 00 00 00 movl $0x0,0xc8(%edx) 108fc1: 00 00 00 108fc4: c7 82 cc 00 00 00 00 movl $0x0,0xcc(%edx) 108fcb: 00 00 00 108fce: c7 82 d0 00 00 00 00 movl $0x0,0xd0(%edx) 108fd5: 00 00 00 108fd8: c7 82 f8 00 00 00 00 movl $0x0,0xf8(%edx) 108fdf: 00 00 00 108fe2: c7 82 fc 00 00 00 00 movl $0x0,0xfc(%edx) 108fe9: 00 00 00 108fec: c7 82 00 01 00 00 00 movl $0x0,0x100(%edx) 108ff3: 00 00 00 108ff6: c7 82 04 01 00 00 00 movl $0x0,0x104(%edx) 108ffd: 00 00 00 109000: c7 82 08 01 00 00 00 movl $0x0,0x108(%edx) 109007: 00 00 00 10900a: c7 82 0c 01 00 00 00 movl $0x0,0x10c(%edx) 109011: 00 00 00 109014: c7 82 10 01 00 00 00 movl $0x0,0x110(%edx) 10901b: 00 00 00 10901e: c7 82 14 01 00 00 00 movl $0x0,0x114(%edx) 109025: 00 00 00 109028: c7 82 18 01 00 00 00 movl $0x0,0x118(%edx) 10902f: 00 00 00 109032: c7 82 1c 01 00 00 00 movl $0x0,0x11c(%edx) 109039: 00 00 00 10903c: c6 82 d4 00 00 00 00 movb $0x0,0xd4(%edx) 109043: c6 82 dc 00 00 00 00 movb $0x0,0xdc(%edx) 10904a: c7 82 f4 00 00 00 00 movl $0x0,0xf4(%edx) 109051: 00 00 00 109054: c7 82 48 01 00 00 00 movl $0x0,0x148(%edx) 10905b: 00 00 00 10905e: c7 82 4c 01 00 00 00 movl $0x0,0x14c(%edx) 109065: 00 00 00 109068: c7 82 50 01 00 00 00 movl $0x0,0x150(%edx) 10906f: 00 00 00 109072: c7 82 54 01 00 00 00 movl $0x0,0x154(%edx) 109079: 00 00 00 10907c: c7 82 d4 02 00 00 00 movl $0x0,0x2d4(%edx) 109083: 00 00 00 109086: c7 82 d4 01 00 00 00 movl $0x0,0x1d4(%edx) 10908d: 00 00 00 109090: c7 82 dc 02 00 00 00 movl $0x0,0x2dc(%edx) 109097: 00 00 00 10909a: c7 82 e0 02 00 00 00 movl $0x0,0x2e0(%edx) 1090a1: 00 00 00 1090a4: c7 82 e4 02 00 00 00 movl $0x0,0x2e4(%edx) 1090ab: 00 00 00 1090ae: c7 82 e8 02 00 00 00 movl $0x0,0x2e8(%edx) 1090b5: 00 00 00 1090b8: 66 b9 38 01 mov $0x138,%cx 1090bc: 89 df mov %ebx,%edi 1090be: f3 aa rep stos %al,%es:(%edi) creating_task->libc_reent = ptr; 1090c0: 8b 45 0c mov 0xc(%ebp),%eax 1090c3: 89 90 f0 00 00 00 mov %edx,0xf0(%eax) 1090c9: b0 01 mov $0x1,%al return TRUE; } return FALSE; } 1090cb: 8d 65 f4 lea -0xc(%ebp),%esp 1090ce: 5b pop %ebx 1090cf: 5e pop %esi 1090d0: 5f pop %edi 1090d1: c9 leave 1090d2: c3 ret 1090d3: 90 nop * hooks run with thread dispatching disabled. */ ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent)); #endif if (ptr) { 1090d4: 31 c0 xor %eax,%eax creating_task->libc_reent = ptr; return TRUE; } return FALSE; } 1090d6: 8d 65 f4 lea -0xc(%ebp),%esp 1090d9: 5b pop %ebx 1090da: 5e pop %esi 1090db: 5f pop %edi 1090dc: c9 leave 1090dd: c3 ret 1090de: 66 90 xchg %ax,%ax { struct _reent *ptr; if (_Thread_libc_reent == 0) { _REENT = _global_impure_ptr; 1090e0: a1 e0 37 12 00 mov 0x1237e0,%eax 1090e5: a3 00 72 12 00 mov %eax,0x127200 RTEMS_INLINE_ROUTINE void _Thread_Set_libc_reent ( struct _reent **libc_reent ) { _Thread_libc_reent = libc_reent; 1090ea: c7 05 44 95 12 00 00 movl $0x127200,0x129544 1090f1: 72 12 00 1090f4: e9 95 fd ff ff jmp 108e8e =============================================================================== 00108dac : void newlib_delete_hook( rtems_tcb *current_task, rtems_tcb *deleted_task ) { 108dac: 55 push %ebp 108dad: 89 e5 mov %esp,%ebp 108daf: 57 push %edi 108db0: 56 push %esi 108db1: 53 push %ebx 108db2: 83 ec 0c sub $0xc,%esp 108db5: 8b 7d 08 mov 0x8(%ebp),%edi 108db8: 8b 5d 0c mov 0xc(%ebp),%ebx /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { 108dbb: 39 df cmp %ebx,%edi 108dbd: 74 55 je 108e14 ptr = _REENT; } else { ptr = deleted_task->libc_reent; 108dbf: 8b b3 f0 00 00 00 mov 0xf0(%ebx),%esi } if (ptr && ptr != _global_impure_ptr) { 108dc5: 85 f6 test %esi,%esi 108dc7: 74 21 je 108dea <== NEVER TAKEN 108dc9: 3b 35 e0 37 12 00 cmp 0x1237e0,%esi 108dcf: 74 19 je 108dea _reclaim_reent(ptr); */ /* * Just in case there are some buffers lying around. */ _fwalk(ptr, newlib_free_buffers); 108dd1: 83 ec 08 sub $0x8,%esp 108dd4: 68 1c 8e 10 00 push $0x108e1c 108dd9: 56 push %esi 108dda: e8 39 ca 00 00 call 115818 <_fwalk> #if REENT_MALLOCED free(ptr); #else _Workspace_Free(ptr); 108ddf: 89 34 24 mov %esi,(%esp) 108de2: e8 51 60 00 00 call 10ee38 <_Workspace_Free> 108de7: 83 c4 10 add $0x10,%esp #endif } deleted_task->libc_reent = NULL; 108dea: c7 83 f0 00 00 00 00 movl $0x0,0xf0(%ebx) 108df1: 00 00 00 /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { 108df4: 39 df cmp %ebx,%edi 108df6: 74 08 je 108e00 _REENT = 0; } } 108df8: 8d 65 f4 lea -0xc(%ebp),%esp 108dfb: 5b pop %ebx 108dfc: 5e pop %esi 108dfd: 5f pop %edi 108dfe: c9 leave 108dff: c3 ret /* * Require the switch back to another task to install its own */ if ( current_task == deleted_task ) { _REENT = 0; 108e00: c7 05 00 72 12 00 00 movl $0x0,0x127200 108e07: 00 00 00 } } 108e0a: 8d 65 f4 lea -0xc(%ebp),%esp 108e0d: 5b pop %ebx 108e0e: 5e pop %esi 108e0f: 5f pop %edi 108e10: c9 leave 108e11: c3 ret 108e12: 66 90 xchg %ax,%ax /* * The reentrancy structure was allocated by newlib using malloc() */ if (current_task == deleted_task) { ptr = _REENT; 108e14: 8b 35 00 72 12 00 mov 0x127200,%esi 108e1a: eb a9 jmp 108dc5 =============================================================================== 00108e1c : */ int newlib_free_buffers( FILE *fp ) { 108e1c: 55 push %ebp 108e1d: 89 e5 mov %esp,%ebp 108e1f: 53 push %ebx 108e20: 83 ec 10 sub $0x10,%esp 108e23: 8b 5d 08 mov 0x8(%ebp),%ebx switch ( fileno(fp) ) { 108e26: 53 push %ebx 108e27: e8 f4 c5 00 00 call 115420 108e2c: 83 c4 10 add $0x10,%esp 108e2f: 83 f8 02 cmp $0x2,%eax 108e32: 76 14 jbe 108e48 <== ALWAYS TAKEN fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 108e34: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e37: 53 push %ebx <== NOT EXECUTED 108e38: e8 77 c3 00 00 call 1151b4 <== NOT EXECUTED 108e3d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } return 0; } 108e40: 31 c0 xor %eax,%eax 108e42: 8b 5d fc mov -0x4(%ebp),%ebx 108e45: c9 leave 108e46: c3 ret 108e47: 90 nop { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 108e48: 80 7b 0c 00 cmpb $0x0,0xc(%ebx) 108e4c: 79 f2 jns 108e40 <== ALWAYS TAKEN free( fp->_bf._base ); 108e4e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e51: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 108e54: e8 2b f7 ff ff call 108584 <== NOT EXECUTED fp->_flags &= ~__SMBF; 108e59: 66 81 63 0c 7f ff andw $0xff7f,0xc(%ebx) <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 108e5f: c7 03 00 00 00 00 movl $0x0,(%ebx) <== NOT EXECUTED 108e65: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) <== NOT EXECUTED 108e6c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; default: fclose(fp); } return 0; } 108e6f: 31 c0 xor %eax,%eax <== NOT EXECUTED 108e71: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108e74: c9 leave <== NOT EXECUTED 108e75: c3 ret <== NOT EXECUTED =============================================================================== 00108780 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { 108780: 55 push %ebp 108781: 89 e5 mov %esp,%ebp 108783: 53 push %ebx 108784: 83 ec 04 sub $0x4,%esp 108787: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_device_driver status; if ( !initialized ) { 10878a: 80 3d d8 b5 12 00 00 cmpb $0x0,0x12b5d8 108791: 74 09 je 10879c NULL_major = major; } return RTEMS_SUCCESSFUL; } 108793: 31 c0 xor %eax,%eax 108795: 8b 5d fc mov -0x4(%ebp),%ebx 108798: c9 leave 108799: c3 ret 10879a: 66 90 xchg %ax,%ax ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 10879c: c6 05 d8 b5 12 00 01 movb $0x1,0x12b5d8 status = rtems_io_register_name( 1087a3: 50 push %eax 1087a4: 6a 00 push $0x0 1087a6: 53 push %ebx 1087a7: 68 33 41 12 00 push $0x124133 1087ac: e8 3b 06 00 00 call 108dec "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 1087b1: 83 c4 10 add $0x10,%esp 1087b4: 85 c0 test %eax,%eax 1087b6: 75 0d jne 1087c5 <== NEVER TAKEN rtems_fatal_error_occurred(status); NULL_major = major; 1087b8: 89 1d 60 b9 12 00 mov %ebx,0x12b960 } return RTEMS_SUCCESSFUL; } 1087be: 31 c0 xor %eax,%eax 1087c0: 8b 5d fc mov -0x4(%ebp),%ebx 1087c3: c9 leave 1087c4: c3 ret major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 1087c5: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1087c8: 50 push %eax <== NOT EXECUTED 1087c9: e8 3e 49 00 00 call 10d10c <== NOT EXECUTED =============================================================================== 00108764 : rtems_device_driver null_write( rtems_device_major_number major __attribute__((unused)), rtems_device_minor_number minor __attribute__((unused)), void *pargp ) { 108764: 55 push %ebp 108765: 89 e5 mov %esp,%ebp 108767: 8b 45 10 mov 0x10(%ebp),%eax rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 10876a: 85 c0 test %eax,%eax 10876c: 74 06 je 108774 <== ALWAYS TAKEN rw_args->bytes_moved = rw_args->count; 10876e: 8b 50 10 mov 0x10(%eax),%edx 108771: 89 50 18 mov %edx,0x18(%eax) return NULL_SUCCESSFUL; } 108774: 31 c0 xor %eax,%eax 108776: c9 leave 108777: c3 ret =============================================================================== 0010915c : int open( const char *pathname, int flags, ... ) { 10915c: 55 push %ebp 10915d: 89 e5 mov %esp,%ebp 10915f: 57 push %edi 109160: 56 push %esi 109161: 53 push %ebx 109162: 83 ec 4c sub $0x4c,%esp /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 109165: 8b 45 0c mov 0xc(%ebp),%eax 109168: 40 inc %eax if ( ( status & _FREAD ) == _FREAD ) 109169: 89 c6 mov %eax,%esi 10916b: 83 e6 01 and $0x1,%esi 10916e: f7 de neg %esi 109170: 83 e6 04 and $0x4,%esi eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 109173: a8 02 test $0x2,%al 109175: 74 03 je 10917a eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 109177: 83 ce 02 or $0x2,%esi va_start(ap, flags); mode = va_arg( ap, int ); 10917a: 8b 45 10 mov 0x10(%ebp),%eax 10917d: 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(); 109180: e8 c3 7c 00 00 call 110e48 109185: 89 c3 mov %eax,%ebx if ( iop == 0 ) { 109187: 85 c0 test %eax,%eax 109189: 0f 84 bd 00 00 00 je 10924c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 10918f: b9 ff ff ff ff mov $0xffffffff,%ecx 109194: 8b 7d 08 mov 0x8(%ebp),%edi 109197: 31 c0 xor %eax,%eax 109199: f2 ae repnz scas %es:(%edi),%al 10919b: f7 d1 not %ecx 10919d: 49 dec %ecx 10919e: 83 ec 0c sub $0xc,%esp 1091a1: 6a 01 push $0x1 1091a3: 8d 45 d4 lea -0x2c(%ebp),%eax 1091a6: 89 45 b4 mov %eax,-0x4c(%ebp) 1091a9: 50 push %eax 1091aa: 56 push %esi 1091ab: 51 push %ecx 1091ac: ff 75 08 pushl 0x8(%ebp) 1091af: e8 60 f3 ff ff call 108514 1091b4: 89 c6 mov %eax,%esi pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1091b6: 83 c4 20 add $0x20,%esp 1091b9: 83 f8 ff cmp $0xffffffff,%eax 1091bc: 0f 84 f2 00 00 00 je 1092b4 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1091c2: 8b 45 0c mov 0xc(%ebp),%eax 1091c5: 25 00 0a 00 00 and $0xa00,%eax 1091ca: 3d 00 0a 00 00 cmp $0xa00,%eax 1091cf: 0f 84 8b 00 00 00 je 109260 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1091d5: 8b 45 dc mov -0x24(%ebp),%eax 1091d8: 89 43 3c mov %eax,0x3c(%ebx) iop->file_info = loc.node_access; 1091db: 8b 45 d4 mov -0x2c(%ebp),%eax 1091de: 89 43 38 mov %eax,0x38(%ebx) iop->flags |= rtems_libio_fcntl_flags( flags ); 1091e1: 8b 73 14 mov 0x14(%ebx),%esi 1091e4: 83 ec 0c sub $0xc,%esp 1091e7: ff 75 0c pushl 0xc(%ebp) 1091ea: e8 e5 7c 00 00 call 110ed4 1091ef: 09 f0 or %esi,%eax 1091f1: 89 43 14 mov %eax,0x14(%ebx) iop->pathinfo = loc; 1091f4: 8d 7b 18 lea 0x18(%ebx),%edi 1091f7: b9 05 00 00 00 mov $0x5,%ecx 1091fc: 8b 75 b4 mov -0x4c(%ebp),%esi 1091ff: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !iop->handlers || !iop->handlers->open_h ) { 109201: 8b 43 3c mov 0x3c(%ebx),%eax 109204: 83 c4 10 add $0x10,%esp 109207: 85 c0 test %eax,%eax 109209: 0f 84 99 00 00 00 je 1092a8 <== NEVER TAKEN 10920f: 8b 00 mov (%eax),%eax 109211: 85 c0 test %eax,%eax 109213: 0f 84 8f 00 00 00 je 1092a8 <== NEVER TAKEN rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 109219: ff 75 c4 pushl -0x3c(%ebp) 10921c: ff 75 0c pushl 0xc(%ebp) 10921f: ff 75 08 pushl 0x8(%ebp) 109222: 53 push %ebx 109223: ff d0 call *%eax if ( rc ) { 109225: 83 c4 10 add $0x10,%esp 109228: 85 c0 test %eax,%eax 10922a: 75 6c jne 109298 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 10922c: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 109233: 0f 85 93 00 00 00 jne 1092cc if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 109239: 89 d8 mov %ebx,%eax 10923b: 2b 05 40 93 12 00 sub 0x129340,%eax 109241: c1 f8 06 sar $0x6,%eax } 109244: 8d 65 f4 lea -0xc(%ebp),%esp 109247: 5b pop %ebx 109248: 5e pop %esi 109249: 5f pop %edi 10924a: c9 leave 10924b: c3 ret * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 10924c: be 17 00 00 00 mov $0x17,%esi if ( rc ) { if ( iop ) rtems_libio_free( iop ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); 109251: e8 12 be 00 00 call 115068 <__errno> 109256: 89 30 mov %esi,(%eax) 109258: b8 ff ff ff ff mov $0xffffffff,%eax 10925d: eb e5 jmp 109244 10925f: 90 nop if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 109260: 8d 7d d4 lea -0x2c(%ebp),%edi 109263: be 11 00 00 00 mov $0x11,%esi done: va_end(ap); if ( rc ) { if ( iop ) 109268: 85 db test %ebx,%ebx 10926a: 74 0c je 109278 <== NEVER TAKEN rtems_libio_free( iop ); 10926c: 83 ec 0c sub $0xc,%esp 10926f: 53 push %ebx 109270: e8 7b 7b 00 00 call 110df0 109275: 83 c4 10 add $0x10,%esp if ( loc_to_free ) 109278: 85 ff test %edi,%edi 10927a: 74 d5 je 109251 rtems_filesystem_freenode( loc_to_free ); 10927c: 8b 47 0c mov 0xc(%edi),%eax 10927f: 85 c0 test %eax,%eax 109281: 74 ce je 109251 <== NEVER TAKEN 109283: 8b 40 1c mov 0x1c(%eax),%eax 109286: 85 c0 test %eax,%eax 109288: 74 c7 je 109251 <== NEVER TAKEN 10928a: 83 ec 0c sub $0xc,%esp 10928d: 57 push %edi 10928e: ff d0 call *%eax 109290: 83 c4 10 add $0x10,%esp 109293: eb bc jmp 109251 109295: 8d 76 00 lea 0x0(%esi),%esi goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; 109298: e8 cb bd 00 00 call 115068 <__errno> 10929d: 8b 30 mov (%eax),%esi 10929f: 8d 7d d4 lea -0x2c(%ebp),%edi */ done: va_end(ap); if ( rc ) { 1092a2: 85 f6 test %esi,%esi 1092a4: 74 93 je 109239 <== NEVER TAKEN 1092a6: eb c0 jmp 109268 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 1092a8: 8d 7d d4 lea -0x2c(%ebp),%edi <== NOT EXECUTED 1092ab: be 86 00 00 00 mov $0x86,%esi <== NOT EXECUTED 1092b0: eb b6 jmp 109268 <== NOT EXECUTED 1092b2: 66 90 xchg %ax,%ax <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 1092b4: e8 af bd 00 00 call 115068 <__errno> 1092b9: 83 38 02 cmpl $0x2,(%eax) 1092bc: 74 5e je 10931c } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 1092be: e8 a5 bd 00 00 call 115068 <__errno> 1092c3: 8b 30 mov (%eax),%esi 1092c5: 31 ff xor %edi,%edi goto done; 1092c7: eb d9 jmp 1092a2 1092c9: 8d 76 00 lea 0x0(%esi),%esi /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 1092cc: 52 push %edx 1092cd: 6a 00 push $0x0 1092cf: 6a 00 push $0x0 1092d1: 89 d8 mov %ebx,%eax 1092d3: 2b 05 40 93 12 00 sub 0x129340,%eax 1092d9: c1 f8 06 sar $0x6,%eax 1092dc: 50 push %eax 1092dd: e8 06 79 00 00 call 110be8 1092e2: 89 c6 mov %eax,%esi if ( rc ) { 1092e4: 83 c4 10 add $0x10,%esp 1092e7: 85 c0 test %eax,%eax 1092e9: 0f 84 4a ff ff ff je 109239 <== ALWAYS TAKEN if(errno) rc = errno; 1092ef: e8 74 bd 00 00 call 115068 <__errno> <== NOT EXECUTED 1092f4: 8b 00 mov (%eax),%eax <== NOT EXECUTED 1092f6: 85 c0 test %eax,%eax <== NOT EXECUTED 1092f8: 0f 85 8b 00 00 00 jne 109389 <== NOT EXECUTED close( iop - rtems_libio_iops ); 1092fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109301: 2b 1d 40 93 12 00 sub 0x129340,%ebx <== NOT EXECUTED 109307: c1 fb 06 sar $0x6,%ebx <== NOT EXECUTED 10930a: 53 push %ebx <== NOT EXECUTED 10930b: e8 48 78 00 00 call 110b58 <== NOT EXECUTED 109310: 31 ff xor %edi,%edi <== NOT EXECUTED 109312: 31 db xor %ebx,%ebx <== NOT EXECUTED 109314: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109317: eb 89 jmp 1092a2 <== NOT EXECUTED 109319: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 10931c: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 109323: 75 0f jne 109334 109325: 31 ff xor %edi,%edi 109327: be 02 00 00 00 mov $0x2,%esi 10932c: e9 37 ff ff ff jmp 109268 109331: 8d 76 00 lea 0x0(%esi),%esi rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 109334: 6a 00 push $0x0 109336: 6a 00 push $0x0 109338: 8b 45 c4 mov -0x3c(%ebp),%eax 10933b: 80 cc 80 or $0x80,%ah 10933e: 50 push %eax 10933f: ff 75 08 pushl 0x8(%ebp) 109342: e8 f1 f5 ff ff call 108938 if ( rc ) { 109347: 83 c4 10 add $0x10,%esp 10934a: 85 c0 test %eax,%eax 10934c: 0f 85 6c ff ff ff jne 1092be <== NEVER TAKEN rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 109352: 89 f1 mov %esi,%ecx 109354: 8b 7d 08 mov 0x8(%ebp),%edi 109357: 31 c0 xor %eax,%eax 109359: f2 ae repnz scas %es:(%edi),%al 10935b: f7 d1 not %ecx 10935d: 49 dec %ecx 10935e: 83 ec 0c sub $0xc,%esp 109361: 6a 01 push $0x1 109363: 8d 45 d4 lea -0x2c(%ebp),%eax 109366: 50 push %eax 109367: 6a 00 push $0x0 109369: 51 push %ecx 10936a: ff 75 08 pushl 0x8(%ebp) 10936d: e8 a2 f1 ff ff call 108514 if ( status != 0 ) { /* The file did not exist */ 109372: 83 c4 20 add $0x20,%esp 109375: 85 c0 test %eax,%eax 109377: 0f 84 58 fe ff ff je 1091d5 <== ALWAYS TAKEN 10937d: 31 ff xor %edi,%edi <== NOT EXECUTED 10937f: be 0d 00 00 00 mov $0xd,%esi <== NOT EXECUTED 109384: e9 df fe ff ff jmp 109268 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 109389: e8 da bc 00 00 call 115068 <__errno> <== NOT EXECUTED 10938e: 8b 30 mov (%eax),%esi <== NOT EXECUTED 109390: e9 69 ff ff ff jmp 1092fe <== NOT EXECUTED =============================================================================== 001090fc : /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1090fc: 55 push %ebp 1090fd: 89 e5 mov %esp,%ebp 1090ff: 83 ec 0c sub $0xc,%esp int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 109102: 6a 00 push $0x0 109104: 6a 00 push $0x0 109106: 68 a4 10 12 00 push $0x1210a4 10910b: e8 4c 00 00 00 call 10915c 109110: 83 c4 10 add $0x10,%esp 109113: 40 inc %eax 109114: 74 2a je 109140 /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) 109116: 52 push %edx 109117: 6a 00 push $0x0 109119: 6a 01 push $0x1 10911b: 68 a4 10 12 00 push $0x1210a4 109120: e8 37 00 00 00 call 10915c 109125: 83 c4 10 add $0x10,%esp 109128: 40 inc %eax 109129: 74 24 je 10914f <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 10912b: 50 push %eax 10912c: 6a 00 push $0x0 10912e: 6a 01 push $0x1 109130: 68 a4 10 12 00 push $0x1210a4 109135: e8 22 00 00 00 call 10915c 10913a: 83 c4 10 add $0x10,%esp 10913d: 40 inc %eax 10913e: 74 02 je 109142 <== NEVER TAKEN rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ } 109140: c9 leave 109141: c3 ret */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 109142: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109145: 68 32 44 54 55 push $0x55544432 <== NOT EXECUTED 10914a: e8 95 31 00 00 call 10c2e4 <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 10914f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109152: 68 31 44 54 55 push $0x55544431 <== NOT EXECUTED 109157: e8 88 31 00 00 call 10c2e4 <== NOT EXECUTED =============================================================================== 00109cfc : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 109cfc: 55 push %ebp 109cfd: 89 e5 mov %esp,%ebp 109cff: 56 push %esi 109d00: 53 push %ebx 109d01: 83 ec 10 sub $0x10,%esp 109d04: 88 45 f4 mov %al,-0xc(%ebp) int i; if (tty->termios.c_oflag & OPOST) { 109d07: 8b 4a 34 mov 0x34(%edx),%ecx 109d0a: f6 c1 01 test $0x1,%cl 109d0d: 74 31 je 109d40 <== NEVER TAKEN switch (c) { 109d0f: 3c 09 cmp $0x9,%al 109d11: 0f 84 b1 00 00 00 je 109dc8 109d17: 76 3f jbe 109d58 <== NEVER TAKEN 109d19: 3c 0a cmp $0xa,%al 109d1b: 74 4f je 109d6c 109d1d: 3c 0d cmp $0xd,%al 109d1f: 74 7f je 109da0 <== NEVER TAKEN if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 109d21: 83 e1 02 and $0x2,%ecx 109d24: 0f 85 c6 00 00 00 jne 109df0 <== NEVER TAKEN 109d2a: 8b 0d e4 71 12 00 mov 0x1271e4,%ecx c = toupper(c); if (!iscntrl(c)) 109d30: 0f b6 c0 movzbl %al,%eax 109d33: f6 44 01 01 20 testb $0x20,0x1(%ecx,%eax,1) 109d38: 75 06 jne 109d40 <== NEVER TAKEN tty->column++; 109d3a: ff 42 28 incl 0x28(%edx) 109d3d: 8d 76 00 lea 0x0(%esi),%esi break; } } rtems_termios_puts (&c, 1, tty); 109d40: 50 push %eax 109d41: 52 push %edx 109d42: 6a 01 push $0x1 109d44: 8d 45 f4 lea -0xc(%ebp),%eax 109d47: 50 push %eax 109d48: e8 7b fe ff ff call 109bc8 109d4d: 83 c4 10 add $0x10,%esp } 109d50: 8d 65 f8 lea -0x8(%ebp),%esp 109d53: 5b pop %ebx 109d54: 5e pop %esi 109d55: c9 leave 109d56: c3 ret 109d57: 90 nop oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 109d58: 3c 08 cmp $0x8,%al <== NOT EXECUTED 109d5a: 75 c5 jne 109d21 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 109d5c: 8b 42 28 mov 0x28(%edx),%eax <== NOT EXECUTED 109d5f: 85 c0 test %eax,%eax <== NOT EXECUTED 109d61: 7e dd jle 109d40 <== NOT EXECUTED tty->column--; 109d63: 48 dec %eax <== NOT EXECUTED 109d64: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED 109d67: eb d7 jmp 109d40 <== NOT EXECUTED 109d69: 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) 109d6c: f6 c1 20 test $0x20,%cl 109d6f: 74 07 je 109d78 <== ALWAYS TAKEN tty->column = 0; 109d71: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED if (tty->termios.c_oflag & ONLCR) { 109d78: 83 e1 04 and $0x4,%ecx 109d7b: 74 c3 je 109d40 <== NEVER TAKEN rtems_termios_puts ("\r", 1, tty); 109d7d: 56 push %esi 109d7e: 52 push %edx 109d7f: 6a 01 push $0x1 109d81: 68 90 29 12 00 push $0x122990 109d86: 89 55 f0 mov %edx,-0x10(%ebp) 109d89: e8 3a fe ff ff call 109bc8 tty->column = 0; 109d8e: 8b 55 f0 mov -0x10(%ebp),%edx 109d91: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) 109d98: 83 c4 10 add $0x10,%esp 109d9b: eb a3 jmp 109d40 109d9d: 8d 76 00 lea 0x0(%esi),%esi } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 109da0: f6 c1 10 test $0x10,%cl <== NOT EXECUTED 109da3: 74 07 je 109dac <== NOT EXECUTED 109da5: 8b 5a 28 mov 0x28(%edx),%ebx <== NOT EXECUTED 109da8: 85 db test %ebx,%ebx <== NOT EXECUTED 109daa: 74 a4 je 109d50 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 109dac: f6 c1 08 test $0x8,%cl <== NOT EXECUTED 109daf: 74 09 je 109dba <== NOT EXECUTED c = '\n'; 109db1: c6 45 f4 0a movb $0xa,-0xc(%ebp) <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 109db5: 83 e1 20 and $0x20,%ecx <== NOT EXECUTED 109db8: 74 86 je 109d40 <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 109dba: c7 42 28 00 00 00 00 movl $0x0,0x28(%edx) <== NOT EXECUTED break; 109dc1: e9 7a ff ff ff jmp 109d40 <== NOT EXECUTED 109dc6: 66 90 xchg %ax,%ax <== NOT EXECUTED case '\t': i = 8 - (tty->column & 7); 109dc8: 8b 5a 28 mov 0x28(%edx),%ebx 109dcb: 89 de mov %ebx,%esi 109dcd: 83 e6 07 and $0x7,%esi 109dd0: b8 08 00 00 00 mov $0x8,%eax 109dd5: 29 f0 sub %esi,%eax if ((tty->termios.c_oflag & TABDLY) == XTABS) { 109dd7: 81 e1 00 18 00 00 and $0x1800,%ecx 109ddd: 81 f9 00 18 00 00 cmp $0x1800,%ecx 109de3: 74 37 je 109e1c <== ALWAYS TAKEN tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 109de5: 01 d8 add %ebx,%eax <== NOT EXECUTED 109de7: 89 42 28 mov %eax,0x28(%edx) <== NOT EXECUTED break; 109dea: e9 51 ff ff ff jmp 109d40 <== NOT EXECUTED 109def: 90 nop <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); 109df0: 8b 0d e4 71 12 00 mov 0x1271e4,%ecx <== NOT EXECUTED 109df6: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 109df9: 0f be 5c 01 01 movsbl 0x1(%ecx,%eax,1),%ebx <== NOT EXECUTED 109dfe: 83 e3 03 and $0x3,%ebx <== NOT EXECUTED 109e01: 83 fb 02 cmp $0x2,%ebx <== NOT EXECUTED 109e04: 74 0e je 109e14 <== NOT EXECUTED 109e06: 89 c3 mov %eax,%ebx <== NOT EXECUTED 109e08: 88 d8 mov %bl,%al <== NOT EXECUTED 109e0a: 88 5d f4 mov %bl,-0xc(%ebp) <== NOT EXECUTED 109e0d: e9 1e ff ff ff jmp 109d30 <== NOT EXECUTED 109e12: 66 90 xchg %ax,%ax <== NOT EXECUTED 109e14: 8d 58 e0 lea -0x20(%eax),%ebx <== NOT EXECUTED 109e17: eb ef jmp 109e08 <== NOT EXECUTED 109e19: 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; 109e1c: 8d 1c 18 lea (%eax,%ebx,1),%ebx 109e1f: 89 5a 28 mov %ebx,0x28(%edx) rtems_termios_puts ( " ", i, tty); 109e22: 51 push %ecx 109e23: 52 push %edx 109e24: 50 push %eax 109e25: 68 9c 25 12 00 push $0x12259c 109e2a: e8 99 fd ff ff call 109bc8 return; 109e2f: 83 c4 10 add $0x10,%esp 109e32: e9 19 ff ff ff jmp 109d50 =============================================================================== 0010a510 : long pathconf( const char *path, int name ) { 10a510: 55 push %ebp 10a511: 89 e5 mov %esp,%ebp 10a513: 56 push %esi 10a514: 53 push %ebx int status; int fd; fd = open( path, O_RDONLY ); 10a515: 83 ec 08 sub $0x8,%esp 10a518: 6a 00 push $0x0 10a51a: ff 75 08 pushl 0x8(%ebp) 10a51d: e8 92 fd ff ff call 10a2b4 10a522: 89 c3 mov %eax,%ebx if ( fd == -1 ) 10a524: 83 c4 10 add $0x10,%esp 10a527: 83 f8 ff cmp $0xffffffff,%eax 10a52a: 74 24 je 10a550 return -1; status = fpathconf( fd, name ); 10a52c: 83 ec 08 sub $0x8,%esp 10a52f: ff 75 0c pushl 0xc(%ebp) 10a532: 50 push %eax 10a533: e8 7c ec ff ff call 1091b4 10a538: 89 c6 mov %eax,%esi (void) close( fd ); 10a53a: 89 1c 24 mov %ebx,(%esp) 10a53d: e8 86 e7 ff ff call 108cc8 return status; 10a542: 83 c4 10 add $0x10,%esp } 10a545: 89 f0 mov %esi,%eax 10a547: 8d 65 f8 lea -0x8(%ebp),%esp 10a54a: 5b pop %ebx 10a54b: 5e pop %esi 10a54c: c9 leave 10a54d: c3 ret 10a54e: 66 90 xchg %ax,%ax { int status; int fd; fd = open( path, O_RDONLY ); if ( fd == -1 ) 10a550: be ff ff ff ff mov $0xffffffff,%esi status = fpathconf( fd, name ); (void) close( fd ); return status; } 10a555: 89 f0 mov %esi,%eax 10a557: 8d 65 f8 lea -0x8(%ebp),%esp 10a55a: 5b pop %ebx 10a55b: 5e pop %esi 10a55c: c9 leave 10a55d: c3 ret =============================================================================== 00113934 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { 113934: 55 push %ebp 113935: 89 e5 mov %esp,%ebp 113937: 57 push %edi 113938: 56 push %esi 113939: 53 push %ebx 11393a: 83 ec 48 sub $0x48,%esp rtems_filesystem_location_info_t loc; rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) 11393d: 6a 01 push $0x1 11393f: 8d 5d c4 lea -0x3c(%ebp),%ebx 113942: 53 push %ebx 113943: 6a 07 push $0x7 113945: 6a 03 push $0x3 113947: 68 0d 34 12 00 push $0x12340d 11394c: e8 c3 4b ff ff call 108514 113951: 83 c4 20 add $0x20,%esp 113954: 85 c0 test %eax,%eax 113956: 0f 85 e0 00 00 00 jne 113a3c <== ALWAYS TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) return -1; } else rtems_filesystem_freenode(&loc); 11395c: 8b 45 d0 mov -0x30(%ebp),%eax <== NOT EXECUTED 11395f: 85 c0 test %eax,%eax <== NOT EXECUTED 113961: 74 10 je 113973 <== NOT EXECUTED 113963: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 113966: 85 c0 test %eax,%eax <== NOT EXECUTED 113968: 74 09 je 113973 <== NOT EXECUTED 11396a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 11396d: 53 push %ebx <== NOT EXECUTED 11396e: ff d0 call *%eax <== NOT EXECUTED 113970: 83 c4 10 add $0x10,%esp <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); 113973: 8d 5d d9 lea -0x27(%ebp),%ebx 113976: be 12 34 12 00 mov $0x123412,%esi 11397b: b9 0a 00 00 00 mov $0xa,%ecx 113980: 89 df mov %ebx,%edi 113982: f3 a4 rep movsb %ds:(%esi),%es:(%edi) sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); 113984: 0f b7 05 10 91 12 00 movzwl 0x129110,%eax 11398b: 8d 50 01 lea 0x1(%eax),%edx 11398e: 66 89 15 10 91 12 00 mov %dx,0x129110 113995: 51 push %ecx 113996: 50 push %eax 113997: 68 1d 34 12 00 push $0x12341d 11399c: 8d 45 e3 lea -0x1d(%ebp),%eax 11399f: 50 push %eax 1139a0: e8 03 20 00 00 call 1159a8 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { 1139a5: 58 pop %eax 1139a6: 5a pop %edx 1139a7: 68 80 01 00 00 push $0x180 1139ac: 53 push %ebx 1139ad: e8 8e 07 00 00 call 114140 1139b2: 83 c4 10 add $0x10,%esp 1139b5: 85 c0 test %eax,%eax 1139b7: 75 6f jne 113a28 <== NEVER TAKEN return -1; sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); 1139b9: 83 ec 08 sub $0x8,%esp 1139bc: 68 00 40 00 00 push $0x4000 1139c1: 53 push %ebx 1139c2: e8 95 57 ff ff call 10915c 1139c7: 8b 55 08 mov 0x8(%ebp),%edx 1139ca: 89 02 mov %eax,(%edx) if (filsdes[0] < 0) { 1139cc: 83 c4 10 add $0x10,%esp 1139cf: 85 c0 test %eax,%eax 1139d1: 0f 88 a1 00 00 00 js 113a78 <== ALWAYS TAKEN the file node will be deleted after it is closed by all. */ unlink(fifopath); } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); 1139d7: 3b 05 0c 52 12 00 cmp 0x12520c,%eax 1139dd: 0f 82 85 00 00 00 jb 113a68 1139e3: 31 c0 xor %eax,%eax iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 1139e5: 83 60 14 fe andl $0xfffffffe,0x14(%eax) <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); 1139e9: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1139ec: 6a 01 push $0x1 <== NOT EXECUTED 1139ee: 53 push %ebx <== NOT EXECUTED 1139ef: e8 68 57 ff ff call 10915c <== NOT EXECUTED 1139f4: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 1139f7: 89 42 04 mov %eax,0x4(%edx) <== NOT EXECUTED if (filsdes[1] < 0) { 1139fa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1139fd: 85 c0 test %eax,%eax <== NOT EXECUTED 1139ff: 0f 88 8b 00 00 00 js 113a90 <== NOT EXECUTED 113a05: 31 f6 xor %esi,%esi <== NOT EXECUTED err = errno; close(filsdes[0]); } unlink(fifopath); 113a07: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113a0a: 53 push %ebx <== NOT EXECUTED 113a0b: e8 4c 07 00 00 call 11415c <== NOT EXECUTED 113a10: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_set_errno_and_return_minus_one(err); 113a13: e8 50 16 00 00 call 115068 <__errno> 113a18: 89 30 mov %esi,(%eax) } 113a1a: b8 ff ff ff ff mov $0xffffffff,%eax 113a1f: 8d 65 f4 lea -0xc(%ebp),%esp 113a22: 5b pop %ebx 113a23: 5e pop %esi 113a24: 5f pop %edi 113a25: c9 leave 113a26: c3 ret 113a27: 90 nop 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){ 113a28: e8 3b 16 00 00 call 115068 <__errno> <== NOT EXECUTED } unlink(fifopath); } rtems_set_errno_and_return_minus_one(err); } 113a2d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 113a32: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 113a35: 5b pop %ebx <== NOT EXECUTED 113a36: 5e pop %esi <== NOT EXECUTED 113a37: 5f pop %edi <== NOT EXECUTED 113a38: c9 leave <== NOT EXECUTED 113a39: c3 ret <== NOT EXECUTED 113a3a: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop; int err = 0; /* Create /tmp if not exists */ if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE) != 0) { if (errno != ENOENT) 113a3c: e8 27 16 00 00 call 115068 <__errno> 113a41: 83 38 02 cmpl $0x2,(%eax) 113a44: 75 e7 jne 113a2d <== NEVER TAKEN return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) 113a46: 83 ec 08 sub $0x8,%esp 113a49: 68 ff 03 00 00 push $0x3ff 113a4e: 68 0d 34 12 00 push $0x12340d 113a53: e8 c4 4e ff ff call 10891c 113a58: 83 c4 10 add $0x10,%esp 113a5b: 85 c0 test %eax,%eax 113a5d: 0f 84 10 ff ff ff je 113973 <== ALWAYS TAKEN 113a63: eb c8 jmp 113a2d 113a65: 8d 76 00 lea 0x0(%esi),%esi 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]); 113a68: c1 e0 06 shl $0x6,%eax <== NOT EXECUTED 113a6b: 03 05 40 93 12 00 add 0x129340,%eax <== NOT EXECUTED 113a71: e9 6f ff ff ff jmp 1139e5 <== NOT EXECUTED 113a76: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* Non-blocking open to avoid waiting for writers */ filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK); if (filsdes[0] < 0) { err = errno; 113a78: e8 eb 15 00 00 call 115068 <__errno> 113a7d: 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); 113a7f: 83 ec 0c sub $0xc,%esp 113a82: 53 push %ebx 113a83: e8 d4 06 00 00 call 11415c 113a88: 83 c4 10 add $0x10,%esp 113a8b: eb 86 jmp 113a13 113a8d: 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; 113a90: e8 d3 15 00 00 call 115068 <__errno> <== NOT EXECUTED 113a95: 8b 30 mov (%eax),%esi <== NOT EXECUTED close(filsdes[0]); 113a97: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 113a9a: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 113a9d: ff 30 pushl (%eax) <== NOT EXECUTED 113a9f: e8 b4 d0 ff ff call 110b58 <== NOT EXECUTED 113aa4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 113aa7: e9 5b ff ff ff jmp 113a07 <== NOT EXECUTED =============================================================================== 0010f300 : pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 10f300: 55 push %ebp <== NOT EXECUTED 10f301: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f303: 56 push %esi <== NOT EXECUTED 10f304: 53 push %ebx <== NOT EXECUTED 10f305: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 10f308: 8b 5d 10 mov 0x10(%ebp),%ebx <== NOT EXECUTED if (cmd == FIONREAD) { 10f30b: 81 7d 0c 7f 66 04 40 cmpl $0x4004667f,0xc(%ebp) <== NOT EXECUTED 10f312: 74 0c je 10f320 <== NOT EXECUTED 10f314: b8 ea ff ff ff mov $0xffffffea,%eax <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 10f319: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10f31c: 5b pop %ebx <== NOT EXECUTED 10f31d: 5e pop %esi <== NOT EXECUTED 10f31e: c9 leave <== NOT EXECUTED 10f31f: c3 ret <== NOT EXECUTED void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 10f320: 85 db test %ebx,%ebx <== NOT EXECUTED 10f322: 75 07 jne 10f32b <== NOT EXECUTED 10f324: b8 f2 ff ff ff mov $0xfffffff2,%eax <== NOT EXECUTED 10f329: eb ee jmp 10f319 <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) 10f32b: 52 push %edx <== NOT EXECUTED 10f32c: 6a 00 push $0x0 <== NOT EXECUTED 10f32e: 6a 00 push $0x0 <== NOT EXECUTED 10f330: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 10f333: e8 70 c9 ff ff call 10bca8 <== NOT EXECUTED 10f338: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f33b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f33d: 74 07 je 10f346 <== NOT EXECUTED 10f33f: b8 fc ff ff ff mov $0xfffffffc,%eax <== NOT EXECUTED 10f344: eb d3 jmp 10f319 <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 10f346: 8b 46 0c mov 0xc(%esi),%eax <== NOT EXECUTED 10f349: 89 03 mov %eax,(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f34b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f34e: ff 76 28 pushl 0x28(%esi) <== NOT EXECUTED 10f351: e8 4e ca ff ff call 10bda4 <== NOT EXECUTED 10f356: 31 c0 xor %eax,%eax <== NOT EXECUTED return 0; 10f358: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f35b: eb bc jmp 10f319 <== NOT EXECUTED =============================================================================== 0010f2a0 : pipe_control_t *pipe, off_t offset, int whence, rtems_libio_t *iop ) { 10f2a0: 55 push %ebp <== NOT EXECUTED 10f2a1: 89 e5 mov %esp,%ebp <== NOT EXECUTED /* Seek on pipe is not supported */ return -ESPIPE; } 10f2a3: b8 e3 ff ff ff mov $0xffffffe3,%eax <== NOT EXECUTED 10f2a8: c9 leave <== NOT EXECUTED 10f2a9: c3 ret <== NOT EXECUTED =============================================================================== 0010f360 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 10f360: 55 push %ebp <== NOT EXECUTED 10f361: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f363: 57 push %edi <== NOT EXECUTED 10f364: 56 push %esi <== NOT EXECUTED 10f365: 53 push %ebx <== NOT EXECUTED 10f366: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED 10f369: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f36c: 6a 00 push $0x0 <== NOT EXECUTED 10f36e: 6a 00 push $0x0 <== NOT EXECUTED 10f370: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f373: e8 30 c9 ff ff call 10bca8 <== NOT EXECUTED 10f378: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f37b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f37d: 0f 85 b1 00 00 00 jne 10f434 <== NOT EXECUTED return -EINTR; while (read < count) { 10f383: 8b 4d 10 mov 0x10(%ebp),%ecx <== NOT EXECUTED 10f386: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10f388: 0f 84 82 01 00 00 je 10f510 <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; if (ret != 0) 10f38e: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 10f395: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 10f39c: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 10f39f: 85 d2 test %edx,%edx <== NOT EXECUTED 10f3a1: 0f 85 a1 00 00 00 jne 10f448 <== NOT EXECUTED /* Not an error */ if (pipe->Writers == 0) 10f3a7: 8b 53 14 mov 0x14(%ebx),%edx <== NOT EXECUTED 10f3aa: 85 d2 test %edx,%edx <== NOT EXECUTED 10f3ac: 0f 84 06 01 00 00 je 10f4b8 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { 10f3b2: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10f3b5: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f3b9: 0f 85 01 01 00 00 jne 10f4c0 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 10f3bf: ff 43 18 incl 0x18(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f3c2: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f3c5: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f3c8: e8 d7 c9 ff ff call 10bda4 <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) 10f3cd: 5f pop %edi <== NOT EXECUTED 10f3ce: 58 pop %eax <== NOT EXECUTED 10f3cf: 6a 00 push $0x0 <== NOT EXECUTED 10f3d1: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f3d4: e8 d3 26 00 00 call 111aac <== NOT EXECUTED 10f3d9: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f3dc: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f3df: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10f3e1: f7 d6 not %esi <== NOT EXECUTED 10f3e3: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f3e6: 6a 00 push $0x0 <== NOT EXECUTED 10f3e8: 6a 00 push $0x0 <== NOT EXECUTED 10f3ea: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f3ed: e8 b6 c8 ff ff call 10bca8 <== NOT EXECUTED 10f3f2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f3f5: 85 c0 test %eax,%eax <== NOT EXECUTED 10f3f7: 0f 85 cf 00 00 00 jne 10f4cc <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 10f3fd: ff 4b 18 decl 0x18(%ebx) <== NOT EXECUTED if (ret != 0) 10f400: 85 f6 test %esi,%esi <== NOT EXECUTED 10f402: 74 98 je 10f39c <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 10f404: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f407: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f40a: e8 95 c9 ff ff call 10bda4 <== NOT EXECUTED 10f40f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: if (read > 0) 10f412: 8b 4d d4 mov -0x2c(%ebp),%ecx <== NOT EXECUTED 10f415: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10f417: 7e 0b jle 10f424 <== NOT EXECUTED return read; return ret; } 10f419: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f41c: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f41f: 5b pop %ebx <== NOT EXECUTED 10f420: 5e pop %esi <== NOT EXECUTED 10f421: 5f pop %edi <== NOT EXECUTED 10f422: c9 leave <== NOT EXECUTED 10f423: c3 ret <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) 10f424: 89 75 d4 mov %esi,-0x2c(%ebp) <== NOT EXECUTED return read; return ret; } 10f427: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f42a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f42d: 5b pop %ebx <== NOT EXECUTED 10f42e: 5e pop %esi <== NOT EXECUTED 10f42f: 5f pop %edi <== NOT EXECUTED 10f430: c9 leave <== NOT EXECUTED 10f431: c3 ret <== NOT EXECUTED 10f432: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 10f434: c7 45 d4 fc ff ff ff movl $0xfffffffc,-0x2c(%ebp) <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 10f43b: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f43e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f441: 5b pop %ebx <== NOT EXECUTED 10f442: 5e pop %esi <== NOT EXECUTED 10f443: 5f pop %edi <== NOT EXECUTED 10f444: c9 leave <== NOT EXECUTED 10f445: c3 ret <== NOT EXECUTED 10f446: 66 90 xchg %ax,%ax <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 10f448: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10f44b: 2b 45 d0 sub -0x30(%ebp),%eax <== NOT EXECUTED 10f44e: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 10f451: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10f453: 76 03 jbe 10f458 <== NOT EXECUTED 10f455: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; 10f458: 8b 73 08 mov 0x8(%ebx),%esi <== NOT EXECUTED 10f45b: 8b 43 04 mov 0x4(%ebx),%eax <== NOT EXECUTED 10f45e: 29 f0 sub %esi,%eax <== NOT EXECUTED if (chunk > chunk1) { 10f460: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED 10f463: 7f 71 jg 10f4d6 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 10f465: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f468: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED 10f46b: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f46d: 89 c7 mov %eax,%edi <== NOT EXECUTED 10f46f: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10f472: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED pipe->Start += chunk; 10f474: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10f477: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED pipe->Start %= pipe->Size; 10f47a: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f47c: f7 73 04 divl 0x4(%ebx) <== NOT EXECUTED 10f47f: 89 53 08 mov %edx,0x8(%ebx) <== NOT EXECUTED pipe->Length -= chunk; 10f482: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f485: 2b 45 cc sub -0x34(%ebp),%eax <== NOT EXECUTED 10f488: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 10f48b: 85 c0 test %eax,%eax <== NOT EXECUTED 10f48d: 75 07 jne 10f496 <== NOT EXECUTED pipe->Start = 0; 10f48f: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) <== NOT EXECUTED if (pipe->waitingWriters > 0) 10f496: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED 10f499: 85 f6 test %esi,%esi <== NOT EXECUTED 10f49b: 75 5f jne 10f4fc <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; 10f49d: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10f4a0: 01 45 d4 add %eax,-0x2c(%ebp) <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 10f4a3: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f4a6: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10f4a9: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 10f4ac: 39 45 d4 cmp %eax,-0x2c(%ebp) <== NOT EXECUTED 10f4af: 0f 82 e7 fe ff ff jb 10f39c <== NOT EXECUTED 10f4b5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10f4b8: 31 f6 xor %esi,%esi <== NOT EXECUTED 10f4ba: e9 45 ff ff ff jmp 10f404 <== NOT EXECUTED 10f4bf: 90 nop <== NOT EXECUTED while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { 10f4c0: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10f4c5: e9 3a ff ff ff jmp 10f404 <== NOT EXECUTED 10f4ca: 66 90 xchg %ax,%ax <== NOT EXECUTED /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f4cc: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10f4d1: e9 3c ff ff ff jmp 10f412 <== 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); 10f4d6: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10f4d9: 03 55 d0 add -0x30(%ebp),%edx <== NOT EXECUTED 10f4dc: 03 33 add (%ebx),%esi <== NOT EXECUTED 10f4de: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f4e0: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10f4e2: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 10f4e4: 8b 55 d0 mov -0x30(%ebp),%edx <== NOT EXECUTED 10f4e7: 01 c2 add %eax,%edx <== NOT EXECUTED 10f4e9: 03 55 0c add 0xc(%ebp),%edx <== NOT EXECUTED 10f4ec: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10f4ef: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f4f1: 8b 33 mov (%ebx),%esi <== NOT EXECUTED 10f4f3: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f4f5: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 10f4f7: e9 78 ff ff ff jmp 10f474 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 10f4fc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f4ff: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f502: 50 push %eax <== NOT EXECUTED 10f503: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f506: e8 3d 25 00 00 call 111a48 <== NOT EXECUTED 10f50b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f50e: eb 8d jmp 10f49d <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 10f510: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%ebp) <== NOT EXECUTED 10f517: 31 f6 xor %esi,%esi <== NOT EXECUTED 10f519: e9 e6 fe ff ff jmp 10f404 <== NOT EXECUTED =============================================================================== 0010f720 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 10f720: 55 push %ebp <== NOT EXECUTED 10f721: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f723: 57 push %edi <== NOT EXECUTED 10f724: 56 push %esi <== NOT EXECUTED 10f725: 53 push %ebx <== NOT EXECUTED 10f726: 83 ec 20 sub $0x20,%esp <== NOT EXECUTED 10f729: 8b 7d 08 mov 0x8(%ebp),%edi <== NOT EXECUTED pipe_control_t *pipe = *pipep; 10f72c: 8b 1f mov (%edi),%ebx <== NOT EXECUTED uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, 10f72e: 6a 00 push $0x0 <== NOT EXECUTED 10f730: 6a 00 push $0x0 <== NOT EXECUTED 10f732: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f735: e8 6e c5 ff ff call 10bca8 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) 10f73a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f73d: 85 c0 test %eax,%eax <== NOT EXECUTED 10f73f: 0f 85 e3 00 00 00 jne 10f828 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); 10f745: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 10f748: 8b 40 14 mov 0x14(%eax),%eax <== NOT EXECUTED 10f74b: 89 c6 mov %eax,%esi <== NOT EXECUTED 10f74d: 83 e6 06 and $0x6,%esi <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) 10f750: a8 02 test $0x2,%al <== NOT EXECUTED 10f752: 74 03 je 10f757 <== NOT EXECUTED pipe->Readers --; 10f754: ff 4b 10 decl 0x10(%ebx) <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) 10f757: f7 c6 04 00 00 00 test $0x4,%esi <== NOT EXECUTED 10f75d: 75 69 jne 10f7c8 <== NOT EXECUTED pipe->Writers --; sc = rtems_semaphore_obtain(rtems_pipe_semaphore, 10f75f: 51 push %ecx <== NOT EXECUTED 10f760: 6a 00 push $0x0 <== NOT EXECUTED 10f762: 6a 00 push $0x0 <== NOT EXECUTED 10f764: ff 35 08 91 12 00 pushl 0x129108 <== NOT EXECUTED 10f76a: e8 39 c5 ff ff call 10bca8 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) 10f76f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f772: 85 c0 test %eax,%eax <== NOT EXECUTED 10f774: 0f 85 ae 00 00 00 jne 10f828 <== NOT EXECUTED rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); 10f77a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f77d: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f780: e8 1f c6 ff ff call 10bda4 <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { 10f785: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f788: 8b 53 10 mov 0x10(%ebx),%edx <== NOT EXECUTED 10f78b: 85 d2 test %edx,%edx <== NOT EXECUTED 10f78d: 74 41 je 10f7d0 <== NOT EXECUTED *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 10f78f: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f792: 85 c0 test %eax,%eax <== NOT EXECUTED 10f794: 75 17 jne 10f7ad <== NOT EXECUTED 10f796: 83 fe 02 cmp $0x2,%esi <== NOT EXECUTED 10f799: 74 12 je 10f7ad <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); 10f79b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f79e: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f7a1: 50 push %eax <== NOT EXECUTED 10f7a2: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f7a5: e8 9e 22 00 00 call 111a48 <== NOT EXECUTED 10f7aa: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); 10f7ad: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f7b0: ff 35 08 91 12 00 pushl 0x129108 <== NOT EXECUTED 10f7b6: e8 e9 c5 ff ff call 10bda4 <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 10f7bb: 31 c0 xor %eax,%eax <== NOT EXECUTED 10f7bd: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f7c0: 5b pop %ebx <== NOT EXECUTED 10f7c1: 5e pop %esi <== NOT EXECUTED 10f7c2: 5f pop %edi <== NOT EXECUTED 10f7c3: c9 leave <== NOT EXECUTED 10f7c4: c3 ret <== NOT EXECUTED 10f7c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; 10f7c8: ff 4b 14 decl 0x14(%ebx) <== NOT EXECUTED 10f7cb: eb 92 jmp 10f75f <== NOT EXECUTED 10f7cd: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 10f7d0: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10f7d3: 85 c0 test %eax,%eax <== NOT EXECUTED 10f7d5: 74 19 je 10f7f0 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10f7d7: 83 fe 04 cmp $0x4,%esi <== NOT EXECUTED 10f7da: 74 d1 je 10f7ad <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 10f7dc: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f7df: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f7e2: 50 push %eax <== NOT EXECUTED 10f7e3: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f7e6: e8 5d 22 00 00 call 111a48 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 10f7eb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f7ee: eb bd jmp 10f7ad <== NOT EXECUTED /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { rtems_barrier_delete(pipe->readBarrier); 10f7f0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f7f3: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f7f6: e8 bd 21 00 00 call 1119b8 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); 10f7fb: 5e pop %esi <== NOT EXECUTED 10f7fc: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f7ff: e8 b4 21 00 00 call 1119b8 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); 10f804: 59 pop %ecx <== NOT EXECUTED 10f805: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f808: e8 f7 c3 ff ff call 10bc04 <== NOT EXECUTED free(pipe->Buffer); 10f80d: 5a pop %edx <== NOT EXECUTED 10f80e: ff 33 pushl (%ebx) <== NOT EXECUTED 10f810: e8 6f 8d ff ff call 108584 <== NOT EXECUTED free(pipe); 10f815: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 10f818: e8 67 8d ff ff call 108584 <== NOT EXECUTED /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; 10f81d: c7 07 00 00 00 00 movl $0x0,(%edi) <== NOT EXECUTED if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); PIPE_UNLOCK(pipe); if (pipe->Readers == 0 && pipe->Writers == 0) { 10f823: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f826: eb 85 jmp 10f7ad <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(sc); 10f828: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f82b: 50 push %eax <== NOT EXECUTED 10f82c: e8 b3 ca ff ff call 10c2e4 <== NOT EXECUTED =============================================================================== 0010f520 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 10f520: 55 push %ebp <== NOT EXECUTED 10f521: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10f523: 57 push %edi <== NOT EXECUTED 10f524: 56 push %esi <== NOT EXECUTED 10f525: 53 push %ebx <== NOT EXECUTED 10f526: 83 ec 2c sub $0x2c,%esp <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 10f529: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED 10f52c: 85 ff test %edi,%edi <== NOT EXECUTED 10f52e: 75 0c jne 10f53c <== NOT EXECUTED 10f530: 31 db xor %ebx,%ebx <== NOT EXECUTED #endif if (written > 0) return written; return ret; } 10f532: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10f534: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10f537: 5b pop %ebx <== NOT EXECUTED 10f538: 5e pop %esi <== NOT EXECUTED 10f539: 5f pop %edi <== NOT EXECUTED 10f53a: c9 leave <== NOT EXECUTED 10f53b: c3 ret <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 10f53c: 56 push %esi <== NOT EXECUTED 10f53d: 6a 00 push $0x0 <== NOT EXECUTED 10f53f: 6a 00 push $0x0 <== NOT EXECUTED 10f541: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f544: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED 10f547: e8 5c c7 ff ff call 10bca8 <== NOT EXECUTED 10f54c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f54f: 85 c0 test %eax,%eax <== NOT EXECUTED 10f551: 0f 85 1d 01 00 00 jne 10f674 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { 10f557: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f55a: 8b 58 10 mov 0x10(%eax),%ebx <== NOT EXECUTED 10f55d: 85 db test %ebx,%ebx <== NOT EXECUTED 10f55f: 0f 84 50 01 00 00 je 10f6b5 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 10f565: 8b 48 04 mov 0x4(%eax),%ecx <== NOT EXECUTED 10f568: 39 4d 10 cmp %ecx,0x10(%ebp) <== NOT EXECUTED 10f56b: 0f 87 3a 01 00 00 ja 10f6ab <== NOT EXECUTED 10f571: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 10f574: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) <== NOT EXECUTED 10f57b: 31 db xor %ebx,%ebx <== NOT EXECUTED else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 10f57d: 89 5d d4 mov %ebx,-0x2c(%ebp) <== NOT EXECUTED 10f580: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 10f583: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f586: 89 ca mov %ecx,%edx <== NOT EXECUTED 10f588: 29 c2 sub %eax,%edx <== NOT EXECUTED 10f58a: 39 fa cmp %edi,%edx <== NOT EXECUTED 10f58c: 73 6f jae 10f5fd <== NOT EXECUTED if (LIBIO_NODELAY(iop)) { 10f58e: 8b 45 14 mov 0x14(%ebp),%eax <== NOT EXECUTED 10f591: f6 40 14 01 testb $0x1,0x14(%eax) <== NOT EXECUTED 10f595: 0f 85 47 01 00 00 jne 10f6e2 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 10f59b: ff 43 1c incl 0x1c(%ebx) <== NOT EXECUTED PIPE_UNLOCK(pipe); 10f59e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f5a1: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f5a4: e8 fb c7 ff ff call 10bda4 <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) 10f5a9: 5a pop %edx <== NOT EXECUTED 10f5aa: 59 pop %ecx <== NOT EXECUTED 10f5ab: 6a 00 push $0x0 <== NOT EXECUTED 10f5ad: ff 73 30 pushl 0x30(%ebx) <== NOT EXECUTED 10f5b0: e8 f7 24 00 00 call 111aac <== NOT EXECUTED 10f5b5: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10f5b8: 83 f8 01 cmp $0x1,%eax <== NOT EXECUTED 10f5bb: 19 f6 sbb %esi,%esi <== NOT EXECUTED 10f5bd: f7 d6 not %esi <== NOT EXECUTED 10f5bf: 83 e6 fc and $0xfffffffc,%esi <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f5c2: 6a 00 push $0x0 <== NOT EXECUTED 10f5c4: 6a 00 push $0x0 <== NOT EXECUTED 10f5c6: ff 73 28 pushl 0x28(%ebx) <== NOT EXECUTED 10f5c9: e8 da c6 ff ff call 10bca8 <== NOT EXECUTED 10f5ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f5d1: 85 c0 test %eax,%eax <== NOT EXECUTED 10f5d3: 0f 85 ff 00 00 00 jne 10f6d8 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 10f5d9: ff 4b 1c decl 0x1c(%ebx) <== NOT EXECUTED if (ret != 0) 10f5dc: 85 f6 test %esi,%esi <== NOT EXECUTED 10f5de: 0f 85 ef 00 00 00 jne 10f6d3 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { 10f5e4: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 10f5e7: 85 c0 test %eax,%eax <== NOT EXECUTED 10f5e9: 0f 84 8f 00 00 00 je 10f67e <== NOT EXECUTED 10f5ef: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { 10f5f2: 8b 43 0c mov 0xc(%ebx),%eax <== NOT EXECUTED 10f5f5: 89 ca mov %ecx,%edx <== NOT EXECUTED 10f5f7: 29 c2 sub %eax,%edx <== NOT EXECUTED 10f5f9: 39 fa cmp %edi,%edx <== NOT EXECUTED 10f5fb: 72 91 jb 10f58e <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 10f5fd: 8b 75 10 mov 0x10(%ebp),%esi <== NOT EXECUTED 10f600: 2b 75 d0 sub -0x30(%ebp),%esi <== NOT EXECUTED 10f603: 89 55 cc mov %edx,-0x34(%ebp) <== NOT EXECUTED 10f606: 39 f2 cmp %esi,%edx <== NOT EXECUTED 10f608: 76 03 jbe 10f60d <== NOT EXECUTED 10f60a: 89 75 cc mov %esi,-0x34(%ebp) <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); 10f60d: 03 43 08 add 0x8(%ebx),%eax <== NOT EXECUTED 10f610: 31 d2 xor %edx,%edx <== NOT EXECUTED 10f612: f7 f1 div %ecx <== NOT EXECUTED 10f614: 89 c8 mov %ecx,%eax <== NOT EXECUTED 10f616: 29 d0 sub %edx,%eax <== NOT EXECUTED if (chunk > chunk1) { 10f618: 39 45 cc cmp %eax,-0x34(%ebp) <== NOT EXECUTED 10f61b: 0f 8e cb 00 00 00 jle 10f6ec <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 10f621: 03 13 add (%ebx),%edx <== NOT EXECUTED 10f623: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10f626: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED 10f629: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f62b: 89 c1 mov %eax,%ecx <== NOT EXECUTED 10f62d: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 10f62f: 8b 13 mov (%ebx),%edx <== NOT EXECUTED 10f631: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10f634: 29 c1 sub %eax,%ecx <== NOT EXECUTED 10f636: 03 45 d0 add -0x30(%ebp),%eax <== NOT EXECUTED 10f639: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10f63c: 01 c6 add %eax,%esi <== NOT EXECUTED 10f63e: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f640: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); pipe->Length += chunk; 10f642: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10f645: 01 43 0c add %eax,0xc(%ebx) <== NOT EXECUTED if (pipe->waitingReaders > 0) 10f648: 83 7b 18 00 cmpl $0x0,0x18(%ebx) <== NOT EXECUTED 10f64c: 0f 85 ae 00 00 00 jne 10f700 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); written += chunk; 10f652: 8b 45 cc mov -0x34(%ebp),%eax <== NOT EXECUTED 10f655: 01 45 d4 add %eax,-0x2c(%ebp) <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10f658: 8b 45 d4 mov -0x2c(%ebp),%eax <== NOT EXECUTED 10f65b: 89 45 d0 mov %eax,-0x30(%ebp) <== NOT EXECUTED 10f65e: 39 45 10 cmp %eax,0x10(%ebp) <== NOT EXECUTED 10f661: 0f 86 af 00 00 00 jbe 10f716 <== NOT EXECUTED 10f667: 8b 4b 04 mov 0x4(%ebx),%ecx <== NOT EXECUTED 10f66a: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10f66f: e9 0f ff ff ff jmp 10f583 <== NOT EXECUTED /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 10f674: bb fc ff ff ff mov $0xfffffffc,%ebx <== NOT EXECUTED 10f679: e9 b4 fe ff ff jmp 10f532 <== NOT EXECUTED 10f67e: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 10f681: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 10f686: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f689: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10f68c: ff 70 28 pushl 0x28(%eax) <== NOT EXECUTED 10f68f: e8 10 c7 ff ff call 10bda4 <== NOT EXECUTED 10f694: 83 c4 10 add $0x10,%esp <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 10f697: 83 fe e0 cmp $0xffffffe0,%esi <== NOT EXECUTED 10f69a: 74 22 je 10f6be <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) 10f69c: 85 db test %ebx,%ebx <== NOT EXECUTED 10f69e: 0f 8f 8e fe ff ff jg 10f532 <== NOT EXECUTED 10f6a4: 89 f3 mov %esi,%ebx <== NOT EXECUTED 10f6a6: e9 87 fe ff ff jmp 10f532 <== NOT EXECUTED } pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { 10f6ab: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10f6b0: e9 bf fe ff ff jmp 10f574 <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10f6b5: be e0 ff ff ff mov $0xffffffe0,%esi <== NOT EXECUTED 10f6ba: 31 db xor %ebx,%ebx <== NOT EXECUTED 10f6bc: eb c8 jmp 10f686 <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); 10f6be: e8 0d 16 00 00 call 110cd0 <== NOT EXECUTED 10f6c3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10f6c6: 6a 0d push $0xd <== NOT EXECUTED 10f6c8: 50 push %eax <== NOT EXECUTED 10f6c9: e8 7a 1b 00 00 call 111248 <== NOT EXECUTED 10f6ce: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f6d1: eb c9 jmp 10f69c <== NOT EXECUTED 10f6d3: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED 10f6d6: eb ae jmp 10f686 <== NOT EXECUTED 10f6d8: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { 10f6db: be fc ff ff ff mov $0xfffffffc,%esi <== NOT EXECUTED 10f6e0: eb ba jmp 10f69c <== NOT EXECUTED 10f6e2: 8b 5d d4 mov -0x2c(%ebp),%ebx <== NOT EXECUTED /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 10f6e5: be f5 ff ff ff mov $0xfffffff5,%esi <== NOT EXECUTED 10f6ea: eb 9a jmp 10f686 <== NOT EXECUTED if (chunk > chunk1) { memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 10f6ec: 03 13 add (%ebx),%edx <== NOT EXECUTED 10f6ee: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 10f6f1: 03 75 d0 add -0x30(%ebp),%esi <== NOT EXECUTED 10f6f4: 89 d7 mov %edx,%edi <== NOT EXECUTED 10f6f6: 8b 4d cc mov -0x34(%ebp),%ecx <== NOT EXECUTED 10f6f9: f3 a4 rep movsb %ds:(%esi),%es:(%edi) <== NOT EXECUTED 10f6fb: e9 42 ff ff ff jmp 10f642 <== NOT EXECUTED pipe->Length += chunk; if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); 10f700: 56 push %esi <== NOT EXECUTED 10f701: 56 push %esi <== NOT EXECUTED 10f702: 8d 45 e4 lea -0x1c(%ebp),%eax <== NOT EXECUTED 10f705: 50 push %eax <== NOT EXECUTED 10f706: ff 73 2c pushl 0x2c(%ebx) <== NOT EXECUTED 10f709: e8 3a 23 00 00 call 111a48 <== NOT EXECUTED 10f70e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10f711: e9 3c ff ff ff jmp 10f652 <== NOT EXECUTED 10f716: 89 c3 mov %eax,%ebx <== NOT EXECUTED } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 10f718: 31 f6 xor %esi,%esi <== NOT EXECUTED 10f71a: e9 67 ff ff ff jmp 10f686 <== NOT EXECUTED =============================================================================== 0010bd98 : int posix_memalign( void **pointer, size_t alignment, size_t size ) { 10bd98: 55 push %ebp 10bd99: 89 e5 mov %esp,%ebp 10bd9b: 53 push %ebx 10bd9c: 83 ec 04 sub $0x4,%esp 10bd9f: 8b 45 0c mov 0xc(%ebp),%eax /* * Update call statistics */ MSBUMP(memalign_calls, 1); 10bda2: ff 05 48 fe 12 00 incl 0x12fe48 if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *))) 10bda8: 8d 50 ff lea -0x1(%eax),%edx 10bdab: 85 c2 test %eax,%edx 10bdad: 75 05 jne 10bdb4 <== NEVER TAKEN 10bdaf: 83 f8 03 cmp $0x3,%eax 10bdb2: 77 0c ja 10bdc0 /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); } 10bdb4: b8 16 00 00 00 mov $0x16,%eax 10bdb9: 5a pop %edx 10bdba: 5b pop %ebx 10bdbb: c9 leave 10bdbc: c3 ret 10bdbd: 8d 76 00 lea 0x0(%esi),%esi 10bdc0: 59 pop %ecx 10bdc1: 5b pop %ebx 10bdc2: c9 leave /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); 10bdc3: e9 20 01 00 00 jmp 10bee8 =============================================================================== 00110398 : #include int pthread_attr_destroy( pthread_attr_t *attr ) { 110398: 55 push %ebp 110399: 89 e5 mov %esp,%ebp 11039b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 11039e: 85 c0 test %eax,%eax 1103a0: 74 12 je 1103b4 1103a2: 8b 10 mov (%eax),%edx 1103a4: 85 d2 test %edx,%edx 1103a6: 74 0c je 1103b4 return EINVAL; attr->is_initialized = false; 1103a8: c7 00 00 00 00 00 movl $0x0,(%eax) 1103ae: 31 c0 xor %eax,%eax return 0; } 1103b0: c9 leave 1103b1: c3 ret 1103b2: 66 90 xchg %ax,%ax { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 1103b4: b8 16 00 00 00 mov $0x16,%eax } 1103b9: c9 leave 1103ba: c3 ret =============================================================================== 00112824 : int pthread_attr_setinheritsched( pthread_attr_t *attr, int inheritsched ) { 112824: 55 push %ebp 112825: 89 e5 mov %esp,%ebp 112827: 8b 45 08 mov 0x8(%ebp),%eax 11282a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 11282d: 85 c0 test %eax,%eax 11282f: 74 1f je 112850 112831: 8b 08 mov (%eax),%ecx 112833: 85 c9 test %ecx,%ecx 112835: 74 19 je 112850 return EINVAL; switch ( inheritsched ) { 112837: 8d 4a ff lea -0x1(%edx),%ecx 11283a: 83 f9 01 cmp $0x1,%ecx 11283d: 76 09 jbe 112848 11283f: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 112844: c9 leave 112845: c3 ret 112846: 66 90 xchg %ax,%ax return EINVAL; switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; 112848: 89 50 10 mov %edx,0x10(%eax) 11284b: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 11284d: c9 leave 11284e: c3 ret 11284f: 90 nop switch ( inheritsched ) { case PTHREAD_INHERIT_SCHED: case PTHREAD_EXPLICIT_SCHED: attr->inheritsched = inheritsched; return 0; 112850: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 112855: c9 leave 112856: c3 ret =============================================================================== 00110568 : int pthread_attr_setschedparam( pthread_attr_t *attr, const struct sched_param *param ) { 110568: 55 push %ebp 110569: 89 e5 mov %esp,%ebp 11056b: 57 push %edi 11056c: 56 push %esi 11056d: 8b 7d 08 mov 0x8(%ebp),%edi 110570: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized || !param ) 110573: 85 ff test %edi,%edi 110575: 74 1d je 110594 110577: 8b 07 mov (%edi),%eax 110579: 85 c0 test %eax,%eax 11057b: 74 17 je 110594 11057d: 85 f6 test %esi,%esi 11057f: 74 13 je 110594 return EINVAL; attr->schedparam = *param; 110581: 83 c7 18 add $0x18,%edi 110584: b9 07 00 00 00 mov $0x7,%ecx 110589: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 11058b: 31 c0 xor %eax,%eax return 0; } 11058d: 5e pop %esi 11058e: 5f pop %edi 11058f: c9 leave 110590: c3 ret 110591: 8d 76 00 lea 0x0(%esi),%esi { if ( !attr || !attr->is_initialized || !param ) return EINVAL; attr->schedparam = *param; return 0; 110594: b8 16 00 00 00 mov $0x16,%eax } 110599: 5e pop %esi 11059a: 5f pop %edi 11059b: c9 leave 11059c: c3 ret =============================================================================== 001105a0 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 1105a0: 55 push %ebp 1105a1: 89 e5 mov %esp,%ebp 1105a3: 8b 45 08 mov 0x8(%ebp),%eax 1105a6: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1105a9: 85 c0 test %eax,%eax 1105ab: 74 23 je 1105d0 1105ad: 8b 08 mov (%eax),%ecx 1105af: 85 c9 test %ecx,%ecx 1105b1: 74 1d je 1105d0 return EINVAL; switch ( policy ) { 1105b3: 85 d2 test %edx,%edx 1105b5: 78 0a js 1105c1 1105b7: 83 fa 02 cmp $0x2,%edx 1105ba: 7e 0c jle 1105c8 1105bc: 83 fa 04 cmp $0x4,%edx 1105bf: 74 07 je 1105c8 <== ALWAYS TAKEN 1105c1: b8 86 00 00 00 mov $0x86,%eax return 0; default: return ENOTSUP; } } 1105c6: c9 leave 1105c7: c3 ret switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 1105c8: 89 50 14 mov %edx,0x14(%eax) 1105cb: 31 c0 xor %eax,%eax return 0; default: return ENOTSUP; } } 1105cd: c9 leave 1105ce: c3 ret 1105cf: 90 nop case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; 1105d0: b8 16 00 00 00 mov $0x16,%eax default: return ENOTSUP; } } 1105d5: c9 leave 1105d6: c3 ret =============================================================================== 001105d8 : int pthread_attr_setscope( pthread_attr_t *attr, int contentionscope ) { 1105d8: 55 push %ebp 1105d9: 89 e5 mov %esp,%ebp 1105db: 8b 45 08 mov 0x8(%ebp),%eax 1105de: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 1105e1: 85 c0 test %eax,%eax 1105e3: 74 1a je 1105ff 1105e5: 8b 08 mov (%eax),%ecx 1105e7: 85 c9 test %ecx,%ecx 1105e9: 74 14 je 1105ff return EINVAL; switch ( contentionscope ) { 1105eb: 85 d2 test %edx,%edx 1105ed: 75 0d jne 1105fc case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; 1105ef: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) 1105f6: 31 c0 xor %eax,%eax return ENOTSUP; default: return EINVAL; } } 1105f8: c9 leave 1105f9: c3 ret 1105fa: 66 90 xchg %ax,%ax ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 1105fc: 4a dec %edx 1105fd: 74 09 je 110608 case PTHREAD_SCOPE_PROCESS: attr->contentionscope = contentionscope; return 0; 1105ff: b8 16 00 00 00 mov $0x16,%eax return ENOTSUP; default: return EINVAL; } } 110604: c9 leave 110605: c3 ret 110606: 66 90 xchg %ax,%ax ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( contentionscope ) { 110608: b8 86 00 00 00 mov $0x86,%eax return ENOTSUP; default: return EINVAL; } } 11060d: c9 leave 11060e: c3 ret =============================================================================== 00110610 : int pthread_attr_setstackaddr( pthread_attr_t *attr, void *stackaddr ) { 110610: 55 push %ebp 110611: 89 e5 mov %esp,%ebp 110613: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 110616: 85 c0 test %eax,%eax 110618: 74 12 je 11062c 11061a: 8b 10 mov (%eax),%edx 11061c: 85 d2 test %edx,%edx 11061e: 74 0c je 11062c return EINVAL; attr->stackaddr = stackaddr; 110620: 8b 55 0c mov 0xc(%ebp),%edx 110623: 89 50 04 mov %edx,0x4(%eax) 110626: 31 c0 xor %eax,%eax return 0; } 110628: c9 leave 110629: c3 ret 11062a: 66 90 xchg %ax,%ax { if ( !attr || !attr->is_initialized ) return EINVAL; attr->stackaddr = stackaddr; return 0; 11062c: b8 16 00 00 00 mov $0x16,%eax } 110631: c9 leave 110632: c3 ret =============================================================================== 00112858 : int pthread_attr_setstacksize( pthread_attr_t *attr, size_t stacksize ) { 112858: 55 push %ebp 112859: 89 e5 mov %esp,%ebp 11285b: 8b 45 08 mov 0x8(%ebp),%eax 11285e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 112861: 85 c0 test %eax,%eax 112863: 74 23 je 112888 112865: 8b 08 mov (%eax),%ecx 112867: 85 c9 test %ecx,%ecx 112869: 74 1d je 112888 return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) 11286b: 8b 0d b8 64 12 00 mov 0x1264b8,%ecx 112871: d1 e1 shl %ecx 112873: 39 d1 cmp %edx,%ecx 112875: 77 09 ja 112880 attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 112877: 89 50 08 mov %edx,0x8(%eax) 11287a: 31 c0 xor %eax,%eax return 0; } 11287c: c9 leave 11287d: c3 ret 11287e: 66 90 xchg %ax,%ax { if ( !attr || !attr->is_initialized ) return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; 112880: 89 48 08 mov %ecx,0x8(%eax) 112883: 31 c0 xor %eax,%eax else attr->stacksize = stacksize; return 0; } 112885: c9 leave 112886: c3 ret 112887: 90 nop return EINVAL; if (stacksize < PTHREAD_MINIMUM_STACK_SIZE) attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE; else attr->stacksize = stacksize; 112888: b8 16 00 00 00 mov $0x16,%eax return 0; } 11288d: c9 leave 11288e: c3 ret =============================================================================== 0010bf5c : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 10bf5c: 55 push %ebp 10bf5d: 89 e5 mov %esp,%ebp 10bf5f: 57 push %edi 10bf60: 56 push %esi 10bf61: 53 push %ebx 10bf62: 83 ec 2c sub $0x2c,%esp 10bf65: 8b 5d 08 mov 0x8(%ebp),%ebx 10bf68: 8b 7d 0c mov 0xc(%ebp),%edi 10bf6b: 8b 75 10 mov 0x10(%ebp),%esi const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 10bf6e: 85 db test %ebx,%ebx 10bf70: 0f 84 82 00 00 00 je 10bff8 return EINVAL; if ( count == 0 ) 10bf76: 85 f6 test %esi,%esi 10bf78: 74 7e je 10bff8 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10bf7a: 85 ff test %edi,%edi 10bf7c: 0f 84 92 00 00 00 je 10c014 <== NEVER TAKEN } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10bf82: 8b 17 mov (%edi),%edx 10bf84: 85 d2 test %edx,%edx 10bf86: 74 70 je 10bff8 return EINVAL; switch ( the_attr->process_shared ) { 10bf88: 8b 47 04 mov 0x4(%edi),%eax 10bf8b: 85 c0 test %eax,%eax 10bf8d: 75 69 jne 10bff8 <== NEVER TAKEN } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 10bf8f: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) the_attributes.maximum_count = count; 10bf96: 89 75 e4 mov %esi,-0x1c(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bf99: a1 78 ab 12 00 mov 0x12ab78,%eax 10bf9e: 40 inc %eax 10bf9f: a3 78 ab 12 00 mov %eax,0x12ab78 * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 10bfa4: 83 ec 0c sub $0xc,%esp 10bfa7: 68 c0 af 12 00 push $0x12afc0 10bfac: e8 b3 20 00 00 call 10e064 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 10bfb1: 83 c4 10 add $0x10,%esp 10bfb4: 85 c0 test %eax,%eax 10bfb6: 74 50 je 10c008 <== NEVER TAKEN _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 10bfb8: 83 ec 08 sub $0x8,%esp 10bfbb: 8d 55 e0 lea -0x20(%ebp),%edx 10bfbe: 52 push %edx 10bfbf: 8d 50 10 lea 0x10(%eax),%edx 10bfc2: 52 push %edx 10bfc3: 89 45 d4 mov %eax,-0x2c(%ebp) 10bfc6: e8 b9 16 00 00 call 10d684 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bfcb: 8b 45 d4 mov -0x2c(%ebp),%eax 10bfce: 8b 50 08 mov 0x8(%eax),%edx 10bfd1: 0f b7 f2 movzwl %dx,%esi 10bfd4: 8b 0d dc af 12 00 mov 0x12afdc,%ecx 10bfda: 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; 10bfdd: 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; 10bfe4: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10bfe6: e8 9d 2d 00 00 call 10ed88 <_Thread_Enable_dispatch> 10bfeb: 31 c0 xor %eax,%eax return 0; 10bfed: 83 c4 10 add $0x10,%esp } 10bff0: 8d 65 f4 lea -0xc(%ebp),%esp 10bff3: 5b pop %ebx 10bff4: 5e pop %esi 10bff5: 5f pop %edi 10bff6: c9 leave 10bff7: c3 ret /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; 10bff8: b8 16 00 00 00 mov $0x16,%eax } 10bffd: 8d 65 f4 lea -0xc(%ebp),%esp 10c000: 5b pop %ebx 10c001: 5e pop %esi 10c002: 5f pop %edi 10c003: c9 leave 10c004: c3 ret 10c005: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 10c008: e8 7b 2d 00 00 call 10ed88 <_Thread_Enable_dispatch> 10c00d: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10c012: eb e9 jmp 10bffd * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 10c014: 83 ec 0c sub $0xc,%esp 10c017: 8d 7d d8 lea -0x28(%ebp),%edi 10c01a: 57 push %edi 10c01b: e8 80 fe ff ff call 10bea0 10c020: 83 c4 10 add $0x10,%esp 10c023: e9 5a ff ff ff jmp 10bf82 =============================================================================== 0010c028 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 10c028: 55 push %ebp 10c029: 89 e5 mov %esp,%ebp 10c02b: 83 ec 18 sub $0x18,%esp 10c02e: 8b 45 08 mov 0x8(%ebp),%eax POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 10c031: 85 c0 test %eax,%eax 10c033: 74 4f je 10c084 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 10c035: 51 push %ecx 10c036: 8d 55 f4 lea -0xc(%ebp),%edx 10c039: 52 push %edx 10c03a: ff 30 pushl (%eax) 10c03c: 68 c0 af 12 00 push $0x12afc0 10c041: e8 ce 24 00 00 call 10e514 <_Objects_Get> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 10c046: 83 c4 10 add $0x10,%esp 10c049: 8b 55 f4 mov -0xc(%ebp),%edx 10c04c: 85 d2 test %edx,%edx 10c04e: 75 34 jne 10c084 case OBJECTS_LOCAL: _CORE_barrier_Wait( 10c050: 83 ec 0c sub $0xc,%esp 10c053: 6a 00 push $0x0 10c055: 6a 00 push $0x0 10c057: 6a 01 push $0x1 10c059: ff 70 08 pushl 0x8(%eax) 10c05c: 83 c0 10 add $0x10,%eax 10c05f: 50 push %eax 10c060: e8 53 16 00 00 call 10d6b8 <_CORE_barrier_Wait> the_barrier->Object.id, true, 0, NULL ); _Thread_Enable_dispatch(); 10c065: 83 c4 20 add $0x20,%esp 10c068: e8 1b 2d 00 00 call 10ed88 <_Thread_Enable_dispatch> return _POSIX_Barrier_Translate_core_barrier_return_code( 10c06d: 83 ec 0c sub $0xc,%esp 10c070: a1 38 ac 12 00 mov 0x12ac38,%eax 10c075: ff 70 34 pushl 0x34(%eax) 10c078: e8 5b 65 00 00 call 1125d8 <_POSIX_Barrier_Translate_core_barrier_return_code> 10c07d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10c080: c9 leave 10c081: c3 ret 10c082: 66 90 xchg %ax,%ax true, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 10c084: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c089: c9 leave 10c08a: c3 ret =============================================================================== 0010be58 : */ int pthread_barrierattr_destroy( pthread_barrierattr_t *attr ) { 10be58: 55 push %ebp 10be59: 89 e5 mov %esp,%ebp 10be5b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10be5e: 85 c0 test %eax,%eax 10be60: 74 12 je 10be74 10be62: 8b 10 mov (%eax),%edx 10be64: 85 d2 test %edx,%edx 10be66: 74 0c je 10be74 return EINVAL; attr->is_initialized = false; 10be68: c7 00 00 00 00 00 movl $0x0,(%eax) 10be6e: 31 c0 xor %eax,%eax return 0; } 10be70: c9 leave 10be71: c3 ret 10be72: 66 90 xchg %ax,%ax { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10be74: b8 16 00 00 00 mov $0x16,%eax } 10be79: c9 leave 10be7a: c3 ret =============================================================================== 0010b738 : */ int pthread_cancel( pthread_t thread ) { 10b738: 55 push %ebp 10b739: 89 e5 mov %esp,%ebp 10b73b: 83 ec 18 sub $0x18,%esp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 10b73e: a1 54 a8 12 00 mov 0x12a854,%eax 10b743: 85 c0 test %eax,%eax 10b745: 74 09 je 10b750 10b747: b8 47 00 00 00 mov $0x47,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b74c: c9 leave 10b74d: c3 ret 10b74e: 66 90 xchg %ax,%ax RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10b750: 51 push %ecx 10b751: 8d 45 f4 lea -0xc(%ebp),%eax 10b754: 50 push %eax 10b755: ff 75 08 pushl 0x8(%ebp) 10b758: 68 80 aa 12 00 push $0x12aa80 10b75d: e8 e2 20 00 00 call 10d844 <_Objects_Get> if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b762: 83 c4 10 add $0x10,%esp 10b765: 8b 55 f4 mov -0xc(%ebp),%edx 10b768: 85 d2 test %edx,%edx 10b76a: 75 20 jne 10b78c case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 10b76c: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx 10b772: c7 82 dc 00 00 00 01 movl $0x1,0xdc(%edx) 10b779: 00 00 00 /* This enables dispatch implicitly */ _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( the_thread ); 10b77c: 83 ec 0c sub $0xc,%esp 10b77f: 50 push %eax 10b780: e8 c3 5e 00 00 call 111648 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b785: 31 c0 xor %eax,%eax return 0; 10b787: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10b78a: c9 leave 10b78b: c3 ret if ( _ISR_Is_in_progress() ) return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10b78c: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10b791: c9 leave 10b792: c3 ret =============================================================================== 0010b5b8 : */ void pthread_cleanup_pop( int execute ) { 10b5b8: 55 push %ebp 10b5b9: 89 e5 mov %esp,%ebp 10b5bb: 57 push %edi 10b5bc: 56 push %esi 10b5bd: 53 push %ebx 10b5be: 83 ec 1c sub $0x1c,%esp 10b5c1: 8b 5d 08 mov 0x8(%ebp),%ebx POSIX_Cancel_Handler_control tmp_handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10b5c4: a1 f8 99 12 00 mov 0x1299f8,%eax 10b5c9: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b5cf: 8b 15 38 99 12 00 mov 0x129938,%edx 10b5d5: 42 inc %edx 10b5d6: 89 15 38 99 12 00 mov %edx,0x129938 * 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 ); 10b5dc: 9c pushf 10b5dd: fa cli 10b5de: 5e pop %esi */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 10b5df: 8d 90 e4 00 00 00 lea 0xe4(%eax),%edx POSIX_API_Control *thread_support; ISR_Level level; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10b5e5: 39 90 e0 00 00 00 cmp %edx,0xe0(%eax) 10b5eb: 74 4f je 10b63c _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 10b5ed: 8b 42 04 mov 0x4(%edx),%eax ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 10b5f0: 8b 08 mov (%eax),%ecx previous = the_node->previous; 10b5f2: 8b 50 04 mov 0x4(%eax),%edx next->previous = previous; 10b5f5: 89 51 04 mov %edx,0x4(%ecx) previous->next = next; 10b5f8: 89 0a mov %ecx,(%edx) _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 10b5fa: 56 push %esi 10b5fb: 9d popf tmp_handler = *handler; 10b5fc: 8d 7d d8 lea -0x28(%ebp),%edi 10b5ff: b9 04 00 00 00 mov $0x4,%ecx 10b604: 89 c6 mov %eax,%esi 10b606: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10b608: 8b 75 e0 mov -0x20(%ebp),%esi 10b60b: 8b 7d e4 mov -0x1c(%ebp),%edi _Workspace_Free( handler ); 10b60e: 83 ec 0c sub $0xc,%esp 10b611: 50 push %eax 10b612: e8 f5 38 00 00 call 10ef0c <_Workspace_Free> _Thread_Enable_dispatch(); 10b617: e8 24 27 00 00 call 10dd40 <_Thread_Enable_dispatch> if ( execute ) 10b61c: 83 c4 10 add $0x10,%esp 10b61f: 85 db test %ebx,%ebx 10b621: 75 09 jne 10b62c (*tmp_handler.routine)( tmp_handler.arg ); } 10b623: 8d 65 f4 lea -0xc(%ebp),%esp 10b626: 5b pop %ebx 10b627: 5e pop %esi 10b628: 5f pop %edi 10b629: c9 leave 10b62a: c3 ret 10b62b: 90 nop _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10b62c: 89 7d 08 mov %edi,0x8(%ebp) 10b62f: 89 f0 mov %esi,%eax } 10b631: 8d 65 f4 lea -0xc(%ebp),%esp 10b634: 5b pop %ebx 10b635: 5e pop %esi 10b636: 5f pop %edi 10b637: c9 leave _Workspace_Free( handler ); _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); 10b638: ff e0 jmp *%eax 10b63a: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 10b63c: e8 ff 26 00 00 call 10dd40 <_Thread_Enable_dispatch> _ISR_Enable( level ); 10b641: 56 push %esi 10b642: 9d popf _Thread_Enable_dispatch(); if ( execute ) (*tmp_handler.routine)( tmp_handler.arg ); } 10b643: 8d 65 f4 lea -0xc(%ebp),%esp 10b646: 5b pop %ebx 10b647: 5e pop %esi 10b648: 5f pop %edi 10b649: c9 leave 10b64a: c3 ret =============================================================================== 0010b964 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 10b964: 55 push %ebp 10b965: 89 e5 mov %esp,%ebp 10b967: 56 push %esi 10b968: 53 push %ebx 10b969: 8b 5d 08 mov 0x8(%ebp),%ebx 10b96c: 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 ) 10b96f: 85 db test %ebx,%ebx 10b971: 74 4d je 10b9c0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b973: a1 b8 af 12 00 mov 0x12afb8,%eax 10b978: 40 inc %eax 10b979: a3 b8 af 12 00 mov %eax,0x12afb8 return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 10b97e: 83 ec 0c sub $0xc,%esp 10b981: 6a 10 push $0x10 10b983: e8 b0 40 00 00 call 10fa38 <_Workspace_Allocate> if ( handler ) { 10b988: 83 c4 10 add $0x10,%esp 10b98b: 85 c0 test %eax,%eax 10b98d: 74 25 je 10b9b4 <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 10b98f: 8b 15 78 b0 12 00 mov 0x12b078,%edx 10b995: 8b 92 f8 00 00 00 mov 0xf8(%edx),%edx 10b99b: 81 c2 e0 00 00 00 add $0xe0,%edx handler->routine = routine; 10b9a1: 89 58 08 mov %ebx,0x8(%eax) handler->arg = arg; 10b9a4: 89 70 0c mov %esi,0xc(%eax) _Chain_Append( handler_stack, &handler->Node ); 10b9a7: 83 ec 08 sub $0x8,%esp 10b9aa: 50 push %eax 10b9ab: 52 push %edx 10b9ac: e8 9b 17 00 00 call 10d14c <_Chain_Append> 10b9b1: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); } 10b9b4: 8d 65 f8 lea -0x8(%ebp),%esp 10b9b7: 5b pop %ebx 10b9b8: 5e pop %esi 10b9b9: c9 leave handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 10b9ba: e9 39 2e 00 00 jmp 10e7f8 <_Thread_Enable_dispatch> 10b9bf: 90 nop } 10b9c0: 8d 65 f8 lea -0x8(%ebp),%esp 10b9c3: 5b pop %ebx 10b9c4: 5e pop %esi 10b9c5: c9 leave 10b9c6: c3 ret =============================================================================== 0010c650 : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 10c650: 55 push %ebp 10c651: 89 e5 mov %esp,%ebp 10c653: 53 push %ebx 10c654: 83 ec 1c sub $0x1c,%esp POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); 10c657: 8d 45 f4 lea -0xc(%ebp),%eax 10c65a: 50 push %eax 10c65b: ff 75 08 pushl 0x8(%ebp) 10c65e: e8 65 00 00 00 call 10c6c8 <_POSIX_Condition_variables_Get> 10c663: 89 c3 mov %eax,%ebx switch ( location ) { 10c665: 83 c4 10 add $0x10,%esp 10c668: 8b 4d f4 mov -0xc(%ebp),%ecx 10c66b: 85 c9 test %ecx,%ecx 10c66d: 75 25 jne 10c694 case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 10c66f: 83 ec 0c sub $0xc,%esp 10c672: 8d 40 18 lea 0x18(%eax),%eax 10c675: 50 push %eax 10c676: e8 7d 3b 00 00 call 1101f8 <_Thread_queue_First> 10c67b: 83 c4 10 add $0x10,%esp 10c67e: 85 c0 test %eax,%eax 10c680: 74 1e je 10c6a0 _Thread_Enable_dispatch(); 10c682: e8 05 34 00 00 call 10fa8c <_Thread_Enable_dispatch> 10c687: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c68c: 8b 5d fc mov -0x4(%ebp),%ebx 10c68f: c9 leave 10c690: c3 ret 10c691: 8d 76 00 lea 0x0(%esi),%esi { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 10c694: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c699: 8b 5d fc mov -0x4(%ebp),%ebx 10c69c: c9 leave 10c69d: c3 ret 10c69e: 66 90 xchg %ax,%ax if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { _Thread_Enable_dispatch(); return EBUSY; } _Objects_Close( 10c6a0: 83 ec 08 sub $0x8,%esp 10c6a3: 53 push %ebx 10c6a4: 68 40 c1 12 00 push $0x12c140 10c6a9: e8 36 27 00 00 call 10ede4 <_Objects_Close> RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 10c6ae: 58 pop %eax 10c6af: 5a pop %edx 10c6b0: 53 push %ebx 10c6b1: 68 40 c1 12 00 push $0x12c140 10c6b6: e8 2d 2a 00 00 call 10f0e8 <_Objects_Free> &_POSIX_Condition_variables_Information, &the_cond->Object ); _POSIX_Condition_variables_Free( the_cond ); _Thread_Enable_dispatch(); 10c6bb: e8 cc 33 00 00 call 10fa8c <_Thread_Enable_dispatch> 10c6c0: 31 c0 xor %eax,%eax return 0; 10c6c2: 83 c4 10 add $0x10,%esp 10c6c5: eb d2 jmp 10c699 =============================================================================== 0010c71c : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 10c71c: 55 push %ebp 10c71d: 89 e5 mov %esp,%ebp 10c71f: 53 push %ebx 10c720: 83 ec 14 sub $0x14,%esp 10c723: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c726: 85 db test %ebx,%ebx 10c728: 0f 84 86 00 00 00 je 10c7b4 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10c72e: 83 7b 04 01 cmpl $0x1,0x4(%ebx) 10c732: 74 06 je 10c73a <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 10c734: 8b 03 mov (%ebx),%eax 10c736: 85 c0 test %eax,%eax 10c738: 75 0a jne 10c744 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 10c73a: b8 16 00 00 00 mov $0x16,%eax } 10c73f: 8b 5d fc mov -0x4(%ebp),%ebx 10c742: c9 leave 10c743: c3 ret rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c744: a1 58 bc 12 00 mov 0x12bc58,%eax 10c749: 40 inc %eax 10c74a: a3 58 bc 12 00 mov %eax,0x12bc58 */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 10c74f: 83 ec 0c sub $0xc,%esp 10c752: 68 40 c1 12 00 push $0x12c140 10c757: e8 0c 26 00 00 call 10ed68 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 10c75c: 83 c4 10 add $0x10,%esp 10c75f: 85 c0 test %eax,%eax 10c761: 74 5d je 10c7c0 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 10c763: 8b 53 04 mov 0x4(%ebx),%edx 10c766: 89 50 10 mov %edx,0x10(%eax) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 10c769: c7 40 14 00 00 00 00 movl $0x0,0x14(%eax) /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 10c770: 6a 74 push $0x74 10c772: 68 00 08 00 00 push $0x800 10c777: 6a 00 push $0x0 10c779: 8d 50 18 lea 0x18(%eax),%edx 10c77c: 52 push %edx 10c77d: 89 45 f4 mov %eax,-0xc(%ebp) 10c780: e8 f3 3a 00 00 call 110278 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c785: 8b 45 f4 mov -0xc(%ebp),%eax 10c788: 8b 50 08 mov 0x8(%eax),%edx 10c78b: 0f b7 da movzwl %dx,%ebx 10c78e: 8b 0d 5c c1 12 00 mov 0x12c15c,%ecx 10c794: 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; 10c797: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 10c79e: 8b 45 08 mov 0x8(%ebp),%eax 10c7a1: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10c7a3: e8 e4 32 00 00 call 10fa8c <_Thread_Enable_dispatch> 10c7a8: 31 c0 xor %eax,%eax return 0; 10c7aa: 83 c4 10 add $0x10,%esp } 10c7ad: 8b 5d fc mov -0x4(%ebp),%ebx 10c7b0: c9 leave 10c7b1: c3 ret 10c7b2: 66 90 xchg %ax,%ax ) { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 10c7b4: bb c8 50 12 00 mov $0x1250c8,%ebx 10c7b9: e9 70 ff ff ff jmp 10c72e 10c7be: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 10c7c0: e8 c7 32 00 00 call 10fa8c <_Thread_Enable_dispatch> 10c7c5: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10c7ca: e9 70 ff ff ff jmp 10c73f =============================================================================== 0010c5b4 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 10c5b4: 55 push %ebp 10c5b5: 89 e5 mov %esp,%ebp 10c5b7: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10c5ba: 85 c0 test %eax,%eax 10c5bc: 74 12 je 10c5d0 10c5be: 8b 10 mov (%eax),%edx 10c5c0: 85 d2 test %edx,%edx 10c5c2: 74 0c je 10c5d0 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; 10c5c4: c7 00 00 00 00 00 movl $0x0,(%eax) 10c5ca: 31 c0 xor %eax,%eax return 0; } 10c5cc: c9 leave 10c5cd: c3 ret 10c5ce: 66 90 xchg %ax,%ax { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10c5d0: b8 16 00 00 00 mov $0x16,%eax } 10c5d5: c9 leave 10c5d6: c3 ret =============================================================================== 0010c5d8 : int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { 10c5d8: 55 push %ebp 10c5d9: 89 e5 mov %esp,%ebp 10c5db: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr ) 10c5de: 85 c0 test %eax,%eax 10c5e0: 74 0e je 10c5f0 return EINVAL; *pshared = attr->process_shared; 10c5e2: 8b 50 04 mov 0x4(%eax),%edx 10c5e5: 8b 45 0c mov 0xc(%ebp),%eax 10c5e8: 89 10 mov %edx,(%eax) 10c5ea: 31 c0 xor %eax,%eax return 0; } 10c5ec: c9 leave 10c5ed: c3 ret 10c5ee: 66 90 xchg %ax,%ax int pthread_condattr_getpshared( const pthread_condattr_t *attr, int *pshared ) { if ( !attr ) 10c5f0: b0 16 mov $0x16,%al return EINVAL; *pshared = attr->process_shared; return 0; } 10c5f2: c9 leave 10c5f3: c3 ret =============================================================================== 0010c618 : int pthread_condattr_setpshared( pthread_condattr_t *attr, int pshared ) { 10c618: 55 push %ebp 10c619: 89 e5 mov %esp,%ebp 10c61b: 8b 45 08 mov 0x8(%ebp),%eax 10c61e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10c621: 85 c0 test %eax,%eax 10c623: 74 05 je 10c62a return EINVAL; switch ( pshared ) { 10c625: 83 fa 01 cmp $0x1,%edx 10c628: 76 0a jbe 10c634 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10c62a: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10c62f: c9 leave 10c630: c3 ret 10c631: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10c634: 89 50 04 mov %edx,0x4(%eax) 10c637: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10c639: c9 leave 10c63a: c3 ret =============================================================================== 0010bccc : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 10bccc: 55 push %ebp 10bccd: 89 e5 mov %esp,%ebp 10bccf: 57 push %edi 10bcd0: 56 push %esi 10bcd1: 53 push %ebx 10bcd2: 83 ec 5c sub $0x5c,%esp 10bcd5: 8b 5d 0c mov 0xc(%ebp),%ebx int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10bcd8: 8b 7d 10 mov 0x10(%ebp),%edi 10bcdb: 85 ff test %edi,%edi 10bcdd: 0f 84 81 01 00 00 je 10be64 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10bce3: 85 db test %ebx,%ebx 10bce5: 74 65 je 10bd4c if ( !the_attr->is_initialized ) 10bce7: 8b 33 mov (%ebx),%esi 10bce9: 85 f6 test %esi,%esi 10bceb: 74 1f je 10bd0c * 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) ) 10bced: 8b 4b 04 mov 0x4(%ebx),%ecx 10bcf0: 85 c9 test %ecx,%ecx 10bcf2: 74 0b je 10bcff 10bcf4: 8b 43 08 mov 0x8(%ebx),%eax 10bcf7: 3b 05 b8 64 12 00 cmp 0x1264b8,%eax 10bcfd: 72 0d jb 10bd0c * 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 ) { 10bcff: 8b 43 10 mov 0x10(%ebx),%eax 10bd02: 83 f8 01 cmp $0x1,%eax 10bd05: 74 4d je 10bd54 10bd07: 83 f8 02 cmp $0x2,%eax 10bd0a: 74 10 je 10bd1c * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 10bd0c: ba 16 00 00 00 mov $0x16,%edx } 10bd11: 89 d0 mov %edx,%eax 10bd13: 8d 65 f4 lea -0xc(%ebp),%esp 10bd16: 5b pop %ebx 10bd17: 5e pop %esi 10bd18: 5f pop %edi 10bd19: c9 leave 10bd1a: c3 ret 10bd1b: 90 nop schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 10bd1c: 8b 43 14 mov 0x14(%ebx),%eax 10bd1f: 89 45 b0 mov %eax,-0x50(%ebp) schedparam = the_attr->schedparam; 10bd22: 8d 4d c4 lea -0x3c(%ebp),%ecx 10bd25: 89 4d b4 mov %ecx,-0x4c(%ebp) 10bd28: 8d 73 18 lea 0x18(%ebx),%esi 10bd2b: b9 07 00 00 00 mov $0x7,%ecx 10bd30: 8b 7d b4 mov -0x4c(%ebp),%edi 10bd33: 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 ) 10bd35: 8b 53 0c mov 0xc(%ebx),%edx 10bd38: 85 d2 test %edx,%edx 10bd3a: 74 49 je 10bd85 <== ALWAYS TAKEN 10bd3c: ba 86 00 00 00 mov $0x86,%edx */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 10bd41: 89 d0 mov %edx,%eax 10bd43: 8d 65 f4 lea -0xc(%ebp),%esp 10bd46: 5b pop %ebx 10bd47: 5e pop %esi 10bd48: 5f pop %edi 10bd49: c9 leave 10bd4a: c3 ret 10bd4b: 90 nop int rc; if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 10bd4c: bb 40 3b 12 00 mov $0x123b40,%ebx 10bd51: eb 94 jmp 10bce7 10bd53: 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 ]; 10bd54: a1 58 a7 12 00 mov 0x12a758,%eax 10bd59: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi schedpolicy = api->schedpolicy; 10bd5f: 8b 86 80 00 00 00 mov 0x80(%esi),%eax 10bd65: 89 45 b0 mov %eax,-0x50(%ebp) schedparam = api->schedparam; 10bd68: 8d 4d c4 lea -0x3c(%ebp),%ecx 10bd6b: 89 4d b4 mov %ecx,-0x4c(%ebp) 10bd6e: 81 c6 84 00 00 00 add $0x84,%esi 10bd74: b9 07 00 00 00 mov $0x7,%ecx 10bd79: 8b 7d b4 mov -0x4c(%ebp),%edi 10bd7c: 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 ) 10bd7e: 8b 53 0c mov 0xc(%ebx),%edx 10bd81: 85 d2 test %edx,%edx 10bd83: 75 b7 jne 10bd3c return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 10bd85: 83 ec 0c sub $0xc,%esp 10bd88: ff 75 c4 pushl -0x3c(%ebp) 10bd8b: e8 64 69 00 00 call 1126f4 <_POSIX_Priority_Is_valid> 10bd90: 83 c4 10 add $0x10,%esp 10bd93: 84 c0 test %al,%al 10bd95: 0f 84 71 ff ff ff je 10bd0c <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); 10bd9b: 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); 10bd9e: 0f b6 35 bc 64 12 00 movzbl 0x1264bc,%esi /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( 10bda5: 8d 45 e0 lea -0x20(%ebp),%eax 10bda8: 50 push %eax 10bda9: 8d 45 e4 lea -0x1c(%ebp),%eax 10bdac: 50 push %eax 10bdad: ff 75 b4 pushl -0x4c(%ebp) 10bdb0: ff 75 b0 pushl -0x50(%ebp) 10bdb3: e8 58 69 00 00 call 112710 <_POSIX_Thread_Translate_sched_param> 10bdb8: 89 c2 mov %eax,%edx schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) 10bdba: 83 c4 10 add $0x10,%esp 10bdbd: 85 c0 test %eax,%eax 10bdbf: 0f 85 4c ff ff ff jne 10bd11 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10bdc5: 83 ec 0c sub $0xc,%esp 10bdc8: ff 35 50 a7 12 00 pushl 0x12a750 10bdce: 89 45 a4 mov %eax,-0x5c(%ebp) 10bdd1: e8 6e 17 00 00 call 10d544 <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 10bdd6: c7 04 24 60 a9 12 00 movl $0x12a960,(%esp) 10bddd: e8 62 21 00 00 call 10df44 <_Objects_Allocate> 10bde2: 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 ) { 10bde5: 83 c4 10 add $0x10,%esp 10bde8: 85 c0 test %eax,%eax 10bdea: 8b 55 a4 mov -0x5c(%ebp),%edx 10bded: 0f 84 06 01 00 00 je 10bef9 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 10bdf3: 8b 4b 08 mov 0x8(%ebx),%ecx 10bdf6: 50 push %eax 10bdf7: 6a 00 push $0x0 10bdf9: 6a 00 push $0x0 10bdfb: ff 75 e0 pushl -0x20(%ebp) 10bdfe: ff 75 e4 pushl -0x1c(%ebp) 10be01: 6a 01 push $0x1 10be03: 81 e6 ff 00 00 00 and $0xff,%esi 10be09: 29 fe sub %edi,%esi 10be0b: 56 push %esi 10be0c: 6a 01 push $0x1 10be0e: a1 b8 64 12 00 mov 0x1264b8,%eax 10be13: d1 e0 shl %eax 10be15: 39 c8 cmp %ecx,%eax 10be17: 73 02 jae 10be1b 10be19: 89 c8 mov %ecx,%eax 10be1b: 50 push %eax 10be1c: ff 73 04 pushl 0x4(%ebx) 10be1f: ff 75 ac pushl -0x54(%ebp) 10be22: 68 60 a9 12 00 push $0x12a960 10be27: 89 55 a4 mov %edx,-0x5c(%ebp) 10be2a: e8 01 2f 00 00 call 10ed30 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 10be2f: 83 c4 30 add $0x30,%esp 10be32: 84 c0 test %al,%al 10be34: 8b 55 a4 mov -0x5c(%ebp),%edx 10be37: 75 35 jne 10be6e RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 10be39: 83 ec 08 sub $0x8,%esp 10be3c: ff 75 ac pushl -0x54(%ebp) 10be3f: 68 60 a9 12 00 push $0x12a960 10be44: e8 7b 24 00 00 call 10e2c4 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 10be49: 59 pop %ecx 10be4a: ff 35 50 a7 12 00 pushl 0x12a750 10be50: e8 37 17 00 00 call 10d58c <_API_Mutex_Unlock> 10be55: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10be5a: 83 c4 10 add $0x10,%esp 10be5d: e9 af fe ff ff jmp 10bd11 10be62: 66 90 xchg %ax,%ax int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) 10be64: ba 0e 00 00 00 mov $0xe,%edx 10be69: e9 a3 fe ff ff jmp 10bd11 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10be6e: 8b 45 ac mov -0x54(%ebp),%eax 10be71: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10be77: 89 45 a8 mov %eax,-0x58(%ebp) api->Attributes = *the_attr; 10be7a: b9 0f 00 00 00 mov $0xf,%ecx 10be7f: 89 c7 mov %eax,%edi 10be81: 89 de mov %ebx,%esi 10be83: f3 a5 rep movsl %ds:(%esi),%es:(%edi) api->detachstate = the_attr->detachstate; 10be85: 8b 43 38 mov 0x38(%ebx),%eax 10be88: 8b 4d a8 mov -0x58(%ebp),%ecx 10be8b: 89 41 3c mov %eax,0x3c(%ecx) api->schedpolicy = schedpolicy; 10be8e: 8b 45 b0 mov -0x50(%ebp),%eax 10be91: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = schedparam; 10be97: 89 cf mov %ecx,%edi 10be99: 81 c7 84 00 00 00 add $0x84,%edi 10be9f: b9 07 00 00 00 mov $0x7,%ecx 10bea4: 8b 75 b4 mov -0x4c(%ebp),%esi 10bea7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) * This insures we evaluate the process-wide signals pending when we * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 10bea9: 8b 4d ac mov -0x54(%ebp),%ecx 10beac: c6 41 74 01 movb $0x1,0x74(%ecx) /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 10beb0: 83 ec 0c sub $0xc,%esp 10beb3: 6a 00 push $0x0 10beb5: ff 75 14 pushl 0x14(%ebp) 10beb8: ff 75 10 pushl 0x10(%ebp) 10bebb: 6a 01 push $0x1 10bebd: 51 push %ecx 10bebe: 89 55 a4 mov %edx,-0x5c(%ebp) 10bec1: e8 06 39 00 00 call 10f7cc <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { 10bec6: 83 c4 20 add $0x20,%esp 10bec9: 83 7d b0 04 cmpl $0x4,-0x50(%ebp) 10becd: 8b 55 a4 mov -0x5c(%ebp),%edx 10bed0: 74 42 je 10bf14 } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 10bed2: 8b 45 ac mov -0x54(%ebp),%eax 10bed5: 8b 48 08 mov 0x8(%eax),%ecx 10bed8: 8b 45 08 mov 0x8(%ebp),%eax 10bedb: 89 08 mov %ecx,(%eax) _RTEMS_Unlock_allocator(); 10bedd: 83 ec 0c sub $0xc,%esp 10bee0: ff 35 50 a7 12 00 pushl 0x12a750 10bee6: 89 55 a4 mov %edx,-0x5c(%ebp) 10bee9: e8 9e 16 00 00 call 10d58c <_API_Mutex_Unlock> return 0; 10beee: 83 c4 10 add $0x10,%esp 10bef1: 8b 55 a4 mov -0x5c(%ebp),%edx 10bef4: e9 18 fe ff ff jmp 10bd11 * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10bef9: 83 ec 0c sub $0xc,%esp 10befc: ff 35 50 a7 12 00 pushl 0x12a750 10bf02: e8 85 16 00 00 call 10d58c <_API_Mutex_Unlock> 10bf07: ba 0b 00 00 00 mov $0xb,%edx return EAGAIN; 10bf0c: 83 c4 10 add $0x10,%esp 10bf0f: e9 fd fd ff ff jmp 10bd11 return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 10bf14: 83 ec 0c sub $0xc,%esp 10bf17: 8b 45 a8 mov -0x58(%ebp),%eax 10bf1a: 05 8c 00 00 00 add $0x8c,%eax 10bf1f: 50 push %eax 10bf20: e8 97 3a 00 00 call 10f9bc <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10bf25: 8b 4d a8 mov -0x58(%ebp),%ecx 10bf28: 89 81 b0 00 00 00 mov %eax,0xb0(%ecx) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10bf2e: 58 pop %eax 10bf2f: 5a pop %edx 10bf30: 89 c8 mov %ecx,%eax 10bf32: 05 a4 00 00 00 add $0xa4,%eax 10bf37: 50 push %eax 10bf38: 68 78 a7 12 00 push $0x12a778 10bf3d: e8 9e 3d 00 00 call 10fce0 <_Watchdog_Insert> 10bf42: 83 c4 10 add $0x10,%esp 10bf45: 8b 55 a4 mov -0x5c(%ebp),%edx 10bf48: eb 88 jmp 10bed2 =============================================================================== 00114a20 : } void pthread_exit( void *value_ptr ) { 114a20: 55 push %ebp 114a21: 89 e5 mov %esp,%ebp 114a23: 83 ec 10 sub $0x10,%esp _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 114a26: ff 75 08 pushl 0x8(%ebp) 114a29: ff 35 78 95 12 00 pushl 0x129578 114a2f: e8 88 ff ff ff call 1149bc <_POSIX_Thread_Exit> 114a34: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 114a37: c9 leave <== NOT EXECUTED 114a38: c3 ret <== NOT EXECUTED =============================================================================== 0010de8c : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 10de8c: 55 push %ebp 10de8d: 89 e5 mov %esp,%ebp 10de8f: 57 push %edi 10de90: 56 push %esi 10de91: 53 push %ebx 10de92: 83 ec 1c sub $0x1c,%esp 10de95: 8b 7d 0c mov 0xc(%ebp),%edi 10de98: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 10de9b: 85 ff test %edi,%edi 10de9d: 74 69 je 10df08 10de9f: 85 db test %ebx,%ebx 10dea1: 74 65 je 10df08 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 10dea3: 51 push %ecx 10dea4: 8d 45 e4 lea -0x1c(%ebp),%eax 10dea7: 50 push %eax 10dea8: ff 75 08 pushl 0x8(%ebp) 10deab: 68 40 d7 12 00 push $0x12d740 10deb0: e8 bb 23 00 00 call 110270 <_Objects_Get> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10deb5: 83 c4 10 add $0x10,%esp 10deb8: 8b 55 e4 mov -0x1c(%ebp),%edx 10debb: 85 d2 test %edx,%edx 10debd: 75 39 jne 10def8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10debf: 8b b0 f8 00 00 00 mov 0xf8(%eax),%esi if ( policy ) *policy = api->schedpolicy; 10dec5: 8b 96 80 00 00 00 mov 0x80(%esi),%edx 10decb: 89 17 mov %edx,(%edi) if ( param ) { *param = api->schedparam; 10decd: 81 c6 84 00 00 00 add $0x84,%esi 10ded3: b9 07 00 00 00 mov $0x7,%ecx 10ded8: 89 df mov %ebx,%edi 10deda: f3 a5 rep movsl %ds:(%esi),%es:(%edi) param->sched_priority = 10dedc: 0f b6 15 5c 92 12 00 movzbl 0x12925c,%edx 10dee3: 2b 50 14 sub 0x14(%eax),%edx 10dee6: 89 13 mov %edx,(%ebx) _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); 10dee8: e8 f7 2b 00 00 call 110ae4 <_Thread_Enable_dispatch> 10deed: 31 c0 xor %eax,%eax break; } return ESRCH; } 10deef: 8d 65 f4 lea -0xc(%ebp),%esp 10def2: 5b pop %ebx 10def3: 5e pop %esi 10def4: 5f pop %edi 10def5: c9 leave 10def6: c3 ret 10def7: 90 nop if ( !policy || !param ) return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10def8: b8 03 00 00 00 mov $0x3,%eax break; } return ESRCH; } 10defd: 8d 65 f4 lea -0xc(%ebp),%esp 10df00: 5b pop %ebx 10df01: 5e pop %esi 10df02: 5f pop %edi 10df03: c9 leave 10df04: c3 ret 10df05: 8d 76 00 lea 0x0(%esi),%esi *param = api->schedparam; param->sched_priority = _POSIX_Priority_From_core( the_thread->current_priority ); } _Thread_Enable_dispatch(); return 0; 10df08: b8 16 00 00 00 mov $0x16,%eax break; } return ESRCH; } 10df0d: 8d 65 f4 lea -0xc(%ebp),%esp 10df10: 5b pop %ebx 10df11: 5e pop %esi 10df12: 5f pop %edi 10df13: c9 leave 10df14: c3 ret =============================================================================== 0010bcc4 : */ void *pthread_getspecific( pthread_key_t key ) { 10bcc4: 55 push %ebp 10bcc5: 89 e5 mov %esp,%ebp 10bcc7: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 10bcca: 8d 45 f4 lea -0xc(%ebp),%eax 10bccd: 50 push %eax 10bcce: ff 75 08 pushl 0x8(%ebp) 10bcd1: 68 80 b8 12 00 push $0x12b880 10bcd6: e8 55 25 00 00 call 10e230 <_Objects_Get> uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10bcdb: 83 c4 10 add $0x10,%esp 10bcde: 8b 55 f4 mov -0xc(%ebp),%edx 10bce1: 85 d2 test %edx,%edx 10bce3: 75 2b jne 10bd10 case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 10bce5: 8b 15 98 b4 12 00 mov 0x12b498,%edx 10bceb: 8b 4a 08 mov 0x8(%edx),%ecx index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 10bcee: 89 ca mov %ecx,%edx 10bcf0: c1 ea 18 shr $0x18,%edx 10bcf3: 83 e2 07 and $0x7,%edx 10bcf6: 0f b7 c9 movzwl %cx,%ecx 10bcf9: 8b 44 90 14 mov 0x14(%eax,%edx,4),%eax 10bcfd: 8b 04 88 mov (%eax,%ecx,4),%eax _Thread_Enable_dispatch(); 10bd00: 89 45 e4 mov %eax,-0x1c(%ebp) 10bd03: e8 9c 2d 00 00 call 10eaa4 <_Thread_Enable_dispatch> 10bd08: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return NULL; } 10bd0b: c9 leave 10bd0c: c3 ret 10bd0d: 8d 76 00 lea 0x0(%esi),%esi uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 10bd10: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return NULL; } 10bd12: c9 leave 10bd13: c3 ret =============================================================================== 00110a94 : int pthread_join( pthread_t thread, void **value_ptr ) { 110a94: 55 push %ebp 110a95: 89 e5 mov %esp,%ebp 110a97: 53 push %ebx 110a98: 83 ec 18 sub $0x18,%esp 110a9b: 8b 5d 0c mov 0xc(%ebp),%ebx 110a9e: 8d 45 f4 lea -0xc(%ebp),%eax 110aa1: 50 push %eax 110aa2: ff 75 08 pushl 0x8(%ebp) 110aa5: 68 80 2c 13 00 push $0x132c80 110aaa: e8 b5 23 00 00 call 112e64 <_Objects_Get> POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 110aaf: 83 c4 10 add $0x10,%esp 110ab2: 8b 55 f4 mov -0xc(%ebp),%edx 110ab5: 85 d2 test %edx,%edx 110ab7: 74 0b je 110ac4 110ab9: b8 03 00 00 00 mov $0x3,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110abe: 8b 5d fc mov -0x4(%ebp),%ebx 110ac1: c9 leave 110ac2: c3 ret 110ac3: 90 nop the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 110ac4: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 110aca: 8b 4a 3c mov 0x3c(%edx),%ecx 110acd: 85 c9 test %ecx,%ecx 110acf: 74 43 je 110b14 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 110ad1: 8b 0d 78 2a 13 00 mov 0x132a78,%ecx _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 110ad7: 39 c8 cmp %ecx,%eax 110ad9: 74 49 je 110b24 /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 110adb: 8d 45 f0 lea -0x10(%ebp),%eax 110ade: 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; 110ae1: c7 42 70 01 00 00 00 movl $0x1,0x70(%edx) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 110ae8: 50 push %eax 110ae9: 68 20 3f 11 00 push $0x113f20 110aee: 6a 00 push $0x0 110af0: 83 c2 40 add $0x40,%edx 110af3: 52 push %edx 110af4: e8 17 31 00 00 call 113c10 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 110af9: e8 da 2b 00 00 call 1136d8 <_Thread_Enable_dispatch> if ( value_ptr ) 110afe: 83 c4 10 add $0x10,%esp 110b01: 85 db test %ebx,%ebx 110b03: 74 05 je 110b0a *value_ptr = return_pointer; 110b05: 8b 45 f0 mov -0x10(%ebp),%eax 110b08: 89 03 mov %eax,(%ebx) 110b0a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110b0c: 8b 5d fc mov -0x4(%ebp),%ebx 110b0f: c9 leave 110b10: c3 ret 110b11: 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(); 110b14: e8 bf 2b 00 00 call 1136d8 <_Thread_Enable_dispatch> 110b19: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return ESRCH; } 110b1e: 8b 5d fc mov -0x4(%ebp),%ebx 110b21: c9 leave 110b22: c3 ret 110b23: 90 nop _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 110b24: e8 af 2b 00 00 call 1136d8 <_Thread_Enable_dispatch> 110b29: b8 2d 00 00 00 mov $0x2d,%eax return EDEADLK; 110b2e: eb 8e jmp 110abe =============================================================================== 0010bb48 : int pthread_key_create( pthread_key_t *key, void (*destructor)( 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 28 sub $0x28,%esp 10bb51: a1 d8 b3 12 00 mov 0x12b3d8,%eax 10bb56: 40 inc %eax 10bb57: a3 d8 b3 12 00 mov %eax,0x12b3d8 * 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 ); 10bb5c: 68 80 b8 12 00 push $0x12b880 10bb61: e8 1a 22 00 00 call 10dd80 <_Objects_Allocate> 10bb66: 89 c6 mov %eax,%esi _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 10bb68: 83 c4 10 add $0x10,%esp 10bb6b: 85 c0 test %eax,%eax 10bb6d: 0f 84 81 00 00 00 je 10bbf4 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 10bb73: 8b 45 0c mov 0xc(%ebp),%eax 10bb76: 89 46 10 mov %eax,0x10(%esi) 10bb79: bb 01 00 00 00 mov $0x1,%ebx for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 10bb7e: 8b 04 9d ac b3 12 00 mov 0x12b3ac(,%ebx,4),%eax 10bb85: 85 c0 test %eax,%eax 10bb87: 74 5f je 10bbe8 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 10bb89: 8b 40 04 mov 0x4(%eax),%eax 10bb8c: 0f b7 40 10 movzwl 0x10(%eax),%eax 10bb90: 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 ); 10bb97: 83 ec 0c sub $0xc,%esp 10bb9a: 51 push %ecx 10bb9b: 89 4d e4 mov %ecx,-0x1c(%ebp) 10bb9e: e8 b9 41 00 00 call 10fd5c <_Workspace_Allocate> if ( !table ) { 10bba3: 83 c4 10 add $0x10,%esp 10bba6: 85 c0 test %eax,%eax 10bba8: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bbab: 74 5b je 10bc08 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 10bbad: 89 44 9e 14 mov %eax,0x14(%esi,%ebx,4) memset( table, '\0', bytes_to_allocate ); 10bbb1: 89 c7 mov %eax,%edi 10bbb3: 31 c0 xor %eax,%eax 10bbb5: f3 aa rep stos %al,%es:(%edi) * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 10bbb7: 43 inc %ebx * This is a bit more complex than one might initially expect because * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; 10bbb8: 83 fb 05 cmp $0x5,%ebx 10bbbb: 75 c1 jne 10bb7e #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bbbd: 8b 46 08 mov 0x8(%esi),%eax 10bbc0: 0f b7 c8 movzwl %ax,%ecx 10bbc3: 8b 15 9c b8 12 00 mov 0x12b89c,%edx 10bbc9: 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; 10bbcc: c7 46 0c 00 00 00 00 movl $0x0,0xc(%esi) } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 10bbd3: 8b 55 08 mov 0x8(%ebp),%edx 10bbd6: 89 02 mov %eax,(%edx) _Thread_Enable_dispatch(); 10bbd8: e8 c7 2e 00 00 call 10eaa4 <_Thread_Enable_dispatch> 10bbdd: 31 c0 xor %eax,%eax return 0; } 10bbdf: 8d 65 f4 lea -0xc(%ebp),%esp 10bbe2: 5b pop %ebx 10bbe3: 5e pop %esi 10bbe4: 5f pop %edi 10bbe5: c9 leave 10bbe6: c3 ret 10bbe7: 90 nop } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 10bbe8: c7 44 9e 14 00 00 00 movl $0x0,0x14(%esi,%ebx,4) 10bbef: 00 10bbf0: eb c5 jmp 10bbb7 10bbf2: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 10bbf4: e8 ab 2e 00 00 call 10eaa4 <_Thread_Enable_dispatch> 10bbf9: b8 0b 00 00 00 mov $0xb,%eax *key = the_key->Object.id; _Thread_Enable_dispatch(); return 0; } 10bbfe: 8d 65 f4 lea -0xc(%ebp),%esp 10bc01: 5b pop %ebx 10bc02: 5e pop %esi 10bc03: 5f pop %edi 10bc04: c9 leave 10bc05: c3 ret 10bc06: 66 90 xchg %ax,%ax #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 10bc08: 89 df mov %ebx,%edi 10bc0a: 4f dec %edi 10bc0b: 74 1a je 10bc27 10bc0d: 8d 5c 9e 10 lea 0x10(%esi,%ebx,4),%ebx 10bc11: 8d 76 00 lea 0x0(%esi),%esi the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 10bc14: 83 ec 0c sub $0xc,%esp 10bc17: ff 33 pushl (%ebx) 10bc19: e8 5a 41 00 00 call 10fd78 <_Workspace_Free> (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; the_api-- ) 10bc1e: 83 eb 04 sub $0x4,%ebx #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 10bc21: 83 c4 10 add $0x10,%esp 10bc24: 4f dec %edi 10bc25: 75 ed jne 10bc14 */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 10bc27: 83 ec 08 sub $0x8,%esp 10bc2a: 56 push %esi 10bc2b: 68 80 b8 12 00 push $0x12b880 10bc30: e8 cb 24 00 00 call 10e100 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 10bc35: e8 6a 2e 00 00 call 10eaa4 <_Thread_Enable_dispatch> 10bc3a: b8 0c 00 00 00 mov $0xc,%eax return ENOMEM; 10bc3f: 83 c4 10 add $0x10,%esp 10bc42: eb 9b jmp 10bbdf =============================================================================== 00114a3c : int pthread_kill( pthread_t thread, int sig ) { 114a3c: 55 push %ebp 114a3d: 89 e5 mov %esp,%ebp 114a3f: 57 push %edi 114a40: 56 push %esi 114a41: 53 push %ebx 114a42: 83 ec 1c sub $0x1c,%esp 114a45: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 114a48: 85 db test %ebx,%ebx 114a4a: 0f 84 8c 00 00 00 je 114adc static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 114a50: 8d 7b ff lea -0x1(%ebx),%edi rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 114a53: 83 ff 1f cmp $0x1f,%edi 114a56: 0f 87 80 00 00 00 ja 114adc RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 114a5c: 51 push %ecx 114a5d: 8d 45 e4 lea -0x1c(%ebp),%eax 114a60: 50 push %eax 114a61: ff 75 08 pushl 0x8(%ebp) 114a64: 68 80 97 12 00 push $0x129780 114a69: e8 8a 89 ff ff call 10d3f8 <_Objects_Get> 114a6e: 89 c6 mov %eax,%esi rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 114a70: 83 c4 10 add $0x10,%esp 114a73: 8b 55 e4 mov -0x1c(%ebp),%edx 114a76: 85 d2 test %edx,%edx 114a78: 75 76 jne 114af0 case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 114a7a: 8b 90 f8 00 00 00 mov 0xf8(%eax),%edx if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 114a80: 8d 04 5b lea (%ebx,%ebx,2),%eax 114a83: 83 3c 85 a8 9a 12 00 cmpl $0x1,0x129aa8(,%eax,4) 114a8a: 01 114a8b: 74 31 je 114abe return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 114a8d: b8 01 00 00 00 mov $0x1,%eax 114a92: 89 f9 mov %edi,%ecx 114a94: d3 e0 shl %cl,%eax 114a96: 09 82 d0 00 00 00 or %eax,0xd0(%edx) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 114a9c: 50 push %eax 114a9d: 6a 00 push $0x0 114a9f: 53 push %ebx 114aa0: 56 push %esi 114aa1: e8 fa fd ff ff call 1148a0 <_POSIX_signals_Unblock_thread> the_thread->do_post_task_switch_extension = true; 114aa6: c6 46 74 01 movb $0x1,0x74(%esi) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 114aaa: a1 54 95 12 00 mov 0x129554,%eax 114aaf: 83 c4 10 add $0x10,%esp 114ab2: 85 c0 test %eax,%eax 114ab4: 74 08 je 114abe 114ab6: 3b 35 78 95 12 00 cmp 0x129578,%esi 114abc: 74 12 je 114ad0 _ISR_Signals_to_thread_executing = true; } _Thread_Enable_dispatch(); 114abe: e8 a9 91 ff ff call 10dc6c <_Thread_Enable_dispatch> 114ac3: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 114ac5: 8d 65 f4 lea -0xc(%ebp),%esp 114ac8: 5b pop %ebx 114ac9: 5e pop %esi 114aca: 5f pop %edi 114acb: c9 leave 114acc: c3 ret 114acd: 8d 76 00 lea 0x0(%esi),%esi (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _ISR_Signals_to_thread_executing = true; 114ad0: c6 05 28 96 12 00 01 movb $0x1,0x129628 114ad7: eb e5 jmp 114abe 114ad9: 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 ); 114adc: e8 87 05 00 00 call 115068 <__errno> 114ae1: c7 00 16 00 00 00 movl $0x16,(%eax) 114ae7: b8 ff ff ff ff mov $0xffffffff,%eax 114aec: eb d7 jmp 114ac5 114aee: 66 90 xchg %ax,%ax #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 114af0: e8 73 05 00 00 call 115068 <__errno> 114af5: c7 00 03 00 00 00 movl $0x3,(%eax) 114afb: b8 ff ff ff ff mov $0xffffffff,%eax 114b00: eb c3 jmp 114ac5 =============================================================================== 0010d78c : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 10d78c: 55 push %ebp 10d78d: 89 e5 mov %esp,%ebp 10d78f: 53 push %ebx 10d790: 83 ec 14 sub $0x14,%esp 10d793: 8b 5d 0c mov 0xc(%ebp),%ebx register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 10d796: 85 db test %ebx,%ebx 10d798: 74 19 je 10d7b3 return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 10d79a: 83 ec 08 sub $0x8,%esp 10d79d: 8d 45 f4 lea -0xc(%ebp),%eax 10d7a0: 50 push %eax 10d7a1: ff 75 08 pushl 0x8(%ebp) 10d7a4: e8 8f ff ff ff call 10d738 <_POSIX_Mutex_Get> switch ( location ) { 10d7a9: 83 c4 10 add $0x10,%esp 10d7ac: 8b 55 f4 mov -0xc(%ebp),%edx 10d7af: 85 d2 test %edx,%edx 10d7b1: 74 0d je 10d7c0 case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; 10d7b3: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d7b8: 8b 5d fc mov -0x4(%ebp),%ebx 10d7bb: c9 leave 10d7bc: c3 ret 10d7bd: 8d 76 00 lea 0x0(%esi),%esi the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 10d7c0: 0f b6 15 5c 92 12 00 movzbl 0x12925c,%edx 10d7c7: 2b 50 60 sub 0x60(%eax),%edx 10d7ca: 89 13 mov %edx,(%ebx) the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); 10d7cc: e8 13 33 00 00 call 110ae4 <_Thread_Enable_dispatch> 10d7d1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10d7d3: 8b 5d fc mov -0x4(%ebp),%ebx 10d7d6: c9 leave 10d7d7: c3 ret =============================================================================== 0010d7d8 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 10d7d8: 55 push %ebp 10d7d9: 89 e5 mov %esp,%ebp 10d7db: 57 push %edi 10d7dc: 56 push %esi 10d7dd: 53 push %ebx 10d7de: 83 ec 1c sub $0x1c,%esp 10d7e1: 8b 75 08 mov 0x8(%ebp),%esi 10d7e4: 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; 10d7e7: 85 db test %ebx,%ebx 10d7e9: 0f 84 09 01 00 00 je 10d8f8 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 10d7ef: 85 f6 test %esi,%esi 10d7f1: 0f 84 e5 00 00 00 je 10d8dc } } } #endif if ( !the_attr->is_initialized ) 10d7f7: 8b 13 mov (%ebx),%edx 10d7f9: 85 d2 test %edx,%edx 10d7fb: 0f 84 db 00 00 00 je 10d8dc return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d801: 8b 43 04 mov 0x4(%ebx),%eax 10d804: 83 f8 01 cmp $0x1,%eax 10d807: 0f 84 f7 00 00 00 je 10d904 return ENOSYS; if ( the_attr->process_shared != PTHREAD_PROCESS_PRIVATE ) 10d80d: 85 c0 test %eax,%eax 10d80f: 0f 85 c7 00 00 00 jne 10d8dc return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d815: 8b 43 0c mov 0xc(%ebx),%eax 10d818: 83 f8 01 cmp $0x1,%eax 10d81b: 0f 84 e7 00 00 00 je 10d908 10d821: 83 f8 02 cmp $0x2,%eax 10d824: 0f 84 c2 00 00 00 je 10d8ec 10d82a: 85 c0 test %eax,%eax 10d82c: 0f 85 aa 00 00 00 jne 10d8dc 10d832: 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 ) ) 10d839: 83 ec 0c sub $0xc,%esp 10d83c: ff 73 08 pushl 0x8(%ebx) 10d83f: e8 2c 03 00 00 call 10db70 <_POSIX_Priority_Is_valid> 10d844: 83 c4 10 add $0x10,%esp 10d847: 84 c0 test %al,%al 10d849: 0f 84 8d 00 00 00 je 10d8dc #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) /* * Validate the mutex type and set appropriate SuperCore mutex * attributes. */ switch ( the_attr->type ) { 10d84f: 83 7b 10 03 cmpl $0x3,0x10(%ebx) 10d853: 0f 87 83 00 00 00 ja 10d8dc 10d859: a1 78 d4 12 00 mov 0x12d478,%eax 10d85e: 40 inc %eax 10d85f: a3 78 d4 12 00 mov %eax,0x12d478 * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 10d864: 83 ec 0c sub $0xc,%esp 10d867: 68 80 d8 12 00 push $0x12d880 10d86c: e8 4f 25 00 00 call 10fdc0 <_Objects_Allocate> 10d871: 89 c7 mov %eax,%edi */ _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 10d873: 83 c4 10 add $0x10,%esp 10d876: 85 c0 test %eax,%eax 10d878: 0f 84 96 00 00 00 je 10d914 _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 10d87e: 8b 43 04 mov 0x4(%ebx),%eax 10d881: 89 47 10 mov %eax,0x10(%edi) the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10d884: 31 c0 xor %eax,%eax 10d886: 83 7b 14 00 cmpl $0x0,0x14(%ebx) 10d88a: 0f 94 c0 sete %al 10d88d: 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; 10d890: c6 47 58 01 movb $0x1,0x58(%edi) the_mutex_attr->priority_ceiling = 10d894: 0f b6 05 5c 92 12 00 movzbl 0x12925c,%eax 10d89b: 2b 43 08 sub 0x8(%ebx),%eax 10d89e: 89 47 60 mov %eax,0x60(%edi) _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 10d8a1: 8b 45 e4 mov -0x1c(%ebp),%eax 10d8a4: 89 47 5c mov %eax,0x5c(%edi) /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 10d8a7: 50 push %eax 10d8a8: 6a 01 push $0x1 10d8aa: 8d 47 54 lea 0x54(%edi),%eax 10d8ad: 50 push %eax 10d8ae: 8d 47 14 lea 0x14(%edi),%eax 10d8b1: 50 push %eax 10d8b2: e8 b5 1c 00 00 call 10f56c <_CORE_mutex_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d8b7: 8b 47 08 mov 0x8(%edi),%eax 10d8ba: 0f b7 c8 movzwl %ax,%ecx 10d8bd: 8b 15 9c d8 12 00 mov 0x12d89c,%edx 10d8c3: 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; 10d8c6: 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; 10d8cd: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10d8cf: e8 10 32 00 00 call 110ae4 <_Thread_Enable_dispatch> 10d8d4: 31 c0 xor %eax,%eax return 0; 10d8d6: 83 c4 10 add $0x10,%esp 10d8d9: eb 06 jmp 10d8e1 10d8db: 90 nop 10d8dc: b8 16 00 00 00 mov $0x16,%eax } 10d8e1: 8d 65 f4 lea -0xc(%ebp),%esp 10d8e4: 5b pop %ebx 10d8e5: 5e pop %esi 10d8e6: 5f pop %edi 10d8e7: c9 leave 10d8e8: c3 ret 10d8e9: 8d 76 00 lea 0x0(%esi),%esi return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d8ec: c7 45 e4 03 00 00 00 movl $0x3,-0x1c(%ebp) case PTHREAD_PRIO_INHERIT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; break; case PTHREAD_PRIO_PROTECT: the_discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; break; 10d8f3: e9 41 ff ff ff jmp 10d839 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; 10d8f8: bb 00 d9 12 00 mov $0x12d900,%ebx 10d8fd: e9 ed fe ff ff jmp 10d7ef 10d902: 66 90 xchg %ax,%ax return EINVAL; /* * We only support process private mutexes. */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 10d904: b0 58 mov $0x58,%al 10d906: eb d9 jmp 10d8e1 return EINVAL; /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 10d908: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%ebp) 10d90f: e9 25 ff ff ff jmp 10d839 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 10d914: e8 cb 31 00 00 call 110ae4 <_Thread_Enable_dispatch> 10d919: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10d91e: eb c1 jmp 10d8e1 =============================================================================== 0010da2c : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 10da2c: 55 push %ebp 10da2d: 89 e5 mov %esp,%ebp 10da2f: 53 push %ebx 10da30: 83 ec 1c sub $0x1c,%esp 10da33: 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 ); 10da36: 8d 45 f4 lea -0xc(%ebp),%eax 10da39: 50 push %eax 10da3a: ff 75 0c pushl 0xc(%ebp) 10da3d: e8 a6 00 00 00 call 10dae8 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10da42: 83 c4 10 add $0x10,%esp 10da45: 83 f8 03 cmp $0x3,%eax 10da48: 74 16 je 10da60 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 10da4a: 50 push %eax 10da4b: ff 75 f4 pushl -0xc(%ebp) 10da4e: 6a 00 push $0x0 10da50: 53 push %ebx 10da51: e8 de fe ff ff call 10d934 <_POSIX_Mutex_Lock_support> 10da56: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10da59: 8b 5d fc mov -0x4(%ebp),%ebx 10da5c: c9 leave 10da5d: c3 ret 10da5e: 66 90 xchg %ax,%ax */ 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 ); 10da60: 52 push %edx 10da61: ff 75 f4 pushl -0xc(%ebp) 10da64: 6a 01 push $0x1 10da66: 53 push %ebx 10da67: e8 c8 fe ff ff call 10d934 <_POSIX_Mutex_Lock_support> 10da6c: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10da6f: 8b 5d fc mov -0x4(%ebp),%ebx 10da72: c9 leave 10da73: c3 ret =============================================================================== 0010d518 : */ int pthread_mutexattr_destroy( pthread_mutexattr_t *attr ) { 10d518: 55 push %ebp 10d519: 89 e5 mov %esp,%ebp 10d51b: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || !attr->is_initialized ) 10d51e: 85 c0 test %eax,%eax 10d520: 74 12 je 10d534 10d522: 8b 10 mov (%eax),%edx 10d524: 85 d2 test %edx,%edx 10d526: 74 0c je 10d534 return EINVAL; attr->is_initialized = false; 10d528: c7 00 00 00 00 00 movl $0x0,(%eax) 10d52e: 31 c0 xor %eax,%eax return 0; } 10d530: c9 leave 10d531: c3 ret 10d532: 66 90 xchg %ax,%ax { if ( !attr || !attr->is_initialized ) return EINVAL; attr->is_initialized = false; return 0; 10d534: b8 16 00 00 00 mov $0x16,%eax } 10d539: c9 leave 10d53a: c3 ret =============================================================================== 0010b7e8 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 10b7e8: 55 push %ebp 10b7e9: 89 e5 mov %esp,%ebp 10b7eb: 8b 45 08 mov 0x8(%ebp),%eax 10b7ee: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10b7f1: 85 c0 test %eax,%eax 10b7f3: 74 13 je 10b808 return EINVAL; if ( !attr->is_initialized ) 10b7f5: 8b 08 mov (%eax),%ecx 10b7f7: 85 c9 test %ecx,%ecx 10b7f9: 74 0d je 10b808 return EINVAL; if ( !type ) 10b7fb: 85 d2 test %edx,%edx 10b7fd: 74 09 je 10b808 <== NEVER TAKEN return EINVAL; *type = attr->type; 10b7ff: 8b 40 10 mov 0x10(%eax),%eax 10b802: 89 02 mov %eax,(%edx) 10b804: 31 c0 xor %eax,%eax return 0; } 10b806: c9 leave 10b807: c3 ret if ( !type ) return EINVAL; *type = attr->type; return 0; 10b808: b8 16 00 00 00 mov $0x16,%eax } 10b80d: c9 leave 10b80e: c3 ret =============================================================================== 0010d5dc : int pthread_mutexattr_setprioceiling( pthread_mutexattr_t *attr, int prioceiling ) { 10d5dc: 55 push %ebp 10d5dd: 89 e5 mov %esp,%ebp 10d5df: 56 push %esi 10d5e0: 53 push %ebx 10d5e1: 8b 5d 08 mov 0x8(%ebp),%ebx 10d5e4: 8b 75 0c mov 0xc(%ebp),%esi if ( !attr || !attr->is_initialized ) 10d5e7: 85 db test %ebx,%ebx 10d5e9: 74 06 je 10d5f1 10d5eb: 8b 03 mov (%ebx),%eax 10d5ed: 85 c0 test %eax,%eax 10d5ef: 75 0f jne 10d600 if ( !_POSIX_Priority_Is_valid( prioceiling ) ) return EINVAL; attr->prio_ceiling = prioceiling; return 0; 10d5f1: b8 16 00 00 00 mov $0x16,%eax } 10d5f6: 8d 65 f8 lea -0x8(%ebp),%esp 10d5f9: 5b pop %ebx 10d5fa: 5e pop %esi 10d5fb: c9 leave 10d5fc: c3 ret 10d5fd: 8d 76 00 lea 0x0(%esi),%esi ) { if ( !attr || !attr->is_initialized ) return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 10d600: 83 ec 0c sub $0xc,%esp 10d603: 56 push %esi 10d604: e8 67 05 00 00 call 10db70 <_POSIX_Priority_Is_valid> 10d609: 83 c4 10 add $0x10,%esp 10d60c: 84 c0 test %al,%al 10d60e: 74 e1 je 10d5f1 return EINVAL; attr->prio_ceiling = prioceiling; 10d610: 89 73 08 mov %esi,0x8(%ebx) 10d613: 31 c0 xor %eax,%eax return 0; } 10d615: 8d 65 f8 lea -0x8(%ebp),%esp 10d618: 5b pop %ebx 10d619: 5e pop %esi 10d61a: c9 leave 10d61b: c3 ret =============================================================================== 0010d644 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 10d644: 55 push %ebp 10d645: 89 e5 mov %esp,%ebp 10d647: 8b 45 08 mov 0x8(%ebp),%eax 10d64a: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10d64d: 85 c0 test %eax,%eax 10d64f: 74 0b je 10d65c 10d651: 8b 08 mov (%eax),%ecx 10d653: 85 c9 test %ecx,%ecx 10d655: 74 05 je 10d65c return EINVAL; switch ( pshared ) { 10d657: 83 fa 01 cmp $0x1,%edx 10d65a: 76 08 jbe 10d664 <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10d65c: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10d661: c9 leave 10d662: c3 ret 10d663: 90 nop return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10d664: 89 50 04 mov %edx,0x4(%eax) 10d667: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10d669: c9 leave 10d66a: c3 ret =============================================================================== 0010b838 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 10b838: 55 push %ebp 10b839: 89 e5 mov %esp,%ebp 10b83b: 8b 45 08 mov 0x8(%ebp),%eax 10b83e: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr || !attr->is_initialized ) 10b841: 85 c0 test %eax,%eax 10b843: 74 0b je 10b850 10b845: 8b 08 mov (%eax),%ecx 10b847: 85 c9 test %ecx,%ecx 10b849: 74 05 je 10b850 <== NEVER TAKEN return EINVAL; switch ( type ) { 10b84b: 83 fa 03 cmp $0x3,%edx 10b84e: 76 08 jbe 10b858 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; 10b850: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10b855: c9 leave 10b856: c3 ret 10b857: 90 nop switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 10b858: 89 50 10 mov %edx,0x10(%eax) 10b85b: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10b85d: c9 leave 10b85e: c3 ret =============================================================================== 0010c388 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 10c388: 55 push %ebp 10c389: 89 e5 mov %esp,%ebp 10c38b: 57 push %edi 10c38c: 56 push %esi 10c38d: 53 push %ebx 10c38e: 83 ec 1c sub $0x1c,%esp 10c391: 8b 5d 08 mov 0x8(%ebp),%ebx 10c394: 8b 75 0c mov 0xc(%ebp),%esi if ( !once_control || !init_routine ) 10c397: 85 db test %ebx,%ebx 10c399: 74 51 je 10c3ec 10c39b: 85 f6 test %esi,%esi 10c39d: 74 4d je 10c3ec return EINVAL; if ( !once_control->init_executed ) { 10c39f: 8b 7b 04 mov 0x4(%ebx),%edi 10c3a2: 85 ff test %edi,%edi 10c3a4: 74 0a je 10c3b0 10c3a6: 31 c0 xor %eax,%eax (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 10c3a8: 8d 65 f4 lea -0xc(%ebp),%esp 10c3ab: 5b pop %ebx 10c3ac: 5e pop %esi 10c3ad: 5f pop %edi 10c3ae: c9 leave 10c3af: 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); 10c3b0: 51 push %ecx 10c3b1: 8d 7d e4 lea -0x1c(%ebp),%edi 10c3b4: 57 push %edi 10c3b5: 68 00 01 00 00 push $0x100 10c3ba: 68 00 01 00 00 push $0x100 10c3bf: e8 e0 0b 00 00 call 10cfa4 if ( !once_control->init_executed ) { 10c3c4: 83 c4 10 add $0x10,%esp 10c3c7: 8b 53 04 mov 0x4(%ebx),%edx 10c3ca: 85 d2 test %edx,%edx 10c3cc: 74 2e je 10c3fc <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10c3ce: 50 push %eax 10c3cf: 57 push %edi 10c3d0: 68 00 01 00 00 push $0x100 10c3d5: ff 75 e4 pushl -0x1c(%ebp) 10c3d8: e8 c7 0b 00 00 call 10cfa4 10c3dd: 31 c0 xor %eax,%eax 10c3df: 83 c4 10 add $0x10,%esp } return 0; } 10c3e2: 8d 65 f4 lea -0xc(%ebp),%esp 10c3e5: 5b pop %ebx 10c3e6: 5e pop %esi 10c3e7: 5f pop %edi 10c3e8: c9 leave 10c3e9: c3 ret 10c3ea: 66 90 xchg %ax,%ax if ( !once_control->init_executed ) { once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 10c3ec: b8 16 00 00 00 mov $0x16,%eax } return 0; } 10c3f1: 8d 65 f4 lea -0xc(%ebp),%esp 10c3f4: 5b pop %ebx 10c3f5: 5e pop %esi 10c3f6: 5f pop %edi 10c3f7: c9 leave 10c3f8: c3 ret 10c3f9: 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; 10c3fc: c7 03 01 00 00 00 movl $0x1,(%ebx) once_control->init_executed = true; 10c402: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) (*init_routine)(); 10c409: ff d6 call *%esi 10c40b: eb c1 jmp 10c3ce =============================================================================== 0010c824 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 10c824: 55 push %ebp 10c825: 89 e5 mov %esp,%ebp 10c827: 53 push %ebx 10c828: 83 ec 14 sub $0x14,%esp 10c82b: 8b 45 08 mov 0x8(%ebp),%eax POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 10c82e: 85 c0 test %eax,%eax 10c830: 74 42 je 10c874 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 10c832: 53 push %ebx 10c833: 8d 55 f4 lea -0xc(%ebp),%edx 10c836: 52 push %edx 10c837: ff 30 pushl (%eax) 10c839: 68 80 c3 12 00 push $0x12c380 10c83e: e8 7d 2b 00 00 call 10f3c0 <_Objects_Get> 10c843: 89 c3 mov %eax,%ebx return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c845: 83 c4 10 add $0x10,%esp 10c848: 8b 4d f4 mov -0xc(%ebp),%ecx 10c84b: 85 c9 test %ecx,%ecx 10c84d: 75 25 jne 10c874 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 ) { 10c84f: 83 ec 0c sub $0xc,%esp 10c852: 8d 40 10 lea 0x10(%eax),%eax 10c855: 50 push %eax 10c856: e8 31 3c 00 00 call 11048c <_Thread_queue_First> 10c85b: 83 c4 10 add $0x10,%esp 10c85e: 85 c0 test %eax,%eax 10c860: 74 1e je 10c880 _Thread_Enable_dispatch(); 10c862: e8 cd 33 00 00 call 10fc34 <_Thread_Enable_dispatch> 10c867: b8 10 00 00 00 mov $0x10,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c86c: 8b 5d fc mov -0x4(%ebp),%ebx 10c86f: c9 leave 10c870: c3 ret 10c871: 8d 76 00 lea 0x0(%esi),%esi _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); return 0; 10c874: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10c879: 8b 5d fc mov -0x4(%ebp),%ebx 10c87c: c9 leave 10c87d: c3 ret 10c87e: 66 90 xchg %ax,%ax /* * POSIX doesn't require behavior when it is locked. */ _Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object ); 10c880: 83 ec 08 sub $0x8,%esp 10c883: 53 push %ebx 10c884: 68 80 c3 12 00 push $0x12c380 10c889: e8 fe 26 00 00 call 10ef8c <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 10c88e: 58 pop %eax 10c88f: 5a pop %edx 10c890: 53 push %ebx 10c891: 68 80 c3 12 00 push $0x12c380 10c896: e8 f5 29 00 00 call 10f290 <_Objects_Free> _POSIX_RWLock_Free( the_rwlock ); _Thread_Enable_dispatch(); 10c89b: e8 94 33 00 00 call 10fc34 <_Thread_Enable_dispatch> 10c8a0: 31 c0 xor %eax,%eax return 0; 10c8a2: 83 c4 10 add $0x10,%esp 10c8a5: eb d2 jmp 10c879 =============================================================================== 0010c8a8 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 10c8a8: 55 push %ebp 10c8a9: 89 e5 mov %esp,%ebp 10c8ab: 56 push %esi 10c8ac: 53 push %ebx 10c8ad: 83 ec 20 sub $0x20,%esp 10c8b0: 8b 5d 08 mov 0x8(%ebp),%ebx 10c8b3: 8b 75 0c mov 0xc(%ebp),%esi const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 10c8b6: 85 db test %ebx,%ebx 10c8b8: 74 15 je 10c8cf return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 10c8ba: 85 f6 test %esi,%esi 10c8bc: 0f 84 86 00 00 00 je 10c948 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 10c8c2: 8b 16 mov (%esi),%edx 10c8c4: 85 d2 test %edx,%edx 10c8c6: 74 07 je 10c8cf <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 10c8c8: 8b 46 04 mov 0x4(%esi),%eax 10c8cb: 85 c0 test %eax,%eax 10c8cd: 74 0d je 10c8dc <== ALWAYS TAKEN ); *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; 10c8cf: b8 16 00 00 00 mov $0x16,%eax } 10c8d4: 8d 65 f8 lea -0x8(%ebp),%esp 10c8d7: 5b pop %ebx 10c8d8: 5e pop %esi 10c8d9: c9 leave 10c8da: c3 ret 10c8db: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c8dc: a1 f8 c0 12 00 mov 0x12c0f8,%eax 10c8e1: 40 inc %eax 10c8e2: a3 f8 c0 12 00 mov %eax,0x12c0f8 * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 10c8e7: 83 ec 0c sub $0xc,%esp 10c8ea: 68 80 c3 12 00 push $0x12c380 10c8ef: e8 1c 26 00 00 call 10ef10 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 10c8f4: 83 c4 10 add $0x10,%esp 10c8f7: 85 c0 test %eax,%eax 10c8f9: 74 41 je 10c93c _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 10c8fb: 83 ec 08 sub $0x8,%esp 10c8fe: 8d 55 f4 lea -0xc(%ebp),%edx 10c901: 52 push %edx 10c902: 8d 50 10 lea 0x10(%eax),%edx 10c905: 52 push %edx 10c906: 89 45 e4 mov %eax,-0x1c(%ebp) 10c909: e8 1e 1e 00 00 call 10e72c <_CORE_RWLock_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c90e: 8b 45 e4 mov -0x1c(%ebp),%eax 10c911: 8b 50 08 mov 0x8(%eax),%edx 10c914: 0f b7 f2 movzwl %dx,%esi 10c917: 8b 0d 9c c3 12 00 mov 0x12c39c,%ecx 10c91d: 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; 10c920: c7 40 0c 00 00 00 00 movl $0x0,0xc(%eax) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 10c927: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10c929: e8 06 33 00 00 call 10fc34 <_Thread_Enable_dispatch> 10c92e: 31 c0 xor %eax,%eax return 0; 10c930: 83 c4 10 add $0x10,%esp } 10c933: 8d 65 f8 lea -0x8(%ebp),%esp 10c936: 5b pop %ebx 10c937: 5e pop %esi 10c938: c9 leave 10c939: c3 ret 10c93a: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 10c93c: e8 f3 32 00 00 call 10fc34 <_Thread_Enable_dispatch> 10c941: b8 0b 00 00 00 mov $0xb,%eax return EAGAIN; 10c946: eb 8c jmp 10c8d4 * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 10c948: 83 ec 0c sub $0xc,%esp 10c94b: 8d 75 ec lea -0x14(%ebp),%esi 10c94e: 56 push %esi 10c94f: e8 74 09 00 00 call 10d2c8 10c954: 83 c4 10 add $0x10,%esp 10c957: e9 66 ff ff ff jmp 10c8c2 =============================================================================== 0010c9c4 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10c9c4: 55 push %ebp 10c9c5: 89 e5 mov %esp,%ebp 10c9c7: 56 push %esi 10c9c8: 53 push %ebx 10c9c9: 83 ec 20 sub $0x20,%esp 10c9cc: 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 ) 10c9cf: 85 db test %ebx,%ebx 10c9d1: 74 7d je 10ca50 * * 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 ); 10c9d3: 83 ec 08 sub $0x8,%esp 10c9d6: 8d 45 f0 lea -0x10(%ebp),%eax 10c9d9: 50 push %eax 10c9da: ff 75 0c pushl 0xc(%ebp) 10c9dd: e8 26 6c 00 00 call 113608 <_POSIX_Absolute_timeout_to_ticks> 10c9e2: 89 c6 mov %eax,%esi 10c9e4: 83 c4 0c add $0xc,%esp 10c9e7: 8d 45 f4 lea -0xc(%ebp),%eax 10c9ea: 50 push %eax 10c9eb: ff 33 pushl (%ebx) 10c9ed: 68 80 c3 12 00 push $0x12c380 10c9f2: e8 c9 29 00 00 call 10f3c0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 10c9f7: 83 c4 10 add $0x10,%esp 10c9fa: 8b 55 f4 mov -0xc(%ebp),%edx 10c9fd: 85 d2 test %edx,%edx 10c9ff: 75 4f jne 10ca50 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, 10ca01: 83 fe 03 cmp $0x3,%esi 10ca04: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 10ca07: 83 ec 0c sub $0xc,%esp 10ca0a: 6a 00 push $0x0 10ca0c: ff 75 f0 pushl -0x10(%ebp) 10ca0f: 0f b6 ca movzbl %dl,%ecx 10ca12: 51 push %ecx 10ca13: ff 33 pushl (%ebx) 10ca15: 83 c0 10 add $0x10,%eax 10ca18: 50 push %eax 10ca19: 88 55 e4 mov %dl,-0x1c(%ebp) 10ca1c: e8 3f 1d 00 00 call 10e760 <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10ca21: 83 c4 20 add $0x20,%esp 10ca24: e8 0b 32 00 00 call 10fc34 <_Thread_Enable_dispatch> if ( !do_wait ) { 10ca29: 8a 55 e4 mov -0x1c(%ebp),%dl 10ca2c: 84 d2 test %dl,%dl 10ca2e: 75 3c jne 10ca6c if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 10ca30: a1 b8 c1 12 00 mov 0x12c1b8,%eax 10ca35: 8b 40 34 mov 0x34(%eax),%eax 10ca38: 83 f8 02 cmp $0x2,%eax 10ca3b: 74 1f je 10ca5c break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ca3d: 83 ec 0c sub $0xc,%esp 10ca40: 50 push %eax 10ca41: e8 e6 00 00 00 call 10cb2c <_POSIX_RWLock_Translate_core_RWLock_return_code> 10ca46: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10ca49: 8d 65 f8 lea -0x8(%ebp),%esp 10ca4c: 5b pop %ebx 10ca4d: 5e pop %esi 10ca4e: c9 leave 10ca4f: c3 ret break; } } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10ca50: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10ca55: 8d 65 f8 lea -0x8(%ebp),%esp 10ca58: 5b pop %ebx 10ca59: 5e pop %esi 10ca5a: c9 leave 10ca5b: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { switch (status) { 10ca5c: 85 f6 test %esi,%esi 10ca5e: 74 f0 je 10ca50 <== NEVER TAKEN 10ca60: 83 fe 02 cmp $0x2,%esi 10ca63: 77 d8 ja 10ca3d <== NEVER TAKEN 10ca65: b0 74 mov $0x74,%al 10ca67: eb ec jmp 10ca55 10ca69: 8d 76 00 lea 0x0(%esi),%esi 10ca6c: a1 b8 c1 12 00 mov 0x12c1b8,%eax 10ca71: 8b 40 34 mov 0x34(%eax),%eax 10ca74: eb c7 jmp 10ca3d =============================================================================== 0010ca78 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 10ca78: 55 push %ebp 10ca79: 89 e5 mov %esp,%ebp 10ca7b: 56 push %esi 10ca7c: 53 push %ebx 10ca7d: 83 ec 20 sub $0x20,%esp 10ca80: 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 ) 10ca83: 85 db test %ebx,%ebx 10ca85: 74 7d je 10cb04 * * 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 ); 10ca87: 83 ec 08 sub $0x8,%esp 10ca8a: 8d 45 f0 lea -0x10(%ebp),%eax 10ca8d: 50 push %eax 10ca8e: ff 75 0c pushl 0xc(%ebp) 10ca91: e8 72 6b 00 00 call 113608 <_POSIX_Absolute_timeout_to_ticks> 10ca96: 89 c6 mov %eax,%esi 10ca98: 83 c4 0c add $0xc,%esp 10ca9b: 8d 45 f4 lea -0xc(%ebp),%eax 10ca9e: 50 push %eax 10ca9f: ff 33 pushl (%ebx) 10caa1: 68 80 c3 12 00 push $0x12c380 10caa6: e8 15 29 00 00 call 10f3c0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); 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 4f jne 10cb04 (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, 10cab5: 83 fe 03 cmp $0x3,%esi 10cab8: 0f 94 c2 sete %dl case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 10cabb: 83 ec 0c sub $0xc,%esp 10cabe: 6a 00 push $0x0 10cac0: ff 75 f0 pushl -0x10(%ebp) 10cac3: 0f b6 ca movzbl %dl,%ecx 10cac6: 51 push %ecx 10cac7: ff 33 pushl (%ebx) 10cac9: 83 c0 10 add $0x10,%eax 10cacc: 50 push %eax 10cacd: 88 55 e4 mov %dl,-0x1c(%ebp) 10cad0: e8 53 1d 00 00 call 10e828 <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 10cad5: 83 c4 20 add $0x20,%esp 10cad8: e8 57 31 00 00 call 10fc34 <_Thread_Enable_dispatch> if ( !do_wait && 10cadd: 8a 55 e4 mov -0x1c(%ebp),%dl 10cae0: 84 d2 test %dl,%dl 10cae2: 75 3c jne 10cb20 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 10cae4: a1 b8 c1 12 00 mov 0x12c1b8,%eax 10cae9: 8b 40 34 mov 0x34(%eax),%eax ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 10caec: 83 f8 02 cmp $0x2,%eax 10caef: 74 1f je 10cb10 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10caf1: 83 ec 0c sub $0xc,%esp 10caf4: 50 push %eax 10caf5: e8 32 00 00 00 call 10cb2c <_POSIX_RWLock_Translate_core_RWLock_return_code> 10cafa: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return EINVAL; } 10cafd: 8d 65 f8 lea -0x8(%ebp),%esp 10cb00: 5b pop %ebx 10cb01: 5e pop %esi 10cb02: c9 leave 10cb03: c3 ret case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 10cb04: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return EINVAL; } 10cb09: 8d 65 f8 lea -0x8(%ebp),%esp 10cb0c: 5b pop %ebx 10cb0d: 5e pop %esi 10cb0e: c9 leave 10cb0f: c3 ret ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 10cb10: 85 f6 test %esi,%esi 10cb12: 74 f0 je 10cb04 <== NEVER TAKEN 10cb14: 83 fe 02 cmp $0x2,%esi 10cb17: 77 d8 ja 10caf1 <== NEVER TAKEN 10cb19: b0 74 mov $0x74,%al 10cb1b: eb ec jmp 10cb09 10cb1d: 8d 76 00 lea 0x0(%esi),%esi 10cb20: a1 b8 c1 12 00 mov 0x12c1b8,%eax 10cb25: 8b 40 34 mov 0x34(%eax),%eax 10cb28: eb c7 jmp 10caf1 =============================================================================== 0010d280 : */ int pthread_rwlockattr_destroy( pthread_rwlockattr_t *attr ) { 10d280: 55 push %ebp 10d281: 89 e5 mov %esp,%ebp 10d283: 8b 45 08 mov 0x8(%ebp),%eax if ( !attr || attr->is_initialized == false ) 10d286: 85 c0 test %eax,%eax 10d288: 74 12 je 10d29c 10d28a: 8b 10 mov (%eax),%edx 10d28c: 85 d2 test %edx,%edx 10d28e: 74 0c je 10d29c return EINVAL; attr->is_initialized = false; 10d290: c7 00 00 00 00 00 movl $0x0,(%eax) 10d296: 31 c0 xor %eax,%eax return 0; } 10d298: c9 leave 10d299: c3 ret 10d29a: 66 90 xchg %ax,%ax { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; return 0; 10d29c: b8 16 00 00 00 mov $0x16,%eax } 10d2a1: c9 leave 10d2a2: c3 ret =============================================================================== 0010d2e8 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 10d2e8: 55 push %ebp 10d2e9: 89 e5 mov %esp,%ebp 10d2eb: 8b 45 08 mov 0x8(%ebp),%eax 10d2ee: 8b 55 0c mov 0xc(%ebp),%edx if ( !attr ) 10d2f1: 85 c0 test %eax,%eax 10d2f3: 74 0b je 10d300 return EINVAL; if ( !attr->is_initialized ) 10d2f5: 8b 08 mov (%eax),%ecx 10d2f7: 85 c9 test %ecx,%ecx 10d2f9: 74 05 je 10d300 return EINVAL; switch ( pshared ) { 10d2fb: 83 fa 01 cmp $0x1,%edx 10d2fe: 76 08 jbe 10d308 <== ALWAYS TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; 10d300: b8 16 00 00 00 mov $0x16,%eax default: return EINVAL; } } 10d305: c9 leave 10d306: c3 ret 10d307: 90 nop return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 10d308: 89 50 04 mov %edx,0x4(%eax) 10d30b: 31 c0 xor %eax,%eax return 0; default: return EINVAL; } } 10d30d: c9 leave 10d30e: c3 ret =============================================================================== 0010b818 : int pthread_setcancelstate( int state, int *oldstate ) { 10b818: 55 push %ebp 10b819: 89 e5 mov %esp,%ebp 10b81b: 53 push %ebx 10b81c: 83 ec 04 sub $0x4,%esp 10b81f: 8b 4d 08 mov 0x8(%ebp),%ecx 10b822: 8b 55 0c mov 0xc(%ebp),%edx * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10b825: a1 54 a8 12 00 mov 0x12a854,%eax 10b82a: 85 c0 test %eax,%eax 10b82c: 75 16 jne 10b844 return EPROTO; if ( !oldstate ) 10b82e: 85 d2 test %edx,%edx 10b830: 74 05 je 10b837 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 10b832: 83 f9 01 cmp $0x1,%ecx 10b835: 76 19 jbe 10b850 /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b837: b8 16 00 00 00 mov $0x16,%eax } 10b83c: 8b 5d fc mov -0x4(%ebp),%ebx 10b83f: c9 leave 10b840: c3 ret 10b841: 8d 76 00 lea 0x0(%esi),%esi * 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() ) 10b844: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b849: 8b 5d fc mov -0x4(%ebp),%ebx 10b84c: c9 leave 10b84d: c3 ret 10b84e: 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 ]; 10b850: a1 78 a8 12 00 mov 0x12a878,%eax 10b855: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10b85b: 8b 1d b8 a7 12 00 mov 0x12a7b8,%ebx 10b861: 43 inc %ebx 10b862: 89 1d b8 a7 12 00 mov %ebx,0x12a7b8 _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 10b868: 8b 98 d4 00 00 00 mov 0xd4(%eax),%ebx 10b86e: 89 1a mov %ebx,(%edx) thread_support->cancelability_state = state; 10b870: 89 88 d4 00 00 00 mov %ecx,0xd4(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b876: 83 ec 0c sub $0xc,%esp 10b879: ff 35 78 a8 12 00 pushl 0x12a878 10b87f: e8 c4 5d 00 00 call 111648 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b884: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b886: 83 c4 10 add $0x10,%esp } 10b889: 8b 5d fc mov -0x4(%ebp),%ebx 10b88c: c9 leave 10b88d: c3 ret =============================================================================== 0010b890 : int pthread_setcanceltype( int type, int *oldtype ) { 10b890: 55 push %ebp 10b891: 89 e5 mov %esp,%ebp 10b893: 53 push %ebx 10b894: 83 ec 04 sub $0x4,%esp 10b897: 8b 4d 08 mov 0x8(%ebp),%ecx 10b89a: 8b 55 0c mov 0xc(%ebp),%edx * Don't even think about deleting a resource from an ISR. * Besides this request is supposed to be for _Thread_Executing * and the ISR context is not a thread. */ if ( _ISR_Is_in_progress() ) 10b89d: a1 54 a8 12 00 mov 0x12a854,%eax 10b8a2: 85 c0 test %eax,%eax 10b8a4: 75 16 jne 10b8bc return EPROTO; if ( !oldtype ) 10b8a6: 85 d2 test %edx,%edx 10b8a8: 74 05 je 10b8af return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 10b8aa: 83 f9 01 cmp $0x1,%ecx 10b8ad: 76 19 jbe 10b8c8 _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b8af: b8 16 00 00 00 mov $0x16,%eax } 10b8b4: 8b 5d fc mov -0x4(%ebp),%ebx 10b8b7: c9 leave 10b8b8: c3 ret 10b8b9: 8d 76 00 lea 0x0(%esi),%esi * 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() ) 10b8bc: b8 47 00 00 00 mov $0x47,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; } 10b8c1: 8b 5d fc mov -0x4(%ebp),%ebx 10b8c4: c9 leave 10b8c5: c3 ret 10b8c6: 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 ]; 10b8c8: a1 78 a8 12 00 mov 0x12a878,%eax 10b8cd: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10b8d3: 8b 1d b8 a7 12 00 mov 0x12a7b8,%ebx 10b8d9: 43 inc %ebx 10b8da: 89 1d b8 a7 12 00 mov %ebx,0x12a7b8 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 10b8e0: 8b 98 d8 00 00 00 mov 0xd8(%eax),%ebx 10b8e6: 89 1a mov %ebx,(%edx) thread_support->cancelability_type = type; 10b8e8: 89 88 d8 00 00 00 mov %ecx,0xd8(%eax) _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing); 10b8ee: 83 ec 0c sub $0xc,%esp 10b8f1: ff 35 78 a8 12 00 pushl 0x12a878 10b8f7: e8 4c 5d 00 00 call 111648 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch> 10b8fc: 31 c0 xor %eax,%eax /* * _Thread_Enable_dispatch is invoked by above call. */ return 0; 10b8fe: 83 c4 10 add $0x10,%esp } 10b901: 8b 5d fc mov -0x4(%ebp),%ebx 10b904: c9 leave 10b905: c3 ret =============================================================================== 0010e2d0 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 10e2d0: 55 push %ebp 10e2d1: 89 e5 mov %esp,%ebp 10e2d3: 57 push %edi 10e2d4: 56 push %esi 10e2d5: 53 push %ebx 10e2d6: 83 ec 2c sub $0x2c,%esp 10e2d9: 8b 75 10 mov 0x10(%ebp),%esi int rc; /* * Check all the parameters */ if ( !param ) 10e2dc: 85 f6 test %esi,%esi 10e2de: 0f 84 cc 00 00 00 je 10e3b0 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 10e2e4: 8d 45 e0 lea -0x20(%ebp),%eax 10e2e7: 50 push %eax 10e2e8: 8d 45 e4 lea -0x1c(%ebp),%eax 10e2eb: 50 push %eax 10e2ec: 56 push %esi 10e2ed: ff 75 0c pushl 0xc(%ebp) 10e2f0: e8 e7 62 00 00 call 1145dc <_POSIX_Thread_Translate_sched_param> 10e2f5: 89 c3 mov %eax,%ebx policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 10e2f7: 83 c4 10 add $0x10,%esp 10e2fa: 85 c0 test %eax,%eax 10e2fc: 74 0a je 10e308 case OBJECTS_ERROR: break; } return ESRCH; } 10e2fe: 89 d8 mov %ebx,%eax 10e300: 8d 65 f4 lea -0xc(%ebp),%esp 10e303: 5b pop %ebx 10e304: 5e pop %esi 10e305: 5f pop %edi 10e306: c9 leave 10e307: c3 ret 10e308: 50 push %eax 10e309: 8d 45 dc lea -0x24(%ebp),%eax 10e30c: 50 push %eax 10e30d: ff 75 08 pushl 0x8(%ebp) 10e310: 68 40 d7 12 00 push $0x12d740 10e315: e8 56 1f 00 00 call 110270 <_Objects_Get> 10e31a: 89 c2 mov %eax,%edx /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10e31c: 83 c4 10 add $0x10,%esp 10e31f: 8b 7d dc mov -0x24(%ebp),%edi 10e322: 85 ff test %edi,%edi 10e324: 0f 85 96 00 00 00 jne 10e3c0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10e32a: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10e330: 89 45 d4 mov %eax,-0x2c(%ebp) if ( api->schedpolicy == SCHED_SPORADIC ) 10e333: 83 b8 80 00 00 00 04 cmpl $0x4,0x80(%eax) 10e33a: 0f 84 c8 00 00 00 je 10e408 (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 10e340: 8b 45 0c mov 0xc(%ebp),%eax 10e343: 8b 4d d4 mov -0x2c(%ebp),%ecx 10e346: 89 81 80 00 00 00 mov %eax,0x80(%ecx) api->schedparam = *param; 10e34c: 89 cf mov %ecx,%edi 10e34e: 81 c7 84 00 00 00 add $0x84,%edi 10e354: b9 07 00 00 00 mov $0x7,%ecx 10e359: f3 a5 rep movsl %ds:(%esi),%es:(%edi) the_thread->budget_algorithm = budget_algorithm; 10e35b: 8b 45 e4 mov -0x1c(%ebp),%eax 10e35e: 89 42 7c mov %eax,0x7c(%edx) the_thread->budget_callout = budget_callout; 10e361: 8b 45 e0 mov -0x20(%ebp),%eax 10e364: 89 82 80 00 00 00 mov %eax,0x80(%edx) switch ( api->schedpolicy ) { 10e36a: 8b 75 0c mov 0xc(%ebp),%esi 10e36d: 85 f6 test %esi,%esi 10e36f: 78 2e js 10e39f <== NEVER TAKEN 10e371: 83 7d 0c 02 cmpl $0x2,0xc(%ebp) 10e375: 7f 55 jg 10e3cc case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 10e377: a1 44 d4 12 00 mov 0x12d444,%eax 10e37c: 89 42 78 mov %eax,0x78(%edx) 10e37f: 0f b6 05 5c 92 12 00 movzbl 0x12925c,%eax 10e386: 8b 4d d4 mov -0x2c(%ebp),%ecx 10e389: 2b 81 84 00 00 00 sub 0x84(%ecx),%eax the_thread->real_priority = 10e38f: 89 42 18 mov %eax,0x18(%edx) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 10e392: 51 push %ecx 10e393: 6a 01 push $0x1 10e395: 50 push %eax 10e396: 52 push %edx 10e397: e8 60 22 00 00 call 1105fc <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 10e39c: 83 c4 10 add $0x10,%esp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 10e39f: e8 40 27 00 00 call 110ae4 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 10e3a4: 89 d8 mov %ebx,%eax 10e3a6: 8d 65 f4 lea -0xc(%ebp),%esp 10e3a9: 5b pop %ebx 10e3aa: 5e pop %esi 10e3ab: 5f pop %edi 10e3ac: c9 leave 10e3ad: c3 ret 10e3ae: 66 90 xchg %ax,%ax int rc; /* * Check all the parameters */ if ( !param ) 10e3b0: bb 16 00 00 00 mov $0x16,%ebx case OBJECTS_ERROR: break; } return ESRCH; } 10e3b5: 89 d8 mov %ebx,%eax 10e3b7: 8d 65 f4 lea -0xc(%ebp),%esp 10e3ba: 5b pop %ebx 10e3bb: 5e pop %esi 10e3bc: 5f pop %edi 10e3bd: c9 leave 10e3be: c3 ret 10e3bf: 90 nop /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 10e3c0: b3 03 mov $0x3,%bl case OBJECTS_ERROR: break; } return ESRCH; } 10e3c2: 89 d8 mov %ebx,%eax 10e3c4: 8d 65 f4 lea -0xc(%ebp),%esp 10e3c7: 5b pop %ebx 10e3c8: 5e pop %esi 10e3c9: 5f pop %edi 10e3ca: c9 leave 10e3cb: c3 ret api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 10e3cc: 83 7d 0c 04 cmpl $0x4,0xc(%ebp) 10e3d0: 75 cd jne 10e39f <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 10e3d2: 8b 4d d4 mov -0x2c(%ebp),%ecx 10e3d5: 8b 81 84 00 00 00 mov 0x84(%ecx),%eax 10e3db: 89 81 a0 00 00 00 mov %eax,0xa0(%ecx) _Watchdog_Remove( &api->Sporadic_timer ); 10e3e1: 83 ec 0c sub $0xc,%esp 10e3e4: 89 c8 mov %ecx,%eax 10e3e6: 05 a4 00 00 00 add $0xa4,%eax 10e3eb: 50 push %eax 10e3ec: 89 55 d0 mov %edx,-0x30(%ebp) 10e3ef: e8 f0 38 00 00 call 111ce4 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 10e3f4: 58 pop %eax 10e3f5: 5a pop %edx 10e3f6: 8b 55 d0 mov -0x30(%ebp),%edx 10e3f9: 52 push %edx 10e3fa: 6a 00 push $0x0 10e3fc: e8 3b fe ff ff call 10e23c <_POSIX_Threads_Sporadic_budget_TSR> 10e401: 83 c4 10 add $0x10,%esp 10e404: eb 99 jmp 10e39f 10e406: 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 ); 10e408: 83 ec 0c sub $0xc,%esp 10e40b: 05 a4 00 00 00 add $0xa4,%eax 10e410: 50 push %eax 10e411: 89 55 d0 mov %edx,-0x30(%ebp) 10e414: e8 cb 38 00 00 call 111ce4 <_Watchdog_Remove> 10e419: 83 c4 10 add $0x10,%esp 10e41c: 8b 55 d0 mov -0x30(%ebp),%edx 10e41f: e9 1c ff ff ff jmp 10e340 =============================================================================== 00112a10 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 112a10: 55 push %ebp 112a11: 89 e5 mov %esp,%ebp 112a13: 57 push %edi 112a14: 56 push %esi 112a15: 53 push %ebx 112a16: 83 ec 0c sub $0xc,%esp 112a19: 8b 4d 08 mov 0x8(%ebp),%ecx 112a1c: 8b 55 0c mov 0xc(%ebp),%edx 112a1f: 8b 5d 10 mov 0x10(%ebp),%ebx POSIX_API_Control *api; if ( !set && !oset ) 112a22: 85 d2 test %edx,%edx 112a24: 0f 84 9a 00 00 00 je 112ac4 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 112a2a: 8b 35 f8 b3 12 00 mov 0x12b3f8,%esi 112a30: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax if ( oset ) 112a36: 85 db test %ebx,%ebx 112a38: 74 0c je 112a46 *oset = api->signals_blocked; 112a3a: 8b b8 cc 00 00 00 mov 0xcc(%eax),%edi 112a40: 89 3b mov %edi,(%ebx) if ( !set ) 112a42: 85 d2 test %edx,%edx 112a44: 74 42 je 112a88 return 0; switch ( how ) { 112a46: 83 f9 01 cmp $0x1,%ecx 112a49: 74 6d je 112ab8 112a4b: 83 f9 02 cmp $0x2,%ecx 112a4e: 74 44 je 112a94 112a50: 85 c9 test %ecx,%ecx 112a52: 75 4c jne 112aa0 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 112a54: 8b 12 mov (%edx),%edx 112a56: 89 90 cc 00 00 00 mov %edx,0xcc(%eax) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 112a5c: 8b 15 28 bb 12 00 mov 0x12bb28,%edx 112a62: 0b 90 d0 00 00 00 or 0xd0(%eax),%edx /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 112a68: 8b 80 cc 00 00 00 mov 0xcc(%eax),%eax 112a6e: f7 d0 not %eax 112a70: 85 c2 test %eax,%edx 112a72: 74 14 je 112a88 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; 112a74: c6 46 74 01 movb $0x1,0x74(%esi) _Thread_Dispatch(); 112a78: e8 93 bf ff ff call 10ea10 <_Thread_Dispatch> 112a7d: 31 c0 xor %eax,%eax } return 0; } 112a7f: 83 c4 0c add $0xc,%esp 112a82: 5b pop %ebx 112a83: 5e pop %esi 112a84: 5f pop %edi 112a85: c9 leave 112a86: c3 ret 112a87: 90 nop /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); 112a88: 31 c0 xor %eax,%eax } return 0; } 112a8a: 83 c4 0c add $0xc,%esp 112a8d: 5b pop %ebx 112a8e: 5e pop %esi 112a8f: 5f pop %edi 112a90: c9 leave 112a91: c3 ret 112a92: 66 90 xchg %ax,%ax switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 112a94: 8b 12 mov (%edx),%edx 112a96: f7 d2 not %edx 112a98: 21 90 cc 00 00 00 and %edx,0xcc(%eax) break; 112a9e: eb bc jmp 112a5c case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 112aa0: e8 03 34 00 00 call 115ea8 <__errno> 112aa5: c7 00 16 00 00 00 movl $0x16,(%eax) 112aab: b8 ff ff ff ff mov $0xffffffff,%eax _Thread_Executing->do_post_task_switch_extension = true; _Thread_Dispatch(); } return 0; } 112ab0: 83 c4 0c add $0xc,%esp 112ab3: 5b pop %ebx 112ab4: 5e pop %esi 112ab5: 5f pop %edi 112ab6: c9 leave 112ab7: c3 ret if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 112ab8: 8b 12 mov (%edx),%edx 112aba: 09 90 cc 00 00 00 or %edx,0xcc(%eax) break; 112ac0: eb 9a jmp 112a5c 112ac2: 66 90 xchg %ax,%ax sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 112ac4: 85 db test %ebx,%ebx 112ac6: 74 d8 je 112aa0 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 112ac8: 8b 35 f8 b3 12 00 mov 0x12b3f8,%esi 112ace: 8b 86 f8 00 00 00 mov 0xf8(%esi),%eax 112ad4: e9 61 ff ff ff jmp 112a3a =============================================================================== 0010c17c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 10c17c: 55 push %ebp 10c17d: 89 e5 mov %esp,%ebp 10c17f: 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() ) 10c182: a1 54 b0 12 00 mov 0x12b054,%eax 10c187: 85 c0 test %eax,%eax 10c189: 75 44 jne 10c1cf <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 10c18b: a1 78 b0 12 00 mov 0x12b078,%eax 10c190: 8b 80 f8 00 00 00 mov 0xf8(%eax),%eax 10c196: 8b 15 b8 af 12 00 mov 0x12afb8,%edx 10c19c: 42 inc %edx 10c19d: 89 15 b8 af 12 00 mov %edx,0x12afb8 _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 10c1a3: 8b 90 d4 00 00 00 mov 0xd4(%eax),%edx 10c1a9: 85 d2 test %edx,%edx 10c1ab: 75 27 jne 10c1d4 <== NEVER TAKEN thread_support->cancelation_requested ) 10c1ad: 8b 80 dc 00 00 00 mov 0xdc(%eax),%eax 10c1b3: 85 c0 test %eax,%eax 10c1b5: 74 1d je 10c1d4 cancel = true; _Thread_Enable_dispatch(); 10c1b7: e8 3c 26 00 00 call 10e7f8 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 10c1bc: 83 ec 08 sub $0x8,%esp 10c1bf: 6a ff push $0xffffffff 10c1c1: ff 35 78 b0 12 00 pushl 0x12b078 10c1c7: e8 4c 62 00 00 call 112418 <_POSIX_Thread_Exit> 10c1cc: 83 c4 10 add $0x10,%esp } 10c1cf: c9 leave <== NOT EXECUTED 10c1d0: c3 ret <== NOT EXECUTED 10c1d1: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10c1d4: c9 leave _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 10c1d5: e9 1e 26 00 00 jmp 10e7f8 <_Thread_Enable_dispatch> =============================================================================== 001094c0 : * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s) { 1094c0: 55 push %ebp 1094c1: 89 e5 mov %esp,%ebp 1094c3: 53 push %ebx 1094c4: 83 ec 04 sub $0x4,%esp 1094c7: 8b 5d 08 mov 0x8(%ebp),%ebx const char *p = s; for (p=s ; *p ; p++ ) 1094ca: 8a 03 mov (%ebx),%al 1094cc: 84 c0 test %al,%al 1094ce: 74 17 je 1094e7 <== NEVER TAKEN BSP_output_char(*p); 1094d0: 83 ec 0c sub $0xc,%esp 1094d3: 0f be c0 movsbl %al,%eax 1094d6: 50 push %eax 1094d7: ff 15 e4 54 12 00 call *0x1254e4 */ void putk(const char *s) { const char *p = s; for (p=s ; *p ; p++ ) 1094dd: 43 inc %ebx 1094de: 8a 03 mov (%ebx),%al 1094e0: 83 c4 10 add $0x10,%esp 1094e3: 84 c0 test %al,%al 1094e5: 75 e9 jne 1094d0 BSP_output_char(*p); BSP_output_char('\n'); 1094e7: c7 45 08 0a 00 00 00 movl $0xa,0x8(%ebp) 1094ee: a1 e4 54 12 00 mov 0x1254e4,%eax } 1094f3: 8b 5d fc mov -0x4(%ebp),%ebx 1094f6: c9 leave { const char *p = s; for (p=s ; *p ; p++ ) BSP_output_char(*p); BSP_output_char('\n'); 1094f7: ff e0 jmp *%eax =============================================================================== 00120834 : ssize_t read( int fd, void *buffer, size_t count ) { 120834: 55 push %ebp 120835: 89 e5 mov %esp,%ebp 120837: 53 push %ebx 120838: 83 ec 04 sub $0x4,%esp 12083b: 8b 5d 08 mov 0x8(%ebp),%ebx 12083e: 8b 45 0c mov 0xc(%ebp),%eax 120841: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 120844: 3b 1d 0c 52 12 00 cmp 0x12520c,%ebx 12084a: 73 50 jae 12089c <== NEVER TAKEN iop = rtems_libio_iop( fd ); 12084c: c1 e3 06 shl $0x6,%ebx 12084f: 03 1d 40 93 12 00 add 0x129340,%ebx rtems_libio_check_is_open( iop ); 120855: 8b 4b 14 mov 0x14(%ebx),%ecx 120858: f6 c5 01 test $0x1,%ch 12085b: 74 3f je 12089c rtems_libio_check_buffer( buffer ); 12085d: 85 c0 test %eax,%eax 12085f: 74 4f je 1208b0 <== NEVER TAKEN rtems_libio_check_count( count ); 120861: 85 d2 test %edx,%edx 120863: 74 2f je 120894 <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 120865: 83 e1 02 and $0x2,%ecx 120868: 74 46 je 1208b0 <== NEVER TAKEN /* * Now process the read(). */ if ( !iop->handlers->read_h ) 12086a: 8b 4b 3c mov 0x3c(%ebx),%ecx 12086d: 8b 49 08 mov 0x8(%ecx),%ecx 120870: 85 c9 test %ecx,%ecx 120872: 74 4e je 1208c2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 120874: 83 ec 04 sub $0x4,%esp 120877: 52 push %edx 120878: 50 push %eax 120879: 53 push %ebx 12087a: ff d1 call *%ecx if ( rc > 0 ) 12087c: 83 c4 10 add $0x10,%esp 12087f: 85 c0 test %eax,%eax 120881: 7e 0b jle 12088e iop->offset += rc; 120883: 89 c1 mov %eax,%ecx 120885: c1 f9 1f sar $0x1f,%ecx 120888: 01 43 0c add %eax,0xc(%ebx) 12088b: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 12088e: 8b 5d fc mov -0x4(%ebp),%ebx 120891: c9 leave 120892: c3 ret 120893: 90 nop 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 ); 120894: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 120896: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 120899: c9 leave <== NOT EXECUTED 12089a: c3 ret <== NOT EXECUTED 12089b: 90 nop <== NOT EXECUTED ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 12089c: e8 c7 47 ff ff call 115068 <__errno> 1208a1: c7 00 09 00 00 00 movl $0x9,(%eax) 1208a7: b8 ff ff ff ff mov $0xffffffff,%eax 1208ac: eb e0 jmp 12088e 1208ae: 66 90 xchg %ax,%ax rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 1208b0: e8 b3 47 ff ff call 115068 <__errno> <== NOT EXECUTED 1208b5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 1208bb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1208c0: eb cc jmp 12088e <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 1208c2: e8 a1 47 ff ff call 115068 <__errno> <== NOT EXECUTED 1208c7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1208cd: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1208d2: eb ba jmp 12088e <== NOT EXECUTED =============================================================================== 0010b2c4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 10b2c4: 55 push %ebp 10b2c5: 89 e5 mov %esp,%ebp 10b2c7: 57 push %edi 10b2c8: 56 push %esi 10b2c9: 53 push %ebx 10b2ca: 83 ec 2c sub $0x2c,%esp 10b2cd: 8b 55 08 mov 0x8(%ebp),%edx 10b2d0: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t loc; int result; if (!buf) 10b2d3: 85 db test %ebx,%ebx 10b2d5: 0f 84 ad 00 00 00 je 10b388 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 10b2db: 31 c0 xor %eax,%eax 10b2dd: b9 ff ff ff ff mov $0xffffffff,%ecx 10b2e2: 89 d7 mov %edx,%edi 10b2e4: f2 ae repnz scas %es:(%edi),%al 10b2e6: f7 d1 not %ecx 10b2e8: 49 dec %ecx 10b2e9: 83 ec 0c sub $0xc,%esp 10b2ec: 6a 00 push $0x0 10b2ee: 8d 75 d4 lea -0x2c(%ebp),%esi 10b2f1: 56 push %esi 10b2f2: 6a 00 push $0x0 10b2f4: 51 push %ecx 10b2f5: 52 push %edx 10b2f6: e8 81 ee ff ff call 10a17c 0, &loc, false ); if ( result != 0 ) 10b2fb: 83 c4 20 add $0x20,%esp 10b2fe: 85 c0 test %eax,%eax 10b300: 75 76 jne 10b378 <== NEVER TAKEN return -1; if ( !loc.ops->node_type_h ){ 10b302: 8b 55 e0 mov -0x20(%ebp),%edx 10b305: 8b 42 10 mov 0x10(%edx),%eax 10b308: 85 c0 test %eax,%eax 10b30a: 74 4e je 10b35a <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 10b30c: 83 ec 0c sub $0xc,%esp 10b30f: 56 push %esi 10b310: ff d0 call *%eax 10b312: 83 c4 10 add $0x10,%esp 10b315: 83 f8 04 cmp $0x4,%eax 10b318: 0f 85 86 00 00 00 jne 10b3a4 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 10b31e: 8b 55 e0 mov -0x20(%ebp),%edx 10b321: 8b 42 3c mov 0x3c(%edx),%eax 10b324: 85 c0 test %eax,%eax 10b326: 0f 84 a1 00 00 00 je 10b3cd <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 10b32c: 52 push %edx 10b32d: ff 75 10 pushl 0x10(%ebp) 10b330: 53 push %ebx 10b331: 56 push %esi 10b332: ff d0 call *%eax 10b334: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 10b336: 8b 45 e0 mov -0x20(%ebp),%eax 10b339: 83 c4 10 add $0x10,%esp 10b33c: 85 c0 test %eax,%eax 10b33e: 74 10 je 10b350 <== NEVER TAKEN 10b340: 8b 40 1c mov 0x1c(%eax),%eax 10b343: 85 c0 test %eax,%eax 10b345: 74 09 je 10b350 <== NEVER TAKEN 10b347: 83 ec 0c sub $0xc,%esp 10b34a: 56 push %esi 10b34b: ff d0 call *%eax 10b34d: 83 c4 10 add $0x10,%esp return result; } 10b350: 89 d8 mov %ebx,%eax 10b352: 8d 65 f4 lea -0xc(%ebp),%esp 10b355: 5b pop %ebx 10b356: 5e pop %esi 10b357: 5f pop %edi 10b358: c9 leave 10b359: c3 ret 0, &loc, false ); if ( result != 0 ) return -1; if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 10b35a: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10b35d: 85 c0 test %eax,%eax <== NOT EXECUTED 10b35f: 74 09 je 10b36a <== NOT EXECUTED 10b361: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b364: 56 push %esi <== NOT EXECUTED 10b365: ff d0 call *%eax <== NOT EXECUTED 10b367: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b36a: e8 5d c5 00 00 call 1178cc <__errno> <== NOT EXECUTED 10b36f: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b375: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 10b378: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b37d: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b37f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b382: 5b pop %ebx <== NOT EXECUTED 10b383: 5e pop %esi <== NOT EXECUTED 10b384: 5f pop %edi <== NOT EXECUTED 10b385: c9 leave <== NOT EXECUTED 10b386: c3 ret <== NOT EXECUTED 10b387: 90 nop <== NOT EXECUTED { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 10b388: e8 3f c5 00 00 call 1178cc <__errno> <== NOT EXECUTED 10b38d: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10b393: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 10b398: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10b39a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10b39d: 5b pop %ebx <== NOT EXECUTED 10b39e: 5e pop %esi <== NOT EXECUTED 10b39f: 5f pop %edi <== NOT EXECUTED 10b3a0: c9 leave <== NOT EXECUTED 10b3a1: c3 ret <== NOT EXECUTED 10b3a2: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 10b3a4: 8b 45 e0 mov -0x20(%ebp),%eax 10b3a7: 85 c0 test %eax,%eax 10b3a9: 74 10 je 10b3bb <== NEVER TAKEN 10b3ab: 8b 40 1c mov 0x1c(%eax),%eax 10b3ae: 85 c0 test %eax,%eax 10b3b0: 74 09 je 10b3bb <== NEVER TAKEN 10b3b2: 83 ec 0c sub $0xc,%esp 10b3b5: 56 push %esi 10b3b6: ff d0 call *%eax 10b3b8: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EINVAL ); 10b3bb: e8 0c c5 00 00 call 1178cc <__errno> 10b3c0: c7 00 16 00 00 00 movl $0x16,(%eax) 10b3c6: bb ff ff ff ff mov $0xffffffff,%ebx 10b3cb: eb 83 jmp 10b350 } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 10b3cd: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10b3d0: 85 c0 test %eax,%eax <== NOT EXECUTED 10b3d2: 74 09 je 10b3dd <== NOT EXECUTED 10b3d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b3d7: 56 push %esi <== NOT EXECUTED 10b3d8: ff d0 call *%eax <== NOT EXECUTED 10b3da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10b3dd: e8 ea c4 00 00 call 1178cc <__errno> <== NOT EXECUTED 10b3e2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10b3e8: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10b3ed: e9 5e ff ff ff jmp 10b350 <== NOT EXECUTED =============================================================================== 00109e80 : ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 109e80: 55 push %ebp 109e81: 89 e5 mov %esp,%ebp 109e83: 57 push %edi 109e84: 56 push %esi 109e85: 53 push %ebx 109e86: 83 ec 1c sub $0x1c,%esp 109e89: 8b 75 08 mov 0x8(%ebp),%esi 109e8c: 8b 5d 0c mov 0xc(%ebp),%ebx int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 109e8f: 3b 35 8c 75 12 00 cmp 0x12758c,%esi 109e95: 0f 83 03 01 00 00 jae 109f9e <== NEVER TAKEN iop = rtems_libio_iop( fd ); 109e9b: c1 e6 06 shl $0x6,%esi 109e9e: 03 35 c0 be 12 00 add 0x12bec0,%esi rtems_libio_check_is_open( iop ); 109ea4: 8b 46 14 mov 0x14(%esi),%eax 109ea7: f6 c4 01 test $0x1,%ah 109eaa: 0f 84 ee 00 00 00 je 109f9e <== NEVER TAKEN rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 109eb0: a8 02 test $0x2,%al 109eb2: 0f 84 b4 00 00 00 je 109f6c <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 109eb8: 85 db test %ebx,%ebx 109eba: 0f 84 ac 00 00 00 je 109f6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 109ec0: 8b 7d 10 mov 0x10(%ebp),%edi 109ec3: 85 ff test %edi,%edi 109ec5: 0f 8e a1 00 00 00 jle 109f6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 109ecb: 81 7d 10 00 04 00 00 cmpl $0x400,0x10(%ebp) 109ed2: 0f 8f 94 00 00 00 jg 109f6c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 109ed8: 8b 46 3c mov 0x3c(%esi),%eax 109edb: 8b 40 08 mov 0x8(%eax),%eax 109ede: 89 45 e0 mov %eax,-0x20(%ebp) 109ee1: 85 c0 test %eax,%eax 109ee3: 0f 84 c9 00 00 00 je 109fb2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 109ee9: c6 45 e4 01 movb $0x1,-0x1c(%ebp) 109eed: 31 c0 xor %eax,%eax 109eef: 31 d2 xor %edx,%edx 109ef1: eb 03 jmp 109ef6 109ef3: 90 nop * 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++ ) { 109ef4: 89 fa mov %edi,%edx ssize_t old; if ( !iov[v].iov_base ) 109ef6: 8b 0c c3 mov (%ebx,%eax,8),%ecx 109ef9: 85 c9 test %ecx,%ecx 109efb: 74 6f je 109f6c if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 109efd: 8b 4c c3 04 mov 0x4(%ebx,%eax,8),%ecx 109f01: 8d 3c 0a lea (%edx,%ecx,1),%edi if ( total < old ) 109f04: 39 d7 cmp %edx,%edi 109f06: 7c 64 jl 109f6c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 109f08: 85 c9 test %ecx,%ecx 109f0a: 74 04 je 109f10 <== NEVER TAKEN 109f0c: 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++ ) { 109f10: 40 inc %eax 109f11: 39 45 10 cmp %eax,0x10(%ebp) 109f14: 7f de jg 109ef4 <== ALWAYS TAKEN /* * 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 ) { 109f16: 80 7d e4 00 cmpb $0x0,-0x1c(%ebp) <== NOT EXECUTED 109f1a: 75 70 jne 109f8c <== NOT EXECUTED 109f1c: 31 ff xor %edi,%edi <== NOT EXECUTED 109f1e: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED 109f25: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109f28: eb 24 jmp 109f4e <== NOT EXECUTED 109f2a: 66 90 xchg %ax,%ax <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) return -1; if ( bytes > 0 ) { 109f2c: 74 0e je 109f3c <== NOT EXECUTED iop->offset += bytes; 109f2e: 89 c1 mov %eax,%ecx <== NOT EXECUTED 109f30: c1 f9 1f sar $0x1f,%ecx <== NOT EXECUTED 109f33: 01 46 0c add %eax,0xc(%esi) <== NOT EXECUTED 109f36: 11 4e 10 adc %ecx,0x10(%esi) <== NOT EXECUTED total += bytes; 109f39: 01 45 e4 add %eax,-0x1c(%ebp) <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 109f3c: 3b 44 fb 04 cmp 0x4(%ebx,%edi,8),%eax <== NOT EXECUTED 109f40: 75 3c jne 109f7e <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109f42: 47 inc %edi <== NOT EXECUTED 109f43: 39 7d 10 cmp %edi,0x10(%ebp) <== NOT EXECUTED 109f46: 7e 36 jle 109f7e <== NOT EXECUTED 109f48: 8b 46 3c mov 0x3c(%esi),%eax <== NOT EXECUTED 109f4b: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); 109f4e: 52 push %edx <== NOT EXECUTED 109f4f: ff 74 fb 04 pushl 0x4(%ebx,%edi,8) <== NOT EXECUTED 109f53: ff 34 fb pushl (%ebx,%edi,8) <== NOT EXECUTED 109f56: 56 push %esi <== NOT EXECUTED 109f57: ff d0 call *%eax <== NOT EXECUTED if ( bytes < 0 ) 109f59: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109f5c: 83 f8 00 cmp $0x0,%eax <== NOT EXECUTED 109f5f: 7d cb jge 109f2c <== NOT EXECUTED } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 109f61: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109f68: eb 14 jmp 109f7e <== NOT EXECUTED 109f6a: 66 90 xchg %ax,%ax <== NOT EXECUTED /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) rtems_set_errno_and_return_minus_one( EINVAL ); 109f6c: e8 ef bd 00 00 call 115d60 <__errno> 109f71: c7 00 16 00 00 00 movl $0x16,(%eax) 109f77: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109f7e: 8b 45 e4 mov -0x1c(%ebp),%eax 109f81: 8d 65 f4 lea -0xc(%ebp),%esp 109f84: 5b pop %ebx 109f85: 5e pop %esi 109f86: 5f pop %edi 109f87: c9 leave 109f88: c3 ret 109f89: 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 ) { 109f8c: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) if (bytes != iov[ v ].iov_len) break; } return total; } 109f93: 8b 45 e4 mov -0x1c(%ebp),%eax 109f96: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109f99: 5b pop %ebx <== NOT EXECUTED 109f9a: 5e pop %esi <== NOT EXECUTED 109f9b: 5f pop %edi <== NOT EXECUTED 109f9c: c9 leave <== NOT EXECUTED 109f9d: c3 ret <== NOT EXECUTED rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 109f9e: e8 bd bd 00 00 call 115d60 <__errno> <== NOT EXECUTED 109fa3: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 109fa9: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109fb0: eb cc jmp 109f7e <== NOT EXECUTED if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 109fb2: e8 a9 bd 00 00 call 115d60 <__errno> <== NOT EXECUTED 109fb7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 109fbd: c7 45 e4 ff ff ff ff movl $0xffffffff,-0x1c(%ebp) <== NOT EXECUTED 109fc4: eb b8 jmp 109f7e <== NOT EXECUTED =============================================================================== 00120954 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 120954: 55 push %ebp 120955: 89 e5 mov %esp,%ebp 120957: 57 push %edi 120958: 56 push %esi 120959: 53 push %ebx 12095a: 83 ec 2c sub $0x2c,%esp 12095d: 8b 5d 08 mov 0x8(%ebp),%ebx 120960: 8b 75 0c mov 0xc(%ebp),%esi 120963: ff 05 70 93 12 00 incl 0x129370 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 120969: 83 3d 80 96 12 00 03 cmpl $0x3,0x129680 120970: 74 72 je 1209e4 <== ALWAYS TAKEN } /* * Continue with realloc(). */ if ( !ptr ) 120972: 85 db test %ebx,%ebx 120974: 74 5e je 1209d4 return malloc( size ); if ( !size ) { 120976: 85 f6 test %esi,%esi 120978: 74 3a je 1209b4 <== NEVER TAKEN free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 12097a: 52 push %edx 12097b: 8d 45 e4 lea -0x1c(%ebp),%eax 12097e: 50 push %eax 12097f: 53 push %ebx 120980: ff 35 18 52 12 00 pushl 0x125218 120986: e8 59 01 00 00 call 120ae4 <_Protected_heap_Get_block_size> 12098b: 83 c4 10 add $0x10,%esp 12098e: 84 c0 test %al,%al 120990: 74 32 je 1209c4 #if defined(RTEMS_MALLOC_BOUNDARY_HELPERS) if (rtems_malloc_boundary_helpers) resize += (*rtems_malloc_boundary_helpers->overhead)(); #endif if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) { 120992: 50 push %eax 120993: 56 push %esi 120994: 53 push %ebx 120995: ff 35 18 52 12 00 pushl 0x125218 12099b: e8 7c 01 00 00 call 120b1c <_Protected_heap_Resize_block> 1209a0: 83 c4 10 add $0x10,%esp 1209a3: 84 c0 test %al,%al 1209a5: 74 5d je 120a04 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 1209a7: 89 d8 mov %ebx,%eax 1209a9: 8d 65 f4 lea -0xc(%ebp),%esp 1209ac: 5b pop %ebx 1209ad: 5e pop %esi 1209ae: 5f pop %edi 1209af: c9 leave 1209b0: c3 ret 1209b1: 8d 76 00 lea 0x0(%esi),%esi */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 1209b4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1209b7: 53 push %ebx <== NOT EXECUTED 1209b8: e8 c7 7b fe ff call 108584 <== NOT EXECUTED 1209bd: 31 db xor %ebx,%ebx <== NOT EXECUTED return (void *) 0; 1209bf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1209c2: eb e3 jmp 1209a7 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 1209c4: e8 9f 46 ff ff call 115068 <__errno> 1209c9: c7 00 16 00 00 00 movl $0x16,(%eax) 1209cf: 31 db xor %ebx,%ebx return (void *) 0; 1209d1: eb d4 jmp 1209a7 1209d3: 90 nop /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 1209d4: 83 ec 0c sub $0xc,%esp 1209d7: 56 push %esi 1209d8: e8 7f 7e fe ff call 10885c 1209dd: 89 c3 mov %eax,%ebx 1209df: 83 c4 10 add $0x10,%esp 1209e2: eb c3 jmp 1209a7 /* * 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) 1209e4: a1 b8 94 12 00 mov 0x1294b8,%eax 1209e9: 85 c0 test %eax,%eax 1209eb: 74 04 je 1209f1 <== ALWAYS TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 1209ed: 31 db xor %ebx,%ebx 1209ef: eb b6 jmp 1209a7 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 1209f1: a1 54 95 12 00 mov 0x129554,%eax 1209f6: 85 c0 test %eax,%eax 1209f8: 0f 84 74 ff ff ff je 120972 <== ALWAYS TAKEN } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 1209fe: 31 db xor %ebx,%ebx 120a00: eb a5 jmp 1209a7 <== NOT EXECUTED 120a02: 66 90 xchg %ax,%ax <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ new_area = malloc( size ); 120a04: 83 ec 0c sub $0xc,%esp 120a07: 56 push %esi 120a08: e8 4f 7e fe ff call 10885c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 120a0d: ff 0d 64 93 12 00 decl 0x129364 if ( !new_area ) { 120a13: 83 c4 10 add $0x10,%esp 120a16: 85 c0 test %eax,%eax 120a18: 74 d3 je 1209ed return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 120a1a: 8b 55 e4 mov -0x1c(%ebp),%edx 120a1d: 89 f1 mov %esi,%ecx 120a1f: 39 d6 cmp %edx,%esi 120a21: 76 02 jbe 120a25 <== NEVER TAKEN 120a23: 89 d1 mov %edx,%ecx 120a25: 89 c7 mov %eax,%edi 120a27: 89 de mov %ebx,%esi 120a29: f3 a4 rep movsb %ds:(%esi),%es:(%edi) free( ptr ); 120a2b: 83 ec 0c sub $0xc,%esp 120a2e: 53 push %ebx 120a2f: 89 45 d4 mov %eax,-0x2c(%ebp) 120a32: e8 4d 7b fe ff call 108584 120a37: 8b 45 d4 mov -0x2c(%ebp),%eax 120a3a: 89 c3 mov %eax,%ebx return new_area; 120a3c: 83 c4 10 add $0x10,%esp 120a3f: e9 63 ff ff ff jmp 1209a7 =============================================================================== 0010c240 : #include int rmdir( const char *pathname ) { 10c240: 55 push %ebp 10c241: 89 e5 mov %esp,%ebp 10c243: 57 push %edi 10c244: 56 push %esi 10c245: 53 push %ebx 10c246: 83 ec 58 sub $0x58,%esp 10c249: 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 ); 10c24c: 53 push %ebx 10c24d: e8 6a e6 ff ff call 10a8bc if ( parentpathlen == 0 ) 10c252: 83 c4 10 add $0x10,%esp 10c255: 85 c0 test %eax,%eax 10c257: 0f 85 2f 01 00 00 jne 10c38c rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 10c25d: 50 push %eax 10c25e: 8d 45 d0 lea -0x30(%ebp),%eax 10c261: 89 45 b4 mov %eax,-0x4c(%ebp) 10c264: 50 push %eax 10c265: 8d 45 e4 lea -0x1c(%ebp),%eax 10c268: 50 push %eax 10c269: 53 push %ebx 10c26a: e8 c1 02 00 00 call 10c530 10c26f: 31 d2 xor %edx,%edx 10c271: c6 45 b3 00 movb $0x0,-0x4d(%ebp) 10c275: 83 c4 10 add $0x10,%esp /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 10c278: 8d 7d bc lea -0x44(%ebp),%edi 10c27b: b9 05 00 00 00 mov $0x5,%ecx 10c280: 8b 75 b4 mov -0x4c(%ebp),%esi 10c283: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = pathname + parentpathlen; 10c285: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 10c287: be ff ff ff ff mov $0xffffffff,%esi 10c28c: 89 f1 mov %esi,%ecx 10c28e: 89 df mov %ebx,%edi 10c290: 31 c0 xor %eax,%eax 10c292: f2 ae repnz scas %es:(%edi),%al 10c294: f7 d1 not %ecx 10c296: 49 dec %ecx 10c297: 83 ec 08 sub $0x8,%esp 10c29a: 51 push %ecx 10c29b: 53 push %ebx 10c29c: e8 cb e5 ff ff call 10a86c 10c2a1: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 10c2a3: 89 f1 mov %esi,%ecx 10c2a5: 89 df mov %ebx,%edi 10c2a7: 31 c0 xor %eax,%eax 10c2a9: f2 ae repnz scas %es:(%edi),%al 10c2ab: f7 d1 not %ecx 10c2ad: 49 dec %ecx 10c2ae: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c2b5: 8d 75 bc lea -0x44(%ebp),%esi 10c2b8: 56 push %esi 10c2b9: 6a 00 push $0x0 10c2bb: 51 push %ecx 10c2bc: 53 push %ebx 10c2bd: e8 42 e6 ff ff call 10a904 0, &loc, false ); if ( result != 0 ) { 10c2c2: 83 c4 20 add $0x20,%esp 10c2c5: 85 c0 test %eax,%eax 10c2c7: 0f 85 fb 00 00 00 jne 10c3c8 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 10c2cd: 8b 55 c8 mov -0x38(%ebp),%edx 10c2d0: 8b 42 10 mov 0x10(%edx),%eax 10c2d3: 85 c0 test %eax,%eax 10c2d5: 0f 84 61 01 00 00 je 10c43c <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 10c2db: 83 ec 0c sub $0xc,%esp 10c2de: 56 push %esi 10c2df: ff d0 call *%eax 10c2e1: 83 c4 10 add $0x10,%esp 10c2e4: 48 dec %eax 10c2e5: 75 5d jne 10c344 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 10c2e7: 8b 45 c4 mov -0x3c(%ebp),%eax 10c2ea: 8b 40 34 mov 0x34(%eax),%eax 10c2ed: 85 c0 test %eax,%eax 10c2ef: 0f 84 fb 00 00 00 je 10c3f0 <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 10c2f5: 83 ec 08 sub $0x8,%esp 10c2f8: 56 push %esi 10c2f9: ff 75 b4 pushl -0x4c(%ebp) 10c2fc: ff d0 call *%eax 10c2fe: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 10c300: 8b 45 c8 mov -0x38(%ebp),%eax 10c303: 83 c4 10 add $0x10,%esp 10c306: 85 c0 test %eax,%eax 10c308: 74 10 je 10c31a <== NEVER TAKEN 10c30a: 8b 40 1c mov 0x1c(%eax),%eax 10c30d: 85 c0 test %eax,%eax 10c30f: 74 09 je 10c31a <== NEVER TAKEN 10c311: 83 ec 0c sub $0xc,%esp 10c314: 56 push %esi 10c315: ff d0 call *%eax 10c317: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10c31a: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10c31e: 74 19 je 10c339 rtems_filesystem_freenode( &parentloc ); 10c320: 8b 45 dc mov -0x24(%ebp),%eax 10c323: 85 c0 test %eax,%eax 10c325: 74 12 je 10c339 <== NEVER TAKEN 10c327: 8b 40 1c mov 0x1c(%eax),%eax 10c32a: 85 c0 test %eax,%eax 10c32c: 74 0b je 10c339 <== NEVER TAKEN 10c32e: 83 ec 0c sub $0xc,%esp 10c331: ff 75 b4 pushl -0x4c(%ebp) 10c334: ff d0 call *%eax 10c336: 83 c4 10 add $0x10,%esp return result; } 10c339: 89 d8 mov %ebx,%eax 10c33b: 8d 65 f4 lea -0xc(%ebp),%esp 10c33e: 5b pop %ebx 10c33f: 5e pop %esi 10c340: 5f pop %edi 10c341: c9 leave 10c342: c3 ret 10c343: 90 nop rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 10c344: 8b 45 c8 mov -0x38(%ebp),%eax 10c347: 85 c0 test %eax,%eax 10c349: 74 10 je 10c35b <== NEVER TAKEN 10c34b: 8b 40 1c mov 0x1c(%eax),%eax 10c34e: 85 c0 test %eax,%eax 10c350: 74 09 je 10c35b <== NEVER TAKEN 10c352: 83 ec 0c sub $0xc,%esp 10c355: 56 push %esi 10c356: ff d0 call *%eax 10c358: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 10c35b: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10c35f: 74 19 je 10c37a <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 10c361: 8b 45 dc mov -0x24(%ebp),%eax 10c364: 85 c0 test %eax,%eax 10c366: 74 12 je 10c37a <== NEVER TAKEN 10c368: 8b 40 1c mov 0x1c(%eax),%eax 10c36b: 85 c0 test %eax,%eax 10c36d: 74 0b je 10c37a <== NEVER TAKEN 10c36f: 83 ec 0c sub $0xc,%esp 10c372: ff 75 b4 pushl -0x4c(%ebp) 10c375: ff d0 call *%eax 10c377: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( ENOTDIR ); 10c37a: e8 a9 bd 00 00 call 118128 <__errno> 10c37f: c7 00 14 00 00 00 movl $0x14,(%eax) 10c385: bb ff ff ff ff mov $0xffffffff,%ebx 10c38a: eb ad jmp 10c339 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 10c38c: 89 c2 mov %eax,%edx 10c38e: 83 ec 0c sub $0xc,%esp 10c391: 6a 00 push $0x0 10c393: 8d 45 d0 lea -0x30(%ebp),%eax 10c396: 89 45 b4 mov %eax,-0x4c(%ebp) 10c399: 50 push %eax 10c39a: 6a 02 push $0x2 10c39c: 52 push %edx 10c39d: 53 push %ebx 10c39e: 89 55 ac mov %edx,-0x54(%ebp) 10c3a1: e8 32 e6 ff ff call 10a9d8 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 10c3a6: 83 c4 20 add $0x20,%esp 10c3a9: 85 c0 test %eax,%eax 10c3ab: 8b 55 ac mov -0x54(%ebp),%edx 10c3ae: 75 0c jne 10c3bc <== NEVER TAKEN 10c3b0: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 10c3b4: e9 bf fe ff ff jmp 10c278 10c3b9: 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 ); 10c3bc: bb ff ff ff ff mov $0xffffffff,%ebx 10c3c1: e9 73 ff ff ff jmp 10c339 10c3c6: 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 ) 10c3c8: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 10c3cc: 74 ee je 10c3bc <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 10c3ce: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10c3d1: 85 c0 test %eax,%eax <== NOT EXECUTED 10c3d3: 74 e7 je 10c3bc <== NOT EXECUTED 10c3d5: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10c3d8: 85 c0 test %eax,%eax <== NOT EXECUTED 10c3da: 74 e0 je 10c3bc <== NOT EXECUTED 10c3dc: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c3df: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 10c3e2: ff d0 call *%eax <== NOT EXECUTED 10c3e4: 83 cb ff or $0xffffffff,%ebx <== NOT EXECUTED 10c3e7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10c3ea: e9 4a ff ff ff jmp 10c339 <== NOT EXECUTED 10c3ef: 90 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 10c3f0: 8b 45 c8 mov -0x38(%ebp),%eax <== NOT EXECUTED 10c3f3: 85 c0 test %eax,%eax <== NOT EXECUTED 10c3f5: 74 10 je 10c407 <== NOT EXECUTED 10c3f7: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10c3fa: 85 c0 test %eax,%eax <== NOT EXECUTED 10c3fc: 74 09 je 10c407 <== NOT EXECUTED 10c3fe: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c401: 56 push %esi <== NOT EXECUTED 10c402: ff d0 call *%eax <== NOT EXECUTED 10c404: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 10c407: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 10c40b: 74 19 je 10c426 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 10c40d: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 10c410: 85 c0 test %eax,%eax <== NOT EXECUTED 10c412: 74 12 je 10c426 <== NOT EXECUTED 10c414: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10c417: 85 c0 test %eax,%eax <== NOT EXECUTED 10c419: 74 0b je 10c426 <== NOT EXECUTED 10c41b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c41e: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 10c421: ff d0 call *%eax <== NOT EXECUTED 10c423: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c426: e8 fd bc 00 00 call 118128 <__errno> <== NOT EXECUTED 10c42b: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10c431: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 10c436: e9 fe fe ff ff jmp 10c339 <== NOT EXECUTED 10c43b: 90 nop <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 10c43c: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10c43f: 85 c0 test %eax,%eax <== NOT EXECUTED 10c441: 75 bb jne 10c3fe <== NOT EXECUTED 10c443: eb c2 jmp 10c407 <== NOT EXECUTED =============================================================================== 00114078 : uint32_t rtems_assoc_local_by_remote_bitfield( const rtems_assoc_t *ap, uint32_t remote_value ) { 114078: 55 push %ebp 114079: 89 e5 mov %esp,%ebp 11407b: 57 push %edi 11407c: 56 push %esi 11407d: 53 push %ebx 11407e: 83 ec 1c sub $0x1c,%esp 114081: 8b 7d 0c mov 0xc(%ebp),%edi 114084: 31 f6 xor %esi,%esi 114086: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) 11408d: bb 01 00 00 00 mov $0x1,%ebx 114092: eb 08 jmp 11409c uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 114094: d1 e3 shl %ebx 114096: 46 inc %esi 114097: 83 fe 20 cmp $0x20,%esi 11409a: 74 1e je 1140ba if (b & remote_value) 11409c: 85 fb test %edi,%ebx 11409e: 74 f4 je 114094 local_value |= rtems_assoc_local_by_remote(ap, b); 1140a0: 83 ec 08 sub $0x8,%esp 1140a3: 53 push %ebx 1140a4: ff 75 08 pushl 0x8(%ebp) 1140a7: e8 1c 00 00 00 call 1140c8 1140ac: 09 45 e4 or %eax,-0x1c(%ebp) 1140af: 83 c4 10 add $0x10,%esp ) { uint32_t b; uint32_t local_value = 0; for (b = 1; b; b <<= 1) { 1140b2: d1 e3 shl %ebx 1140b4: 46 inc %esi 1140b5: 83 fe 20 cmp $0x20,%esi 1140b8: 75 e2 jne 11409c <== ALWAYS TAKEN if (b & remote_value) local_value |= rtems_assoc_local_by_remote(ap, b); } return local_value; } 1140ba: 8b 45 e4 mov -0x1c(%ebp),%eax 1140bd: 8d 65 f4 lea -0xc(%ebp),%esp 1140c0: 5b pop %ebx 1140c1: 5e pop %esi 1140c2: 5f pop %edi 1140c3: c9 leave 1140c4: c3 ret =============================================================================== 00119550 : uint32_t bad_value #else uint32_t bad_value __attribute((unused)) #endif ) { 119550: 55 push %ebp <== NOT EXECUTED 119551: 89 e5 mov %esp,%ebp <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 119553: b8 80 d8 12 00 mov $0x12d880,%eax <== NOT EXECUTED 119558: c9 leave <== NOT EXECUTED 119559: c3 ret <== NOT EXECUTED =============================================================================== 00115dd8 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 115dd8: 55 push %ebp 115dd9: 89 e5 mov %esp,%ebp 115ddb: 53 push %ebx 115ddc: 83 ec 0c sub $0xc,%esp 115ddf: 8b 5d 0c mov 0xc(%ebp),%ebx const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 115de2: 53 push %ebx 115de3: ff 75 08 pushl 0x8(%ebp) 115de6: e8 1d 00 00 00 call 115e08 if (nap) 115deb: 83 c4 10 add $0x10,%esp 115dee: 85 c0 test %eax,%eax 115df0: 74 0a je 115dfc <== NEVER TAKEN return nap->name; 115df2: 8b 00 mov (%eax),%eax return rtems_assoc_name_bad(local_value); } 115df4: 8b 5d fc mov -0x4(%ebp),%ebx 115df7: c9 leave 115df8: c3 ret 115df9: 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); 115dfc: 89 5d 08 mov %ebx,0x8(%ebp) } 115dff: 8b 5d fc mov -0x4(%ebp),%ebx 115e02: c9 leave nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 115e03: e9 48 37 00 00 jmp 119550 =============================================================================== 00114ff8 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114ff8: 55 push %ebp 114ff9: 89 e5 mov %esp,%ebp 114ffb: 57 push %edi 114ffc: 56 push %esi 114ffd: 53 push %ebx 114ffe: 8b 45 08 mov 0x8(%ebp),%eax 115001: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 115004: 8b 30 mov (%eax),%esi 115006: 85 f6 test %esi,%esi 115008: 74 3e je 115048 <== NEVER TAKEN 11500a: bf 22 34 12 00 mov $0x123422,%edi 11500f: b9 0a 00 00 00 mov $0xa,%ecx 115014: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 115016: 74 18 je 115030 <== NEVER TAKEN 115018: 31 c9 xor %ecx,%ecx 11501a: eb 09 jmp 115025 default_ap = ap++; for ( ; ap->name; ap++) 11501c: 83 c0 0c add $0xc,%eax 11501f: 8b 18 mov (%eax),%ebx 115021: 85 db test %ebx,%ebx 115023: 74 1b je 115040 if (ap->local_value == local_value) 115025: 39 50 04 cmp %edx,0x4(%eax) 115028: 75 f2 jne 11501c return ap; return default_ap; } 11502a: 5b pop %ebx 11502b: 5e pop %esi 11502c: 5f pop %edi 11502d: c9 leave 11502e: c3 ret 11502f: 90 nop ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 115030: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED for ( ; ap->name; ap++) 115033: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED 115036: 85 f6 test %esi,%esi <== NOT EXECUTED 115038: 74 f0 je 11502a <== NOT EXECUTED 11503a: 89 c1 mov %eax,%ecx <== NOT EXECUTED 11503c: 89 d8 mov %ebx,%eax <== NOT EXECUTED 11503e: eb e5 jmp 115025 <== NOT EXECUTED 115040: 89 c8 mov %ecx,%eax if (ap->local_value == local_value) return ap; return default_ap; } 115042: 5b pop %ebx 115043: 5e pop %esi 115044: 5f pop %edi 115045: c9 leave 115046: c3 ret 115047: 90 nop uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 115048: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->local_value == local_value) return ap; return default_ap; } 11504a: 5b pop %ebx <== NOT EXECUTED 11504b: 5e pop %esi <== NOT EXECUTED 11504c: 5f pop %edi <== NOT EXECUTED 11504d: c9 leave <== NOT EXECUTED 11504e: c3 ret <== NOT EXECUTED =============================================================================== 001140e8 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 1140e8: 55 push %ebp 1140e9: 89 e5 mov %esp,%ebp 1140eb: 57 push %edi 1140ec: 56 push %esi 1140ed: 53 push %ebx 1140ee: 8b 45 08 mov 0x8(%ebp),%eax 1140f1: 8b 55 0c mov 0xc(%ebp),%edx const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 1140f4: 8b 30 mov (%eax),%esi 1140f6: 85 f6 test %esi,%esi 1140f8: 74 3e je 114138 <== NEVER TAKEN 1140fa: bf 22 34 12 00 mov $0x123422,%edi 1140ff: b9 0a 00 00 00 mov $0xa,%ecx 114104: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 114106: 74 18 je 114120 <== NEVER TAKEN 114108: 31 c9 xor %ecx,%ecx 11410a: eb 09 jmp 114115 default_ap = ap++; for ( ; ap->name; ap++) 11410c: 83 c0 0c add $0xc,%eax 11410f: 8b 18 mov (%eax),%ebx 114111: 85 db test %ebx,%ebx 114113: 74 1b je 114130 if (ap->remote_value == remote_value) 114115: 39 50 08 cmp %edx,0x8(%eax) 114118: 75 f2 jne 11410c return ap; return default_ap; } 11411a: 5b pop %ebx 11411b: 5e pop %esi 11411c: 5f pop %edi 11411d: c9 leave 11411e: c3 ret 11411f: 90 nop ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; 114120: 8d 58 0c lea 0xc(%eax),%ebx <== NOT EXECUTED for ( ; ap->name; ap++) 114123: 8b 70 0c mov 0xc(%eax),%esi <== NOT EXECUTED 114126: 85 f6 test %esi,%esi <== NOT EXECUTED 114128: 74 f0 je 11411a <== NOT EXECUTED 11412a: 89 c1 mov %eax,%ecx <== NOT EXECUTED 11412c: 89 d8 mov %ebx,%eax <== NOT EXECUTED 11412e: eb e5 jmp 114115 <== NOT EXECUTED 114130: 89 c8 mov %ecx,%eax if (ap->remote_value == remote_value) return ap; return default_ap; } 114132: 5b pop %ebx 114133: 5e pop %esi 114134: 5f pop %edi 114135: c9 leave 114136: c3 ret 114137: 90 nop uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 114138: 31 c0 xor %eax,%eax for ( ; ap->name; ap++) if (ap->remote_value == remote_value) return ap; return default_ap; } 11413a: 5b pop %ebx <== NOT EXECUTED 11413b: 5e pop %esi <== NOT EXECUTED 11413c: 5f pop %edi <== NOT EXECUTED 11413d: c9 leave <== NOT EXECUTED 11413e: c3 ret <== NOT EXECUTED =============================================================================== 00114f8c : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 114f8c: 55 push %ebp <== NOT EXECUTED 114f8d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 114f8f: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 114f92: ff 75 0c pushl 0xc(%ebp) <== NOT EXECUTED 114f95: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 114f98: e8 5b 00 00 00 call 114ff8 <== NOT EXECUTED if (nap) 114f9d: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 114fa0: 85 c0 test %eax,%eax <== NOT EXECUTED 114fa2: 74 03 je 114fa7 <== NOT EXECUTED return nap->remote_value; 114fa4: 8b 40 08 mov 0x8(%eax),%eax <== NOT EXECUTED return 0; } 114fa7: c9 leave <== NOT EXECUTED 114fa8: c3 ret <== NOT EXECUTED =============================================================================== 001118d0 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 1118d0: 55 push %ebp 1118d1: 89 e5 mov %esp,%ebp 1118d3: 57 push %edi 1118d4: 56 push %esi 1118d5: 53 push %ebx 1118d6: 83 ec 2c sub $0x2c,%esp 1118d9: 8b 5d 08 mov 0x8(%ebp),%ebx 1118dc: 8b 7d 0c mov 0xc(%ebp),%edi 1118df: 8b 45 10 mov 0x10(%ebp),%eax 1118e2: 8b 75 14 mov 0x14(%ebp),%esi Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 1118e5: 85 db test %ebx,%ebx 1118e7: 0f 84 87 00 00 00 je 111974 return RTEMS_INVALID_NAME; if ( !id ) 1118ed: 85 f6 test %esi,%esi 1118ef: 0f 84 bb 00 00 00 je 1119b0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 1118f5: f7 c7 10 00 00 00 test $0x10,%edi 1118fb: 0f 84 83 00 00 00 je 111984 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 111901: 85 c0 test %eax,%eax 111903: 0f 84 87 00 00 00 je 111990 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 111909: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 111910: 89 45 e4 mov %eax,-0x1c(%ebp) 111913: a1 b8 94 12 00 mov 0x1294b8,%eax 111918: 40 inc %eax 111919: a3 b8 94 12 00 mov %eax,0x1294b8 * 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 ); 11191e: 83 ec 0c sub $0xc,%esp 111921: 68 80 9e 12 00 push $0x129e80 111926: e8 1d b6 ff ff call 10cf48 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 11192b: 83 c4 10 add $0x10,%esp 11192e: 85 c0 test %eax,%eax 111930: 74 6a je 11199c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 111932: 89 78 10 mov %edi,0x10(%eax) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 111935: 83 ec 08 sub $0x8,%esp 111938: 8d 55 e0 lea -0x20(%ebp),%edx 11193b: 52 push %edx 11193c: 8d 50 14 lea 0x14(%eax),%edx 11193f: 52 push %edx 111940: 89 45 d4 mov %eax,-0x2c(%ebp) 111943: e8 5c 06 00 00 call 111fa4 <_CORE_barrier_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 111948: 8b 45 d4 mov -0x2c(%ebp),%eax 11194b: 8b 50 08 mov 0x8(%eax),%edx 11194e: 0f b7 fa movzwl %dx,%edi 111951: 8b 0d 9c 9e 12 00 mov 0x129e9c,%ecx 111957: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11195a: 89 58 0c mov %ebx,0xc(%eax) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 11195d: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11195f: e8 08 c3 ff ff call 10dc6c <_Thread_Enable_dispatch> 111964: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 111966: 83 c4 10 add $0x10,%esp } 111969: 8d 65 f4 lea -0xc(%ebp),%esp 11196c: 5b pop %ebx 11196d: 5e pop %esi 11196e: 5f pop %edi 11196f: c9 leave 111970: c3 ret 111971: 8d 76 00 lea 0x0(%esi),%esi ) { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 111974: b8 03 00 00 00 mov $0x3,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111979: 8d 65 f4 lea -0xc(%ebp),%esp 11197c: 5b pop %ebx 11197d: 5e pop %esi 11197e: 5f pop %edi 11197f: c9 leave 111980: c3 ret 111981: 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; 111984: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%ebp) 11198b: eb 83 jmp 111910 11198d: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 111990: b0 0a mov $0xa,%al *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 111992: 8d 65 f4 lea -0xc(%ebp),%esp 111995: 5b pop %ebx 111996: 5e pop %esi 111997: 5f pop %edi 111998: c9 leave 111999: c3 ret 11199a: 66 90 xchg %ax,%ax _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 11199c: e8 cb c2 ff ff call 10dc6c <_Thread_Enable_dispatch> 1119a1: b8 05 00 00 00 mov $0x5,%eax *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1119a6: 8d 65 f4 lea -0xc(%ebp),%esp 1119a9: 5b pop %ebx 1119aa: 5e pop %esi 1119ab: 5f pop %edi 1119ac: c9 leave 1119ad: c3 ret 1119ae: 66 90 xchg %ax,%ax CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 1119b0: b8 09 00 00 00 mov $0x9,%eax 1119b5: eb b2 jmp 111969 =============================================================================== 00108098 : const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 108098: 55 push %ebp 108099: 89 e5 mov %esp,%ebp 10809b: 57 push %edi 10809c: 56 push %esi 10809d: 53 push %ebx 10809e: 83 ec 1c sub $0x1c,%esp 1080a1: 8b 45 08 mov 0x8(%ebp),%eax 1080a4: 8b 5d 0c mov 0xc(%ebp),%ebx 1080a7: 8b 75 10 mov 0x10(%ebp),%esi const char *p; if ( !name ) 1080aa: 85 c0 test %eax,%eax 1080ac: 75 0e jne 1080bc int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i return NULL; if ( !length ) 1080c0: 85 f6 test %esi,%esi 1080c2: 74 ea je 1080ae return NULL; value[0] = '\0'; 1080c4: c6 03 00 movb $0x0,(%ebx) p = rtems_bsp_cmdline_get_param_raw( name ); 1080c7: 83 ec 0c sub $0xc,%esp 1080ca: 50 push %eax 1080cb: e8 48 00 00 00 call 108118 if ( !p ) 1080d0: 83 c4 10 add $0x10,%esp 1080d3: 85 c0 test %eax,%eax 1080d5: 74 d7 je 1080ae int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<== NEVER TAKEN 1080dd: 4e dec %esi 1080de: 89 75 e4 mov %esi,-0x1c(%ebp) 1080e1: 74 cd je 1080b0 <== NEVER TAKEN 1080e3: 31 f6 xor %esi,%esi 1080e5: 31 d2 xor %edx,%edx 1080e7: 31 ff xor %edi,%edi 1080e9: eb 24 jmp 10810f 1080eb: 90 nop if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 1080ec: f7 c7 01 00 00 00 test $0x1,%edi 1080f2: 75 05 jne 1080f9 <== NEVER TAKEN 1080f4: 80 f9 20 cmp $0x20,%cl 1080f7: 74 b7 je 1080b0 <== NEVER TAKEN break; value[i++] = *p++; 1080f9: 88 0c 33 mov %cl,(%ebx,%esi,1) 1080fc: 42 inc %edx 1080fd: 89 d6 mov %edx,%esi value[i] = '\0'; 1080ff: c6 04 13 00 movb $0x0,(%ebx,%edx,1) int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 10810a: 3b 55 e4 cmp -0x1c(%ebp),%edx 10810d: 73 a1 jae 1080b0 <== NEVER TAKEN if ( *p == '\"' ) { 10810f: 80 f9 22 cmp $0x22,%cl 108112: 75 d8 jne 1080ec <== ALWAYS TAKEN quotes++; 108114: 47 inc %edi <== NOT EXECUTED 108115: eb e2 jmp 1080f9 <== NOT EXECUTED =============================================================================== 00108118 : extern const char *bsp_boot_cmdline; const char *rtems_bsp_cmdline_get_param_raw( const char *name ) { 108118: 55 push %ebp 108119: 89 e5 mov %esp,%ebp 10811b: 83 ec 08 sub $0x8,%esp 10811e: 8b 45 08 mov 0x8(%ebp),%eax const char *p; if ( !name ) 108121: 85 c0 test %eax,%eax 108123: 75 07 jne 10812c if ( !bsp_boot_cmdline ) return NULL; p = strstr(bsp_boot_cmdline, name); /* printf( "raw: %p (%s)\n", p, p ); */ return p; 108125: 31 c0 xor %eax,%eax } 108127: c9 leave 108128: c3 ret 108129: 8d 76 00 lea 0x0(%esi),%esi const char *p; if ( !name ) return NULL; if ( !bsp_boot_cmdline ) 10812c: 8b 15 98 9b 12 00 mov 0x129b98,%edx 108132: 85 d2 test %edx,%edx 108134: 74 ef je 108125 return NULL; p = strstr(bsp_boot_cmdline, name); 108136: 83 ec 08 sub $0x8,%esp 108139: 50 push %eax 10813a: 52 push %edx 10813b: e8 54 e6 00 00 call 116794 108140: 83 c4 10 add $0x10,%esp /* printf( "raw: %p (%s)\n", p, p ); */ return p; } 108143: c9 leave 108144: c3 ret =============================================================================== 00108148 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 108148: 55 push %ebp 108149: 89 e5 mov %esp,%ebp 10814b: 57 push %edi 10814c: 53 push %ebx 10814d: 8b 7d 08 mov 0x8(%ebp),%edi 108150: 8b 5d 0c mov 0xc(%ebp),%ebx const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 108153: 50 push %eax 108154: ff 75 10 pushl 0x10(%ebp) 108157: 53 push %ebx 108158: 57 push %edi 108159: e8 3a ff ff ff call 108098 10815e: 89 c2 mov %eax,%edx if ( !p ) 108160: 83 c4 10 add $0x10,%esp 108163: 85 c0 test %eax,%eax 108165: 75 0d jne 108174 <== ALWAYS TAKEN *d++ = *rhs++; if ( *(d-1) == '\"' ) d--; *d = '\0'; return value; 108167: 31 db xor %ebx,%ebx } 108169: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10816b: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10816e: 5b pop %ebx <== NOT EXECUTED 10816f: 5f pop %edi <== NOT EXECUTED 108170: c9 leave <== NOT EXECUTED 108171: c3 ret <== NOT EXECUTED 108172: 66 90 xchg %ax,%ax <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 108174: 31 c0 xor %eax,%eax 108176: b9 ff ff ff ff mov $0xffffffff,%ecx 10817b: f2 ae repnz scas %es:(%edi),%al 10817d: f7 d1 not %ecx 10817f: 8d 44 0a ff lea -0x1(%edx,%ecx,1),%eax if ( *rhs != '=' ) 108183: 80 38 3d cmpb $0x3d,(%eax) 108186: 75 df jne 108167 <== NEVER TAKEN return NULL; rhs++; 108188: 8d 48 01 lea 0x1(%eax),%ecx if ( *rhs == '\"' ) 10818b: 8a 50 01 mov 0x1(%eax),%dl 10818e: 80 fa 22 cmp $0x22,%dl 108191: 74 2d je 1081c0 <== NEVER TAKEN rhs++; for ( d=value ; *rhs ; ) 108193: 84 d2 test %dl,%dl 108195: 74 31 je 1081c8 <== ALWAYS TAKEN 108197: 89 d8 mov %ebx,%eax <== NOT EXECUTED 108199: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED *d++ = *rhs++; 10819c: 88 10 mov %dl,(%eax) <== NOT EXECUTED 10819e: 40 inc %eax <== NOT EXECUTED 10819f: 41 inc %ecx <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1081a0: 8a 11 mov (%ecx),%dl <== NOT EXECUTED 1081a2: 84 d2 test %dl,%dl <== NOT EXECUTED 1081a4: 75 f6 jne 10819c <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 1081a6: 8d 50 ff lea -0x1(%eax),%edx 1081a9: 80 78 ff 22 cmpb $0x22,-0x1(%eax) 1081ad: 74 02 je 1081b1 <== NEVER TAKEN 1081af: 89 c2 mov %eax,%edx d--; *d = '\0'; 1081b1: c6 02 00 movb $0x0,(%edx) return value; } 1081b4: 89 d8 mov %ebx,%eax 1081b6: 8d 65 f8 lea -0x8(%ebp),%esp 1081b9: 5b pop %ebx 1081ba: 5f pop %edi 1081bb: c9 leave 1081bc: c3 ret 1081bd: 8d 76 00 lea 0x0(%esi),%esi if ( *rhs != '=' ) return NULL; rhs++; if ( *rhs == '\"' ) rhs++; 1081c0: 8d 48 02 lea 0x2(%eax),%ecx <== NOT EXECUTED 1081c3: 8a 50 02 mov 0x2(%eax),%dl <== NOT EXECUTED 1081c6: eb cb jmp 108193 <== NOT EXECUTED for ( d=value ; *rhs ; ) 1081c8: 89 d8 mov %ebx,%eax 1081ca: eb da jmp 1081a6 =============================================================================== 00116318 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 116318: 55 push %ebp 116319: 89 e5 mov %esp,%ebp 11631b: 53 push %ebx 11631c: 83 ec 04 sub $0x4,%esp 11631f: 8b 45 08 mov 0x8(%ebp),%eax 116322: 8b 5d 0c mov 0xc(%ebp),%ebx if ( !time_buffer ) 116325: 85 db test %ebx,%ebx 116327: 74 3b je 116364 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) 116329: 85 c0 test %eax,%eax 11632b: 74 2b je 116358 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) 11632d: 83 f8 01 cmp $0x1,%eax 116330: 74 3e je 116370 return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { 116332: 83 f8 02 cmp $0x2,%eax 116335: 74 45 je 11637c *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { 116337: 83 f8 03 cmp $0x3,%eax 11633a: 74 4c je 116388 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) 11633c: 83 f8 04 cmp $0x4,%eax 11633f: 74 0b je 11634c 116341: b8 0a 00 00 00 mov $0xa,%eax return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } 116346: 5a pop %edx 116347: 5b pop %ebx 116348: c9 leave 116349: c3 ret 11634a: 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 ); 11634c: 89 5d 08 mov %ebx,0x8(%ebp) return RTEMS_INVALID_NUMBER; } 11634f: 59 pop %ecx 116350: 5b pop %ebx 116351: 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 ); 116352: e9 49 01 00 00 jmp 1164a0 116357: 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 ); 116358: 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; } 11635b: 58 pop %eax 11635c: 5b pop %ebx 11635d: 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 ); 11635e: e9 7d 00 00 00 jmp 1163e0 116363: 90 nop rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) 116364: 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; } 116369: 5a pop %edx 11636a: 5b pop %ebx 11636b: c9 leave 11636c: c3 ret 11636d: 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); 116370: 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; } 116373: 5b pop %ebx 116374: 5b pop %ebx 116375: 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); 116376: e9 19 00 00 00 jmp 116394 11637b: 90 nop if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 11637c: e8 53 00 00 00 call 1163d4 116381: 89 03 mov %eax,(%ebx) 116383: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116385: eb bf jmp 116346 116387: 90 nop } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 116388: e8 33 00 00 00 call 1163c0 11638d: 89 03 mov %eax,(%ebx) 11638f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116391: eb b3 jmp 116346 =============================================================================== 0010c628 : #include rtems_status_code rtems_clock_get_tod( rtems_time_of_day *time_buffer ) { 10c628: 55 push %ebp 10c629: 89 e5 mov %esp,%ebp 10c62b: 56 push %esi 10c62c: 53 push %ebx 10c62d: 83 ec 50 sub $0x50,%esp 10c630: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10c633: 85 db test %ebx,%ebx 10c635: 0f 84 a1 00 00 00 je 10c6dc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 10c63b: 80 3d cc cc 12 00 00 cmpb $0x0,0x12cccc 10c642: 75 0c jne 10c650 10c644: b8 0b 00 00 00 mov $0xb,%eax tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; } 10c649: 8d 65 f8 lea -0x8(%ebp),%esp 10c64c: 5b pop %ebx 10c64d: 5e pop %esi 10c64e: c9 leave 10c64f: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 10c650: 9c pushf 10c651: fa cli 10c652: 5e pop %esi _TOD_Get( &now ); 10c653: 83 ec 0c sub $0xc,%esp 10c656: 8d 45 e8 lea -0x18(%ebp),%eax 10c659: 50 push %eax 10c65a: e8 49 19 00 00 call 10dfa8 <_TOD_Get> _ISR_Enable(level); 10c65f: 56 push %esi 10c660: 9d popf useconds = (suseconds_t)now.tv_nsec; 10c661: 8b 4d ec mov -0x14(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 10c664: 8b 45 e8 mov -0x18(%ebp),%eax 10c667: 89 45 f0 mov %eax,-0x10(%ebp) time->tv_usec = useconds; 10c66a: be d3 4d 62 10 mov $0x10624dd3,%esi 10c66f: 89 c8 mov %ecx,%eax 10c671: f7 ee imul %esi 10c673: 89 45 b0 mov %eax,-0x50(%ebp) 10c676: 89 55 b4 mov %edx,-0x4c(%ebp) 10c679: 8b 75 b4 mov -0x4c(%ebp),%esi 10c67c: c1 fe 06 sar $0x6,%esi 10c67f: 89 c8 mov %ecx,%eax 10c681: 99 cltd 10c682: 29 d6 sub %edx,%esi 10c684: 89 75 f4 mov %esi,-0xc(%ebp) /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 10c687: 58 pop %eax 10c688: 5a pop %edx 10c689: 8d 45 c4 lea -0x3c(%ebp),%eax 10c68c: 50 push %eax 10c68d: 8d 45 f0 lea -0x10(%ebp),%eax 10c690: 50 push %eax 10c691: e8 7a a9 00 00 call 117010 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 10c696: 8b 45 d8 mov -0x28(%ebp),%eax 10c699: 05 6c 07 00 00 add $0x76c,%eax 10c69e: 89 03 mov %eax,(%ebx) tmbuf->month = time.tm_mon + 1; 10c6a0: 8b 45 d4 mov -0x2c(%ebp),%eax 10c6a3: 40 inc %eax 10c6a4: 89 43 04 mov %eax,0x4(%ebx) tmbuf->day = time.tm_mday; 10c6a7: 8b 45 d0 mov -0x30(%ebp),%eax 10c6aa: 89 43 08 mov %eax,0x8(%ebx) tmbuf->hour = time.tm_hour; 10c6ad: 8b 45 cc mov -0x34(%ebp),%eax 10c6b0: 89 43 0c mov %eax,0xc(%ebx) tmbuf->minute = time.tm_min; 10c6b3: 8b 45 c8 mov -0x38(%ebp),%eax 10c6b6: 89 43 10 mov %eax,0x10(%ebx) tmbuf->second = time.tm_sec; 10c6b9: 8b 45 c4 mov -0x3c(%ebp),%eax 10c6bc: 89 43 14 mov %eax,0x14(%ebx) tmbuf->ticks = now.tv_usec / 10c6bf: 8b 45 f4 mov -0xc(%ebp),%eax 10c6c2: 31 d2 xor %edx,%edx 10c6c4: f7 35 8c 86 12 00 divl 0x12868c 10c6ca: 89 43 18 mov %eax,0x18(%ebx) 10c6cd: 31 c0 xor %eax,%eax rtems_configuration_get_microseconds_per_tick(); return RTEMS_SUCCESSFUL; 10c6cf: 83 c4 10 add $0x10,%esp } 10c6d2: 8d 65 f8 lea -0x8(%ebp),%esp 10c6d5: 5b pop %ebx 10c6d6: 5e pop %esi 10c6d7: c9 leave 10c6d8: c3 ret 10c6d9: 8d 76 00 lea 0x0(%esi),%esi { rtems_time_of_day *tmbuf = time_buffer; struct tm time; struct timeval now; if ( !time_buffer ) 10c6dc: b8 09 00 00 00 mov $0x9,%eax 10c6e1: e9 63 ff ff ff jmp 10c649 =============================================================================== 001164a0 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { 1164a0: 55 push %ebp 1164a1: 89 e5 mov %esp,%ebp 1164a3: 56 push %esi 1164a4: 53 push %ebx 1164a5: 83 ec 20 sub $0x20,%esp 1164a8: 8b 5d 08 mov 0x8(%ebp),%ebx if ( !time ) 1164ab: 85 db test %ebx,%ebx 1164ad: 74 59 je 116508 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Is_set ) 1164af: 80 3d 0c 41 14 00 00 cmpb $0x0,0x14410c 1164b6: 75 0c jne 1164c4 1164b8: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } 1164bd: 8d 65 f8 lea -0x8(%ebp),%esp 1164c0: 5b pop %ebx 1164c1: 5e pop %esi 1164c2: c9 leave 1164c3: c3 ret { ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); 1164c4: 9c pushf 1164c5: fa cli 1164c6: 5e pop %esi _TOD_Get( &now ); 1164c7: 83 ec 0c sub $0xc,%esp 1164ca: 8d 45 f0 lea -0x10(%ebp),%eax 1164cd: 50 push %eax 1164ce: e8 61 44 00 00 call 11a934 <_TOD_Get> _ISR_Enable(level); 1164d3: 56 push %esi 1164d4: 9d popf useconds = (suseconds_t)now.tv_nsec; 1164d5: 8b 4d f4 mov -0xc(%ebp),%ecx useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 1164d8: 8b 45 f0 mov -0x10(%ebp),%eax 1164db: 89 03 mov %eax,(%ebx) time->tv_usec = useconds; 1164dd: be d3 4d 62 10 mov $0x10624dd3,%esi 1164e2: 89 c8 mov %ecx,%eax 1164e4: f7 ee imul %esi 1164e6: 89 45 e0 mov %eax,-0x20(%ebp) 1164e9: 89 55 e4 mov %edx,-0x1c(%ebp) 1164ec: 8b 75 e4 mov -0x1c(%ebp),%esi 1164ef: c1 fe 06 sar $0x6,%esi 1164f2: 89 c8 mov %ecx,%eax 1164f4: 99 cltd 1164f5: 29 d6 sub %edx,%esi 1164f7: 89 73 04 mov %esi,0x4(%ebx) 1164fa: 31 c0 xor %eax,%eax if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; 1164fc: 83 c4 10 add $0x10,%esp } 1164ff: 8d 65 f8 lea -0x8(%ebp),%esp 116502: 5b pop %ebx 116503: 5e pop %esi 116504: c9 leave 116505: c3 ret 116506: 66 90 xchg %ax,%ax rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) 116508: b8 09 00 00 00 mov $0x9,%eax 11650d: eb ae jmp 1164bd =============================================================================== 0010b7a8 : * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { 10b7a8: 55 push %ebp 10b7a9: 89 e5 mov %esp,%ebp 10b7ab: 83 ec 08 sub $0x8,%esp 10b7ae: 8b 45 08 mov 0x8(%ebp),%eax if ( !uptime ) 10b7b1: 85 c0 test %eax,%eax 10b7b3: 74 13 je 10b7c8 return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); 10b7b5: 83 ec 0c sub $0xc,%esp 10b7b8: 50 push %eax 10b7b9: e8 6e 16 00 00 call 10ce2c <_TOD_Get_uptime_as_timespec> 10b7be: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b7c0: 83 c4 10 add $0x10,%esp } 10b7c3: c9 leave 10b7c4: c3 ret 10b7c5: 8d 76 00 lea 0x0(%esi),%esi */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) 10b7c8: b0 09 mov $0x9,%al return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } 10b7ca: c9 leave 10b7cb: c3 ret =============================================================================== 0010c700 : */ rtems_status_code rtems_clock_set( rtems_time_of_day *time_buffer ) { 10c700: 55 push %ebp 10c701: 89 e5 mov %esp,%ebp 10c703: 53 push %ebx 10c704: 83 ec 14 sub $0x14,%esp 10c707: 8b 5d 08 mov 0x8(%ebp),%ebx struct timespec newtime; if ( !time_buffer ) 10c70a: 85 db test %ebx,%ebx 10c70c: 74 66 je 10c774 return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { 10c70e: 83 ec 0c sub $0xc,%esp 10c711: 53 push %ebx 10c712: e8 39 01 00 00 call 10c850 <_TOD_Validate> 10c717: 83 c4 10 add $0x10,%esp 10c71a: 84 c0 test %al,%al 10c71c: 75 0a jne 10c728 10c71e: b8 14 00 00 00 mov $0x14,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c723: 8b 5d fc mov -0x4(%ebp),%ebx 10c726: c9 leave 10c727: c3 ret if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( _TOD_Validate( time_buffer ) ) { newtime.tv_sec = _TOD_To_seconds( time_buffer ); 10c728: 83 ec 0c sub $0xc,%esp 10c72b: 53 push %ebx 10c72c: e8 93 00 00 00 call 10c7c4 <_TOD_To_seconds> 10c731: 89 45 f0 mov %eax,-0x10(%ebp) newtime.tv_nsec = time_buffer->ticks * 10c734: 8b 43 18 mov 0x18(%ebx),%eax 10c737: 0f af 05 8c 86 12 00 imul 0x12868c,%eax 10c73e: 8d 04 80 lea (%eax,%eax,4),%eax 10c741: 8d 04 80 lea (%eax,%eax,4),%eax 10c744: 8d 04 80 lea (%eax,%eax,4),%eax 10c747: c1 e0 03 shl $0x3,%eax 10c74a: 89 45 f4 mov %eax,-0xc(%ebp) rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c74d: a1 b8 cc 12 00 mov 0x12ccb8,%eax 10c752: 40 inc %eax 10c753: a3 b8 cc 12 00 mov %eax,0x12ccb8 rtems_configuration_get_nanoseconds_per_tick(); _Thread_Disable_dispatch(); _TOD_Set( &newtime ); 10c758: 8d 45 f0 lea -0x10(%ebp),%eax 10c75b: 89 04 24 mov %eax,(%esp) 10c75e: e8 29 19 00 00 call 10e08c <_TOD_Set> _Thread_Enable_dispatch(); 10c763: e8 38 2c 00 00 call 10f3a0 <_Thread_Enable_dispatch> 10c768: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c76a: 83 c4 10 add $0x10,%esp } return RTEMS_INVALID_CLOCK; } 10c76d: 8b 5d fc mov -0x4(%ebp),%ebx 10c770: c9 leave 10c771: c3 ret 10c772: 66 90 xchg %ax,%ax rtems_time_of_day *time_buffer ) { struct timespec newtime; if ( !time_buffer ) 10c774: b8 09 00 00 00 mov $0x9,%eax _TOD_Set( &newtime ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INVALID_CLOCK; } 10c779: 8b 5d fc mov -0x4(%ebp),%ebx 10c77c: c9 leave 10c77d: c3 ret =============================================================================== 0010b5d0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 10b5d0: 55 push %ebp 10b5d1: 89 e5 mov %esp,%ebp 10b5d3: 83 ec 08 sub $0x8,%esp _TOD_Tickle_ticks(); 10b5d6: e8 35 15 00 00 call 10cb10 <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 10b5db: 83 ec 0c sub $0xc,%esp 10b5de: 68 98 95 12 00 push $0x129598 10b5e3: e8 9c 37 00 00 call 10ed84 <_Watchdog_Tickle> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 10b5e8: e8 17 32 00 00 call 10e804 <_Thread_Tickle_timeslice> * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 10b5ed: a0 88 95 12 00 mov 0x129588,%al if ( _Thread_Is_context_switch_necessary() && 10b5f2: 83 c4 10 add $0x10,%esp 10b5f5: 84 c0 test %al,%al 10b5f7: 74 09 je 10b602 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 10b5f9: a1 b8 94 12 00 mov 0x1294b8,%eax 10b5fe: 85 c0 test %eax,%eax 10b600: 74 06 je 10b608 _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 10b602: 31 c0 xor %eax,%eax 10b604: c9 leave 10b605: c3 ret 10b606: 66 90 xchg %ax,%ax _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 10b608: e8 03 25 00 00 call 10db10 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; } 10b60d: 31 c0 xor %eax,%eax 10b60f: c9 leave 10b610: c3 ret =============================================================================== 001087cc : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1087cc: 55 push %ebp 1087cd: 89 e5 mov %esp,%ebp 1087cf: 57 push %edi 1087d0: 56 push %esi 1087d1: 53 push %ebx 1087d2: 83 ec 6c sub $0x6c,%esp 1087d5: 8b 7d 08 mov 0x8(%ebp),%edi Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1087d8: 8b 45 0c mov 0xc(%ebp),%eax 1087db: 85 c0 test %eax,%eax 1087dd: 0f 84 5f 01 00 00 je 108942 <== NEVER TAKEN * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 1087e3: 83 ec 0c sub $0xc,%esp 1087e6: 8d 45 d8 lea -0x28(%ebp),%eax 1087e9: 50 push %eax 1087ea: e8 11 58 00 00 call 10e000 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1087ef: 83 c4 0c add $0xc,%esp 1087f2: 8d 55 d0 lea -0x30(%ebp),%edx 1087f5: 52 push %edx 1087f6: 8d 4d d8 lea -0x28(%ebp),%ecx 1087f9: 51 push %ecx 1087fa: 68 cc d2 12 00 push $0x12d2cc 1087ff: e8 b0 7a 00 00 call 1102b4 <_Timespec_Subtract> } } } #endif (*print)( 108804: 5b pop %ebx 108805: 5e pop %esi 108806: 68 f4 4b 12 00 push $0x124bf4 10880b: 57 push %edi 10880c: ff 55 0c call *0xc(%ebp) 10880f: c7 45 a4 01 00 00 00 movl $0x1,-0x5c(%ebp) 108816: 83 c4 10 add $0x10,%esp ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 108819: 8b 5d a4 mov -0x5c(%ebp),%ebx 10881c: 8b 04 9d 8c cc 12 00 mov 0x12cc8c(,%ebx,4),%eax 108823: 85 c0 test %eax,%eax 108825: 0f 84 ed 00 00 00 je 108918 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10882b: 8b 70 04 mov 0x4(%eax),%esi if ( information ) { 10882e: 85 f6 test %esi,%esi 108830: 0f 84 e2 00 00 00 je 108918 <== NEVER TAKEN for ( i=1 ; i <= information->maximum ; i++ ) { 108836: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10883b: 0f 84 d7 00 00 00 je 108918 108841: bb 01 00 00 00 mov $0x1,%ebx if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 108846: 89 5d 94 mov %ebx,-0x6c(%ebp) 108849: eb 4b jmp 108896 10884b: 90 nop }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 10884c: 8d 5d e0 lea -0x20(%ebp),%ebx 10884f: 53 push %ebx 108850: 8d 45 e4 lea -0x1c(%ebp),%eax 108853: 50 push %eax 108854: 8d 55 d0 lea -0x30(%ebp),%edx 108857: 52 push %edx 108858: 8d 4d c8 lea -0x38(%ebp),%ecx 10885b: 51 push %ecx 10885c: e8 7f 79 00 00 call 1101e0 <_Timespec_Divide> /* * Print the information */ (*print)( context, 108861: 58 pop %eax 108862: 5a pop %edx 108863: ff 75 e0 pushl -0x20(%ebp) 108866: ff 75 e4 pushl -0x1c(%ebp) 108869: ba d3 4d 62 10 mov $0x10624dd3,%edx 10886e: 8b 45 cc mov -0x34(%ebp),%eax 108871: f7 e2 mul %edx 108873: c1 ea 06 shr $0x6,%edx 108876: 52 push %edx 108877: ff 75 c8 pushl -0x38(%ebp) 10887a: 68 67 4e 12 00 push $0x124e67 10887f: 57 push %edi 108880: ff 55 0c call *0xc(%ebp) 108883: 83 c4 20 add $0x20,%esp api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 108886: ff 45 94 incl -0x6c(%ebp) 108889: 0f b7 46 10 movzwl 0x10(%esi),%eax 10888d: 3b 45 94 cmp -0x6c(%ebp),%eax 108890: 0f 82 82 00 00 00 jb 108918 the_thread = (Thread_Control *)information->local_table[ i ]; 108896: 8b 46 1c mov 0x1c(%esi),%eax 108899: 8b 4d 94 mov -0x6c(%ebp),%ecx 10889c: 8b 14 88 mov (%eax,%ecx,4),%edx if ( !the_thread ) 10889f: 85 d2 test %edx,%edx 1088a1: 74 e3 je 108886 <== NEVER TAKEN continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1088a3: 51 push %ecx 1088a4: 8d 5d b3 lea -0x4d(%ebp),%ebx 1088a7: 53 push %ebx 1088a8: 6a 0d push $0xd 1088aa: ff 72 08 pushl 0x8(%edx) 1088ad: 89 55 a0 mov %edx,-0x60(%ebp) 1088b0: e8 2b 44 00 00 call 10cce0 (*print)( 1088b5: 53 push %ebx 1088b6: 8b 55 a0 mov -0x60(%ebp),%edx 1088b9: ff 72 08 pushl 0x8(%edx) 1088bc: 68 54 4e 12 00 push $0x124e54 1088c1: 57 push %edi 1088c2: ff 55 0c call *0xc(%ebp) #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 1088c5: 8b 55 a0 mov -0x60(%ebp),%edx 1088c8: 8b 8a 84 00 00 00 mov 0x84(%edx),%ecx 1088ce: 8b 9a 88 00 00 00 mov 0x88(%edx),%ebx 1088d4: 89 4d c8 mov %ecx,-0x38(%ebp) 1088d7: 89 5d cc mov %ebx,-0x34(%ebp) if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1088da: 83 c4 20 add $0x20,%esp 1088dd: a1 78 cd 12 00 mov 0x12cd78,%eax 1088e2: 8b 40 08 mov 0x8(%eax),%eax 1088e5: 3b 42 08 cmp 0x8(%edx),%eax 1088e8: 0f 85 5e ff ff ff jne 10884c Timestamp_Control used; _Timestamp_Subtract( 1088ee: 52 push %edx 1088ef: 8d 5d c0 lea -0x40(%ebp),%ebx 1088f2: 53 push %ebx 1088f3: 8d 45 d8 lea -0x28(%ebp),%eax 1088f6: 50 push %eax 1088f7: 68 80 cd 12 00 push $0x12cd80 1088fc: e8 b3 79 00 00 call 1102b4 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 108901: 59 pop %ecx 108902: 58 pop %eax 108903: 53 push %ebx 108904: 8d 4d c8 lea -0x38(%ebp),%ecx 108907: 51 push %ecx 108908: e8 97 78 00 00 call 1101a4 <_Timespec_Add_to> 10890d: 83 c4 10 add $0x10,%esp 108910: e9 37 ff ff ff jmp 10884c 108915: 8d 76 00 lea 0x0(%esi),%esi "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 108918: ff 45 a4 incl -0x5c(%ebp) " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 10891b: 83 7d a4 05 cmpl $0x5,-0x5c(%ebp) 10891f: 0f 85 f4 fe ff ff jne 108819 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 108925: ba d3 4d 62 10 mov $0x10624dd3,%edx 10892a: 8b 45 d4 mov -0x2c(%ebp),%eax 10892d: f7 e2 mul %edx 10892f: c1 ea 06 shr $0x6,%edx 108932: 52 push %edx 108933: ff 75 d0 pushl -0x30(%ebp) 108936: 68 68 4d 12 00 push $0x124d68 10893b: 57 push %edi 10893c: ff 55 0c call *0xc(%ebp) 10893f: 83 c4 10 add $0x10,%esp "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 108942: 8d 65 f4 lea -0xc(%ebp),%esp 108945: 5b pop %ebx 108946: 5e pop %esi 108947: 5f pop %edi 108948: c9 leave 108949: c3 ret =============================================================================== 00114f5c : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { 114f5c: 55 push %ebp <== NOT EXECUTED 114f5d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 114f5f: 53 push %ebx <== NOT EXECUTED 114f60: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 114f63: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 114f66: 68 a0 34 12 00 push $0x1234a0 <== NOT EXECUTED 114f6b: e8 1c 00 00 00 call 114f8c <== NOT EXECUTED 114f70: 89 c3 mov %eax,%ebx <== NOT EXECUTED 114f72: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 114f75: 85 c0 test %eax,%eax <== NOT EXECUTED 114f77: 74 07 je 114f80 <== NOT EXECUTED { errno = rc; 114f79: e8 ea 00 00 00 call 115068 <__errno> <== NOT EXECUTED 114f7e: 89 18 mov %ebx,(%eax) <== NOT EXECUTED return -1; } return -1; } 114f80: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 114f85: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 114f88: c9 leave <== NOT EXECUTED 114f89: c3 ret <== NOT EXECUTED =============================================================================== 0010cde4 : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 10cde4: 55 push %ebp <== NOT EXECUTED 10cde5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cde7: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED * printf(3) format string, with its concommitant arguments. * * Returns the number of characters written. */ int rtems_error( 10cdea: 8d 4d 10 lea 0x10(%ebp),%ecx <== NOT EXECUTED { va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 10cded: 8b 55 0c mov 0xc(%ebp),%edx <== NOT EXECUTED 10cdf0: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 10cdf3: e8 34 fe ff ff call 10cc2c <== NOT EXECUTED va_end(arglist); return chars_written; } 10cdf8: c9 leave <== NOT EXECUTED 10cdf9: c3 ret <== NOT EXECUTED =============================================================================== 0010b798 : rtems_status_code rtems_event_send( rtems_id id, rtems_event_set event_in ) { 10b798: 55 push %ebp 10b799: 89 e5 mov %esp,%ebp 10b79b: 53 push %ebx 10b79c: 83 ec 1c sub $0x1c,%esp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); 10b79f: 8d 45 f4 lea -0xc(%ebp),%eax 10b7a2: 50 push %eax 10b7a3: ff 75 08 pushl 0x8(%ebp) 10b7a6: e8 e5 24 00 00 call 10dc90 <_Thread_Get> switch ( location ) { 10b7ab: 83 c4 10 add $0x10,%esp 10b7ae: 8b 55 f4 mov -0xc(%ebp),%edx 10b7b1: 85 d2 test %edx,%edx 10b7b3: 75 2b jne 10b7e0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 10b7b5: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 10b7bb: 9c pushf 10b7bc: fa cli 10b7bd: 59 pop %ecx *the_event_set |= the_new_events; 10b7be: 8b 5d 0c mov 0xc(%ebp),%ebx 10b7c1: 09 1a or %ebx,(%edx) _ISR_Enable( level ); 10b7c3: 51 push %ecx 10b7c4: 9d popf _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 10b7c5: 83 ec 0c sub $0xc,%esp 10b7c8: 50 push %eax 10b7c9: e8 1e 00 00 00 call 10b7ec <_Event_Surrender> _Thread_Enable_dispatch(); 10b7ce: e8 99 24 00 00 call 10dc6c <_Thread_Enable_dispatch> 10b7d3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10b7d5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7d8: 8b 5d fc mov -0x4(%ebp),%ebx 10b7db: c9 leave 10b7dc: c3 ret 10b7dd: 8d 76 00 lea 0x0(%esi),%esi register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10b7e0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b7e5: 8b 5d fc mov -0x4(%ebp),%ebx 10b7e8: c9 leave 10b7e9: c3 ret =============================================================================== 0010d73c : rtems_status_code rtems_extension_create( rtems_name name, const rtems_extensions_table *extension_table, rtems_id *id ) { 10d73c: 55 push %ebp 10d73d: 89 e5 mov %esp,%ebp 10d73f: 57 push %edi 10d740: 56 push %esi 10d741: 53 push %ebx 10d742: 83 ec 1c sub $0x1c,%esp 10d745: 8b 75 0c mov 0xc(%ebp),%esi 10d748: 8b 5d 10 mov 0x10(%ebp),%ebx Extension_Control *the_extension; if ( !id ) 10d74b: 85 db test %ebx,%ebx 10d74d: 0f 84 85 00 00 00 je 10d7d8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10d753: 8b 45 08 mov 0x8(%ebp),%eax 10d756: 85 c0 test %eax,%eax 10d758: 75 0e jne 10d768 10d75a: b8 03 00 00 00 mov $0x3,%eax ); *id = the_extension->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d75f: 8d 65 f4 lea -0xc(%ebp),%esp 10d762: 5b pop %ebx 10d763: 5e pop %esi 10d764: 5f pop %edi 10d765: c9 leave 10d766: c3 ret 10d767: 90 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d768: a1 b8 cc 12 00 mov 0x12ccb8,%eax 10d76d: 40 inc %eax 10d76e: a3 b8 cc 12 00 mov %eax,0x12ccb8 #ifndef __EXTENSION_MANAGER_inl #define __EXTENSION_MANAGER_inl RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 10d773: 83 ec 0c sub $0xc,%esp 10d776: 68 40 cf 12 00 push $0x12cf40 10d77b: e8 18 0e 00 00 call 10e598 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 10d780: 83 c4 10 add $0x10,%esp 10d783: 85 c0 test %eax,%eax 10d785: 74 45 je 10d7cc <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 10d787: 8d 78 24 lea 0x24(%eax),%edi 10d78a: b9 08 00 00 00 mov $0x8,%ecx 10d78f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _User_extensions_Add_set( extension ); 10d791: 83 ec 0c sub $0xc,%esp 10d794: 8d 50 10 lea 0x10(%eax),%edx 10d797: 52 push %edx 10d798: 89 45 e4 mov %eax,-0x1c(%ebp) 10d79b: e8 50 2b 00 00 call 1102f0 <_User_extensions_Add_set> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10d7a0: 8b 45 e4 mov -0x1c(%ebp),%eax 10d7a3: 8b 50 08 mov 0x8(%eax),%edx 10d7a6: 0f b7 f2 movzwl %dx,%esi 10d7a9: 8b 0d 5c cf 12 00 mov 0x12cf5c,%ecx 10d7af: 89 04 b1 mov %eax,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10d7b2: 8b 4d 08 mov 0x8(%ebp),%ecx 10d7b5: 89 48 0c mov %ecx,0xc(%eax) &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 10d7b8: 89 13 mov %edx,(%ebx) _Thread_Enable_dispatch(); 10d7ba: e8 e1 1b 00 00 call 10f3a0 <_Thread_Enable_dispatch> 10d7bf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d7c1: 83 c4 10 add $0x10,%esp } 10d7c4: 8d 65 f4 lea -0xc(%ebp),%esp 10d7c7: 5b pop %ebx 10d7c8: 5e pop %esi 10d7c9: 5f pop %edi 10d7ca: c9 leave 10d7cb: c3 ret _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { _Thread_Enable_dispatch(); 10d7cc: e8 cf 1b 00 00 call 10f3a0 <_Thread_Enable_dispatch> 10d7d1: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10d7d6: eb 87 jmp 10d75f rtems_id *id ) { Extension_Control *the_extension; if ( !id ) 10d7d8: b8 09 00 00 00 mov $0x9,%eax 10d7dd: eb 80 jmp 10d75f =============================================================================== 0010d5c0 : #include rtems_status_code rtems_extension_delete( rtems_id id ) { 10d5c0: 55 push %ebp 10d5c1: 89 e5 mov %esp,%ebp 10d5c3: 53 push %ebx 10d5c4: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 10d5c7: 8d 45 f4 lea -0xc(%ebp),%eax 10d5ca: 50 push %eax 10d5cb: ff 75 08 pushl 0x8(%ebp) 10d5ce: 68 e0 ba 12 00 push $0x12bae0 10d5d3: e8 f8 11 00 00 call 10e7d0 <_Objects_Get> 10d5d8: 89 c3 mov %eax,%ebx Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10d5da: 83 c4 10 add $0x10,%esp 10d5dd: 8b 55 f4 mov -0xc(%ebp),%edx 10d5e0: 85 d2 test %edx,%edx 10d5e2: 75 38 jne 10d61c case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 10d5e4: 83 ec 0c sub $0xc,%esp 10d5e7: 8d 40 10 lea 0x10(%eax),%eax 10d5ea: 50 push %eax 10d5eb: e8 d0 29 00 00 call 10ffc0 <_User_extensions_Remove_set> _Objects_Close( &_Extension_Information, &the_extension->Object ); 10d5f0: 59 pop %ecx 10d5f1: 58 pop %eax 10d5f2: 53 push %ebx 10d5f3: 68 e0 ba 12 00 push $0x12bae0 10d5f8: e8 9f 0d 00 00 call 10e39c <_Objects_Close> RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 10d5fd: 58 pop %eax 10d5fe: 5a pop %edx 10d5ff: 53 push %ebx 10d600: 68 e0 ba 12 00 push $0x12bae0 10d605: e8 96 10 00 00 call 10e6a0 <_Objects_Free> _Extension_Free( the_extension ); _Thread_Enable_dispatch(); 10d60a: e8 35 1a 00 00 call 10f044 <_Thread_Enable_dispatch> 10d60f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d611: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d614: 8b 5d fc mov -0x4(%ebp),%ebx 10d617: c9 leave 10d618: c3 ret 10d619: 8d 76 00 lea 0x0(%esi),%esi { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 10d61c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d621: 8b 5d fc mov -0x4(%ebp),%ebx 10d624: c9 leave 10d625: c3 ret =============================================================================== 001083f8 : } int rtems_filesystem_dirname( const char *pathname ) { 1083f8: 55 push %ebp 1083f9: 89 e5 mov %esp,%ebp 1083fb: 57 push %edi 1083fc: 56 push %esi 1083fd: 53 push %ebx 1083fe: 83 ec 0c sub $0xc,%esp 108401: 8b 55 08 mov 0x8(%ebp),%edx int len = strlen( pathname ); 108404: 31 c0 xor %eax,%eax 108406: b9 ff ff ff ff mov $0xffffffff,%ecx 10840b: 89 d7 mov %edx,%edi 10840d: f2 ae repnz scas %es:(%edi),%al 10840f: f7 d1 not %ecx while ( len ) { 108411: 89 cb mov %ecx,%ebx 108413: 4b dec %ebx 108414: 74 20 je 108436 <== NEVER TAKEN 108416: 8d 34 1a lea (%edx,%ebx,1),%esi 108419: eb 06 jmp 108421 10841b: 90 nop len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 10841c: 4e dec %esi const char *pathname ) { int len = strlen( pathname ); while ( len ) { 10841d: 85 db test %ebx,%ebx 10841f: 74 15 je 108436 len--; 108421: 4b dec %ebx if ( rtems_filesystem_is_separator( pathname[len] ) ) 108422: 83 ec 0c sub $0xc,%esp 108425: 0f be 46 ff movsbl -0x1(%esi),%eax 108429: 50 push %eax 10842a: e8 05 10 00 00 call 109434 10842f: 83 c4 10 add $0x10,%esp 108432: 85 c0 test %eax,%eax 108434: 74 e6 je 10841c break; } return len; } 108436: 89 d8 mov %ebx,%eax 108438: 8d 65 f4 lea -0xc(%ebp),%esp 10843b: 5b pop %ebx 10843c: 5e pop %esi 10843d: 5f pop %edi 10843e: c9 leave 10843f: c3 ret =============================================================================== 00108514 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 108514: 55 push %ebp 108515: 89 e5 mov %esp,%ebp 108517: 56 push %esi 108518: 53 push %ebx 108519: 83 ec 10 sub $0x10,%esp 10851c: 8b 5d 08 mov 0x8(%ebp),%ebx 10851f: 8b 75 14 mov 0x14(%ebp),%esi int i = 0; 108522: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 108529: 85 db test %ebx,%ebx 10852b: 74 45 je 108572 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 10852d: 85 f6 test %esi,%esi 10852f: 74 2f je 108560 <== NEVER TAKEN /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 108531: 51 push %ecx 108532: 56 push %esi 108533: 8d 45 f4 lea -0xc(%ebp),%eax 108536: 50 push %eax 108537: 53 push %ebx 108538: e8 93 0e 00 00 call 1093d0 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 10853d: 8b 45 f4 mov -0xc(%ebp),%eax 108540: 5a pop %edx 108541: ff 75 18 pushl 0x18(%ebp) 108544: 56 push %esi 108545: ff 75 10 pushl 0x10(%ebp) 108548: 8b 55 0c mov 0xc(%ebp),%edx 10854b: 29 c2 sub %eax,%edx 10854d: 52 push %edx 10854e: 01 c3 add %eax,%ebx 108550: 53 push %ebx 108551: e8 ea fe ff ff call 108440 108556: 83 c4 20 add $0x20,%esp pathnamelen - i, flags, pathloc, follow_link ); } 108559: 8d 65 f8 lea -0x8(%ebp),%esp 10855c: 5b pop %ebx 10855d: 5e pop %esi 10855e: c9 leave 10855f: c3 ret if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 108560: e8 03 cb 00 00 call 115068 <__errno> <== NOT EXECUTED 108565: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10856b: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108570: eb e7 jmp 108559 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 108572: e8 f1 ca 00 00 call 115068 <__errno> <== NOT EXECUTED 108577: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 10857d: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 108582: eb d5 jmp 108559 <== NOT EXECUTED =============================================================================== 00108440 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 108440: 55 push %ebp 108441: 89 e5 mov %esp,%ebp 108443: 57 push %edi 108444: 56 push %esi 108445: 53 push %ebx 108446: 83 ec 1c sub $0x1c,%esp 108449: 8b 45 08 mov 0x8(%ebp),%eax 10844c: 8b 4d 0c mov 0xc(%ebp),%ecx 10844f: 8b 7d 10 mov 0x10(%ebp),%edi 108452: 8b 5d 14 mov 0x14(%ebp),%ebx 108455: 8b 55 18 mov 0x18(%ebp),%edx 108458: 89 55 e4 mov %edx,-0x1c(%ebp) /* * Verify Input parameters. */ if ( !pathname ) 10845b: 85 c0 test %eax,%eax 10845d: 0f 84 8c 00 00 00 je 1084ef <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 108463: 85 db test %ebx,%ebx 108465: 0f 84 96 00 00 00 je 108501 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 10846b: 8b 53 0c mov 0xc(%ebx),%edx 10846e: 8b 12 mov (%edx),%edx 108470: 85 d2 test %edx,%edx 108472: 74 69 je 1084dd <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 108474: 53 push %ebx 108475: 57 push %edi 108476: 51 push %ecx 108477: 50 push %eax 108478: ff d2 call *%edx 10847a: 89 c6 mov %eax,%esi /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 10847c: 83 c4 10 add $0x10,%esp 10847f: 85 c0 test %eax,%eax 108481: 75 25 jne 1084a8 108483: 8b 45 e4 mov -0x1c(%ebp),%eax 108486: 85 c0 test %eax,%eax 108488: 74 1e je 1084a8 if ( !pathloc->ops->node_type_h ){ 10848a: 8b 53 0c mov 0xc(%ebx),%edx 10848d: 8b 42 10 mov 0x10(%edx),%eax 108490: 85 c0 test %eax,%eax 108492: 74 39 je 1084cd <== NEVER TAKEN rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 108494: 83 ec 0c sub $0xc,%esp 108497: 53 push %ebx 108498: ff d0 call *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 10849a: 83 e8 03 sub $0x3,%eax 10849d: 83 c4 10 add $0x10,%esp 1084a0: 83 f8 01 cmp $0x1,%eax 1084a3: 76 0f jbe 1084b4 1084a5: 8d 76 00 lea 0x0(%esi),%esi result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 1084a8: 89 f0 mov %esi,%eax 1084aa: 8d 65 f4 lea -0xc(%ebp),%esp 1084ad: 5b pop %ebx 1084ae: 5e pop %esi 1084af: 5f pop %edi 1084b0: c9 leave 1084b1: c3 ret 1084b2: 66 90 xchg %ax,%ax type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1084b4: 8b 53 0c mov 0xc(%ebx),%edx 1084b7: 8b 42 34 mov 0x34(%edx),%eax 1084ba: 85 c0 test %eax,%eax 1084bc: 74 0f je 1084cd <== NEVER TAKEN * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 1084be: 89 7d 0c mov %edi,0xc(%ebp) 1084c1: 89 5d 08 mov %ebx,0x8(%ebp) } } return result; } 1084c4: 8d 65 f4 lea -0xc(%ebp),%esp 1084c7: 5b pop %ebx 1084c8: 5e pop %esi 1084c9: 5f pop %edi 1084ca: c9 leave * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 1084cb: ff e0 jmp *%eax if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 1084cd: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1084d0: 85 c0 test %eax,%eax <== NOT EXECUTED 1084d2: 74 09 je 1084dd <== NOT EXECUTED 1084d4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1084d7: 53 push %ebx <== NOT EXECUTED 1084d8: ff d0 call *%eax <== NOT EXECUTED 1084da: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1084dd: e8 86 cb 00 00 call 115068 <__errno> <== NOT EXECUTED 1084e2: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1084e8: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1084ed: eb b9 jmp 1084a8 <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 1084ef: e8 74 cb 00 00 call 115068 <__errno> <== NOT EXECUTED 1084f4: c7 00 0e 00 00 00 movl $0xe,(%eax) <== NOT EXECUTED 1084fa: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 1084ff: eb a7 jmp 1084a8 <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 108501: e8 62 cb 00 00 call 115068 <__errno> <== NOT EXECUTED 108506: c7 00 05 00 00 00 movl $0x5,(%eax) <== NOT EXECUTED 10850c: be ff ff ff ff mov $0xffffffff,%esi <== NOT EXECUTED 108511: eb 95 jmp 1084a8 <== NOT EXECUTED =============================================================================== 001110a0 : rtems_filesystem_fsmount_me_t rtems_filesystem_get_mount_handler( const char *type ) { 1110a0: 55 push %ebp 1110a1: 89 e5 mov %esp,%ebp 1110a3: 83 ec 18 sub $0x18,%esp 1110a6: 8b 45 08 mov 0x8(%ebp),%eax find_arg fa = { .type = type, .mount_h = NULL }; 1110a9: 89 45 f0 mov %eax,-0x10(%ebp) 1110ac: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp) if ( type != NULL ) { 1110b3: 85 c0 test %eax,%eax 1110b5: 74 17 je 1110ce <== NEVER TAKEN rtems_filesystem_iterate( find_handler, &fa ); 1110b7: 83 ec 08 sub $0x8,%esp 1110ba: 8d 45 f0 lea -0x10(%ebp),%eax 1110bd: 50 push %eax 1110be: 68 0c 0f 11 00 push $0x110f0c 1110c3: e8 34 ff ff ff call 110ffc 1110c8: 8b 45 f4 mov -0xc(%ebp),%eax 1110cb: 83 c4 10 add $0x10,%esp } return fa.mount_h; } 1110ce: c9 leave 1110cf: c3 ret =============================================================================== 001111a4 : #include "rtems/libio_.h" void rtems_filesystem_get_sym_start_loc(const char *path, int *index, rtems_filesystem_location_info_t *loc) { 1111a4: 55 push %ebp 1111a5: 89 e5 mov %esp,%ebp 1111a7: 57 push %edi 1111a8: 56 push %esi 1111a9: 53 push %ebx 1111aa: 83 ec 18 sub $0x18,%esp 1111ad: 8b 5d 0c mov 0xc(%ebp),%ebx if (rtems_filesystem_is_separator(path[0])) { 1111b0: 8b 45 08 mov 0x8(%ebp),%eax 1111b3: 0f be 00 movsbl (%eax),%eax 1111b6: 50 push %eax 1111b7: e8 78 82 ff ff call 109434 1111bc: 83 c4 10 add $0x10,%esp 1111bf: 85 c0 test %eax,%eax 1111c1: 75 11 jne 1111d4 *loc = rtems_filesystem_root; *index = 1; } else { *index = 0; 1111c3: c7 03 00 00 00 00 movl $0x0,(%ebx) } } 1111c9: 8d 65 f4 lea -0xc(%ebp),%esp 1111cc: 5b pop %ebx 1111cd: 5e pop %esi 1111ce: 5f pop %edi 1111cf: c9 leave 1111d0: c3 ret 1111d1: 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; 1111d4: 8b 35 e4 70 12 00 mov 0x1270e4,%esi 1111da: 83 c6 18 add $0x18,%esi 1111dd: b9 05 00 00 00 mov $0x5,%ecx 1111e2: 8b 7d 10 mov 0x10(%ebp),%edi 1111e5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) *index = 1; 1111e7: c7 03 01 00 00 00 movl $0x1,(%ebx) } else { *index = 0; } } 1111ed: 8d 65 f4 lea -0xc(%ebp),%esp 1111f0: 5b pop %ebx 1111f1: 5e pop %esi 1111f2: 5f pop %edi 1111f3: c9 leave 1111f4: c3 ret =============================================================================== 00108284 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 108284: 55 push %ebp 108285: 89 e5 mov %esp,%ebp 108287: 57 push %edi 108288: 56 push %esi 108289: 53 push %ebx 10828a: 83 ec 2c sub $0x2c,%esp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 10828d: a1 e4 70 12 00 mov 0x1270e4,%eax 108292: c7 40 2c 12 00 00 00 movl $0x12,0x2c(%eax) /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 108299: a1 80 0f 12 00 mov 0x120f80,%eax 10829e: 85 c0 test %eax,%eax 1082a0: 0f 84 9f 00 00 00 je 108345 <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1082a6: a1 14 52 12 00 mov 0x125214,%eax status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1082ab: 83 ec 0c sub $0xc,%esp 1082ae: 6a 00 push $0x0 1082b0: ff 70 04 pushl 0x4(%eax) 1082b3: ff 30 pushl (%eax) 1082b5: ff 70 0c pushl 0xc(%eax) 1082b8: ff 70 08 pushl 0x8(%eax) 1082bb: e8 d4 07 00 00 call 108a94 if ( status == -1 ) 1082c0: 83 c4 20 add $0x20,%esp 1082c3: 40 inc %eax 1082c4: 0f 84 95 00 00 00 je 10835f <== NEVER TAKEN rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1082ca: a1 e4 70 12 00 mov 0x1270e4,%eax 1082cf: 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); 1082d5: 83 ec 0c sub $0xc,%esp 1082d8: 6a 00 push $0x0 1082da: 8d 5d d4 lea -0x2c(%ebp),%ebx 1082dd: 53 push %ebx 1082de: 6a 00 push $0x0 1082e0: 6a 01 push $0x1 1082e2: 68 07 29 12 00 push $0x122907 1082e7: e8 28 02 00 00 call 108514 rtems_filesystem_root = loc; 1082ec: 8b 3d e4 70 12 00 mov 0x1270e4,%edi 1082f2: 83 c7 18 add $0x18,%edi 1082f5: b9 05 00 00 00 mov $0x5,%ecx 1082fa: 89 de mov %ebx,%esi 1082fc: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1082fe: 83 c4 14 add $0x14,%esp 108301: 6a 00 push $0x0 108303: 53 push %ebx 108304: 6a 00 push $0x0 108306: 6a 01 push $0x1 108308: 68 07 29 12 00 push $0x122907 10830d: e8 02 02 00 00 call 108514 rtems_filesystem_current = loc; 108312: 8b 3d e4 70 12 00 mov 0x1270e4,%edi 108318: 83 c7 04 add $0x4,%edi 10831b: b9 05 00 00 00 mov $0x5,%ecx 108320: 89 de mov %ebx,%esi 108322: 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); 108324: 83 c4 18 add $0x18,%esp 108327: 68 ff 01 00 00 push $0x1ff 10832c: 68 09 29 12 00 push $0x122909 108331: e8 e6 05 00 00 call 10891c if ( status != 0 ) 108336: 83 c4 10 add $0x10,%esp 108339: 85 c0 test %eax,%eax 10833b: 75 15 jne 108352 <== 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. */ } 10833d: 8d 65 f4 lea -0xc(%ebp),%esp 108340: 5b pop %ebx 108341: 5e pop %esi 108342: 5f pop %edi 108343: c9 leave 108344: c3 ret /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 108345: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108348: 68 01 00 cd ab push $0xabcd0001 <== NOT EXECUTED 10834d: e8 92 3f 00 00 call 10c2e4 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 108352: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108355: 68 03 00 cd ab push $0xabcd0003 <== NOT EXECUTED 10835a: e8 85 3f 00 00 call 10c2e4 <== 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 ); 10835f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108362: 68 02 00 cd ab push $0xabcd0002 <== NOT EXECUTED 108367: e8 78 3f 00 00 call 10c2e4 <== NOT EXECUTED =============================================================================== 00110ffc : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 110ffc: 55 push %ebp 110ffd: 89 e5 mov %esp,%ebp 110fff: 57 push %edi 111000: 56 push %esi 111001: 53 push %ebx 111002: 83 ec 1c sub $0x1c,%esp 111005: 8b 75 08 mov 0x8(%ebp),%esi 111008: 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 ) { 11100b: 8b 15 60 0f 12 00 mov 0x120f60,%edx 111011: 85 d2 test %edx,%edx 111013: 74 24 je 111039 <== NEVER TAKEN 111015: bb 60 0f 12 00 mov $0x120f60,%ebx 11101a: eb 04 jmp 111020 11101c: 84 d2 test %dl,%dl <== NOT EXECUTED 11101e: 75 70 jne 111090 <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); 111020: 83 ec 08 sub $0x8,%esp 111023: 57 push %edi 111024: 53 push %ebx 111025: ff d6 call *%esi 111027: 88 c2 mov %al,%dl ++table_entry; 111029: 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 ) { 11102c: 83 c4 10 add $0x10,%esp 11102f: 8b 03 mov (%ebx),%eax 111031: 85 c0 test %eax,%eax 111033: 75 e7 jne 11101c <== NEVER TAKEN stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 111035: 84 d2 test %dl,%dl 111037: 75 57 jne 111090 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 ); 111039: 51 push %ecx 11103a: 6a 00 push $0x0 11103c: 6a 00 push $0x0 11103e: ff 35 48 93 12 00 pushl 0x129348 111044: e8 5f ac ff ff call 10bca8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 111049: 8b 1d 0c 71 12 00 mov 0x12710c,%ebx rtems_libio_lock(); for ( 11104f: 83 c4 10 add $0x10,%esp 111052: 81 fb 10 71 12 00 cmp $0x127110,%ebx 111058: 75 06 jne 111060 11105a: eb 3e jmp 11109a 11105c: 84 c0 test %al,%al 11105e: 75 19 jne 111079 !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 111060: 83 ec 08 sub $0x8,%esp 111063: 57 push %edi 111064: 8d 43 08 lea 0x8(%ebx),%eax 111067: 50 push %eax 111068: ff d6 call *%esi 11106a: 88 c2 mov %al,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 11106c: 8b 1b mov (%ebx),%ebx ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 11106e: 83 c4 10 add $0x10,%esp 111071: 81 fb 10 71 12 00 cmp $0x127110,%ebx 111077: 75 e3 jne 11105c } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 111079: 83 ec 0c sub $0xc,%esp 11107c: ff 35 48 93 12 00 pushl 0x129348 111082: 88 55 e4 mov %dl,-0x1c(%ebp) 111085: e8 1a ad ff ff call 10bda4 11108a: 83 c4 10 add $0x10,%esp 11108d: 8a 55 e4 mov -0x1c(%ebp),%dl } rtems_libio_unlock(); } return stop; } 111090: 88 d0 mov %dl,%al 111092: 8d 65 f4 lea -0xc(%ebp),%esp 111095: 5b pop %ebx 111096: 5e pop %esi 111097: 5f pop %edi 111098: c9 leave 111099: c3 ret ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 11109a: 31 d2 xor %edx,%edx 11109c: eb db jmp 111079 =============================================================================== 00108a24 : bool rtems_filesystem_mount_iterate( rtems_per_filesystem_mount_routine routine, void *routine_arg ) { 108a24: 55 push %ebp 108a25: 89 e5 mov %esp,%ebp 108a27: 57 push %edi 108a28: 56 push %esi 108a29: 53 push %ebx 108a2a: 83 ec 20 sub $0x20,%esp 108a2d: 8b 7d 08 mov 0x8(%ebp),%edi 108a30: 8b 75 0c mov 0xc(%ebp),%esi rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 108a33: 6a 00 push $0x0 108a35: 6a 00 push $0x0 108a37: ff 35 48 93 12 00 pushl 0x129348 108a3d: e8 66 32 00 00 call 10bca8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 108a42: 8b 1d c4 70 12 00 mov 0x1270c4,%ebx rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108a48: 83 c4 10 add $0x10,%esp 108a4b: 81 fb c8 70 12 00 cmp $0x1270c8,%ebx 108a51: 75 09 jne 108a5c <== ALWAYS TAKEN 108a53: eb 3b jmp 108a90 <== NOT EXECUTED 108a55: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED 108a58: 84 c0 test %al,%al 108a5a: 75 16 jne 108a72 <== 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 ); 108a5c: 83 ec 08 sub $0x8,%esp 108a5f: 56 push %esi 108a60: 53 push %ebx 108a61: ff d7 call *%edi 108a63: 88 c2 mov %al,%dl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 108a65: 8b 1b mov (%ebx),%ebx { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108a67: 83 c4 10 add $0x10,%esp 108a6a: 81 fb c8 70 12 00 cmp $0x1270c8,%ebx 108a70: 75 e6 jne 108a58 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 108a72: 83 ec 0c sub $0xc,%esp 108a75: ff 35 48 93 12 00 pushl 0x129348 108a7b: 88 55 e4 mov %dl,-0x1c(%ebp) 108a7e: e8 21 33 00 00 call 10bda4 stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 108a83: 8a 55 e4 mov -0x1c(%ebp),%dl 108a86: 88 d0 mov %dl,%al 108a88: 8d 65 f4 lea -0xc(%ebp),%esp 108a8b: 5b pop %ebx 108a8c: 5e pop %esi 108a8d: 5f pop %edi 108a8e: c9 leave 108a8f: c3 ret { rtems_chain_node *node = NULL; bool stop = false; rtems_libio_lock(); for ( 108a90: 31 d2 xor %edx,%edx <== NOT EXECUTED 108a92: eb de jmp 108a72 <== NOT EXECUTED =============================================================================== 001083a8 : int rtems_filesystem_prefix_separators( const char *pathname, int pathnamelen ) { 1083a8: 55 push %ebp 1083a9: 89 e5 mov %esp,%ebp 1083ab: 57 push %edi 1083ac: 56 push %esi 1083ad: 53 push %ebx 1083ae: 83 ec 0c sub $0xc,%esp 1083b1: 8b 75 08 mov 0x8(%ebp),%esi 1083b4: 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 ) ) 1083b7: 8a 06 mov (%esi),%al 1083b9: 84 c0 test %al,%al 1083bb: 74 34 je 1083f1 <== NEVER TAKEN 1083bd: 85 ff test %edi,%edi 1083bf: 74 30 je 1083f1 <== NEVER TAKEN 1083c1: 31 db xor %ebx,%ebx 1083c3: eb 0f jmp 1083d4 1083c5: 8d 76 00 lea 0x0(%esi),%esi { pathname++; pathnamelen--; stripped++; 1083c8: 43 inc %ebx { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 1083c9: 8a 04 1e mov (%esi,%ebx,1),%al 1083cc: 84 c0 test %al,%al 1083ce: 74 17 je 1083e7 <== NEVER TAKEN 1083d0: 39 df cmp %ebx,%edi 1083d2: 74 13 je 1083e7 <== NEVER TAKEN 1083d4: 83 ec 0c sub $0xc,%esp 1083d7: 0f be c0 movsbl %al,%eax 1083da: 50 push %eax 1083db: e8 54 10 00 00 call 109434 1083e0: 83 c4 10 add $0x10,%esp 1083e3: 85 c0 test %eax,%eax 1083e5: 75 e1 jne 1083c8 pathname++; pathnamelen--; stripped++; } return stripped; } 1083e7: 89 d8 mov %ebx,%eax 1083e9: 8d 65 f4 lea -0xc(%ebp),%esp 1083ec: 5b pop %ebx 1083ed: 5e pop %esi 1083ee: 5f pop %edi 1083ef: c9 leave 1083f0: c3 ret { /* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) ) 1083f1: 31 db xor %ebx,%ebx 1083f3: eb f2 jmp 1083e7 <== NOT EXECUTED =============================================================================== 001110d0 : int rtems_filesystem_register( const char *type, rtems_filesystem_fsmount_me_t mount_h ) { 1110d0: 55 push %ebp 1110d1: 89 e5 mov %esp,%ebp 1110d3: 57 push %edi 1110d4: 56 push %esi 1110d5: 53 push %ebx 1110d6: 83 ec 18 sub $0x18,%esp 1110d9: 8b 5d 08 mov 0x8(%ebp),%ebx size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; 1110dc: 31 c0 xor %eax,%eax 1110de: b9 ff ff ff ff mov $0xffffffff,%ecx 1110e3: 89 df mov %ebx,%edi 1110e5: f2 ae repnz scas %es:(%edi),%al 1110e7: f7 d1 not %ecx filesystem_node *fsn = malloc( fsn_size ); 1110e9: 83 c1 10 add $0x10,%ecx 1110ec: 51 push %ecx 1110ed: e8 6a 77 ff ff call 10885c 1110f2: 89 c6 mov %eax,%esi char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) 1110f4: 83 c4 10 add $0x10,%esp 1110f7: 85 c0 test %eax,%eax 1110f9: 0f 84 92 00 00 00 je 111191 <== NEVER TAKEN rtems_filesystem_fsmount_me_t mount_h ) { size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); 1110ff: 8d 78 10 lea 0x10(%eax),%edi if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); strcpy(type_storage, type); 111102: 83 ec 08 sub $0x8,%esp 111105: 53 push %ebx 111106: 57 push %edi 111107: e8 7c 4a 00 00 call 115b88 fsn->entry.type = type_storage; 11110c: 89 7e 08 mov %edi,0x8(%esi) fsn->entry.mount_h = mount_h; 11110f: 8b 45 0c mov 0xc(%ebp),%eax 111112: 89 46 0c mov %eax,0xc(%esi) rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 111115: 83 c4 0c add $0xc,%esp 111118: 6a 00 push $0x0 11111a: 6a 00 push $0x0 11111c: ff 35 48 93 12 00 pushl 0x129348 111122: e8 81 ab ff ff call 10bca8 rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { 111127: 89 1c 24 mov %ebx,(%esp) 11112a: e8 71 ff ff ff call 1110a0 11112f: 83 c4 10 add $0x10,%esp 111132: 85 c0 test %eax,%eax 111134: 75 2a jne 111160 <== NEVER TAKEN RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 111136: 83 ec 08 sub $0x8,%esp 111139: 56 push %esi 11113a: 68 0c 71 12 00 push $0x12710c 11113f: e8 7c b4 ff ff call 10c5c0 <_Chain_Append> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 111144: 59 pop %ecx 111145: ff 35 48 93 12 00 pushl 0x129348 11114b: e8 54 ac ff ff call 10bda4 111150: 31 c0 xor %eax,%eax rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_unlock(); return 0; 111152: 83 c4 10 add $0x10,%esp } 111155: 8d 65 f4 lea -0xc(%ebp),%esp 111158: 5b pop %ebx 111159: 5e pop %esi 11115a: 5f pop %edi 11115b: c9 leave 11115c: c3 ret 11115d: 8d 76 00 lea 0x0(%esi),%esi 111160: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 111163: ff 35 48 93 12 00 pushl 0x129348 <== NOT EXECUTED 111169: e8 36 ac ff ff call 10bda4 <== NOT EXECUTED rtems_libio_lock(); if ( rtems_filesystem_get_mount_handler( type ) == NULL ) { rtems_chain_append( &filesystem_chain, &fsn->node ); } else { rtems_libio_unlock(); free( fsn ); 11116e: 89 34 24 mov %esi,(%esp) <== NOT EXECUTED 111171: e8 0e 74 ff ff call 108584 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 111176: e8 ed 3e 00 00 call 115068 <__errno> <== NOT EXECUTED 11117b: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 111181: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 111186: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } rtems_libio_unlock(); return 0; } 111189: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 11118c: 5b pop %ebx <== NOT EXECUTED 11118d: 5e pop %esi <== NOT EXECUTED 11118e: 5f pop %edi <== NOT EXECUTED 11118f: c9 leave <== NOT EXECUTED 111190: c3 ret <== NOT EXECUTED size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1; filesystem_node *fsn = malloc( fsn_size ); char *type_storage = (char *) fsn + sizeof( filesystem_node ); if ( fsn == NULL ) rtems_set_errno_and_return_minus_one( ENOMEM ); 111191: e8 d2 3e 00 00 call 115068 <__errno> <== NOT EXECUTED 111196: c7 00 0c 00 00 00 movl $0xc,(%eax) <== NOT EXECUTED 11119c: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 1111a1: eb b2 jmp 111155 <== NOT EXECUTED =============================================================================== 00110f48 : int rtems_filesystem_unregister( const char *type ) { 110f48: 55 push %ebp <== NOT EXECUTED 110f49: 89 e5 mov %esp,%ebp <== NOT EXECUTED 110f4b: 56 push %esi <== NOT EXECUTED 110f4c: 53 push %ebx <== NOT EXECUTED 110f4d: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED rtems_chain_node *node = NULL; if ( type == NULL ) { 110f50: 85 f6 test %esi,%esi <== NOT EXECUTED 110f52: 0f 84 94 00 00 00 je 110fec <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 110f58: 52 push %edx <== NOT EXECUTED 110f59: 6a 00 push $0x0 <== NOT EXECUTED 110f5b: 6a 00 push $0x0 <== NOT EXECUTED 110f5d: ff 35 48 93 12 00 pushl 0x129348 <== NOT EXECUTED 110f63: e8 40 ad ff ff call 10bca8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return the_chain->first; 110f68: 8b 1d 0c 71 12 00 mov 0x12710c,%ebx <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } rtems_libio_lock(); for ( 110f6e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110f71: 81 fb 10 71 12 00 cmp $0x127110,%ebx <== NOT EXECUTED 110f77: 75 0d jne 110f86 <== NOT EXECUTED 110f79: eb 49 jmp 110fc4 <== NOT EXECUTED 110f7b: 90 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; 110f7c: 8b 1b mov (%ebx),%ebx <== NOT EXECUTED 110f7e: 81 fb 10 71 12 00 cmp $0x127110,%ebx <== NOT EXECUTED 110f84: 74 3e je 110fc4 <== NOT EXECUTED !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 ) { 110f86: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 110f89: 56 push %esi <== NOT EXECUTED 110f8a: ff 73 08 pushl 0x8(%ebx) <== NOT EXECUTED 110f8d: e8 9e 4b 00 00 call 115b30 <== NOT EXECUTED 110f92: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 110f95: 85 c0 test %eax,%eax <== NOT EXECUTED 110f97: 75 e3 jne 110f7c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 110f99: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110f9c: 53 push %ebx <== NOT EXECUTED 110f9d: e8 42 b6 ff ff call 10c5e4 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( node ); free( fsn ); 110fa2: 89 1c 24 mov %ebx,(%esp) <== NOT EXECUTED 110fa5: e8 da 75 ff ff call 108584 <== NOT EXECUTED } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110faa: 58 pop %eax <== NOT EXECUTED 110fab: ff 35 48 93 12 00 pushl 0x129348 <== NOT EXECUTED 110fb1: e8 ee ad ff ff call 10bda4 <== NOT EXECUTED 110fb6: 31 c0 xor %eax,%eax <== NOT EXECUTED rtems_libio_unlock(); return 0; 110fb8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 110fbb: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 110fbe: 5b pop %ebx <== NOT EXECUTED 110fbf: 5e pop %esi <== NOT EXECUTED 110fc0: c9 leave <== NOT EXECUTED 110fc1: c3 ret <== NOT EXECUTED 110fc2: 66 90 xchg %ax,%ax <== NOT EXECUTED 110fc4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 110fc7: ff 35 48 93 12 00 pushl 0x129348 <== NOT EXECUTED 110fcd: e8 d2 ad ff ff call 10bda4 <== NOT EXECUTED return 0; } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); 110fd2: e8 91 40 00 00 call 115068 <__errno> <== NOT EXECUTED 110fd7: c7 00 02 00 00 00 movl $0x2,(%eax) <== NOT EXECUTED 110fdd: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 110fe2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 110fe5: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 110fe8: 5b pop %ebx <== NOT EXECUTED 110fe9: 5e pop %esi <== NOT EXECUTED 110fea: c9 leave <== NOT EXECUTED 110feb: c3 ret <== NOT EXECUTED ) { rtems_chain_node *node = NULL; if ( type == NULL ) { rtems_set_errno_and_return_minus_one( EINVAL ); 110fec: e8 77 40 00 00 call 115068 <__errno> <== NOT EXECUTED 110ff1: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 110ff7: 83 c8 ff or $0xffffffff,%eax <== NOT EXECUTED 110ffa: eb e9 jmp 110fe5 <== NOT EXECUTED =============================================================================== 00114c64 : rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 114c64: 55 push %ebp 114c65: 89 e5 mov %esp,%ebp 114c67: 56 push %esi 114c68: 53 push %ebx 114c69: 8b 45 08 mov 0x8(%ebp),%eax 114c6c: 8b 4d 0c mov 0xc(%ebp),%ecx 114c6f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114c72: 39 05 60 9f 12 00 cmp %eax,0x129f60 114c78: 76 22 jbe 114c9c return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; 114c7a: 8d 34 40 lea (%eax,%eax,2),%esi 114c7d: 8b 15 64 9f 12 00 mov 0x129f64,%edx 114c83: 8b 54 f2 08 mov 0x8(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 114c87: 85 d2 test %edx,%edx 114c89: 74 1d je 114ca8 114c8b: 89 5d 10 mov %ebx,0x10(%ebp) 114c8e: 89 4d 0c mov %ecx,0xc(%ebp) 114c91: 89 45 08 mov %eax,0x8(%ebp) } 114c94: 5b pop %ebx 114c95: 5e pop %esi 114c96: 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; 114c97: ff e2 jmp *%edx 114c99: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114c9c: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].close_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 114ca1: 5b pop %ebx 114ca2: 5e pop %esi 114ca3: c9 leave 114ca4: c3 ret 114ca5: 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; 114ca8: 31 c0 xor %eax,%eax } 114caa: 5b pop %ebx 114cab: 5e pop %esi 114cac: c9 leave 114cad: c3 ret =============================================================================== 00114cb0 : rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 114cb0: 55 push %ebp 114cb1: 89 e5 mov %esp,%ebp 114cb3: 56 push %esi 114cb4: 53 push %ebx 114cb5: 8b 45 08 mov 0x8(%ebp),%eax 114cb8: 8b 4d 0c mov 0xc(%ebp),%ecx 114cbb: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114cbe: 39 05 60 9f 12 00 cmp %eax,0x129f60 114cc4: 76 22 jbe 114ce8 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; 114cc6: 8d 34 40 lea (%eax,%eax,2),%esi 114cc9: 8b 15 64 9f 12 00 mov 0x129f64,%edx 114ccf: 8b 54 f2 14 mov 0x14(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 114cd3: 85 d2 test %edx,%edx 114cd5: 74 1d je 114cf4 114cd7: 89 5d 10 mov %ebx,0x10(%ebp) 114cda: 89 4d 0c mov %ecx,0xc(%ebp) 114cdd: 89 45 08 mov %eax,0x8(%ebp) } 114ce0: 5b pop %ebx 114ce1: 5e pop %esi 114ce2: 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; 114ce3: ff e2 jmp *%edx 114ce5: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114ce8: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].control_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 114ced: 5b pop %ebx 114cee: 5e pop %esi 114cef: c9 leave 114cf0: c3 ret 114cf1: 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; 114cf4: 31 c0 xor %eax,%eax } 114cf6: 5b pop %ebx 114cf7: 5e pop %esi 114cf8: c9 leave 114cf9: c3 ret =============================================================================== 00111f1c : rtems_status_code rtems_io_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 111f1c: 55 push %ebp 111f1d: 89 e5 mov %esp,%ebp 111f1f: 56 push %esi 111f20: 53 push %ebx 111f21: 8b 45 08 mov 0x8(%ebp),%eax 111f24: 8b 4d 0c mov 0xc(%ebp),%ecx 111f27: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111f2a: 39 05 60 9f 12 00 cmp %eax,0x129f60 111f30: 76 1e jbe 111f50 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; 111f32: 8d 34 40 lea (%eax,%eax,2),%esi 111f35: 8b 15 64 9f 12 00 mov 0x129f64,%edx 111f3b: 8b 14 f2 mov (%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 111f3e: 85 d2 test %edx,%edx 111f40: 74 1a je 111f5c 111f42: 89 5d 10 mov %ebx,0x10(%ebp) 111f45: 89 4d 0c mov %ecx,0xc(%ebp) 111f48: 89 45 08 mov %eax,0x8(%ebp) } 111f4b: 5b pop %ebx 111f4c: 5e pop %esi 111f4d: 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; 111f4e: ff e2 jmp *%edx void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 111f50: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].initialization_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 111f55: 5b pop %ebx 111f56: 5e pop %esi 111f57: c9 leave 111f58: c3 ret 111f59: 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; 111f5c: 31 c0 xor %eax,%eax } 111f5e: 5b pop %ebx 111f5f: 5e pop %esi 111f60: c9 leave 111f61: c3 ret =============================================================================== 00108118 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 108118: 55 push %ebp <== NOT EXECUTED 108119: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10811b: 57 push %edi <== NOT EXECUTED 10811c: 56 push %esi <== NOT EXECUTED 10811d: 53 push %ebx <== NOT EXECUTED 10811e: 83 ec 48 sub $0x48,%esp <== NOT EXECUTED 108121: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED IMFS_jnode_t *the_jnode; rtems_filesystem_location_info_t loc; int result; rtems_filesystem_node_types_t node_type; result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); 108124: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 108129: 89 f7 mov %esi,%edi <== NOT EXECUTED 10812b: 31 c0 xor %eax,%eax <== NOT EXECUTED 10812d: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 10812f: f7 d1 not %ecx <== NOT EXECUTED 108131: 49 dec %ecx <== NOT EXECUTED 108132: 6a 01 push $0x1 <== NOT EXECUTED 108134: 8d 5d d4 lea -0x2c(%ebp),%ebx <== NOT EXECUTED 108137: 53 push %ebx <== NOT EXECUTED 108138: 6a 00 push $0x0 <== NOT EXECUTED 10813a: 51 push %ecx <== NOT EXECUTED 10813b: 56 push %esi <== NOT EXECUTED 10813c: e8 d3 03 00 00 call 108514 <== NOT EXECUTED 108141: 89 c7 mov %eax,%edi <== NOT EXECUTED the_jnode = loc.node_access; 108143: 8b 55 d4 mov -0x2c(%ebp),%edx <== NOT EXECUTED if ( !loc.ops->node_type_h ) { 108146: 8b 4d e0 mov -0x20(%ebp),%ecx <== NOT EXECUTED 108149: 8b 41 10 mov 0x10(%ecx),%eax <== NOT EXECUTED 10814c: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10814f: 85 c0 test %eax,%eax <== NOT EXECUTED 108151: 74 41 je 108194 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 108153: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108156: 53 push %ebx <== NOT EXECUTED 108157: 89 55 c4 mov %edx,-0x3c(%ebp) <== NOT EXECUTED 10815a: ff d0 call *%eax <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 10815c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10815f: 85 ff test %edi,%edi <== NOT EXECUTED 108161: 8b 55 c4 mov -0x3c(%ebp),%edx <== NOT EXECUTED 108164: 74 56 je 1081bc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 108166: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 108169: 85 c0 test %eax,%eax <== NOT EXECUTED 10816b: 0f 84 93 00 00 00 je 108204 <== NOT EXECUTED 108171: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 108174: 85 c0 test %eax,%eax <== NOT EXECUTED 108176: 0f 84 88 00 00 00 je 108204 <== NOT EXECUTED 10817c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10817f: 53 push %ebx <== NOT EXECUTED 108180: ff d0 call *%eax <== NOT EXECUTED 108182: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED 108187: 83 c4 10 add $0x10,%esp <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 10818a: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10818d: 5b pop %ebx <== NOT EXECUTED 10818e: 5e pop %esi <== NOT EXECUTED 10818f: 5f pop %edi <== NOT EXECUTED 108190: c9 leave <== NOT EXECUTED 108191: c3 ret <== NOT EXECUTED 108192: 66 90 xchg %ax,%ax <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 108194: 8b 41 1c mov 0x1c(%ecx),%eax <== NOT EXECUTED 108197: 85 c0 test %eax,%eax <== NOT EXECUTED 108199: 74 09 je 1081a4 <== NOT EXECUTED 10819b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10819e: 53 push %ebx <== NOT EXECUTED 10819f: ff d0 call *%eax <== NOT EXECUTED 1081a1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1081a4: e8 bf ce 00 00 call 115068 <__errno> <== NOT EXECUTED 1081a9: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1081af: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); return RTEMS_SUCCESSFUL; } 1081b4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1081b7: 5b pop %ebx <== NOT EXECUTED 1081b8: 5e pop %esi <== NOT EXECUTED 1081b9: 5f pop %edi <== NOT EXECUTED 1081ba: c9 leave <== NOT EXECUTED 1081bb: c3 ret <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 1081bc: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 1081bf: 75 a5 jne 108166 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 1081c1: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1081c4: 89 31 mov %esi,(%ecx) <== NOT EXECUTED device_info->device_name_length = strlen( name ); 1081c6: b9 ff ff ff ff mov $0xffffffff,%ecx <== NOT EXECUTED 1081cb: 89 f7 mov %esi,%edi <== NOT EXECUTED 1081cd: 31 c0 xor %eax,%eax <== NOT EXECUTED 1081cf: f2 ae repnz scas %es:(%edi),%al <== NOT EXECUTED 1081d1: f7 d1 not %ecx <== NOT EXECUTED 1081d3: 49 dec %ecx <== NOT EXECUTED 1081d4: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1081d7: 89 48 04 mov %ecx,0x4(%eax) <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 1081da: 8b 42 50 mov 0x50(%edx),%eax <== NOT EXECUTED 1081dd: 8b 4d 0c mov 0xc(%ebp),%ecx <== NOT EXECUTED 1081e0: 89 41 08 mov %eax,0x8(%ecx) <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 1081e3: 8b 42 54 mov 0x54(%edx),%eax <== NOT EXECUTED 1081e6: 89 41 0c mov %eax,0xc(%ecx) <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 1081e9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 1081ec: 85 c0 test %eax,%eax <== NOT EXECUTED 1081ee: 74 21 je 108211 <== NOT EXECUTED 1081f0: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1081f3: 85 c0 test %eax,%eax <== NOT EXECUTED 1081f5: 74 1a je 108211 <== NOT EXECUTED 1081f7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1081fa: 53 push %ebx <== NOT EXECUTED 1081fb: ff d0 call *%eax <== NOT EXECUTED 1081fd: 31 c0 xor %eax,%eax <== NOT EXECUTED 1081ff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 108202: eb 86 jmp 10818a <== NOT EXECUTED 108204: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 108209: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10820c: 5b pop %ebx <== NOT EXECUTED 10820d: 5e pop %esi <== NOT EXECUTED 10820e: 5f pop %edi <== NOT EXECUTED 10820f: c9 leave <== NOT EXECUTED 108210: c3 ret <== NOT EXECUTED device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 108211: 31 c0 xor %eax,%eax <== NOT EXECUTED 108213: e9 72 ff ff ff jmp 10818a <== NOT EXECUTED =============================================================================== 00114cfc : rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 114cfc: 55 push %ebp 114cfd: 89 e5 mov %esp,%ebp 114cff: 56 push %esi 114d00: 53 push %ebx 114d01: 8b 45 08 mov 0x8(%ebp),%eax 114d04: 8b 4d 0c mov 0xc(%ebp),%ecx 114d07: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114d0a: 39 05 60 9f 12 00 cmp %eax,0x129f60 114d10: 76 22 jbe 114d34 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; 114d12: 8d 34 40 lea (%eax,%eax,2),%esi 114d15: 8b 15 64 9f 12 00 mov 0x129f64,%edx 114d1b: 8b 54 f2 04 mov 0x4(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 114d1f: 85 d2 test %edx,%edx 114d21: 74 1d je 114d40 114d23: 89 5d 10 mov %ebx,0x10(%ebp) 114d26: 89 4d 0c mov %ecx,0xc(%ebp) 114d29: 89 45 08 mov %eax,0x8(%ebp) } 114d2c: 5b pop %ebx 114d2d: 5e pop %esi 114d2e: 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; 114d2f: ff e2 jmp *%edx 114d31: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114d34: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].open_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 114d39: 5b pop %ebx 114d3a: 5e pop %esi 114d3b: c9 leave 114d3c: c3 ret 114d3d: 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; 114d40: 31 c0 xor %eax,%eax } 114d42: 5b pop %ebx 114d43: 5e pop %esi 114d44: c9 leave 114d45: c3 ret =============================================================================== 00114d48 : rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 114d48: 55 push %ebp 114d49: 89 e5 mov %esp,%ebp 114d4b: 56 push %esi 114d4c: 53 push %ebx 114d4d: 8b 45 08 mov 0x8(%ebp),%eax 114d50: 8b 4d 0c mov 0xc(%ebp),%ecx 114d53: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114d56: 39 05 60 9f 12 00 cmp %eax,0x129f60 114d5c: 76 22 jbe 114d80 return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; 114d5e: 8d 34 40 lea (%eax,%eax,2),%esi 114d61: 8b 15 64 9f 12 00 mov 0x129f64,%edx 114d67: 8b 54 f2 0c mov 0xc(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 114d6b: 85 d2 test %edx,%edx 114d6d: 74 1d je 114d8c 114d6f: 89 5d 10 mov %ebx,0x10(%ebp) 114d72: 89 4d 0c mov %ecx,0xc(%ebp) 114d75: 89 45 08 mov %eax,0x8(%ebp) } 114d78: 5b pop %ebx 114d79: 5e pop %esi 114d7a: 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; 114d7b: ff e2 jmp *%edx 114d7d: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114d80: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].read_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 114d85: 5b pop %ebx 114d86: 5e pop %esi 114d87: c9 leave 114d88: c3 ret 114d89: 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; 114d8c: 31 c0 xor %eax,%eax } 114d8e: 5b pop %ebx 114d8f: 5e pop %esi 114d90: c9 leave 114d91: c3 ret =============================================================================== 0010d51c : 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 ) { 10d51c: 55 push %ebp 10d51d: 89 e5 mov %esp,%ebp 10d51f: 57 push %edi 10d520: 56 push %esi 10d521: 53 push %ebx 10d522: 83 ec 0c sub $0xc,%esp 10d525: 8b 5d 08 mov 0x8(%ebp),%ebx 10d528: 8b 75 0c mov 0xc(%ebp),%esi 10d52b: 8b 55 10 mov 0x10(%ebp),%edx rtems_device_major_number major_limit = _IO_Number_of_drivers; 10d52e: a1 00 db 12 00 mov 0x12db00,%eax if ( rtems_interrupt_is_in_progress() ) 10d533: 8b 0d f4 d0 12 00 mov 0x12d0f4,%ecx 10d539: 85 c9 test %ecx,%ecx 10d53b: 0f 85 ab 00 00 00 jne 10d5ec return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 10d541: 85 d2 test %edx,%edx 10d543: 0f 84 e3 00 00 00 je 10d62c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 10d549: 89 02 mov %eax,(%edx) if ( driver_table == NULL ) 10d54b: 85 f6 test %esi,%esi 10d54d: 0f 84 d9 00 00 00 je 10d62c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d553: 8b 3e mov (%esi),%edi 10d555: 85 ff test %edi,%edi 10d557: 0f 84 c3 00 00 00 je 10d620 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d55d: 39 d8 cmp %ebx,%eax 10d55f: 76 7b jbe 10d5dc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10d561: a1 58 d0 12 00 mov 0x12d058,%eax 10d566: 40 inc %eax 10d567: a3 58 d0 12 00 mov %eax,0x12d058 return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 10d56c: 85 db test %ebx,%ebx 10d56e: 0f 85 88 00 00 00 jne 10d5fc static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 10d574: 8b 0d 00 db 12 00 mov 0x12db00,%ecx rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 10d57a: 85 c9 test %ecx,%ecx 10d57c: 0f 84 b7 00 00 00 je 10d639 <== NEVER TAKEN 10d582: 8b 3d 04 db 12 00 mov 0x12db04,%edi 10d588: 89 f8 mov %edi,%eax 10d58a: eb 08 jmp 10d594 10d58c: 43 inc %ebx 10d58d: 83 c0 18 add $0x18,%eax 10d590: 39 d9 cmp %ebx,%ecx 10d592: 76 0b jbe 10d59f static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d594: 83 38 00 cmpl $0x0,(%eax) 10d597: 75 f3 jne 10d58c 10d599: 83 78 04 00 cmpl $0x0,0x4(%eax) 10d59d: 75 ed jne 10d58c if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d59f: 89 1a mov %ebx,(%edx) if ( m != n ) 10d5a1: 39 d9 cmp %ebx,%ecx 10d5a3: 0f 84 97 00 00 00 je 10d640 10d5a9: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d5ac: 8d 04 c7 lea (%edi,%eax,8),%eax } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 10d5af: b9 06 00 00 00 mov $0x6,%ecx 10d5b4: 89 c7 mov %eax,%edi 10d5b6: f3 a5 rep movsl %ds:(%esi),%es:(%edi) _Thread_Enable_dispatch(); 10d5b8: e8 2f 1a 00 00 call 10efec <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 10d5bd: c7 45 10 00 00 00 00 movl $0x0,0x10(%ebp) 10d5c4: c7 45 0c 00 00 00 00 movl $0x0,0xc(%ebp) 10d5cb: 89 5d 08 mov %ebx,0x8(%ebp) } 10d5ce: 83 c4 0c add $0xc,%esp 10d5d1: 5b pop %ebx 10d5d2: 5e pop %esi 10d5d3: 5f pop %edi 10d5d4: c9 leave _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d5d5: e9 f6 86 00 00 jmp 115cd0 10d5da: 66 90 xchg %ax,%ax return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 10d5dc: 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 ); } 10d5e1: 83 c4 0c add $0xc,%esp 10d5e4: 5b pop %ebx 10d5e5: 5e pop %esi 10d5e6: 5f pop %edi 10d5e7: c9 leave 10d5e8: c3 ret 10d5e9: 8d 76 00 lea 0x0(%esi),%esi rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) 10d5ec: 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 ); } 10d5f1: 83 c4 0c add $0xc,%esp 10d5f4: 5b pop %ebx 10d5f5: 5e pop %esi 10d5f6: 5f pop %edi 10d5f7: c9 leave 10d5f8: c3 ret 10d5f9: 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; 10d5fc: 8d 04 5b lea (%ebx,%ebx,2),%eax 10d5ff: c1 e0 03 shl $0x3,%eax 10d602: 03 05 04 db 12 00 add 0x12db04,%eax static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d608: 8b 38 mov (%eax),%edi 10d60a: 85 ff test %edi,%edi 10d60c: 74 3e je 10d64c 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(); 10d60e: e8 d9 19 00 00 call 10efec <_Thread_Enable_dispatch> 10d613: 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 ); } 10d618: 83 c4 0c add $0xc,%esp 10d61b: 5b pop %ebx 10d61c: 5e pop %esi 10d61d: 5f pop %edi 10d61e: c9 leave 10d61f: c3 ret static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d620: 8b 4e 04 mov 0x4(%esi),%ecx 10d623: 85 c9 test %ecx,%ecx 10d625: 0f 85 32 ff ff ff jne 10d55d 10d62b: 90 nop _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 10d62c: b8 09 00 00 00 mov $0x9,%eax } 10d631: 83 c4 0c add $0xc,%esp 10d634: 5b pop %ebx 10d635: 5e pop %esi 10d636: 5f pop %edi 10d637: c9 leave 10d638: c3 ret if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 10d639: c7 02 00 00 00 00 movl $0x0,(%edx) <== NOT EXECUTED 10d63f: 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(); 10d640: e8 a7 19 00 00 call 10efec <_Thread_Enable_dispatch> 10d645: b8 05 00 00 00 mov $0x5,%eax return sc; 10d64a: eb 95 jmp 10d5e1 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 10d64c: 8b 48 04 mov 0x4(%eax),%ecx 10d64f: 85 c9 test %ecx,%ecx 10d651: 75 bb jne 10d60e if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 10d653: 89 1a mov %ebx,(%edx) 10d655: e9 55 ff ff ff jmp 10d5af =============================================================================== 0010d65c : */ rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { 10d65c: 55 push %ebp 10d65d: 89 e5 mov %esp,%ebp 10d65f: 57 push %edi 10d660: 83 ec 04 sub $0x4,%esp 10d663: 8b 45 08 mov 0x8(%ebp),%eax if ( rtems_interrupt_is_in_progress() ) 10d666: 8b 15 f4 d0 12 00 mov 0x12d0f4,%edx 10d66c: 85 d2 test %edx,%edx 10d66e: 75 44 jne 10d6b4 return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { 10d670: 39 05 00 db 12 00 cmp %eax,0x12db00 10d676: 77 0c ja 10d684 10d678: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d67d: 5a pop %edx 10d67e: 5f pop %edi 10d67f: c9 leave 10d680: c3 ret 10d681: 8d 76 00 lea 0x0(%esi),%esi 10d684: 8b 15 58 d0 12 00 mov 0x12d058,%edx 10d68a: 42 inc %edx 10d68b: 89 15 58 d0 12 00 mov %edx,0x12d058 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( 10d691: 8d 14 40 lea (%eax,%eax,2),%edx 10d694: c1 e2 03 shl $0x3,%edx 10d697: 03 15 04 db 12 00 add 0x12db04,%edx 10d69d: b9 18 00 00 00 mov $0x18,%ecx 10d6a2: 31 c0 xor %eax,%eax 10d6a4: 89 d7 mov %edx,%edi 10d6a6: f3 aa rep stos %al,%es:(%edi) &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); 10d6a8: e8 3f 19 00 00 call 10efec <_Thread_Enable_dispatch> 10d6ad: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d6af: 5a pop %edx 10d6b0: 5f pop %edi 10d6b1: c9 leave 10d6b2: c3 ret 10d6b3: 90 nop rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) 10d6b4: b8 12 00 00 00 mov $0x12,%eax return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; } 10d6b9: 5a pop %edx 10d6ba: 5f pop %edi 10d6bb: c9 leave 10d6bc: c3 ret =============================================================================== 00114d94 : rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { 114d94: 55 push %ebp 114d95: 89 e5 mov %esp,%ebp 114d97: 56 push %esi 114d98: 53 push %ebx 114d99: 8b 45 08 mov 0x8(%ebp),%eax 114d9c: 8b 4d 0c mov 0xc(%ebp),%ecx 114d9f: 8b 5d 10 mov 0x10(%ebp),%ebx rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114da2: 39 05 60 9f 12 00 cmp %eax,0x129f60 114da8: 76 22 jbe 114dcc return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; 114daa: 8d 34 40 lea (%eax,%eax,2),%esi 114dad: 8b 15 64 9f 12 00 mov 0x129f64,%edx 114db3: 8b 54 f2 10 mov 0x10(%edx,%esi,8),%edx return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; 114db7: 85 d2 test %edx,%edx 114db9: 74 1d je 114dd8 114dbb: 89 5d 10 mov %ebx,0x10(%ebp) 114dbe: 89 4d 0c mov %ecx,0xc(%ebp) 114dc1: 89 45 08 mov %eax,0x8(%ebp) } 114dc4: 5b pop %ebx 114dc5: 5e pop %esi 114dc6: 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; 114dc7: ff e2 jmp *%edx 114dc9: 8d 76 00 lea 0x0(%esi),%esi void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) 114dcc: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; callout = _IO_Driver_address_table[major].write_entry; return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; } 114dd1: 5b pop %ebx 114dd2: 5e pop %esi 114dd3: c9 leave 114dd4: c3 ret 114dd5: 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; 114dd8: 31 c0 xor %eax,%eax } 114dda: 5b pop %ebx 114ddb: 5e pop %esi 114ddc: c9 leave 114ddd: c3 ret =============================================================================== 0010e530 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 10e530: 55 push %ebp 10e531: 89 e5 mov %esp,%ebp 10e533: 57 push %edi 10e534: 56 push %esi 10e535: 53 push %ebx 10e536: 83 ec 1c sub $0x1c,%esp 10e539: 8b 7d 08 mov 0x8(%ebp),%edi uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 10e53c: 85 ff test %edi,%edi 10e53e: 74 4d je 10e58d <== NEVER TAKEN 10e540: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 10e547: 8b 55 e4 mov -0x1c(%ebp),%edx 10e54a: 8b 04 95 8c cc 12 00 mov 0x12cc8c(,%edx,4),%eax 10e551: 85 c0 test %eax,%eax 10e553: 74 2f je 10e584 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 10e555: 8b 70 04 mov 0x4(%eax),%esi if ( !information ) 10e558: 85 f6 test %esi,%esi 10e55a: 74 28 je 10e584 continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e55c: 66 83 7e 10 00 cmpw $0x0,0x10(%esi) 10e561: 74 21 je 10e584 10e563: bb 01 00 00 00 mov $0x1,%ebx the_thread = (Thread_Control *)information->local_table[ i ]; 10e568: 8b 46 1c mov 0x1c(%esi),%eax 10e56b: 8b 04 98 mov (%eax,%ebx,4),%eax if ( !the_thread ) 10e56e: 85 c0 test %eax,%eax 10e570: 74 09 je 10e57b <== NEVER TAKEN continue; (*routine)(the_thread); 10e572: 83 ec 0c sub $0xc,%esp 10e575: 50 push %eax 10e576: ff d7 call *%edi 10e578: 83 c4 10 add $0x10,%esp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 10e57b: 43 inc %ebx 10e57c: 0f b7 46 10 movzwl 0x10(%esi),%eax 10e580: 39 d8 cmp %ebx,%eax 10e582: 73 e4 jae 10e568 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 10e584: ff 45 e4 incl -0x1c(%ebp) 10e587: 83 7d e4 05 cmpl $0x5,-0x1c(%ebp) 10e58b: 75 ba jne 10e547 (*routine)(the_thread); } } } 10e58d: 8d 65 f4 lea -0xc(%ebp),%esp 10e590: 5b pop %ebx 10e591: 5e pop %esi 10e592: 5f pop %edi 10e593: c9 leave 10e594: c3 ret =============================================================================== 00110e48 : * This routine searches the IOP Table for an unused entry. If it * finds one, it returns it. Otherwise, it returns NULL. */ rtems_libio_t *rtems_libio_allocate( void ) { 110e48: 55 push %ebp 110e49: 89 e5 mov %esp,%ebp 110e4b: 57 push %edi 110e4c: 53 push %ebx 110e4d: 83 ec 14 sub $0x14,%esp rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 110e50: 6a 00 push $0x0 110e52: 6a 00 push $0x0 110e54: ff 35 48 93 12 00 pushl 0x129348 110e5a: e8 49 ae ff ff call 10bca8 rtems_status_code rc; rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { 110e5f: a1 44 93 12 00 mov 0x129344,%eax 110e64: 83 c4 10 add $0x10,%esp 110e67: 85 c0 test %eax,%eax 110e69: 75 19 jne 110e84 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; goto done; 110e6b: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110e6d: 83 ec 0c sub $0xc,%esp 110e70: ff 35 48 93 12 00 pushl 0x129348 110e76: e8 29 af ff ff call 10bda4 iop = 0; done: rtems_libio_unlock(); return iop; } 110e7b: 89 d8 mov %ebx,%eax 110e7d: 8d 65 f8 lea -0x8(%ebp),%esp 110e80: 5b pop %ebx 110e81: 5f pop %edi 110e82: c9 leave 110e83: c3 ret rtems_id sema; rtems_libio_lock(); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 110e84: 83 ec 0c sub $0xc,%esp 110e87: 8d 55 f4 lea -0xc(%ebp),%edx 110e8a: 52 push %edx 110e8b: 6a 00 push $0x0 110e8d: 6a 54 push $0x54 110e8f: 6a 01 push $0x1 110e91: 2b 05 40 93 12 00 sub 0x129340,%eax 110e97: c1 f8 06 sar $0x6,%eax 110e9a: 0d 00 49 42 4c or $0x4c424900,%eax 110e9f: 50 push %eax 110ea0: e8 8b ab ff ff call 10ba30 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, 0, &sema ); if (rc != RTEMS_SUCCESSFUL) 110ea5: 83 c4 20 add $0x20,%esp 110ea8: 85 c0 test %eax,%eax 110eaa: 75 bf jne 110e6b <== NEVER TAKEN goto failed; iop = rtems_libio_iop_freelist; 110eac: 8b 1d 44 93 12 00 mov 0x129344,%ebx next = iop->data1; 110eb2: 8b 53 34 mov 0x34(%ebx),%edx (void) memset( iop, 0, sizeof(rtems_libio_t) ); 110eb5: b9 40 00 00 00 mov $0x40,%ecx 110eba: 89 df mov %ebx,%edi 110ebc: f3 aa rep stos %al,%es:(%edi) iop->flags = LIBIO_FLAGS_OPEN; 110ebe: c7 43 14 00 01 00 00 movl $0x100,0x14(%ebx) iop->sem = sema; 110ec5: 8b 45 f4 mov -0xc(%ebp),%eax 110ec8: 89 43 2c mov %eax,0x2c(%ebx) rtems_libio_iop_freelist = next; 110ecb: 89 15 44 93 12 00 mov %edx,0x129344 goto done; 110ed1: eb 9a jmp 110e6d =============================================================================== 00110df0 : */ void rtems_libio_free( rtems_libio_t *iop ) { 110df0: 55 push %ebp 110df1: 89 e5 mov %esp,%ebp 110df3: 53 push %ebx 110df4: 83 ec 08 sub $0x8,%esp 110df7: 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 ); 110dfa: 6a 00 push $0x0 110dfc: 6a 00 push $0x0 110dfe: ff 35 48 93 12 00 pushl 0x129348 110e04: e8 9f ae ff ff call 10bca8 rtems_libio_lock(); if (iop->sem) 110e09: 8b 43 2c mov 0x2c(%ebx),%eax 110e0c: 83 c4 10 add $0x10,%esp 110e0f: 85 c0 test %eax,%eax 110e11: 74 0c je 110e1f <== NEVER TAKEN rtems_semaphore_delete(iop->sem); 110e13: 83 ec 0c sub $0xc,%esp 110e16: 50 push %eax 110e17: e8 e8 ad ff ff call 10bc04 110e1c: 83 c4 10 add $0x10,%esp iop->flags &= ~LIBIO_FLAGS_OPEN; 110e1f: 81 63 14 ff fe ff ff andl $0xfffffeff,0x14(%ebx) iop->data1 = rtems_libio_iop_freelist; 110e26: a1 44 93 12 00 mov 0x129344,%eax 110e2b: 89 43 34 mov %eax,0x34(%ebx) rtems_libio_iop_freelist = iop; 110e2e: 89 1d 44 93 12 00 mov %ebx,0x129344 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110e34: a1 48 93 12 00 mov 0x129348,%eax 110e39: 89 45 08 mov %eax,0x8(%ebp) rtems_libio_unlock(); } 110e3c: 8b 5d fc mov -0x4(%ebp),%ebx 110e3f: c9 leave 110e40: e9 5f af ff ff jmp 10bda4 =============================================================================== 00108688 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 108688: 55 push %ebp 108689: 89 e5 mov %esp,%ebp 10868b: 53 push %ebx 10868c: 83 ec 04 sub $0x4,%esp rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 10868f: a1 0c 52 12 00 mov 0x12520c,%eax 108694: 85 c0 test %eax,%eax 108696: 74 4d je 1086e5 <== NEVER TAKEN { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 108698: 83 ec 08 sub $0x8,%esp 10869b: 6a 40 push $0x40 10869d: 50 push %eax 10869e: e8 c9 fc ff ff call 10836c 1086a3: 89 c2 mov %eax,%edx 1086a5: a3 40 93 12 00 mov %eax,0x129340 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1086aa: 83 c4 10 add $0x10,%esp 1086ad: 85 c0 test %eax,%eax 1086af: 74 71 je 108722 <== NEVER TAKEN rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1086b1: a3 44 93 12 00 mov %eax,0x129344 for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1086b6: 8b 1d 0c 52 12 00 mov 0x12520c,%ebx 1086bc: 83 fb 01 cmp $0x1,%ebx 1086bf: 76 1d jbe 1086de <== NEVER TAKEN 1086c1: 8d 50 40 lea 0x40(%eax),%edx 1086c4: b9 01 00 00 00 mov $0x1,%ecx 1086c9: 8d 76 00 lea 0x0(%esi),%esi iop->data1 = iop + 1; 1086cc: 89 52 f4 mov %edx,-0xc(%edx) 1086cf: 83 c2 40 add $0x40,%edx 1086d2: 41 inc %ecx sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1086d3: 39 d9 cmp %ebx,%ecx 1086d5: 75 f5 jne 1086cc 1086d7: c1 e1 06 shl $0x6,%ecx 1086da: 8d 54 01 c0 lea -0x40(%ecx,%eax,1),%edx iop->data1 = iop + 1; iop->data1 = NULL; 1086de: 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( 1086e5: 83 ec 0c sub $0xc,%esp 1086e8: 68 48 93 12 00 push $0x129348 1086ed: 6a 00 push $0x0 1086ef: 6a 54 push $0x54 1086f1: 6a 01 push $0x1 1086f3: 68 4f 49 42 4c push $0x4c42494f 1086f8: e8 33 33 00 00 call 10ba30 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 1086fd: 83 c4 20 add $0x20,%esp 108700: 85 c0 test %eax,%eax 108702: 75 15 jne 108719 <== NEVER TAKEN /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 108704: a1 08 52 12 00 mov 0x125208,%eax 108709: 85 c0 test %eax,%eax 10870b: 74 07 je 108714 <== NEVER TAKEN (* rtems_fs_init_helper)(); } 10870d: 8b 5d fc mov -0x4(%ebp),%ebx 108710: c9 leave /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) (* rtems_fs_init_helper)(); 108711: ff e0 jmp *%eax 108713: 90 nop } 108714: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 108717: c9 leave <== NOT EXECUTED 108718: 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 ); 108719: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10871c: 50 push %eax <== NOT EXECUTED 10871d: e8 c2 3b 00 00 call 10c2e4 <== 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); 108722: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108725: 6a 1a push $0x1a <== NOT EXECUTED 108727: e8 b8 3b 00 00 call 10c2e4 <== NOT EXECUTED =============================================================================== 00110d28 : */ int rtems_libio_is_file_open( void *node_access ) { 110d28: 55 push %ebp 110d29: 89 e5 mov %esp,%ebp 110d2b: 53 push %ebx 110d2c: 83 ec 08 sub $0x8,%esp 110d2f: 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 ); 110d32: 6a 00 push $0x0 110d34: 6a 00 push $0x0 110d36: ff 35 48 93 12 00 pushl 0x129348 110d3c: e8 67 af ff ff call 10bca8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110d41: a1 40 93 12 00 mov 0x129340,%eax 110d46: 8b 0d 0c 52 12 00 mov 0x12520c,%ecx 110d4c: 83 c4 10 add $0x10,%esp 110d4f: 85 c9 test %ecx,%ecx 110d51: 74 18 je 110d6b <== NEVER TAKEN 110d53: 31 d2 xor %edx,%edx 110d55: eb 04 jmp 110d5b 110d57: 90 nop 110d58: 83 c0 40 add $0x40,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 110d5b: f6 40 15 01 testb $0x1,0x15(%eax) 110d5f: 74 05 je 110d66 /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.node_access == node_access ) { 110d61: 39 58 18 cmp %ebx,0x18(%eax) 110d64: 74 1e je 110d84 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110d66: 42 inc %edx 110d67: 39 ca cmp %ecx,%edx 110d69: 72 ed jb 110d58 110d6b: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110d6d: 83 ec 0c sub $0xc,%esp 110d70: ff 35 48 93 12 00 pushl 0x129348 110d76: e8 29 b0 ff ff call 10bda4 } rtems_libio_unlock(); return result; } 110d7b: 89 d8 mov %ebx,%eax 110d7d: 8b 5d fc mov -0x4(%ebp),%ebx 110d80: c9 leave 110d81: c3 ret 110d82: 66 90 xchg %ax,%ax /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110d84: bb 01 00 00 00 mov $0x1,%ebx 110d89: eb e2 jmp 110d6d =============================================================================== 00110d8c : */ int rtems_libio_is_open_files_in_fs( rtems_filesystem_mount_table_entry_t * fs_mt_entry ) { 110d8c: 55 push %ebp 110d8d: 89 e5 mov %esp,%ebp 110d8f: 53 push %ebx 110d90: 83 ec 08 sub $0x8,%esp 110d93: 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 ); 110d96: 6a 00 push $0x0 110d98: 6a 00 push $0x0 110d9a: ff 35 48 93 12 00 pushl 0x129348 110da0: e8 03 af ff ff call 10bca8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110da5: a1 40 93 12 00 mov 0x129340,%eax 110daa: 8b 0d 0c 52 12 00 mov 0x12520c,%ecx 110db0: 83 c4 10 add $0x10,%esp 110db3: 85 c9 test %ecx,%ecx 110db5: 74 18 je 110dcf <== NEVER TAKEN 110db7: 31 d2 xor %edx,%edx 110db9: eb 04 jmp 110dbf 110dbb: 90 nop 110dbc: 83 c0 40 add $0x40,%eax if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) { 110dbf: f6 40 15 01 testb $0x1,0x15(%eax) 110dc3: 74 05 je 110dca /* * Check if this node is under the file system that we * are trying to dismount. */ if ( iop->pathinfo.mt_entry == fs_mt_entry ) { 110dc5: 39 58 28 cmp %ebx,0x28(%eax) 110dc8: 74 1e je 110de8 /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110dca: 42 inc %edx 110dcb: 39 ca cmp %ecx,%edx 110dcd: 72 ed jb 110dbc 110dcf: 31 db xor %ebx,%ebx } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 110dd1: 83 ec 0c sub $0xc,%esp 110dd4: ff 35 48 93 12 00 pushl 0x129348 110dda: e8 c5 af ff ff call 10bda4 } rtems_libio_unlock(); return result; } 110ddf: 89 d8 mov %ebx,%eax 110de1: 8b 5d fc mov -0x4(%ebp),%ebx 110de4: c9 leave 110de5: c3 ret 110de6: 66 90 xchg %ax,%ax /* * Look for any active file descriptor entry. */ for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){ 110de8: bb 01 00 00 00 mov $0x1,%ebx 110ded: eb e2 jmp 110dd1 =============================================================================== 00109a64 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 109a64: 55 push %ebp 109a65: 89 e5 mov %esp,%ebp 109a67: 57 push %edi 109a68: 56 push %esi 109a69: 53 push %ebx 109a6a: 83 ec 40 sub $0x40,%esp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 109a6d: 8d 45 e4 lea -0x1c(%ebp),%eax 109a70: 50 push %eax 109a71: 6a 00 push $0x0 109a73: 6a 00 push $0x0 109a75: e8 22 2e 00 00 call 10c89c if (sc != RTEMS_SUCCESSFUL) return sc; 109a7a: 83 c4 10 add $0x10,%esp 109a7d: 85 c0 test %eax,%eax 109a7f: 75 75 jne 109af6 <== NEVER TAKEN /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 109a81: 8b 1d 84 79 12 00 mov 0x127984,%ebx 109a87: 81 fb 60 9c 12 00 cmp $0x129c60,%ebx 109a8d: 74 71 je 109b00 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 109a8f: be 60 9c 12 00 mov $0x129c60,%esi 109a94: b9 12 00 00 00 mov $0x12,%ecx 109a99: 89 df mov %ebx,%edi 109a9b: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_current_user_env->task_id=task_id; /* mark the local values*/ 109a9d: 8b 45 e4 mov -0x1c(%ebp),%eax 109aa0: 89 03 mov %eax,(%ebx) * 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_evaluate_path("/", 1, 0, &loc, 0); 109aa2: 83 ec 0c sub $0xc,%esp 109aa5: 6a 00 push $0x0 109aa7: 8d 5d d0 lea -0x30(%ebp),%ebx 109aaa: 53 push %ebx 109aab: 6a 00 push $0x0 109aad: 6a 01 push $0x1 109aaf: 68 87 31 12 00 push $0x123187 109ab4: e8 d7 ed ff ff call 108890 rtems_filesystem_root = loc; 109ab9: 8b 3d 84 79 12 00 mov 0x127984,%edi 109abf: 83 c7 18 add $0x18,%edi 109ac2: b9 05 00 00 00 mov $0x5,%ecx 109ac7: 89 de mov %ebx,%esi 109ac9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 109acb: 83 c4 14 add $0x14,%esp 109ace: 6a 00 push $0x0 109ad0: 53 push %ebx 109ad1: 6a 00 push $0x0 109ad3: 6a 01 push $0x1 109ad5: 68 87 31 12 00 push $0x123187 109ada: e8 b1 ed ff ff call 108890 rtems_filesystem_current = loc; 109adf: 8b 3d 84 79 12 00 mov 0x127984,%edi 109ae5: 83 c7 04 add $0x4,%edi 109ae8: b9 05 00 00 00 mov $0x5,%ecx 109aed: 89 de mov %ebx,%esi 109aef: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 109af1: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 109af3: 83 c4 20 add $0x20,%esp } 109af6: 8d 65 f4 lea -0xc(%ebp),%esp 109af9: 5b pop %ebx 109afa: 5e pop %esi 109afb: 5f pop %edi 109afc: c9 leave 109afd: c3 ret 109afe: 66 90 xchg %ax,%ax sc=rtems_task_ident(RTEMS_SELF,0,&task_id); if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 109b00: 83 ec 0c sub $0xc,%esp 109b03: 6a 48 push $0x48 109b05: e8 f2 f2 ff ff call 108dfc 109b0a: 89 c3 mov %eax,%ebx if (!tmp) 109b0c: 83 c4 10 add $0x10,%esp 109b0f: 85 c0 test %eax,%eax 109b11: 74 25 je 109b38 <== NEVER TAKEN #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); 109b13: 51 push %ecx 109b14: 68 70 99 10 00 push $0x109970 109b19: 68 84 79 12 00 push $0x127984 109b1e: 6a 00 push $0x0 109b20: e8 a3 2e 00 00 call 10c9c8 if (sc != RTEMS_SUCCESSFUL) { 109b25: 83 c4 10 add $0x10,%esp 109b28: 85 c0 test %eax,%eax 109b2a: 75 14 jne 109b40 <== NEVER TAKEN * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 109b2c: 89 1d 84 79 12 00 mov %ebx,0x127984 109b32: e9 58 ff ff ff jmp 109a8f 109b37: 90 nop if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 109b38: b8 1a 00 00 00 mov $0x1a,%eax <== NOT EXECUTED 109b3d: eb b7 jmp 109af6 <== NOT EXECUTED 109b3f: 90 nop <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 109b40: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109b43: 53 push %ebx <== NOT EXECUTED 109b44: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 109b47: e8 b4 ed ff ff call 108900 <== NOT EXECUTED return sc; 109b4c: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109b4f: 8b 45 c4 mov -0x3c(%ebp),%eax <== NOT EXECUTED 109b52: eb a2 jmp 109af6 <== NOT EXECUTED =============================================================================== 001099cc : * b) mutex access to rtems_filesystem_current, rtems_filesytem_root * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 1099cc: 55 push %ebp <== NOT EXECUTED 1099cd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1099cf: 53 push %ebx <== NOT EXECUTED 1099d0: 83 ec 18 sub $0x18,%esp <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 1099d3: 8d 45 f0 lea -0x10(%ebp),%eax <== NOT EXECUTED 1099d6: 50 push %eax <== NOT EXECUTED 1099d7: 6a 00 push $0x0 <== NOT EXECUTED 1099d9: 6a 00 push $0x0 <== NOT EXECUTED 1099db: e8 bc 2e 00 00 call 10c89c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 1099e0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1099e3: 85 c0 test %eax,%eax <== NOT EXECUTED 1099e5: 75 30 jne 109a17 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 1099e7: 8b 1d 84 79 12 00 mov 0x127984,%ebx <== NOT EXECUTED 1099ed: 8b 03 mov (%ebx),%eax <== NOT EXECUTED 1099ef: 3b 45 f0 cmp -0x10(%ebp),%eax <== NOT EXECUTED 1099f2: 74 28 je 109a1c <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 1099f4: 52 push %edx <== NOT EXECUTED 1099f5: 8d 45 f4 lea -0xc(%ebp),%eax <== NOT EXECUTED 1099f8: 50 push %eax <== NOT EXECUTED 1099f9: 68 84 79 12 00 push $0x127984 <== NOT EXECUTED 1099fe: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 109a01: e8 12 31 00 00 call 10cb18 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 109a06: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a09: 85 c0 test %eax,%eax <== NOT EXECUTED 109a0b: 74 33 je 109a40 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 109a0d: c7 05 84 79 12 00 60 movl $0x129c60,0x127984 <== NOT EXECUTED 109a14: 9c 12 00 return sc; } 109a17: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 109a1a: c9 leave <== NOT EXECUTED 109a1b: c3 ret <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 109a1c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109a1f: 68 84 79 12 00 push $0x127984 <== NOT EXECUTED 109a24: 6a 00 push $0x0 <== NOT EXECUTED 109a26: e8 61 30 00 00 call 10ca8c <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 109a2b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a2e: 85 c0 test %eax,%eax <== NOT EXECUTED 109a30: 75 e5 jne 109a17 <== NOT EXECUTED free_user_env(tmp); 109a32: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109a35: 53 push %ebx <== NOT EXECUTED 109a36: e8 35 ff ff ff call 109970 <== NOT EXECUTED 109a3b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a3e: eb b4 jmp 1099f4 <== NOT EXECUTED sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 109a40: 50 push %eax <== NOT EXECUTED 109a41: 68 70 99 10 00 push $0x109970 <== NOT EXECUTED 109a46: 68 84 79 12 00 push $0x127984 <== NOT EXECUTED 109a4b: 6a 00 push $0x0 <== NOT EXECUTED 109a4d: e8 76 2f 00 00 call 10c9c8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 109a52: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a55: 85 c0 test %eax,%eax <== NOT EXECUTED 109a57: 75 b4 jne 109a0d <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 109a59: 8b 55 f4 mov -0xc(%ebp),%edx <== NOT EXECUTED 109a5c: 89 15 84 79 12 00 mov %edx,0x127984 <== NOT EXECUTED /* increase the reference count */ #ifdef HAVE_USERENV_REFCNT rtems_current_user_env->refcnt++; #endif return RTEMS_SUCCESSFUL; 109a62: eb b3 jmp 109a17 <== NOT EXECUTED =============================================================================== 00110ce8 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 110ce8: 55 push %ebp 110ce9: 89 e5 mov %esp,%ebp 110ceb: 8b 55 08 mov 0x8(%ebp),%edx uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 110cee: 89 d0 mov %edx,%eax 110cf0: 83 e0 06 and $0x6,%eax 110cf3: 83 f8 06 cmp $0x6,%eax 110cf6: 74 2c je 110d24 <== NEVER TAKEN fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 110cf8: f6 c2 02 test $0x2,%dl 110cfb: 75 23 jne 110d20 <== ALWAYS TAKEN 110cfd: 89 d0 mov %edx,%eax <== NOT EXECUTED 110cff: c1 e8 02 shr $0x2,%eax <== NOT EXECUTED 110d02: 83 e0 01 and $0x1,%eax <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 110d05: f6 c2 01 test $0x1,%dl 110d08: 74 03 je 110d0d fcntl_flags |= O_NONBLOCK; 110d0a: 80 cc 40 or $0x40,%ah } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 110d0d: f6 c6 02 test $0x2,%dh 110d10: 74 03 je 110d15 fcntl_flags |= O_APPEND; 110d12: 83 c8 08 or $0x8,%eax } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 110d15: 80 e6 04 and $0x4,%dh 110d18: 74 03 je 110d1d fcntl_flags |= O_CREAT; 110d1a: 80 cc 02 or $0x2,%ah } return fcntl_flags; } 110d1d: c9 leave 110d1e: c3 ret 110d1f: 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) { 110d20: 31 c0 xor %eax,%eax 110d22: eb e1 jmp 110d05 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 110d24: b0 02 mov $0x2,%al <== NOT EXECUTED 110d26: eb dd jmp 110d05 <== NOT EXECUTED =============================================================================== 00114d34 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 114d34: 55 push %ebp 114d35: 89 e5 mov %esp,%ebp 114d37: 53 push %ebx 114d38: 83 ec 14 sub $0x14,%esp 114d3b: 8b 5d 08 mov 0x8(%ebp),%ebx void *return_this; /* * Parameter error checks */ if ( !pointer ) 114d3e: 85 db test %ebx,%ebx 114d40: 74 5b je 114d9d return EINVAL; *pointer = NULL; 114d42: 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()) && 114d48: 83 3d 20 d2 12 00 03 cmpl $0x3,0x12d220 114d4f: 74 43 je 114d94 <== ALWAYS TAKEN /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 114d51: e8 d6 48 ff ff call 10962c uintptr_t size, uintptr_t alignment ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 ); 114d56: 6a 00 push $0x0 114d58: ff 75 0c pushl 0xc(%ebp) 114d5b: ff 75 10 pushl 0x10(%ebp) 114d5e: ff 35 98 8c 12 00 pushl 0x128c98 114d64: e8 57 9c ff ff call 10e9c0 <_Protected_heap_Allocate_aligned_with_boundary> return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 114d69: 83 c4 10 add $0x10,%esp 114d6c: 85 c0 test %eax,%eax 114d6e: 74 38 je 114da8 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 114d70: 8b 15 e8 b1 12 00 mov 0x12b1e8,%edx 114d76: 85 d2 test %edx,%edx 114d78: 74 10 je 114d8a <== ALWAYS TAKEN (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 114d7a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 114d7d: 53 push %ebx <== NOT EXECUTED 114d7e: 89 45 f4 mov %eax,-0xc(%ebp) <== NOT EXECUTED 114d81: ff 52 04 call *0x4(%edx) <== NOT EXECUTED 114d84: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 114d87: 8b 45 f4 mov -0xc(%ebp),%eax <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 114d8a: 89 03 mov %eax,(%ebx) 114d8c: 31 c0 xor %eax,%eax return 0; } 114d8e: 8b 5d fc mov -0x4(%ebp),%ebx 114d91: c9 leave 114d92: c3 ret 114d93: 90 nop *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 114d94: e8 3b 48 ff ff call 1095d4 114d99: 84 c0 test %al,%al 114d9b: 75 b4 jne 114d51 <== ALWAYS TAKEN if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 114d9d: b8 16 00 00 00 mov $0x16,%eax } 114da2: 8b 5d fc mov -0x4(%ebp),%ebx 114da5: c9 leave 114da6: c3 ret 114da7: 90 nop return_this = _Protected_heap_Allocate_aligned( RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 114da8: b0 0c mov $0xc,%al 114daa: eb e2 jmp 114d8e =============================================================================== 00116c78 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { 116c78: 55 push %ebp 116c79: 89 e5 mov %esp,%ebp 116c7b: 57 push %edi 116c7c: 56 push %esi 116c7d: 53 push %ebx 116c7e: 83 ec 1c sub $0x1c,%esp 116c81: 8b 7d 08 mov 0x8(%ebp),%edi 116c84: 8b 5d 0c mov 0xc(%ebp),%ebx 116c87: 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 ) 116c8a: 85 db test %ebx,%ebx 116c8c: 74 62 je 116cf0 return RTEMS_INVALID_ADDRESS; if ( !count ) 116c8e: 85 f6 test %esi,%esi 116c90: 74 5e je 116cf0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116c92: 51 push %ecx 116c93: 8d 45 e4 lea -0x1c(%ebp),%eax 116c96: 50 push %eax 116c97: 57 push %edi 116c98: 68 20 4b 14 00 push $0x144b20 116c9d: e8 36 4d 00 00 call 11b9d8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116ca2: 83 c4 10 add $0x10,%esp 116ca5: 8b 55 e4 mov -0x1c(%ebp),%edx 116ca8: 85 d2 test %edx,%edx 116caa: 74 10 je 116cbc 116cac: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cb1: 8d 65 f4 lea -0xc(%ebp),%esp 116cb4: 5b pop %ebx 116cb5: 5e pop %esi 116cb6: 5f pop %edi 116cb7: c9 leave 116cb8: c3 ret 116cb9: 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( 116cbc: 83 ec 08 sub $0x8,%esp 116cbf: 56 push %esi 116cc0: 6a 00 push $0x0 116cc2: 57 push %edi 116cc3: ff 75 10 pushl 0x10(%ebp) 116cc6: 53 push %ebx 116cc7: 83 c0 14 add $0x14,%eax 116cca: 50 push %eax 116ccb: e8 ec 34 00 00 call 11a1bc <_CORE_message_queue_Broadcast> 116cd0: 89 c3 mov %eax,%ebx NULL, #endif count ); _Thread_Enable_dispatch(); 116cd2: 83 c4 20 add $0x20,%esp 116cd5: e8 e2 55 00 00 call 11c2bc <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( core_status ); 116cda: 83 ec 0c sub $0xc,%esp 116cdd: 53 push %ebx 116cde: e8 69 03 00 00 call 11704c <_Message_queue_Translate_core_message_queue_return_code> #endif count ); _Thread_Enable_dispatch(); return 116ce3: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ce6: 8d 65 f4 lea -0xc(%ebp),%esp 116ce9: 5b pop %ebx 116cea: 5e pop %esi 116ceb: 5f pop %edi 116cec: c9 leave 116ced: c3 ret 116cee: 66 90 xchg %ax,%ax #endif count ); _Thread_Enable_dispatch(); return 116cf0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116cf5: 8d 65 f4 lea -0xc(%ebp),%esp 116cf8: 5b pop %ebx 116cf9: 5e pop %esi 116cfa: 5f pop %edi 116cfb: c9 leave 116cfc: c3 ret =============================================================================== 0011418c : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { 11418c: 55 push %ebp 11418d: 89 e5 mov %esp,%ebp 11418f: 57 push %edi 114190: 56 push %esi 114191: 53 push %ebx 114192: 83 ec 2c sub $0x2c,%esp 114195: 8b 5d 08 mov 0x8(%ebp),%ebx 114198: 8b 75 0c mov 0xc(%ebp),%esi 11419b: 8b 4d 10 mov 0x10(%ebp),%ecx 11419e: 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 ) ) 1141a1: 85 db test %ebx,%ebx 1141a3: 74 2f je 1141d4 return RTEMS_INVALID_NAME; if ( !id ) 1141a5: 85 ff test %edi,%edi 1141a7: 0f 84 a3 00 00 00 je 114250 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1141ad: 85 f6 test %esi,%esi 1141af: 74 13 je 1141c4 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 1141b1: 85 c9 test %ecx,%ecx 1141b3: 75 2f jne 1141e4 1141b5: b8 08 00 00 00 mov $0x8,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141ba: 8d 65 f4 lea -0xc(%ebp),%esp 1141bd: 5b pop %ebx 1141be: 5e pop %esi 1141bf: 5f pop %edi 1141c0: c9 leave 1141c1: c3 ret 1141c2: 66 90 xchg %ax,%ax if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 1141c4: b8 0a 00 00 00 mov $0xa,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141c9: 8d 65 f4 lea -0xc(%ebp),%esp 1141cc: 5b pop %ebx 1141cd: 5e pop %esi 1141ce: 5f pop %edi 1141cf: c9 leave 1141d0: c3 ret 1141d1: 8d 76 00 lea 0x0(%esi),%esi CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) bool is_global; #endif if ( !rtems_is_name_valid( name ) ) 1141d4: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 1141d9: 8d 65 f4 lea -0xc(%ebp),%esp 1141dc: 5b pop %ebx 1141dd: 5e pop %esi 1141de: 5f pop %edi 1141df: c9 leave 1141e0: c3 ret 1141e1: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 1141e4: a1 18 2d 13 00 mov 0x132d18,%eax 1141e9: 40 inc %eax 1141ea: a3 18 2d 13 00 mov %eax,0x132d18 #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); 1141ef: 89 4d d4 mov %ecx,-0x2c(%ebp) 1141f2: e8 09 69 00 00 call 11ab00 <_Message_queue_Allocate> 1141f7: 89 c2 mov %eax,%edx if ( !the_message_queue ) { 1141f9: 85 c0 test %eax,%eax 1141fb: 8b 4d d4 mov -0x2c(%ebp),%ecx 1141fe: 74 7c je 11427c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; 114200: 8b 45 14 mov 0x14(%ebp),%eax 114203: 89 42 10 mov %eax,0x10(%edx) if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 114206: a8 04 test $0x4,%al 114208: 0f 95 c0 setne %al 11420b: 0f b6 c0 movzbl %al,%eax 11420e: 89 45 e4 mov %eax,-0x1c(%ebp) else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 114211: 51 push %ecx 114212: 56 push %esi 114213: 8d 45 e4 lea -0x1c(%ebp),%eax 114216: 50 push %eax 114217: 8d 42 14 lea 0x14(%edx),%eax 11421a: 50 push %eax 11421b: 89 55 d4 mov %edx,-0x2c(%ebp) 11421e: e8 f1 10 00 00 call 115314 <_CORE_message_queue_Initialize> 114223: 83 c4 10 add $0x10,%esp 114226: 84 c0 test %al,%al 114228: 8b 55 d4 mov -0x2c(%ebp),%edx 11422b: 75 2f jne 11425c */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 11422d: 83 ec 08 sub $0x8,%esp 114230: 52 push %edx 114231: 68 40 37 13 00 push $0x133740 114236: e8 6d 1f 00 00 call 1161a8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); 11423b: e8 8c 29 00 00 call 116bcc <_Thread_Enable_dispatch> 114240: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 114245: 83 c4 10 add $0x10,%esp 114248: e9 6d ff ff ff jmp 1141ba 11424d: 8d 76 00 lea 0x0(%esi),%esi #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 114250: b8 09 00 00 00 mov $0x9,%eax 114255: e9 60 ff ff ff jmp 1141ba 11425a: 66 90 xchg %ax,%ax #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11425c: 8b 42 08 mov 0x8(%edx),%eax 11425f: 0f b7 f0 movzwl %ax,%esi 114262: 8b 0d 5c 37 13 00 mov 0x13375c,%ecx 114268: 89 14 b1 mov %edx,(%ecx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 11426b: 89 5a 0c mov %ebx,0xc(%edx) &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 11426e: 89 07 mov %eax,(%edi) name, 0 ); #endif _Thread_Enable_dispatch(); 114270: e8 57 29 00 00 call 116bcc <_Thread_Enable_dispatch> 114275: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 114277: e9 3e ff ff ff jmp 1141ba _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); 11427c: e8 4b 29 00 00 call 116bcc <_Thread_Enable_dispatch> 114281: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 114286: e9 2f ff ff ff jmp 1141ba =============================================================================== 00116e00 : */ rtems_status_code rtems_message_queue_delete( rtems_id id ) { 116e00: 55 push %ebp 116e01: 89 e5 mov %esp,%ebp 116e03: 53 push %ebx 116e04: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116e07: 8d 45 f4 lea -0xc(%ebp),%eax 116e0a: 50 push %eax 116e0b: ff 75 08 pushl 0x8(%ebp) 116e0e: 68 20 4b 14 00 push $0x144b20 116e13: e8 c0 4b 00 00 call 11b9d8 <_Objects_Get> 116e18: 89 c3 mov %eax,%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116e1a: 83 c4 10 add $0x10,%esp 116e1d: 8b 4d f4 mov -0xc(%ebp),%ecx 116e20: 85 c9 test %ecx,%ecx 116e22: 75 3c jne 116e60 case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, 116e24: 83 ec 08 sub $0x8,%esp 116e27: 50 push %eax 116e28: 68 20 4b 14 00 push $0x144b20 116e2d: e8 36 47 00 00 call 11b568 <_Objects_Close> &the_message_queue->Object ); _CORE_message_queue_Close( 116e32: 83 c4 0c add $0xc,%esp 116e35: 6a 05 push $0x5 116e37: 6a 00 push $0x0 116e39: 8d 43 14 lea 0x14(%ebx),%eax 116e3c: 50 push %eax 116e3d: e8 fe 33 00 00 call 11a240 <_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 ); 116e42: 58 pop %eax 116e43: 5a pop %edx 116e44: 53 push %ebx 116e45: 68 20 4b 14 00 push $0x144b20 116e4a: e8 1d 4a 00 00 call 11b86c <_Objects_Free> 0, /* Not used */ 0 ); } #endif _Thread_Enable_dispatch(); 116e4f: e8 68 54 00 00 call 11c2bc <_Thread_Enable_dispatch> 116e54: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116e56: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e59: 8b 5d fc mov -0x4(%ebp),%ebx 116e5c: c9 leave 116e5d: c3 ret 116e5e: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116e60: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e65: 8b 5d fc mov -0x4(%ebp),%ebx 116e68: c9 leave 116e69: c3 ret =============================================================================== 00116e6c : rtems_status_code rtems_message_queue_flush( rtems_id id, uint32_t *count ) { 116e6c: 55 push %ebp 116e6d: 89 e5 mov %esp,%ebp 116e6f: 53 push %ebx 116e70: 83 ec 14 sub $0x14,%esp 116e73: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116e76: 85 db test %ebx,%ebx 116e78: 74 46 je 116ec0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 116e7a: 51 push %ecx 116e7b: 8d 45 f4 lea -0xc(%ebp),%eax 116e7e: 50 push %eax 116e7f: ff 75 08 pushl 0x8(%ebp) 116e82: 68 20 4b 14 00 push $0x144b20 116e87: e8 4c 4b 00 00 call 11b9d8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116e8c: 83 c4 10 add $0x10,%esp 116e8f: 8b 55 f4 mov -0xc(%ebp),%edx 116e92: 85 d2 test %edx,%edx 116e94: 74 0a je 116ea0 116e96: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116e9b: 8b 5d fc mov -0x4(%ebp),%ebx 116e9e: c9 leave 116e9f: 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 ); 116ea0: 83 ec 0c sub $0xc,%esp 116ea3: 83 c0 14 add $0x14,%eax 116ea6: 50 push %eax 116ea7: e8 d0 33 00 00 call 11a27c <_CORE_message_queue_Flush> 116eac: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116eae: e8 09 54 00 00 call 11c2bc <_Thread_Enable_dispatch> 116eb3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116eb5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116eb8: 8b 5d fc mov -0x4(%ebp),%ebx 116ebb: c9 leave 116ebc: c3 ret 116ebd: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116ec0: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116ec5: 8b 5d fc mov -0x4(%ebp),%ebx 116ec8: c9 leave 116ec9: c3 ret =============================================================================== 00116ecc : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { 116ecc: 55 push %ebp 116ecd: 89 e5 mov %esp,%ebp 116ecf: 53 push %ebx 116ed0: 83 ec 14 sub $0x14,%esp 116ed3: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116ed6: 85 db test %ebx,%ebx 116ed8: 74 3a je 116f14 116eda: 51 push %ecx 116edb: 8d 45 f4 lea -0xc(%ebp),%eax 116ede: 50 push %eax 116edf: ff 75 08 pushl 0x8(%ebp) 116ee2: 68 20 4b 14 00 push $0x144b20 116ee7: e8 ec 4a 00 00 call 11b9d8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 116eec: 83 c4 10 add $0x10,%esp 116eef: 8b 55 f4 mov -0xc(%ebp),%edx 116ef2: 85 d2 test %edx,%edx 116ef4: 74 0a je 116f00 116ef6: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116efb: 8b 5d fc mov -0x4(%ebp),%ebx 116efe: c9 leave 116eff: 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; 116f00: 8b 40 5c mov 0x5c(%eax),%eax 116f03: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 116f05: e8 b2 53 00 00 call 11c2bc <_Thread_Enable_dispatch> 116f0a: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116f0c: 8b 5d fc mov -0x4(%ebp),%ebx 116f0f: c9 leave 116f10: c3 ret 116f11: 8d 76 00 lea 0x0(%esi),%esi ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 116f14: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116f19: 8b 5d fc mov -0x4(%ebp),%ebx 116f1c: c9 leave 116f1d: c3 ret =============================================================================== 001142b0 : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { 1142b0: 55 push %ebp 1142b1: 89 e5 mov %esp,%ebp 1142b3: 56 push %esi 1142b4: 53 push %ebx 1142b5: 83 ec 10 sub $0x10,%esp 1142b8: 8b 5d 0c mov 0xc(%ebp),%ebx 1142bb: 8b 75 10 mov 0x10(%ebp),%esi register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) 1142be: 85 db test %ebx,%ebx 1142c0: 74 6e je 114330 return RTEMS_INVALID_ADDRESS; if ( !size ) 1142c2: 85 f6 test %esi,%esi 1142c4: 74 6a je 114330 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 1142c6: 51 push %ecx 1142c7: 8d 45 f4 lea -0xc(%ebp),%eax 1142ca: 50 push %eax 1142cb: ff 75 08 pushl 0x8(%ebp) 1142ce: 68 40 37 13 00 push $0x133740 1142d3: e8 00 20 00 00 call 1162d8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 1142d8: 83 c4 10 add $0x10,%esp 1142db: 8b 55 f4 mov -0xc(%ebp),%edx 1142de: 85 d2 test %edx,%edx 1142e0: 75 42 jne 114324 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( 1142e2: 83 ec 08 sub $0x8,%esp 1142e5: ff 75 18 pushl 0x18(%ebp) 1142e8: 8b 55 14 mov 0x14(%ebp),%edx 1142eb: 83 e2 01 and $0x1,%edx 1142ee: 83 f2 01 xor $0x1,%edx 1142f1: 52 push %edx 1142f2: 56 push %esi 1142f3: 53 push %ebx 1142f4: ff 70 08 pushl 0x8(%eax) 1142f7: 83 c0 14 add $0x14,%eax 1142fa: 50 push %eax 1142fb: e8 d4 10 00 00 call 1153d4 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); 114300: 83 c4 20 add $0x20,%esp 114303: e8 c4 28 00 00 call 116bcc <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( 114308: 83 ec 0c sub $0xc,%esp 11430b: a1 d8 2d 13 00 mov 0x132dd8,%eax 114310: ff 70 34 pushl 0x34(%eax) 114313: e8 a0 00 00 00 call 1143b8 <_Message_queue_Translate_core_message_queue_return_code> 114318: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11431b: 8d 65 f8 lea -0x8(%ebp),%esp 11431e: 5b pop %ebx 11431f: 5e pop %esi 114320: c9 leave 114321: c3 ret 114322: 66 90 xchg %ax,%ax if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 114324: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114329: 8d 65 f8 lea -0x8(%ebp),%esp 11432c: 5b pop %ebx 11432d: 5e pop %esi 11432e: c9 leave 11432f: c3 ret size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 114330: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 114335: 8d 65 f8 lea -0x8(%ebp),%esp 114338: 5b pop %ebx 114339: 5e pop %esi 11433a: c9 leave 11433b: c3 ret =============================================================================== 0010b9a4 : rtems_status_code rtems_message_queue_send( rtems_id id, const void *buffer, size_t size ) { 10b9a4: 55 push %ebp 10b9a5: 89 e5 mov %esp,%ebp 10b9a7: 56 push %esi 10b9a8: 53 push %ebx 10b9a9: 83 ec 10 sub $0x10,%esp 10b9ac: 8b 75 08 mov 0x8(%ebp),%esi 10b9af: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10b9b2: 85 db test %ebx,%ebx 10b9b4: 74 5e je 10ba14 <== NEVER TAKEN RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 10b9b6: 51 push %ecx 10b9b7: 8d 45 f4 lea -0xc(%ebp),%eax 10b9ba: 50 push %eax 10b9bb: 56 push %esi 10b9bc: 68 e0 9e 12 00 push $0x129ee0 10b9c1: e8 32 1a 00 00 call 10d3f8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 10b9c6: 83 c4 10 add $0x10,%esp 10b9c9: 8b 55 f4 mov -0xc(%ebp),%edx 10b9cc: 85 d2 test %edx,%edx 10b9ce: 74 0c je 10b9dc 10b9d0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10b9d5: 8d 65 f8 lea -0x8(%ebp),%esp 10b9d8: 5b pop %ebx 10b9d9: 5e pop %esi 10b9da: c9 leave 10b9db: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 10b9dc: 6a 00 push $0x0 10b9de: 6a 00 push $0x0 10b9e0: 68 ff ff ff 7f push $0x7fffffff 10b9e5: 6a 00 push $0x0 10b9e7: 56 push %esi 10b9e8: ff 75 10 pushl 0x10(%ebp) 10b9eb: 53 push %ebx 10b9ec: 83 c0 14 add $0x14,%eax 10b9ef: 50 push %eax 10b9f0: e8 2b 0c 00 00 call 10c620 <_CORE_message_queue_Submit> 10b9f5: 89 c3 mov %eax,%ebx MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 10b9f7: 83 c4 20 add $0x20,%esp 10b9fa: e8 6d 22 00 00 call 10dc6c <_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); 10b9ff: 83 ec 0c sub $0xc,%esp 10ba02: 53 push %ebx 10ba03: e8 18 00 00 00 call 10ba20 <_Message_queue_Translate_core_message_queue_return_code> 10ba08: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba0b: 8d 65 f8 lea -0x8(%ebp),%esp 10ba0e: 5b pop %ebx 10ba0f: 5e pop %esi 10ba10: c9 leave 10ba11: c3 ret 10ba12: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 10ba14: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ba19: 8d 65 f8 lea -0x8(%ebp),%esp 10ba1c: 5b pop %ebx 10ba1d: 5e pop %esi 10ba1e: c9 leave 10ba1f: c3 ret =============================================================================== 0011705c : rtems_status_code rtems_message_queue_urgent( rtems_id id, const void *buffer, size_t size ) { 11705c: 55 push %ebp 11705d: 89 e5 mov %esp,%ebp 11705f: 56 push %esi 117060: 53 push %ebx 117061: 83 ec 10 sub $0x10,%esp 117064: 8b 75 08 mov 0x8(%ebp),%esi 117067: 8b 5d 0c mov 0xc(%ebp),%ebx register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 11706a: 85 db test %ebx,%ebx 11706c: 74 5e je 1170cc 11706e: 51 push %ecx 11706f: 8d 45 f4 lea -0xc(%ebp),%eax 117072: 50 push %eax 117073: 56 push %esi 117074: 68 20 4b 14 00 push $0x144b20 117079: e8 5a 49 00 00 call 11b9d8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 11707e: 83 c4 10 add $0x10,%esp 117081: 8b 55 f4 mov -0xc(%ebp),%edx 117084: 85 d2 test %edx,%edx 117086: 74 0c je 117094 117088: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11708d: 8d 65 f8 lea -0x8(%ebp),%esp 117090: 5b pop %ebx 117091: 5e pop %esi 117092: c9 leave 117093: c3 ret CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, bool wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 117094: 6a 00 push $0x0 117096: 6a 00 push $0x0 117098: 68 00 00 00 80 push $0x80000000 11709d: 6a 00 push $0x0 11709f: 56 push %esi 1170a0: ff 75 10 pushl 0x10(%ebp) 1170a3: 53 push %ebx 1170a4: 83 c0 14 add $0x14,%eax 1170a7: 50 push %eax 1170a8: e8 23 34 00 00 call 11a4d0 <_CORE_message_queue_Submit> 1170ad: 89 c3 mov %eax,%ebx id, MESSAGE_QUEUE_MP_HANDLER, false, /* sender does not block */ 0 /* no timeout */ ); _Thread_Enable_dispatch(); 1170af: 83 c4 20 add $0x20,%esp 1170b2: e8 05 52 00 00 call 11c2bc <_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); 1170b7: 83 ec 0c sub $0xc,%esp 1170ba: 53 push %ebx 1170bb: e8 8c ff ff ff call 11704c <_Message_queue_Translate_core_message_queue_return_code> 1170c0: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1170c3: 8d 65 f8 lea -0x8(%ebp),%esp 1170c6: 5b pop %ebx 1170c7: 5e pop %esi 1170c8: c9 leave 1170c9: c3 ret 1170ca: 66 90 xchg %ax,%ax { register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 1170cc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1170d1: 8d 65 f8 lea -0x8(%ebp),%esp 1170d4: 5b pop %ebx 1170d5: 5e pop %esi 1170d6: c9 leave 1170d7: c3 ret =============================================================================== 0010bf68 : }; const char *rtems_object_get_api_name( int api ) { 10bf68: 55 push %ebp 10bf69: 89 e5 mov %esp,%ebp 10bf6b: 83 ec 10 sub $0x10,%esp const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); 10bf6e: ff 75 08 pushl 0x8(%ebp) 10bf71: 68 a0 8e 12 00 push $0x128ea0 10bf76: e8 3d 53 00 00 call 1112b8 if ( api_assoc ) 10bf7b: 83 c4 10 add $0x10,%esp 10bf7e: 85 c0 test %eax,%eax 10bf80: 74 06 je 10bf88 return api_assoc->name; 10bf82: 8b 00 mov (%eax),%eax return "BAD CLASS"; } 10bf84: c9 leave 10bf85: c3 ret 10bf86: 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 ) 10bf88: b8 af 3c 12 00 mov $0x123caf,%eax return api_assoc->name; return "BAD CLASS"; } 10bf8d: c9 leave 10bf8e: c3 ret =============================================================================== 0010d4f0 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 10d4f0: 55 push %ebp 10d4f1: 89 e5 mov %esp,%ebp 10d4f3: 57 push %edi 10d4f4: 56 push %esi 10d4f5: 53 push %ebx 10d4f6: 83 ec 0c sub $0xc,%esp 10d4f9: 8b 5d 10 mov 0x10(%ebp),%ebx int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d4fc: 85 db test %ebx,%ebx 10d4fe: 74 5c je 10d55c return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 10d500: 83 ec 08 sub $0x8,%esp 10d503: ff 75 0c pushl 0xc(%ebp) 10d506: ff 75 08 pushl 0x8(%ebp) 10d509: e8 12 1b 00 00 call 10f020 <_Objects_Get_information> if ( !obj_info ) 10d50e: 83 c4 10 add $0x10,%esp 10d511: 85 c0 test %eax,%eax 10d513: 74 57 je 10d56c return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 10d515: 8b 50 08 mov 0x8(%eax),%edx 10d518: 89 13 mov %edx,(%ebx) info->maximum_id = obj_info->maximum_id; 10d51a: 8b 50 0c mov 0xc(%eax),%edx 10d51d: 89 53 04 mov %edx,0x4(%ebx) info->auto_extend = obj_info->auto_extend; 10d520: 8a 50 12 mov 0x12(%eax),%dl 10d523: 88 53 0c mov %dl,0xc(%ebx) info->maximum = obj_info->maximum; 10d526: 0f b7 70 10 movzwl 0x10(%eax),%esi 10d52a: 89 73 08 mov %esi,0x8(%ebx) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 10d52d: 85 f6 test %esi,%esi 10d52f: 74 3f je 10d570 <== NEVER TAKEN 10d531: 8b 78 1c mov 0x1c(%eax),%edi 10d534: b9 01 00 00 00 mov $0x1,%ecx 10d539: b8 01 00 00 00 mov $0x1,%eax 10d53e: 31 d2 xor %edx,%edx if ( !obj_info->local_table[i] ) unallocated++; 10d540: 83 3c 8f 01 cmpl $0x1,(%edi,%ecx,4) 10d544: 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++ ) 10d547: 40 inc %eax 10d548: 89 c1 mov %eax,%ecx 10d54a: 39 c6 cmp %eax,%esi 10d54c: 73 f2 jae 10d540 if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 10d54e: 89 53 10 mov %edx,0x10(%ebx) 10d551: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10d553: 8d 65 f4 lea -0xc(%ebp),%esp 10d556: 5b pop %ebx 10d557: 5e pop %esi 10d558: 5f pop %edi 10d559: c9 leave 10d55a: c3 ret 10d55b: 90 nop int i; /* * Validate parameters and look up information structure. */ if ( !info ) 10d55c: b8 09 00 00 00 mov $0x9,%eax unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 10d561: 8d 65 f4 lea -0xc(%ebp),%esp 10d564: 5b pop %ebx 10d565: 5e pop %esi 10d566: 5f pop %edi 10d567: c9 leave 10d568: c3 ret 10d569: 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 ) 10d56c: b0 0a mov $0xa,%al 10d56e: eb e3 jmp 10d553 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++ ) 10d570: 31 d2 xor %edx,%edx 10d572: eb da jmp 10d54e <== NOT EXECUTED =============================================================================== 0010cb10 : rtems_status_code rtems_object_get_classic_name( rtems_id id, rtems_name *name ) { 10cb10: 55 push %ebp 10cb11: 89 e5 mov %esp,%ebp 10cb13: 53 push %ebx 10cb14: 83 ec 14 sub $0x14,%esp 10cb17: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10cb1a: 85 db test %ebx,%ebx 10cb1c: 74 26 je 10cb44 return RTEMS_INVALID_ADDRESS; status = _Objects_Id_to_name( id, &name_u ); 10cb1e: 83 ec 08 sub $0x8,%esp 10cb21: 8d 45 f4 lea -0xc(%ebp),%eax 10cb24: 50 push %eax 10cb25: ff 75 08 pushl 0x8(%ebp) 10cb28: e8 5f 1b 00 00 call 10e68c <_Objects_Id_to_name> *name = name_u.name_u32; 10cb2d: 8b 55 f4 mov -0xc(%ebp),%edx 10cb30: 89 13 mov %edx,(%ebx) return _Status_Object_name_errors_to_status[ status ]; 10cb32: 8b 04 85 ac 48 12 00 mov 0x1248ac(,%eax,4),%eax 10cb39: 83 c4 10 add $0x10,%esp } 10cb3c: 8b 5d fc mov -0x4(%ebp),%ebx 10cb3f: c9 leave 10cb40: c3 ret 10cb41: 8d 76 00 lea 0x0(%esi),%esi ) { Objects_Name_or_id_lookup_errors status; Objects_Name name_u; if ( !name ) 10cb44: 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 ]; } 10cb49: 8b 5d fc mov -0x4(%ebp),%ebx 10cb4c: c9 leave 10cb4d: c3 ret =============================================================================== 0010bf9c : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { 10bf9c: 55 push %ebp 10bf9d: 89 e5 mov %esp,%ebp 10bf9f: 57 push %edi 10bfa0: 56 push %esi 10bfa1: 53 push %ebx 10bfa2: 83 ec 1c sub $0x1c,%esp 10bfa5: 8b 75 08 mov 0x8(%ebp),%esi 10bfa8: 8b 7d 0c mov 0xc(%ebp),%edi Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10bfab: 85 ff test %edi,%edi 10bfad: 74 61 je 10c010 return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10bfaf: 85 f6 test %esi,%esi 10bfb1: 74 35 je 10bfe8 information = _Objects_Get_information_id( tmpId ); 10bfb3: 83 ec 0c sub $0xc,%esp 10bfb6: 56 push %esi 10bfb7: e8 f0 18 00 00 call 10d8ac <_Objects_Get_information_id> 10bfbc: 89 c3 mov %eax,%ebx if ( !information ) 10bfbe: 83 c4 10 add $0x10,%esp 10bfc1: 85 c0 test %eax,%eax 10bfc3: 74 16 je 10bfdb return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); 10bfc5: 50 push %eax 10bfc6: 8d 45 e4 lea -0x1c(%ebp),%eax 10bfc9: 50 push %eax 10bfca: 56 push %esi 10bfcb: 53 push %ebx 10bfcc: e8 7f 1a 00 00 call 10da50 <_Objects_Get> switch ( location ) { 10bfd1: 83 c4 10 add $0x10,%esp 10bfd4: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bfd7: 85 c9 test %ecx,%ecx 10bfd9: 74 19 je 10bff4 case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10bfdb: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bfe0: 8d 65 f4 lea -0xc(%ebp),%esp 10bfe3: 5b pop %ebx 10bfe4: 5e pop %esi 10bfe5: 5f pop %edi 10bfe6: c9 leave 10bfe7: c3 ret Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10bfe8: a1 38 b3 12 00 mov 0x12b338,%eax 10bfed: 8b 70 08 mov 0x8(%eax),%esi 10bff0: eb c1 jmp 10bfb3 10bff2: 66 90 xchg %ax,%ax the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); 10bff4: 52 push %edx 10bff5: 57 push %edi 10bff6: 50 push %eax 10bff7: 53 push %ebx 10bff8: e8 4f 1c 00 00 call 10dc4c <_Objects_Set_name> _Thread_Enable_dispatch(); 10bffd: e8 96 23 00 00 call 10e398 <_Thread_Enable_dispatch> 10c002: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c004: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c007: 8d 65 f4 lea -0xc(%ebp),%esp 10c00a: 5b pop %ebx 10c00b: 5e pop %esi 10c00c: 5f pop %edi 10c00d: c9 leave 10c00e: c3 ret 10c00f: 90 nop Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) 10c010: b8 09 00 00 00 mov $0x9,%eax 10c015: eb c9 jmp 10bfe0 =============================================================================== 0010cdcc : void rtems_panic( const char *printf_format, ... ) { 10cdcc: 55 push %ebp <== NOT EXECUTED 10cdcd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cdcf: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED /* * rtems_panic is shorthand for rtems_error(RTEMS_ERROR_PANIC, ...) */ void rtems_panic( 10cdd2: 8d 4d 0c lea 0xc(%ebp),%ecx <== NOT EXECUTED ) { va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 10cdd5: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10cdd8: b8 00 00 00 20 mov $0x20000000,%eax <== NOT EXECUTED 10cddd: e8 4a fe ff ff call 10cc2c <== NOT EXECUTED va_end(arglist); } 10cde2: c9 leave <== NOT EXECUTED 10cde3: c3 ret <== NOT EXECUTED =============================================================================== 001170d8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 1170d8: 55 push %ebp 1170d9: 89 e5 mov %esp,%ebp 1170db: 57 push %edi 1170dc: 56 push %esi 1170dd: 53 push %ebx 1170de: 83 ec 1c sub $0x1c,%esp 1170e1: 8b 5d 08 mov 0x8(%ebp),%ebx 1170e4: 8b 75 0c mov 0xc(%ebp),%esi 1170e7: 8b 55 10 mov 0x10(%ebp),%edx 1170ea: 8b 7d 14 mov 0x14(%ebp),%edi register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 1170ed: 85 db test %ebx,%ebx 1170ef: 74 47 je 117138 return RTEMS_INVALID_NAME; if ( !starting_address ) 1170f1: 85 f6 test %esi,%esi 1170f3: 74 23 je 117118 return RTEMS_INVALID_ADDRESS; if ( !id ) 1170f5: 8b 45 1c mov 0x1c(%ebp),%eax 1170f8: 85 c0 test %eax,%eax 1170fa: 74 1c je 117118 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 1170fc: 85 d2 test %edx,%edx 1170fe: 74 28 je 117128 117100: 85 ff test %edi,%edi 117102: 74 24 je 117128 117104: 39 fa cmp %edi,%edx 117106: 72 20 jb 117128 117108: f7 c7 03 00 00 00 test $0x3,%edi 11710e: 75 18 jne 117128 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 117110: f7 c6 03 00 00 00 test $0x3,%esi 117116: 74 30 je 117148 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 117118: b8 09 00 00 00 mov $0x9,%eax } 11711d: 8d 65 f4 lea -0xc(%ebp),%esp 117120: 5b pop %ebx 117121: 5e pop %esi 117122: 5f pop %edi 117123: c9 leave 117124: c3 ret 117125: 8d 76 00 lea 0x0(%esi),%esi 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 117128: b8 08 00 00 00 mov $0x8,%eax } 11712d: 8d 65 f4 lea -0xc(%ebp),%esp 117130: 5b pop %ebx 117131: 5e pop %esi 117132: 5f pop %edi 117133: c9 leave 117134: c3 ret 117135: 8d 76 00 lea 0x0(%esi),%esi rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 117138: b8 03 00 00 00 mov $0x3,%eax ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 11713d: 8d 65 f4 lea -0xc(%ebp),%esp 117140: 5b pop %ebx 117141: 5e pop %esi 117142: 5f pop %edi 117143: c9 leave 117144: c3 ret 117145: 8d 76 00 lea 0x0(%esi),%esi 117148: a1 f8 40 14 00 mov 0x1440f8,%eax 11714d: 40 inc %eax 11714e: a3 f8 40 14 00 mov %eax,0x1440f8 * 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 ); 117153: 83 ec 0c sub $0xc,%esp 117156: 68 80 3f 14 00 push $0x143f80 11715b: 89 55 e0 mov %edx,-0x20(%ebp) 11715e: e8 89 43 00 00 call 11b4ec <_Objects_Allocate> 117163: 89 45 e4 mov %eax,-0x1c(%ebp) _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 117166: 83 c4 10 add $0x10,%esp 117169: 85 c0 test %eax,%eax 11716b: 8b 55 e0 mov -0x20(%ebp),%edx 11716e: 74 58 je 1171c8 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 117170: 8b 45 e4 mov -0x1c(%ebp),%eax 117173: 89 70 10 mov %esi,0x10(%eax) the_partition->length = length; 117176: 89 50 14 mov %edx,0x14(%eax) the_partition->buffer_size = buffer_size; 117179: 89 78 18 mov %edi,0x18(%eax) the_partition->attribute_set = attribute_set; 11717c: 8b 4d 18 mov 0x18(%ebp),%ecx 11717f: 89 48 1c mov %ecx,0x1c(%eax) the_partition->number_of_used_blocks = 0; 117182: c7 40 20 00 00 00 00 movl $0x0,0x20(%eax) _Chain_Initialize( &the_partition->Memory, starting_address, 117189: 57 push %edi 11718a: 89 d0 mov %edx,%eax 11718c: 31 d2 xor %edx,%edx 11718e: f7 f7 div %edi 117190: 50 push %eax 117191: 56 push %esi 117192: 8b 45 e4 mov -0x1c(%ebp),%eax 117195: 83 c0 24 add $0x24,%eax 117198: 50 push %eax 117199: e8 de 2f 00 00 call 11a17c <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 11719e: 8b 7d e4 mov -0x1c(%ebp),%edi 1171a1: 8b 47 08 mov 0x8(%edi),%eax 1171a4: 0f b7 f0 movzwl %ax,%esi 1171a7: 8b 15 9c 3f 14 00 mov 0x143f9c,%edx 1171ad: 89 3c b2 mov %edi,(%edx,%esi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 1171b0: 89 5f 0c mov %ebx,0xc(%edi) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 1171b3: 8b 55 1c mov 0x1c(%ebp),%edx 1171b6: 89 02 mov %eax,(%edx) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 1171b8: e8 ff 50 00 00 call 11c2bc <_Thread_Enable_dispatch> 1171bd: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1171bf: 83 c4 10 add $0x10,%esp 1171c2: e9 66 ff ff ff jmp 11712d 1171c7: 90 nop _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 1171c8: e8 ef 50 00 00 call 11c2bc <_Thread_Enable_dispatch> 1171cd: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1171d2: e9 56 ff ff ff jmp 11712d =============================================================================== 00117244 : rtems_status_code rtems_partition_get_buffer( rtems_id id, void **buffer ) { 117244: 55 push %ebp 117245: 89 e5 mov %esp,%ebp 117247: 56 push %esi 117248: 53 push %ebx 117249: 83 ec 20 sub $0x20,%esp 11724c: 8b 5d 0c mov 0xc(%ebp),%ebx register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 11724f: 85 db test %ebx,%ebx 117251: 74 59 je 1172ac RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 117253: 52 push %edx 117254: 8d 45 f4 lea -0xc(%ebp),%eax 117257: 50 push %eax 117258: ff 75 08 pushl 0x8(%ebp) 11725b: 68 80 3f 14 00 push $0x143f80 117260: e8 73 47 00 00 call 11b9d8 <_Objects_Get> 117265: 89 c6 mov %eax,%esi return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 117267: 83 c4 10 add $0x10,%esp 11726a: 8b 45 f4 mov -0xc(%ebp),%eax 11726d: 85 c0 test %eax,%eax 11726f: 75 2f jne 1172a0 */ RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 117271: 83 ec 0c sub $0xc,%esp 117274: 8d 46 24 lea 0x24(%esi),%eax 117277: 50 push %eax 117278: e8 db 2e 00 00 call 11a158 <_Chain_Get> case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 11727d: 83 c4 10 add $0x10,%esp 117280: 85 c0 test %eax,%eax 117282: 74 34 je 1172b8 the_partition->number_of_used_blocks += 1; 117284: ff 46 20 incl 0x20(%esi) _Thread_Enable_dispatch(); 117287: 89 45 e4 mov %eax,-0x1c(%ebp) 11728a: e8 2d 50 00 00 call 11c2bc <_Thread_Enable_dispatch> *buffer = the_buffer; 11728f: 8b 45 e4 mov -0x1c(%ebp),%eax 117292: 89 03 mov %eax,(%ebx) 117294: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117296: 8d 65 f8 lea -0x8(%ebp),%esp 117299: 5b pop %ebx 11729a: 5e pop %esi 11729b: c9 leave 11729c: c3 ret 11729d: 8d 76 00 lea 0x0(%esi),%esi if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 1172a0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1172a5: 8d 65 f8 lea -0x8(%ebp),%esp 1172a8: 5b pop %ebx 1172a9: 5e pop %esi 1172aa: c9 leave 1172ab: c3 ret { register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 1172ac: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1172b1: 8d 65 f8 lea -0x8(%ebp),%esp 1172b4: 5b pop %ebx 1172b5: 5e pop %esi 1172b6: c9 leave 1172b7: c3 ret the_partition->number_of_used_blocks += 1; _Thread_Enable_dispatch(); *buffer = the_buffer; return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1172b8: e8 ff 4f 00 00 call 11c2bc <_Thread_Enable_dispatch> 1172bd: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 1172c2: eb e1 jmp 1172a5 =============================================================================== 001172e8 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 1172e8: 55 push %ebp 1172e9: 89 e5 mov %esp,%ebp 1172eb: 56 push %esi 1172ec: 53 push %ebx 1172ed: 83 ec 14 sub $0x14,%esp 1172f0: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 1172f3: 8d 45 f4 lea -0xc(%ebp),%eax 1172f6: 50 push %eax 1172f7: ff 75 08 pushl 0x8(%ebp) 1172fa: 68 80 3f 14 00 push $0x143f80 1172ff: e8 d4 46 00 00 call 11b9d8 <_Objects_Get> 117304: 89 c3 mov %eax,%ebx register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 117306: 83 c4 10 add $0x10,%esp 117309: 8b 45 f4 mov -0xc(%ebp),%eax 11730c: 85 c0 test %eax,%eax 11730e: 74 0c je 11731c 117310: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117315: 8d 65 f8 lea -0x8(%ebp),%esp 117318: 5b pop %ebx 117319: 5e pop %esi 11731a: c9 leave 11731b: c3 ret ) { void *starting; void *ending; starting = the_partition->starting_address; 11731c: 8b 43 10 mov 0x10(%ebx),%eax ending = _Addresses_Add_offset( starting, the_partition->length ); 11731f: 8b 53 14 mov 0x14(%ebx),%edx const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 117322: 39 c6 cmp %eax,%esi 117324: 72 3a jb 117360 117326: 8d 14 10 lea (%eax,%edx,1),%edx 117329: 39 d6 cmp %edx,%esi 11732b: 77 33 ja 117360 <== NEVER TAKEN return ( 11732d: 89 f2 mov %esi,%edx 11732f: 29 c2 sub %eax,%edx 117331: 89 d0 mov %edx,%eax 117333: 31 d2 xor %edx,%edx 117335: f7 73 18 divl 0x18(%ebx) 117338: 85 d2 test %edx,%edx 11733a: 75 24 jne 117360 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 11733c: 83 ec 08 sub $0x8,%esp 11733f: 56 push %esi 117340: 8d 43 24 lea 0x24(%ebx),%eax 117343: 50 push %eax 117344: e8 d3 2d 00 00 call 11a11c <_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; 117349: ff 4b 20 decl 0x20(%ebx) _Thread_Enable_dispatch(); 11734c: e8 6b 4f 00 00 call 11c2bc <_Thread_Enable_dispatch> 117351: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 117353: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 117356: 8d 65 f8 lea -0x8(%ebp),%esp 117359: 5b pop %ebx 11735a: 5e pop %esi 11735b: c9 leave 11735c: c3 ret 11735d: 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(); 117360: e8 57 4f 00 00 call 11c2bc <_Thread_Enable_dispatch> 117365: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11736a: 8d 65 f8 lea -0x8(%ebp),%esp 11736d: 5b pop %ebx 11736e: 5e pop %esi 11736f: c9 leave 117370: c3 ret =============================================================================== 0010f2ac : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { 10f2ac: 55 push %ebp 10f2ad: 89 e5 mov %esp,%ebp 10f2af: 83 ec 08 sub $0x8,%esp if (!rtems_pipe_configured) 10f2b2: 80 3d 04 77 12 00 00 cmpb $0x0,0x127704 10f2b9: 74 09 je 10f2c4 <== ALWAYS TAKEN return; if (rtems_pipe_semaphore) 10f2bb: a1 08 91 12 00 mov 0x129108,%eax <== NOT EXECUTED 10f2c0: 85 c0 test %eax,%eax <== NOT EXECUTED 10f2c2: 74 04 je 10f2c8 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); rtems_pipe_no = now; } 10f2c4: c9 leave 10f2c5: c3 ret 10f2c6: 66 90 xchg %ax,%ax if (rtems_pipe_semaphore) return; rtems_status_code sc; sc = rtems_semaphore_create( 10f2c8: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f2cb: 68 08 91 12 00 push $0x129108 <== NOT EXECUTED 10f2d0: 6a 00 push $0x0 <== NOT EXECUTED 10f2d2: 6a 54 push $0x54 <== NOT EXECUTED 10f2d4: 6a 01 push $0x1 <== NOT EXECUTED 10f2d6: 68 45 50 49 50 push $0x50495045 <== NOT EXECUTED 10f2db: e8 50 c7 ff ff call 10ba30 <== NOT EXECUTED rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) 10f2e0: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10f2e3: 85 c0 test %eax,%eax <== NOT EXECUTED 10f2e5: 75 0d jne 10f2f4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interval now; now = rtems_clock_get_ticks_since_boot(); 10f2e7: e8 c0 c2 ff ff call 10b5ac <== NOT EXECUTED rtems_pipe_no = now; 10f2ec: 66 a3 10 91 12 00 mov %ax,0x129110 <== NOT EXECUTED } 10f2f2: c9 leave <== NOT EXECUTED 10f2f3: c3 ret <== NOT EXECUTED sc = rtems_semaphore_create( rtems_build_name ('P', 'I', 'P', 'E'), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_pipe_semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10f2f4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10f2f7: 50 push %eax <== NOT EXECUTED 10f2f8: e8 e7 cf ff ff call 10c2e4 <== NOT EXECUTED =============================================================================== 00116710 : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { 116710: 55 push %ebp 116711: 89 e5 mov %esp,%ebp 116713: 57 push %edi 116714: 56 push %esi 116715: 53 push %ebx 116716: 83 ec 1c sub $0x1c,%esp 116719: 8b 5d 08 mov 0x8(%ebp),%ebx 11671c: 8b 55 0c mov 0xc(%ebp),%edx 11671f: 8b 7d 10 mov 0x10(%ebp),%edi 116722: 8b 75 18 mov 0x18(%ebp),%esi register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 116725: 85 db test %ebx,%ebx 116727: 74 1b je 116744 return RTEMS_INVALID_NAME; if ( !id ) 116729: 85 f6 test %esi,%esi 11672b: 74 08 je 116735 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 11672d: 89 f8 mov %edi,%eax 11672f: 09 d0 or %edx,%eax 116731: a8 03 test $0x3,%al 116733: 74 1f je 116754 (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 116735: b8 09 00 00 00 mov $0x9,%eax } 11673a: 8d 65 f4 lea -0xc(%ebp),%esp 11673d: 5b pop %ebx 11673e: 5e pop %esi 11673f: 5f pop %edi 116740: c9 leave 116741: c3 ret 116742: 66 90 xchg %ax,%ax rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) 116744: b8 03 00 00 00 mov $0x3,%eax ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 116749: 8d 65 f4 lea -0xc(%ebp),%esp 11674c: 5b pop %ebx 11674d: 5e pop %esi 11674e: 5f pop %edi 11674f: c9 leave 116750: c3 ret 116751: 8d 76 00 lea 0x0(%esi),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 116754: a1 f8 40 14 00 mov 0x1440f8,%eax 116759: 40 inc %eax 11675a: a3 f8 40 14 00 mov %eax,0x1440f8 * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 11675f: 83 ec 0c sub $0xc,%esp 116762: 68 40 3f 14 00 push $0x143f40 116767: 89 55 e4 mov %edx,-0x1c(%ebp) 11676a: e8 7d 4d 00 00 call 11b4ec <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 11676f: 83 c4 10 add $0x10,%esp 116772: 85 c0 test %eax,%eax 116774: 8b 55 e4 mov -0x1c(%ebp),%edx 116777: 74 33 je 1167ac _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 116779: 89 50 10 mov %edx,0x10(%eax) the_port->external_base = external_start; 11677c: 89 78 14 mov %edi,0x14(%eax) the_port->length = length - 1; 11677f: 8b 55 14 mov 0x14(%ebp),%edx 116782: 4a dec %edx 116783: 89 50 18 mov %edx,0x18(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 116786: 8b 50 08 mov 0x8(%eax),%edx 116789: 0f b7 fa movzwl %dx,%edi 11678c: 8b 0d 5c 3f 14 00 mov 0x143f5c,%ecx 116792: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 116795: 89 58 0c mov %ebx,0xc(%eax) &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 116798: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 11679a: e8 1d 5b 00 00 call 11c2bc <_Thread_Enable_dispatch> 11679f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1167a1: 8d 65 f4 lea -0xc(%ebp),%esp 1167a4: 5b pop %ebx 1167a5: 5e pop %esi 1167a6: 5f pop %edi 1167a7: c9 leave 1167a8: c3 ret 1167a9: 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(); 1167ac: e8 0b 5b 00 00 call 11c2bc <_Thread_Enable_dispatch> 1167b1: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 1167b6: eb 82 jmp 11673a =============================================================================== 001167b8 : */ rtems_status_code rtems_port_delete( rtems_id id ) { 1167b8: 55 push %ebp 1167b9: 89 e5 mov %esp,%ebp 1167bb: 83 ec 2c sub $0x2c,%esp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 1167be: 8d 45 f4 lea -0xc(%ebp),%eax 1167c1: 50 push %eax 1167c2: ff 75 08 pushl 0x8(%ebp) 1167c5: 68 40 3f 14 00 push $0x143f40 1167ca: e8 09 52 00 00 call 11b9d8 <_Objects_Get> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1167cf: 83 c4 10 add $0x10,%esp 1167d2: 8b 4d f4 mov -0xc(%ebp),%ecx 1167d5: 85 c9 test %ecx,%ecx 1167d7: 75 2f jne 116808 case OBJECTS_LOCAL: _Objects_Close( &_Dual_ported_memory_Information, &the_port->Object ); 1167d9: 83 ec 08 sub $0x8,%esp 1167dc: 50 push %eax 1167dd: 68 40 3f 14 00 push $0x143f40 1167e2: 89 45 e4 mov %eax,-0x1c(%ebp) 1167e5: e8 7e 4d 00 00 call 11b568 <_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 ); 1167ea: 58 pop %eax 1167eb: 5a pop %edx 1167ec: 8b 45 e4 mov -0x1c(%ebp),%eax 1167ef: 50 push %eax 1167f0: 68 40 3f 14 00 push $0x143f40 1167f5: e8 72 50 00 00 call 11b86c <_Objects_Free> _Dual_ported_memory_Free( the_port ); _Thread_Enable_dispatch(); 1167fa: e8 bd 5a 00 00 call 11c2bc <_Thread_Enable_dispatch> 1167ff: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 116801: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116804: c9 leave 116805: c3 ret 116806: 66 90 xchg %ax,%ax { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 116808: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11680d: c9 leave 11680e: c3 ret =============================================================================== 00116810 : rtems_status_code rtems_port_external_to_internal( rtems_id id, void *external, void **internal ) { 116810: 55 push %ebp 116811: 89 e5 mov %esp,%ebp 116813: 56 push %esi 116814: 53 push %ebx 116815: 83 ec 10 sub $0x10,%esp 116818: 8b 75 0c mov 0xc(%ebp),%esi 11681b: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 11681e: 85 db test %ebx,%ebx 116820: 74 4e je 116870 RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 116822: 51 push %ecx 116823: 8d 45 f4 lea -0xc(%ebp),%eax 116826: 50 push %eax 116827: ff 75 08 pushl 0x8(%ebp) 11682a: 68 40 3f 14 00 push $0x143f40 11682f: e8 a4 51 00 00 call 11b9d8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 116834: 83 c4 10 add $0x10,%esp 116837: 8b 55 f4 mov -0xc(%ebp),%edx 11683a: 85 d2 test %edx,%edx 11683c: 74 0e je 11684c 11683e: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116843: 8d 65 f8 lea -0x8(%ebp),%esp 116846: 5b pop %ebx 116847: 5e pop %esi 116848: c9 leave 116849: c3 ret 11684a: 66 90 xchg %ax,%ax return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( external, the_port->external_base ); 11684c: 89 f2 mov %esi,%edx 11684e: 2b 50 14 sub 0x14(%eax),%edx if ( ending > the_port->length ) 116851: 3b 50 18 cmp 0x18(%eax),%edx 116854: 77 16 ja 11686c *internal = external; else *internal = _Addresses_Add_offset( the_port->internal_base, 116856: 03 50 10 add 0x10(%eax),%edx 116859: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 11685b: e8 5c 5a 00 00 call 11c2bc <_Thread_Enable_dispatch> 116860: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116862: 8d 65 f8 lea -0x8(%ebp),%esp 116865: 5b pop %ebx 116866: 5e pop %esi 116867: c9 leave 116868: c3 ret 116869: 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; 11686c: 89 33 mov %esi,(%ebx) 11686e: eb eb jmp 11685b { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !internal ) 116870: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116875: 8d 65 f8 lea -0x8(%ebp),%esp 116878: 5b pop %ebx 116879: 5e pop %esi 11687a: c9 leave 11687b: c3 ret =============================================================================== 001168a0 : rtems_status_code rtems_port_internal_to_external( rtems_id id, void *internal, void **external ) { 1168a0: 55 push %ebp 1168a1: 89 e5 mov %esp,%ebp 1168a3: 56 push %esi 1168a4: 53 push %ebx 1168a5: 83 ec 10 sub $0x10,%esp 1168a8: 8b 75 0c mov 0xc(%ebp),%esi 1168ab: 8b 5d 10 mov 0x10(%ebp),%ebx register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 1168ae: 85 db test %ebx,%ebx 1168b0: 74 4e je 116900 1168b2: 51 push %ecx 1168b3: 8d 45 f4 lea -0xc(%ebp),%eax 1168b6: 50 push %eax 1168b7: ff 75 08 pushl 0x8(%ebp) 1168ba: 68 40 3f 14 00 push $0x143f40 1168bf: e8 14 51 00 00 call 11b9d8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 1168c4: 83 c4 10 add $0x10,%esp 1168c7: 8b 55 f4 mov -0xc(%ebp),%edx 1168ca: 85 d2 test %edx,%edx 1168cc: 74 0e je 1168dc 1168ce: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1168d3: 8d 65 f8 lea -0x8(%ebp),%esp 1168d6: 5b pop %ebx 1168d7: 5e pop %esi 1168d8: c9 leave 1168d9: c3 ret 1168da: 66 90 xchg %ax,%ax the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: ending = _Addresses_Subtract( internal, the_port->internal_base ); 1168dc: 89 f2 mov %esi,%edx 1168de: 2b 50 10 sub 0x10(%eax),%edx if ( ending > the_port->length ) 1168e1: 3b 50 18 cmp 0x18(%eax),%edx 1168e4: 77 16 ja 1168fc *external = internal; else *external = _Addresses_Add_offset( the_port->external_base, 1168e6: 03 50 14 add 0x14(%eax),%edx 1168e9: 89 13 mov %edx,(%ebx) ending ); _Thread_Enable_dispatch(); 1168eb: e8 cc 59 00 00 call 11c2bc <_Thread_Enable_dispatch> 1168f0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1168f2: 8d 65 f8 lea -0x8(%ebp),%esp 1168f5: 5b pop %ebx 1168f6: 5e pop %esi 1168f7: c9 leave 1168f8: c3 ret 1168f9: 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; 1168fc: 89 33 mov %esi,(%ebx) 1168fe: eb eb jmp 1168eb { register Dual_ported_memory_Control *the_port; Objects_Locations location; uint32_t ending; if ( !external ) 116900: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 116905: 8d 65 f8 lea -0x8(%ebp),%esp 116908: 5b pop %ebx 116909: 5e pop %esi 11690a: c9 leave 11690b: c3 ret =============================================================================== 00117374 : */ rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { 117374: 55 push %ebp 117375: 89 e5 mov %esp,%ebp 117377: 53 push %ebx 117378: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 11737b: 8d 45 f4 lea -0xc(%ebp),%eax 11737e: 50 push %eax 11737f: ff 75 08 pushl 0x8(%ebp) 117382: 68 c0 3f 14 00 push $0x143fc0 117387: e8 4c 46 00 00 call 11b9d8 <_Objects_Get> 11738c: 89 c3 mov %eax,%ebx Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 11738e: 83 c4 10 add $0x10,%esp 117391: 8b 45 f4 mov -0xc(%ebp),%eax 117394: 85 c0 test %eax,%eax 117396: 74 0c je 1173a4 117398: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11739d: 8b 5d fc mov -0x4(%ebp),%ebx 1173a0: c9 leave 1173a1: c3 ret 1173a2: 66 90 xchg %ax,%ax the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 1173a4: 8b 43 40 mov 0x40(%ebx),%eax 1173a7: 3b 05 b8 41 14 00 cmp 0x1441b8,%eax 1173ad: 74 11 je 1173c0 _Thread_Enable_dispatch(); 1173af: e8 08 4f 00 00 call 11c2bc <_Thread_Enable_dispatch> 1173b4: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1173b9: 8b 5d fc mov -0x4(%ebp),%ebx 1173bc: c9 leave 1173bd: c3 ret 1173be: 66 90 xchg %ax,%ax 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 ); 1173c0: 83 ec 0c sub $0xc,%esp 1173c3: 8d 43 10 lea 0x10(%ebx),%eax 1173c6: 50 push %eax 1173c7: e8 5c 63 00 00 call 11d728 <_Watchdog_Remove> the_period->state = RATE_MONOTONIC_INACTIVE; 1173cc: c7 43 38 00 00 00 00 movl $0x0,0x38(%ebx) _Thread_Enable_dispatch(); 1173d3: e8 e4 4e 00 00 call 11c2bc <_Thread_Enable_dispatch> 1173d8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1173da: 83 c4 10 add $0x10,%esp 1173dd: eb be jmp 11739d =============================================================================== 0010c930 : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { 10c930: 55 push %ebp 10c931: 89 e5 mov %esp,%ebp 10c933: 57 push %edi 10c934: 56 push %esi 10c935: 53 push %ebx 10c936: 83 ec 1c sub $0x1c,%esp 10c939: 8b 5d 08 mov 0x8(%ebp),%ebx 10c93c: 8b 75 0c mov 0xc(%ebp),%esi Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c93f: 85 db test %ebx,%ebx 10c941: 0f 84 a9 00 00 00 je 10c9f0 return RTEMS_INVALID_NAME; if ( !id ) 10c947: 85 f6 test %esi,%esi 10c949: 0f 84 c5 00 00 00 je 10ca14 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10c94f: a1 58 c3 12 00 mov 0x12c358,%eax 10c954: 40 inc %eax 10c955: a3 58 c3 12 00 mov %eax,0x12c358 * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) 10c95a: 83 ec 0c sub $0xc,%esp 10c95d: 68 60 c2 12 00 push $0x12c260 10c962: e8 c1 1e 00 00 call 10e828 <_Objects_Allocate> 10c967: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { 10c969: 83 c4 10 add $0x10,%esp 10c96c: 85 c0 test %eax,%eax 10c96e: 0f 84 8c 00 00 00 je 10ca00 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; 10c974: a1 18 c4 12 00 mov 0x12c418,%eax 10c979: 89 42 40 mov %eax,0x40(%edx) the_period->state = RATE_MONOTONIC_INACTIVE; 10c97c: 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; 10c983: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 10c98a: c7 42 2c 00 00 00 00 movl $0x0,0x2c(%edx) the_watchdog->id = id; 10c991: c7 42 30 00 00 00 00 movl $0x0,0x30(%edx) the_watchdog->user_data = user_data; 10c998: 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 ); 10c99f: 8d 42 54 lea 0x54(%edx),%eax 10c9a2: 89 45 e4 mov %eax,-0x1c(%ebp) 10c9a5: b9 38 00 00 00 mov $0x38,%ecx 10c9aa: 31 c0 xor %eax,%eax 10c9ac: 8b 7d e4 mov -0x1c(%ebp),%edi 10c9af: f3 aa rep stos %al,%es:(%edi) 10c9b1: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10c9b8: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10c9bf: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10c9c6: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c9cd: 8b 42 08 mov 0x8(%edx),%eax 10c9d0: 0f b7 f8 movzwl %ax,%edi 10c9d3: 8b 0d 7c c2 12 00 mov 0x12c27c,%ecx 10c9d9: 89 14 b9 mov %edx,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c9dc: 89 5a 0c mov %ebx,0xc(%edx) &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; 10c9df: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10c9e1: e8 4a 2c 00 00 call 10f630 <_Thread_Enable_dispatch> 10c9e6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c9e8: 8d 65 f4 lea -0xc(%ebp),%esp 10c9eb: 5b pop %ebx 10c9ec: 5e pop %esi 10c9ed: 5f pop %edi 10c9ee: c9 leave 10c9ef: c3 ret rtems_id *id ) { Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) 10c9f0: b8 03 00 00 00 mov $0x3,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c9f5: 8d 65 f4 lea -0xc(%ebp),%esp 10c9f8: 5b pop %ebx 10c9f9: 5e pop %esi 10c9fa: 5f pop %edi 10c9fb: c9 leave 10c9fc: c3 ret 10c9fd: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); 10ca00: e8 2b 2c 00 00 call 10f630 <_Thread_Enable_dispatch> 10ca05: b8 05 00 00 00 mov $0x5,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca0a: 8d 65 f4 lea -0xc(%ebp),%esp 10ca0d: 5b pop %ebx 10ca0e: 5e pop %esi 10ca0f: 5f pop %edi 10ca10: c9 leave 10ca11: c3 ret 10ca12: 66 90 xchg %ax,%ax Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10ca14: b8 09 00 00 00 mov $0x9,%eax ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ca19: 8d 65 f4 lea -0xc(%ebp),%esp 10ca1c: 5b pop %ebx 10ca1d: 5e pop %esi 10ca1e: 5f pop %edi 10ca1f: c9 leave 10ca20: c3 ret =============================================================================== 00113884 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 113884: 55 push %ebp 113885: 89 e5 mov %esp,%ebp 113887: 53 push %ebx 113888: 83 ec 24 sub $0x24,%esp 11388b: 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 ) 11388e: 85 db test %ebx,%ebx 113890: 0f 84 92 00 00 00 je 113928 113896: 50 push %eax 113897: 8d 45 f4 lea -0xc(%ebp),%eax 11389a: 50 push %eax 11389b: ff 75 08 pushl 0x8(%ebp) 11389e: 68 60 c2 12 00 push $0x12c260 1138a3: e8 14 b5 ff ff call 10edbc <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1138a8: 83 c4 10 add $0x10,%esp 1138ab: 8b 4d f4 mov -0xc(%ebp),%ecx 1138ae: 85 c9 test %ecx,%ecx 1138b0: 74 0a je 1138bc 1138b2: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1138b7: 8b 5d fc mov -0x4(%ebp),%ebx 1138ba: c9 leave 1138bb: c3 ret the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 1138bc: 8b 50 40 mov 0x40(%eax),%edx 1138bf: 8b 52 08 mov 0x8(%edx),%edx 1138c2: 89 13 mov %edx,(%ebx) status->state = the_period->state; 1138c4: 8b 50 38 mov 0x38(%eax),%edx 1138c7: 89 53 04 mov %edx,0x4(%ebx) /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { 1138ca: 85 d2 test %edx,%edx 1138cc: 75 2a jne 1138f8 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); 1138ce: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) 1138d5: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) _Timespec_Set_to_zero( &status->executed_since_last_period ); 1138dc: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) 1138e3: 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(); 1138ea: e8 41 bd ff ff call 10f630 <_Thread_Enable_dispatch> 1138ef: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1138f1: 8b 5d fc mov -0x4(%ebp),%ebx 1138f4: c9 leave 1138f5: c3 ret 1138f6: 66 90 xchg %ax,%ax /* * Grab the current status. */ valid_status = _Rate_monotonic_Get_status( 1138f8: 52 push %edx 1138f9: 8d 55 ec lea -0x14(%ebp),%edx 1138fc: 52 push %edx 1138fd: 8d 55 e4 lea -0x1c(%ebp),%edx 113900: 52 push %edx 113901: 50 push %eax 113902: e8 b5 91 ff ff call 10cabc <_Rate_monotonic_Get_status> the_period, &since_last_period, &executed ); if (!valid_status) { 113907: 83 c4 10 add $0x10,%esp 11390a: 84 c0 test %al,%al 11390c: 74 26 je 113934 _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 11390e: 8b 45 e4 mov -0x1c(%ebp),%eax 113911: 8b 55 e8 mov -0x18(%ebp),%edx 113914: 89 43 08 mov %eax,0x8(%ebx) 113917: 89 53 0c mov %edx,0xc(%ebx) &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 11391a: 8b 45 ec mov -0x14(%ebp),%eax 11391d: 8b 55 f0 mov -0x10(%ebp),%edx 113920: 89 43 10 mov %eax,0x10(%ebx) 113923: 89 53 14 mov %edx,0x14(%ebx) 113926: eb c2 jmp 1138ea Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) 113928: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11392d: 8b 5d fc mov -0x4(%ebp),%ebx 113930: c9 leave 113931: c3 ret 113932: 66 90 xchg %ax,%ax valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); 113934: e8 f7 bc ff ff call 10f630 <_Thread_Enable_dispatch> 113939: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 11393e: e9 74 ff ff ff jmp 1138b7 =============================================================================== 0010cc44 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 10cc44: 55 push %ebp 10cc45: 89 e5 mov %esp,%ebp 10cc47: 57 push %edi 10cc48: 56 push %esi 10cc49: 53 push %ebx 10cc4a: 83 ec 30 sub $0x30,%esp 10cc4d: 8b 5d 08 mov 0x8(%ebp),%ebx 10cc50: 8b 75 0c mov 0xc(%ebp),%esi RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 10cc53: 8d 45 e4 lea -0x1c(%ebp),%eax 10cc56: 50 push %eax 10cc57: 53 push %ebx 10cc58: 68 60 c2 12 00 push $0x12c260 10cc5d: e8 5a 21 00 00 call 10edbc <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10cc62: 83 c4 10 add $0x10,%esp 10cc65: 8b 7d e4 mov -0x1c(%ebp),%edi 10cc68: 85 ff test %edi,%edi 10cc6a: 74 10 je 10cc7c the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 10cc6c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc71: 8d 65 f4 lea -0xc(%ebp),%esp 10cc74: 5b pop %ebx 10cc75: 5e pop %esi 10cc76: 5f pop %edi 10cc77: c9 leave 10cc78: c3 ret 10cc79: 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 ) ) { 10cc7c: 8b 50 40 mov 0x40(%eax),%edx 10cc7f: 3b 15 18 c4 12 00 cmp 0x12c418,%edx 10cc85: 74 15 je 10cc9c _Thread_Enable_dispatch(); 10cc87: e8 a4 29 00 00 call 10f630 <_Thread_Enable_dispatch> 10cc8c: b8 17 00 00 00 mov $0x17,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc91: 8d 65 f4 lea -0xc(%ebp),%esp 10cc94: 5b pop %ebx 10cc95: 5e pop %esi 10cc96: 5f pop %edi 10cc97: c9 leave 10cc98: c3 ret 10cc99: 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 ) { 10cc9c: 85 f6 test %esi,%esi 10cc9e: 0f 84 b0 00 00 00 je 10cd54 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 10cca4: 9c pushf 10cca5: fa cli 10cca6: 5f pop %edi switch ( the_period->state ) { 10cca7: 8b 50 38 mov 0x38(%eax),%edx 10ccaa: 83 fa 02 cmp $0x2,%edx 10ccad: 0f 84 bd 00 00 00 je 10cd70 10ccb3: 83 fa 04 cmp $0x4,%edx 10ccb6: 74 5c je 10cd14 10ccb8: 85 d2 test %edx,%edx 10ccba: 75 b0 jne 10cc6c <== NEVER TAKEN case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 10ccbc: 57 push %edi 10ccbd: 9d popf /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 10ccbe: 83 ec 0c sub $0xc,%esp 10ccc1: 50 push %eax 10ccc2: 89 45 d4 mov %eax,-0x2c(%ebp) 10ccc5: e8 7e fd ff ff call 10ca48 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; 10ccca: 8b 45 d4 mov -0x2c(%ebp),%eax 10cccd: 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; 10ccd4: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10ccdb: c7 40 2c 9c d0 10 00 movl $0x10d09c,0x2c(%eax) the_watchdog->id = id; 10cce2: 89 58 30 mov %ebx,0x30(%eax) the_watchdog->user_data = user_data; 10cce5: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 10ccec: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10ccef: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10ccf2: 5a pop %edx 10ccf3: 59 pop %ecx 10ccf4: 83 c0 10 add $0x10,%eax 10ccf7: 50 push %eax 10ccf8: 68 38 c4 12 00 push $0x12c438 10ccfd: e8 76 3a 00 00 call 110778 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10cd02: e8 29 29 00 00 call 10f630 <_Thread_Enable_dispatch> 10cd07: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cd09: 83 c4 10 add $0x10,%esp 10cd0c: e9 60 ff ff ff jmp 10cc71 10cd11: 8d 76 00 lea 0x0(%esi),%esi case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 10cd14: 83 ec 0c sub $0xc,%esp 10cd17: 50 push %eax 10cd18: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd1b: e8 34 fe ff ff call 10cb54 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 10cd20: 57 push %edi 10cd21: 9d popf the_period->state = RATE_MONOTONIC_ACTIVE; 10cd22: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd25: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) the_period->next_length = length; 10cd2c: 89 70 3c mov %esi,0x3c(%eax) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10cd2f: 89 70 1c mov %esi,0x1c(%eax) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10cd32: 59 pop %ecx 10cd33: 5b pop %ebx 10cd34: 83 c0 10 add $0x10,%eax 10cd37: 50 push %eax 10cd38: 68 38 c4 12 00 push $0x12c438 10cd3d: e8 36 3a 00 00 call 110778 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 10cd42: e8 e9 28 00 00 call 10f630 <_Thread_Enable_dispatch> 10cd47: b8 06 00 00 00 mov $0x6,%eax return RTEMS_TIMEOUT; 10cd4c: 83 c4 10 add $0x10,%esp 10cd4f: e9 1d ff ff ff jmp 10cc71 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10cd54: 8b 40 38 mov 0x38(%eax),%eax 10cd57: 83 f8 04 cmp $0x4,%eax 10cd5a: 76 74 jbe 10cdd0 <== ALWAYS TAKEN 10cd5c: 31 c0 xor %eax,%eax case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 10cd5e: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd61: e8 ca 28 00 00 call 10f630 <_Thread_Enable_dispatch> return( return_value ); 10cd66: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd69: e9 03 ff ff ff jmp 10cc71 10cd6e: 66 90 xchg %ax,%ax case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 10cd70: 83 ec 0c sub $0xc,%esp 10cd73: 50 push %eax 10cd74: 89 45 d4 mov %eax,-0x2c(%ebp) 10cd77: e8 d8 fd ff ff call 10cb54 <_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; 10cd7c: 8b 45 d4 mov -0x2c(%ebp),%eax 10cd7f: c7 40 38 01 00 00 00 movl $0x1,0x38(%eax) the_period->next_length = length; 10cd86: 89 70 3c mov %esi,0x3c(%eax) _ISR_Enable( level ); 10cd89: 57 push %edi 10cd8a: 9d popf _Thread_Executing->Wait.id = the_period->Object.id; 10cd8b: 8b 15 18 c4 12 00 mov 0x12c418,%edx 10cd91: 8b 48 08 mov 0x8(%eax),%ecx 10cd94: 89 4a 20 mov %ecx,0x20(%edx) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 10cd97: 5e pop %esi 10cd98: 5f pop %edi 10cd99: 68 00 40 00 00 push $0x4000 10cd9e: 52 push %edx 10cd9f: 89 45 d4 mov %eax,-0x2c(%ebp) 10cda2: e8 a1 31 00 00 call 10ff48 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 10cda7: 9c pushf 10cda8: fa cli 10cda9: 59 pop %ecx local_state = the_period->state; 10cdaa: 8b 45 d4 mov -0x2c(%ebp),%eax 10cdad: 8b 50 38 mov 0x38(%eax),%edx the_period->state = RATE_MONOTONIC_ACTIVE; 10cdb0: c7 40 38 02 00 00 00 movl $0x2,0x38(%eax) _ISR_Enable( level ); 10cdb7: 51 push %ecx 10cdb8: 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 ) 10cdb9: 83 c4 10 add $0x10,%esp 10cdbc: 83 fa 03 cmp $0x3,%edx 10cdbf: 74 18 je 10cdd9 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 10cdc1: e8 6a 28 00 00 call 10f630 <_Thread_Enable_dispatch> 10cdc6: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cdc8: e9 a4 fe ff ff jmp 10cc71 10cdcd: 8d 76 00 lea 0x0(%esi),%esi _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 10cdd0: 8b 04 85 68 4d 12 00 mov 0x124d68(,%eax,4),%eax 10cdd7: eb 85 jmp 10cd5e /* * 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 ); 10cdd9: 83 ec 08 sub $0x8,%esp 10cddc: 68 00 40 00 00 push $0x4000 10cde1: ff 35 18 c4 12 00 pushl 0x12c418 10cde7: e8 9c 24 00 00 call 10f288 <_Thread_Clear_state> 10cdec: 83 c4 10 add $0x10,%esp 10cdef: eb d0 jmp 10cdc1 =============================================================================== 0010cdf4 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 10cdf4: 55 push %ebp 10cdf5: 89 e5 mov %esp,%ebp 10cdf7: 57 push %edi 10cdf8: 56 push %esi 10cdf9: 53 push %ebx 10cdfa: 83 ec 7c sub $0x7c,%esp 10cdfd: 8b 7d 08 mov 0x8(%ebp),%edi 10ce00: 8b 75 0c mov 0xc(%ebp),%esi rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 10ce03: 85 f6 test %esi,%esi 10ce05: 0f 84 bd 00 00 00 je 10cec8 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); 10ce0b: 83 ec 08 sub $0x8,%esp 10ce0e: 68 7c 4d 12 00 push $0x124d7c 10ce13: 57 push %edi 10ce14: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 10ce16: 59 pop %ecx 10ce17: 5b pop %ebx 10ce18: 68 b4 4d 12 00 push $0x124db4 10ce1d: 57 push %edi 10ce1e: ff d6 call *%esi (*print)( context, "--- Wall times are in seconds ---\n" ); 10ce20: 58 pop %eax 10ce21: 5a pop %edx 10ce22: 68 d8 4d 12 00 push $0x124dd8 10ce27: 57 push %edi 10ce28: ff d6 call *%esi Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 10ce2a: 59 pop %ecx 10ce2b: 5b pop %ebx 10ce2c: 68 fc 4d 12 00 push $0x124dfc 10ce31: 57 push %edi 10ce32: ff d6 call *%esi #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 10ce34: 58 pop %eax 10ce35: 5a pop %edx 10ce36: 68 48 4e 12 00 push $0x124e48 10ce3b: 57 push %edi 10ce3c: ff d6 call *%esi /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 10ce3e: 8b 1d 68 c2 12 00 mov 0x12c268,%ebx 10ce44: 83 c4 10 add $0x10,%esp 10ce47: 3b 1d 6c c2 12 00 cmp 0x12c26c,%ebx 10ce4d: 77 79 ja 10cec8 <== NEVER TAKEN struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10ce4f: 89 75 84 mov %esi,-0x7c(%ebp) 10ce52: eb 09 jmp 10ce5d * 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++ ) { 10ce54: 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 ; 10ce55: 39 1d 6c c2 12 00 cmp %ebx,0x12c26c 10ce5b: 72 6b jb 10cec8 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 10ce5d: 83 ec 08 sub $0x8,%esp 10ce60: 8d 45 88 lea -0x78(%ebp),%eax 10ce63: 50 push %eax 10ce64: 53 push %ebx 10ce65: e8 6e 69 00 00 call 1137d8 if ( status != RTEMS_SUCCESSFUL ) 10ce6a: 83 c4 10 add $0x10,%esp 10ce6d: 85 c0 test %eax,%eax 10ce6f: 75 e3 jne 10ce54 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 10ce71: 83 ec 08 sub $0x8,%esp 10ce74: 8d 55 c0 lea -0x40(%ebp),%edx 10ce77: 52 push %edx 10ce78: 53 push %ebx 10ce79: e8 06 6a 00 00 call 113884 #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 10ce7e: 83 c4 0c add $0xc,%esp 10ce81: 8d 45 e3 lea -0x1d(%ebp),%eax 10ce84: 50 push %eax 10ce85: 6a 05 push $0x5 10ce87: ff 75 c0 pushl -0x40(%ebp) 10ce8a: e8 a9 02 00 00 call 10d138 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 10ce8f: 59 pop %ecx 10ce90: 5e pop %esi 10ce91: ff 75 8c pushl -0x74(%ebp) 10ce94: ff 75 88 pushl -0x78(%ebp) 10ce97: 8d 55 e3 lea -0x1d(%ebp),%edx 10ce9a: 52 push %edx 10ce9b: 53 push %ebx 10ce9c: 68 9a 4d 12 00 push $0x124d9a 10cea1: 57 push %edi 10cea2: ff 55 84 call *-0x7c(%ebp) ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 10cea5: 8b 45 88 mov -0x78(%ebp),%eax 10cea8: 83 c4 20 add $0x20,%esp 10ceab: 85 c0 test %eax,%eax 10cead: 75 21 jne 10ced0 (*print)( context, "\n" ); 10ceaf: 83 ec 08 sub $0x8,%esp 10ceb2: 68 3d 2f 12 00 push $0x122f3d 10ceb7: 57 push %edi 10ceb8: ff 55 84 call *-0x7c(%ebp) continue; 10cebb: 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++ ) { 10cebe: 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 ; 10cebf: 39 1d 6c c2 12 00 cmp %ebx,0x12c26c 10cec5: 73 96 jae 10ce5d <== ALWAYS TAKEN 10cec7: 90 nop the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 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 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 ); 10ced0: 52 push %edx 10ced1: 8d 55 d8 lea -0x28(%ebp),%edx 10ced4: 52 push %edx 10ced5: 50 push %eax 10ced6: 8d 45 a0 lea -0x60(%ebp),%eax 10ced9: 50 push %eax 10ceda: e8 01 35 00 00 call 1103e0 <_Timespec_Divide_by_integer> (*print)( context, 10cedf: 8b 4d dc mov -0x24(%ebp),%ecx 10cee2: be d3 4d 62 10 mov $0x10624dd3,%esi 10cee7: 89 c8 mov %ecx,%eax 10cee9: f7 ee imul %esi 10ceeb: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cef1: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cef7: c1 f8 06 sar $0x6,%eax 10cefa: c1 f9 1f sar $0x1f,%ecx 10cefd: 29 c8 sub %ecx,%eax 10ceff: 50 push %eax 10cf00: ff 75 d8 pushl -0x28(%ebp) 10cf03: 8b 4d 9c mov -0x64(%ebp),%ecx 10cf06: 89 c8 mov %ecx,%eax 10cf08: f7 ee imul %esi 10cf0a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf10: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf16: c1 f8 06 sar $0x6,%eax 10cf19: c1 f9 1f sar $0x1f,%ecx 10cf1c: 29 c8 sub %ecx,%eax 10cf1e: 50 push %eax 10cf1f: ff 75 98 pushl -0x68(%ebp) 10cf22: 8b 4d 94 mov -0x6c(%ebp),%ecx 10cf25: 89 c8 mov %ecx,%eax 10cf27: f7 ee imul %esi 10cf29: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 10cf2f: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf35: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf3b: c1 f8 06 sar $0x6,%eax 10cf3e: c1 f9 1f sar $0x1f,%ecx 10cf41: 29 c8 sub %ecx,%eax 10cf43: 50 push %eax 10cf44: ff 75 90 pushl -0x70(%ebp) 10cf47: 68 94 4e 12 00 push $0x124e94 10cf4c: 57 push %edi 10cf4d: ff 55 84 call *-0x7c(%ebp) struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 10cf50: 83 c4 2c add $0x2c,%esp 10cf53: 8d 55 d8 lea -0x28(%ebp),%edx 10cf56: 52 push %edx 10cf57: ff 75 88 pushl -0x78(%ebp) 10cf5a: 8d 45 b8 lea -0x48(%ebp),%eax 10cf5d: 50 push %eax 10cf5e: e8 7d 34 00 00 call 1103e0 <_Timespec_Divide_by_integer> (*print)( context, 10cf63: 8b 4d dc mov -0x24(%ebp),%ecx 10cf66: 89 c8 mov %ecx,%eax 10cf68: f7 ee imul %esi 10cf6a: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf70: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf76: c1 f8 06 sar $0x6,%eax 10cf79: c1 f9 1f sar $0x1f,%ecx 10cf7c: 29 c8 sub %ecx,%eax 10cf7e: 50 push %eax 10cf7f: ff 75 d8 pushl -0x28(%ebp) 10cf82: 8b 4d b4 mov -0x4c(%ebp),%ecx 10cf85: 89 c8 mov %ecx,%eax 10cf87: f7 ee imul %esi 10cf89: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cf8f: 8b 85 7c ff ff ff mov -0x84(%ebp),%eax 10cf95: c1 f8 06 sar $0x6,%eax 10cf98: c1 f9 1f sar $0x1f,%ecx 10cf9b: 29 c8 sub %ecx,%eax 10cf9d: 50 push %eax 10cf9e: ff 75 b0 pushl -0x50(%ebp) 10cfa1: 8b 4d ac mov -0x54(%ebp),%ecx 10cfa4: 89 c8 mov %ecx,%eax 10cfa6: f7 ee imul %esi 10cfa8: 89 85 78 ff ff ff mov %eax,-0x88(%ebp) 10cfae: 89 95 7c ff ff ff mov %edx,-0x84(%ebp) 10cfb4: 8b b5 7c ff ff ff mov -0x84(%ebp),%esi 10cfba: c1 fe 06 sar $0x6,%esi 10cfbd: 89 c8 mov %ecx,%eax 10cfbf: 99 cltd 10cfc0: 29 d6 sub %edx,%esi 10cfc2: 56 push %esi 10cfc3: ff 75 a8 pushl -0x58(%ebp) 10cfc6: 68 b4 4e 12 00 push $0x124eb4 10cfcb: 57 push %edi 10cfcc: ff 55 84 call *-0x7c(%ebp) 10cfcf: 83 c4 30 add $0x30,%esp 10cfd2: e9 7d fe ff ff jmp 10ce54 =============================================================================== 0010cff0 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 10cff0: 55 push %ebp 10cff1: 89 e5 mov %esp,%ebp 10cff3: 53 push %ebx 10cff4: 83 ec 04 sub $0x4,%esp 10cff7: a1 58 c3 12 00 mov 0x12c358,%eax 10cffc: 40 inc %eax 10cffd: a3 58 c3 12 00 mov %eax,0x12c358 /* * 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 ; 10d002: 8b 1d 68 c2 12 00 mov 0x12c268,%ebx 10d008: 3b 1d 6c c2 12 00 cmp 0x12c26c,%ebx 10d00e: 77 15 ja 10d025 <== NEVER TAKEN id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 10d010: 83 ec 0c sub $0xc,%esp 10d013: 53 push %ebx 10d014: e8 17 00 00 00 call 10d030 * 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++ ) { 10d019: 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 ; 10d01a: 83 c4 10 add $0x10,%esp 10d01d: 39 1d 6c c2 12 00 cmp %ebx,0x12c26c 10d023: 73 eb jae 10d010 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 10d025: 8b 5d fc mov -0x4(%ebp),%ebx 10d028: c9 leave } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 10d029: e9 02 26 00 00 jmp 10f630 <_Thread_Enable_dispatch> =============================================================================== 0010d030 : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { 10d030: 55 push %ebp 10d031: 89 e5 mov %esp,%ebp 10d033: 57 push %edi 10d034: 53 push %ebx 10d035: 83 ec 14 sub $0x14,%esp 10d038: 8d 45 f4 lea -0xc(%ebp),%eax 10d03b: 50 push %eax 10d03c: ff 75 08 pushl 0x8(%ebp) 10d03f: 68 60 c2 12 00 push $0x12c260 10d044: e8 73 1d 00 00 call 10edbc <_Objects_Get> 10d049: 89 c2 mov %eax,%edx Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10d04b: 83 c4 10 add $0x10,%esp 10d04e: 8b 45 f4 mov -0xc(%ebp),%eax 10d051: 85 c0 test %eax,%eax 10d053: 75 3b jne 10d090 case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 10d055: 8d 5a 54 lea 0x54(%edx),%ebx 10d058: b9 38 00 00 00 mov $0x38,%ecx 10d05d: 31 c0 xor %eax,%eax 10d05f: 89 df mov %ebx,%edi 10d061: f3 aa rep stos %al,%es:(%edi) 10d063: c7 42 5c ff ff ff 7f movl $0x7fffffff,0x5c(%edx) 10d06a: c7 42 60 ff ff ff 7f movl $0x7fffffff,0x60(%edx) 10d071: c7 42 74 ff ff ff 7f movl $0x7fffffff,0x74(%edx) 10d078: c7 42 78 ff ff ff 7f movl $0x7fffffff,0x78(%edx) _Thread_Enable_dispatch(); 10d07f: e8 ac 25 00 00 call 10f630 <_Thread_Enable_dispatch> 10d084: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d086: 8d 65 f8 lea -0x8(%ebp),%esp 10d089: 5b pop %ebx 10d08a: 5f pop %edi 10d08b: c9 leave 10d08c: c3 ret 10d08d: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 10d090: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10d095: 8d 65 f8 lea -0x8(%ebp),%esp 10d098: 5b pop %ebx 10d099: 5f pop %edi 10d09a: c9 leave 10d09b: c3 ret =============================================================================== 00117b18 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 117b18: 55 push %ebp 117b19: 89 e5 mov %esp,%ebp 117b1b: 57 push %edi 117b1c: 56 push %esi 117b1d: 53 push %ebx 117b1e: 83 ec 1c sub $0x1c,%esp 117b21: 8b 75 08 mov 0x8(%ebp),%esi 117b24: 8b 5d 0c mov 0xc(%ebp),%ebx 117b27: 8b 7d 1c mov 0x1c(%ebp),%edi rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117b2a: 85 f6 test %esi,%esi 117b2c: 0f 84 92 00 00 00 je 117bc4 return RTEMS_INVALID_NAME; if ( !starting_address ) 117b32: 85 db test %ebx,%ebx 117b34: 74 09 je 117b3f return RTEMS_INVALID_ADDRESS; if ( !id ) 117b36: 85 ff test %edi,%edi 117b38: 74 05 je 117b3f return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 117b3a: f6 c3 03 test $0x3,%bl 117b3d: 74 0d je 117b4c return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status; 117b3f: b8 09 00 00 00 mov $0x9,%eax } 117b44: 8d 65 f4 lea -0xc(%ebp),%esp 117b47: 5b pop %ebx 117b48: 5e pop %esi 117b49: 5f pop %edi 117b4a: c9 leave 117b4b: c3 ret return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117b4c: 83 ec 0c sub $0xc,%esp 117b4f: ff 35 b0 41 14 00 pushl 0x1441b0 117b55: e8 4a 25 00 00 call 11a0a4 <_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 ); 117b5a: c7 04 24 00 40 14 00 movl $0x144000,(%esp) 117b61: e8 86 39 00 00 call 11b4ec <_Objects_Allocate> 117b66: 89 c2 mov %eax,%edx the_region = _Region_Allocate(); if ( !the_region ) 117b68: 83 c4 10 add $0x10,%esp 117b6b: 85 c0 test %eax,%eax 117b6d: 74 65 je 117bd4 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 117b6f: ff 75 14 pushl 0x14(%ebp) 117b72: ff 75 10 pushl 0x10(%ebp) 117b75: 53 push %ebx 117b76: 8d 40 68 lea 0x68(%eax),%eax 117b79: 50 push %eax 117b7a: 89 55 e4 mov %edx,-0x1c(%ebp) 117b7d: e8 4e 34 00 00 call 11afd0 <_Heap_Initialize> 117b82: 8b 55 e4 mov -0x1c(%ebp),%edx 117b85: 89 42 5c mov %eax,0x5c(%edx) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 117b88: 83 c4 10 add $0x10,%esp 117b8b: 85 c0 test %eax,%eax 117b8d: 75 4d jne 117bdc */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117b8f: 83 ec 08 sub $0x8,%esp 117b92: 52 push %edx 117b93: 68 00 40 14 00 push $0x144000 117b98: e8 cf 3c 00 00 call 11b86c <_Objects_Free> 117b9d: b8 08 00 00 00 mov $0x8,%eax 117ba2: 83 c4 10 add $0x10,%esp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 117ba5: 83 ec 0c sub $0xc,%esp 117ba8: ff 35 b0 41 14 00 pushl 0x1441b0 117bae: 89 45 e4 mov %eax,-0x1c(%ebp) 117bb1: e8 36 25 00 00 call 11a0ec <_API_Mutex_Unlock> return return_status; 117bb6: 83 c4 10 add $0x10,%esp 117bb9: 8b 45 e4 mov -0x1c(%ebp),%eax } 117bbc: 8d 65 f4 lea -0xc(%ebp),%esp 117bbf: 5b pop %ebx 117bc0: 5e pop %esi 117bc1: 5f pop %edi 117bc2: c9 leave 117bc3: c3 ret ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 117bc4: b8 03 00 00 00 mov $0x3,%eax } } _RTEMS_Unlock_allocator(); return return_status; } 117bc9: 8d 65 f4 lea -0xc(%ebp),%esp 117bcc: 5b pop %ebx 117bcd: 5e pop %esi 117bce: 5f pop %edi 117bcf: c9 leave 117bd0: c3 ret 117bd1: 8d 76 00 lea 0x0(%esi),%esi _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) 117bd4: b8 05 00 00 00 mov $0x5,%eax 117bd9: eb ca jmp 117ba5 117bdb: 90 nop return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 117bdc: 89 5a 50 mov %ebx,0x50(%edx) the_region->length = length; 117bdf: 8b 45 10 mov 0x10(%ebp),%eax 117be2: 89 42 54 mov %eax,0x54(%edx) the_region->page_size = page_size; 117be5: 8b 45 14 mov 0x14(%ebp),%eax 117be8: 89 42 58 mov %eax,0x58(%edx) the_region->attribute_set = attribute_set; 117beb: 8b 45 18 mov 0x18(%ebp),%eax 117bee: 89 42 60 mov %eax,0x60(%edx) the_region->number_of_used_blocks = 0; 117bf1: c7 42 64 00 00 00 00 movl $0x0,0x64(%edx) _Thread_queue_Initialize( 117bf8: 6a 06 push $0x6 117bfa: 6a 40 push $0x40 117bfc: 8b 45 18 mov 0x18(%ebp),%eax 117bff: c1 e8 02 shr $0x2,%eax 117c02: 83 e0 01 and $0x1,%eax 117c05: 50 push %eax 117c06: 8d 42 10 lea 0x10(%edx),%eax 117c09: 50 push %eax 117c0a: 89 55 e4 mov %edx,-0x1c(%ebp) 117c0d: e8 6e 4e 00 00 call 11ca80 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 117c12: 8b 55 e4 mov -0x1c(%ebp),%edx 117c15: 8b 42 08 mov 0x8(%edx),%eax 117c18: 0f b7 d8 movzwl %ax,%ebx 117c1b: 8b 0d 1c 40 14 00 mov 0x14401c,%ecx 117c21: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 117c24: 89 72 0c mov %esi,0xc(%edx) &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 117c27: 89 07 mov %eax,(%edi) 117c29: 31 c0 xor %eax,%eax 117c2b: 83 c4 10 add $0x10,%esp 117c2e: e9 72 ff ff ff jmp 117ba5 =============================================================================== 00117c34 : */ rtems_status_code rtems_region_delete( rtems_id id ) { 117c34: 55 push %ebp 117c35: 89 e5 mov %esp,%ebp 117c37: 53 push %ebx 117c38: 83 ec 30 sub $0x30,%esp Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; _RTEMS_Lock_allocator(); 117c3b: ff 35 b0 41 14 00 pushl 0x1441b0 117c41: e8 5e 24 00 00 call 11a0a4 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 117c46: 83 c4 0c add $0xc,%esp 117c49: 8d 45 f4 lea -0xc(%ebp),%eax 117c4c: 50 push %eax 117c4d: ff 75 08 pushl 0x8(%ebp) 117c50: 68 00 40 14 00 push $0x144000 117c55: e8 42 3d 00 00 call 11b99c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117c5a: 83 c4 10 add $0x10,%esp 117c5d: 8b 5d f4 mov -0xc(%ebp),%ebx 117c60: 85 db test %ebx,%ebx 117c62: 74 1c je 117c80 117c64: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117c69: 83 ec 0c sub $0xc,%esp 117c6c: ff 35 b0 41 14 00 pushl 0x1441b0 117c72: e8 75 24 00 00 call 11a0ec <_API_Mutex_Unlock> return return_status; } 117c77: 89 d8 mov %ebx,%eax 117c79: 8b 5d fc mov -0x4(%ebp),%ebx 117c7c: c9 leave 117c7d: c3 ret 117c7e: 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 ) 117c80: 8b 48 64 mov 0x64(%eax),%ecx 117c83: 85 c9 test %ecx,%ecx 117c85: 74 09 je 117c90 117c87: bb 0c 00 00 00 mov $0xc,%ebx 117c8c: eb db jmp 117c69 117c8e: 66 90 xchg %ax,%ax return_status = RTEMS_RESOURCE_IN_USE; else { _Objects_Close( &_Region_Information, &the_region->Object ); 117c90: 83 ec 08 sub $0x8,%esp 117c93: 50 push %eax 117c94: 68 00 40 14 00 push $0x144000 117c99: 89 45 e4 mov %eax,-0x1c(%ebp) 117c9c: e8 c7 38 00 00 call 11b568 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 117ca1: 58 pop %eax 117ca2: 5a pop %edx 117ca3: 8b 45 e4 mov -0x1c(%ebp),%eax 117ca6: 50 push %eax 117ca7: 68 00 40 14 00 push $0x144000 117cac: e8 bb 3b 00 00 call 11b86c <_Objects_Free> 117cb1: 31 db xor %ebx,%ebx 117cb3: 83 c4 10 add $0x10,%esp 117cb6: eb b1 jmp 117c69 =============================================================================== 00117cb8 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 117cb8: 55 push %ebp 117cb9: 89 e5 mov %esp,%ebp 117cbb: 56 push %esi 117cbc: 53 push %ebx 117cbd: 83 ec 10 sub $0x10,%esp 117cc0: 8b 5d 0c mov 0xc(%ebp),%ebx Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 117cc3: 85 db test %ebx,%ebx 117cc5: 74 71 je 117d38 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 117cc7: 83 ec 0c sub $0xc,%esp 117cca: ff 35 b0 41 14 00 pushl 0x1441b0 117cd0: e8 cf 23 00 00 call 11a0a4 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 117cd5: 83 c4 0c add $0xc,%esp 117cd8: 8d 45 f0 lea -0x10(%ebp),%eax 117cdb: 50 push %eax 117cdc: ff 75 08 pushl 0x8(%ebp) 117cdf: 68 00 40 14 00 push $0x144000 117ce4: e8 b3 3c 00 00 call 11b99c <_Objects_Get_no_protection> 117ce9: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 117ceb: 83 c4 10 add $0x10,%esp 117cee: 8b 45 f0 mov -0x10(%ebp),%eax 117cf1: 85 c0 test %eax,%eax 117cf3: 74 1f je 117d14 117cf5: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117cfa: 83 ec 0c sub $0xc,%esp 117cfd: ff 35 b0 41 14 00 pushl 0x1441b0 117d03: e8 e4 23 00 00 call 11a0ec <_API_Mutex_Unlock> return return_status; 117d08: 83 c4 10 add $0x10,%esp } 117d0b: 89 d8 mov %ebx,%eax 117d0d: 8d 65 f8 lea -0x8(%ebp),%esp 117d10: 5b pop %ebx 117d11: 5e pop %esi 117d12: c9 leave 117d13: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: heap_status = _Heap_Extend( 117d14: 8d 45 f4 lea -0xc(%ebp),%eax 117d17: 50 push %eax 117d18: ff 75 10 pushl 0x10(%ebp) 117d1b: 53 push %ebx 117d1c: 8d 46 68 lea 0x68(%esi),%eax 117d1f: 50 push %eax 117d20: e8 b3 2f 00 00 call 11acd8 <_Heap_Extend> starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { 117d25: 83 c4 10 add $0x10,%esp 117d28: 85 c0 test %eax,%eax 117d2a: 74 18 je 117d44 the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117d2c: 48 dec %eax 117d2d: 74 25 je 117d54 117d2f: bb 18 00 00 00 mov $0x18,%ebx 117d34: eb c4 jmp 117cfa 117d36: 66 90 xchg %ax,%ax Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 117d38: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117d3a: 89 d8 mov %ebx,%eax 117d3c: 8d 65 f8 lea -0x8(%ebp),%esp 117d3f: 5b pop %ebx 117d40: 5e pop %esi 117d41: c9 leave 117d42: c3 ret 117d43: 90 nop length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended; 117d44: 8b 45 f4 mov -0xc(%ebp),%eax 117d47: 01 46 54 add %eax,0x54(%esi) the_region->maximum_segment_size += amount_extended; 117d4a: 01 46 5c add %eax,0x5c(%esi) 117d4d: 31 db xor %ebx,%ebx 117d4f: eb a9 jmp 117cfa 117d51: 8d 76 00 lea 0x0(%esi),%esi return_status = RTEMS_SUCCESSFUL; } else if ( heap_status == HEAP_EXTEND_ERROR ) { 117d54: bb 09 00 00 00 mov $0x9,%ebx 117d59: eb 9f jmp 117cfa =============================================================================== 00117d5c : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { 117d5c: 55 push %ebp 117d5d: 89 e5 mov %esp,%ebp 117d5f: 53 push %ebx 117d60: 83 ec 14 sub $0x14,%esp 117d63: 8b 5d 0c mov 0xc(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117d66: 85 db test %ebx,%ebx 117d68: 74 76 je 117de0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117d6a: 83 ec 0c sub $0xc,%esp 117d6d: ff 35 b0 41 14 00 pushl 0x1441b0 117d73: e8 2c 23 00 00 call 11a0a4 <_API_Mutex_Lock> 117d78: 83 c4 0c add $0xc,%esp 117d7b: 8d 45 f4 lea -0xc(%ebp),%eax 117d7e: 50 push %eax 117d7f: ff 75 08 pushl 0x8(%ebp) 117d82: 68 00 40 14 00 push $0x144000 117d87: e8 10 3c 00 00 call 11b99c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117d8c: 83 c4 10 add $0x10,%esp 117d8f: 8b 55 f4 mov -0xc(%ebp),%edx 117d92: 85 d2 test %edx,%edx 117d94: 74 1e je 117db4 117d96: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117d9b: 83 ec 0c sub $0xc,%esp 117d9e: ff 35 b0 41 14 00 pushl 0x1441b0 117da4: e8 43 23 00 00 call 11a0ec <_API_Mutex_Unlock> return return_status; 117da9: 83 c4 10 add $0x10,%esp } 117dac: 89 d8 mov %ebx,%eax 117dae: 8b 5d fc mov -0x4(%ebp),%ebx 117db1: c9 leave 117db2: c3 ret 117db3: 90 nop the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; 117db4: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) the_info->Used.total = 0; 117dbb: c7 43 14 00 00 00 00 movl $0x0,0x14(%ebx) the_info->Used.largest = 0; 117dc2: c7 43 10 00 00 00 00 movl $0x0,0x10(%ebx) _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); 117dc9: 83 ec 08 sub $0x8,%esp 117dcc: 53 push %ebx 117dcd: 83 c0 68 add $0x68,%eax 117dd0: 50 push %eax 117dd1: e8 12 31 00 00 call 11aee8 <_Heap_Get_free_information> 117dd6: 31 db xor %ebx,%ebx return_status = RTEMS_SUCCESSFUL; break; 117dd8: 83 c4 10 add $0x10,%esp 117ddb: eb be jmp 117d9b 117ddd: 8d 76 00 lea 0x0(%esi),%esi { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) 117de0: b3 09 mov $0x9,%bl break; } _RTEMS_Unlock_allocator(); return return_status; } 117de2: 89 d8 mov %ebx,%eax 117de4: 8b 5d fc mov -0x4(%ebp),%ebx 117de7: c9 leave 117de8: c3 ret =============================================================================== 00117e64 : uintptr_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 117e64: 55 push %ebp 117e65: 89 e5 mov %esp,%ebp 117e67: 57 push %edi 117e68: 56 push %esi 117e69: 53 push %ebx 117e6a: 83 ec 2c sub $0x2c,%esp 117e6d: 8b 75 0c mov 0xc(%ebp),%esi 117e70: 8b 5d 18 mov 0x18(%ebp),%ebx Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117e73: 85 db test %ebx,%ebx 117e75: 0f 84 a1 00 00 00 je 117f1c return RTEMS_INVALID_ADDRESS; *segment = NULL; 117e7b: c7 03 00 00 00 00 movl $0x0,(%ebx) if ( size == 0 ) 117e81: 85 f6 test %esi,%esi 117e83: 75 0f jne 117e94 117e85: b8 08 00 00 00 mov $0x8,%eax break; } _RTEMS_Unlock_allocator(); return return_status; } 117e8a: 8d 65 f4 lea -0xc(%ebp),%esp 117e8d: 5b pop %ebx 117e8e: 5e pop %esi 117e8f: 5f pop %edi 117e90: c9 leave 117e91: c3 ret 117e92: 66 90 xchg %ax,%ax *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 117e94: 83 ec 0c sub $0xc,%esp 117e97: ff 35 b0 41 14 00 pushl 0x1441b0 117e9d: e8 02 22 00 00 call 11a0a4 <_API_Mutex_Lock> executing = _Thread_Executing; 117ea2: a1 b8 41 14 00 mov 0x1441b8,%eax 117ea7: 89 45 d4 mov %eax,-0x2c(%ebp) 117eaa: 83 c4 0c add $0xc,%esp 117ead: 8d 45 e4 lea -0x1c(%ebp),%eax 117eb0: 50 push %eax 117eb1: ff 75 08 pushl 0x8(%ebp) 117eb4: 68 00 40 14 00 push $0x144000 117eb9: e8 de 3a 00 00 call 11b99c <_Objects_Get_no_protection> 117ebe: 89 c7 mov %eax,%edi the_region = _Region_Get( id, &location ); switch ( location ) { 117ec0: 83 c4 10 add $0x10,%esp 117ec3: 8b 45 e4 mov -0x1c(%ebp),%eax 117ec6: 85 c0 test %eax,%eax 117ec8: 75 2a jne 117ef4 case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) 117eca: 3b 77 5c cmp 0x5c(%edi),%esi 117ecd: 76 2d jbe 117efc 117ecf: b8 08 00 00 00 mov $0x8,%eax default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117ed4: 83 ec 0c sub $0xc,%esp 117ed7: ff 35 b0 41 14 00 pushl 0x1441b0 117edd: 89 45 d0 mov %eax,-0x30(%ebp) 117ee0: e8 07 22 00 00 call 11a0ec <_API_Mutex_Unlock> return return_status; 117ee5: 83 c4 10 add $0x10,%esp 117ee8: 8b 45 d0 mov -0x30(%ebp),%eax } 117eeb: 8d 65 f4 lea -0xc(%ebp),%esp 117eee: 5b pop %ebx 117eef: 5e pop %esi 117ef0: 5f pop %edi 117ef1: c9 leave 117ef2: c3 ret 117ef3: 90 nop _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 117ef4: b8 04 00 00 00 mov $0x4,%eax 117ef9: eb d9 jmp 117ed4 117efb: 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 ); 117efc: 6a 00 push $0x0 117efe: 6a 00 push $0x0 117f00: 56 push %esi 117f01: 8d 47 68 lea 0x68(%edi),%eax 117f04: 50 push %eax 117f05: e8 1a 2c 00 00 call 11ab24 <_Heap_Allocate_aligned_with_boundary> the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 117f0a: 83 c4 10 add $0x10,%esp 117f0d: 85 c0 test %eax,%eax 117f0f: 74 17 je 117f28 the_region->number_of_used_blocks += 1; 117f11: ff 47 64 incl 0x64(%edi) *segment = the_segment; 117f14: 89 03 mov %eax,(%ebx) 117f16: 31 c0 xor %eax,%eax 117f18: eb ba jmp 117ed4 117f1a: 66 90 xchg %ax,%ax Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; void *the_segment; if ( !segment ) 117f1c: b8 09 00 00 00 mov $0x9,%eax 117f21: e9 64 ff ff ff jmp 117e8a 117f26: 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 ) ) { 117f28: f6 45 10 01 testb $0x1,0x10(%ebp) 117f2c: 74 07 je 117f35 117f2e: b8 0d 00 00 00 mov $0xd,%eax 117f33: eb 9f jmp 117ed4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 117f35: a1 f8 40 14 00 mov 0x1440f8,%eax 117f3a: 40 inc %eax 117f3b: a3 f8 40 14 00 mov %eax,0x1440f8 * 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(); 117f40: 83 ec 0c sub $0xc,%esp 117f43: ff 35 b0 41 14 00 pushl 0x1441b0 117f49: e8 9e 21 00 00 call 11a0ec <_API_Mutex_Unlock> executing->Wait.queue = &the_region->Wait_queue; 117f4e: 8d 47 10 lea 0x10(%edi),%eax 117f51: 8b 55 d4 mov -0x2c(%ebp),%edx 117f54: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 117f57: 8b 4d 08 mov 0x8(%ebp),%ecx 117f5a: 89 4a 20 mov %ecx,0x20(%edx) executing->Wait.count = size; 117f5d: 89 72 24 mov %esi,0x24(%edx) executing->Wait.return_argument = segment; 117f60: 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; 117f63: 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 ); 117f6a: 83 c4 0c add $0xc,%esp 117f6d: 68 30 cb 11 00 push $0x11cb30 117f72: ff 75 14 pushl 0x14(%ebp) 117f75: 50 push %eax 117f76: e8 a5 48 00 00 call 11c820 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 117f7b: e8 3c 43 00 00 call 11c2bc <_Thread_Enable_dispatch> return (rtems_status_code) executing->Wait.return_code; 117f80: 8b 55 d4 mov -0x2c(%ebp),%edx 117f83: 8b 42 34 mov 0x34(%edx),%eax 117f86: 83 c4 10 add $0x10,%esp 117f89: e9 fc fe ff ff jmp 117e8a =============================================================================== 00117f90 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 117f90: 55 push %ebp 117f91: 89 e5 mov %esp,%ebp 117f93: 56 push %esi 117f94: 53 push %ebx 117f95: 83 ec 20 sub $0x20,%esp 117f98: 8b 5d 0c mov 0xc(%ebp),%ebx 117f9b: 8b 75 10 mov 0x10(%ebp),%esi Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 117f9e: 85 db test %ebx,%ebx 117fa0: 74 72 je 118014 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( !size ) 117fa2: 85 f6 test %esi,%esi 117fa4: 74 6e je 118014 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 117fa6: 83 ec 0c sub $0xc,%esp 117fa9: ff 35 b0 41 14 00 pushl 0x1441b0 117faf: e8 f0 20 00 00 call 11a0a4 <_API_Mutex_Lock> 117fb4: 83 c4 0c add $0xc,%esp 117fb7: 8d 45 f4 lea -0xc(%ebp),%eax 117fba: 50 push %eax 117fbb: ff 75 08 pushl 0x8(%ebp) 117fbe: 68 00 40 14 00 push $0x144000 117fc3: e8 d4 39 00 00 call 11b99c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 117fc8: 83 c4 10 add $0x10,%esp 117fcb: 8b 55 f4 mov -0xc(%ebp),%edx 117fce: 85 d2 test %edx,%edx 117fd0: 75 36 jne 118008 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 117fd2: 52 push %edx 117fd3: 56 push %esi 117fd4: 53 push %ebx 117fd5: 83 c0 68 add $0x68,%eax 117fd8: 50 push %eax 117fd9: e8 22 34 00 00 call 11b400 <_Heap_Size_of_alloc_area> 117fde: 83 c4 10 add $0x10,%esp 117fe1: 84 c0 test %al,%al 117fe3: 74 3b je 118020 <== NEVER TAKEN 117fe5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 117fe7: 83 ec 0c sub $0xc,%esp 117fea: ff 35 b0 41 14 00 pushl 0x1441b0 117ff0: 89 45 e4 mov %eax,-0x1c(%ebp) 117ff3: e8 f4 20 00 00 call 11a0ec <_API_Mutex_Unlock> return return_status; 117ff8: 83 c4 10 add $0x10,%esp 117ffb: 8b 45 e4 mov -0x1c(%ebp),%eax } 117ffe: 8d 65 f8 lea -0x8(%ebp),%esp 118001: 5b pop %ebx 118002: 5e pop %esi 118003: c9 leave 118004: c3 ret 118005: 8d 76 00 lea 0x0(%esi),%esi return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 118008: 4a dec %edx 118009: 75 da jne 117fe5 <== NEVER TAKEN 11800b: b8 04 00 00 00 mov $0x4,%eax 118010: eb d5 jmp 117fe7 118012: 66 90 xchg %ax,%ax return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 118014: b8 09 00 00 00 mov $0x9,%eax } 118019: 8d 65 f8 lea -0x8(%ebp),%esp 11801c: 5b pop %ebx 11801d: 5e pop %esi 11801e: c9 leave 11801f: c3 ret the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 118020: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED 118025: eb c0 jmp 117fe7 <== NOT EXECUTED =============================================================================== 0011804c : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { 11804c: 55 push %ebp 11804d: 89 e5 mov %esp,%ebp 11804f: 56 push %esi 118050: 53 push %ebx 118051: 83 ec 20 sub $0x20,%esp 118054: 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 ) 118057: 85 db test %ebx,%ebx 118059: 0f 84 a5 00 00 00 je 118104 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 11805f: 83 ec 0c sub $0xc,%esp 118062: ff 35 b0 41 14 00 pushl 0x1441b0 118068: e8 37 20 00 00 call 11a0a4 <_API_Mutex_Lock> 11806d: 83 c4 0c add $0xc,%esp 118070: 8d 45 f0 lea -0x10(%ebp),%eax 118073: 50 push %eax 118074: ff 75 08 pushl 0x8(%ebp) 118077: 68 00 40 14 00 push $0x144000 11807c: e8 1b 39 00 00 call 11b99c <_Objects_Get_no_protection> 118081: 89 c6 mov %eax,%esi the_region = _Region_Get( id, &location ); switch ( location ) { 118083: 83 c4 10 add $0x10,%esp 118086: 8b 45 f0 mov -0x10(%ebp),%eax 118089: 85 c0 test %eax,%eax 11808b: 74 1f je 1180ac default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11808d: 83 ec 0c sub $0xc,%esp 118090: ff 35 b0 41 14 00 pushl 0x1441b0 118096: e8 51 20 00 00 call 11a0ec <_API_Mutex_Unlock> 11809b: b8 04 00 00 00 mov $0x4,%eax return return_status; 1180a0: 83 c4 10 add $0x10,%esp } 1180a3: 8d 65 f8 lea -0x8(%ebp),%esp 1180a6: 5b pop %ebx 1180a7: 5e pop %esi 1180a8: c9 leave 1180a9: c3 ret 1180aa: 66 90 xchg %ax,%ax case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 1180ac: 83 ec 0c sub $0xc,%esp 1180af: 8d 45 f4 lea -0xc(%ebp),%eax 1180b2: 50 push %eax 1180b3: 8d 45 ec lea -0x14(%ebp),%eax 1180b6: 50 push %eax 1180b7: ff 75 10 pushl 0x10(%ebp) 1180ba: ff 75 0c pushl 0xc(%ebp) 1180bd: 8d 46 68 lea 0x68(%esi),%eax 1180c0: 50 push %eax 1180c1: e8 2e 32 00 00 call 11b2f4 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 1180c6: 8b 55 ec mov -0x14(%ebp),%edx 1180c9: 89 13 mov %edx,(%ebx) _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) 1180cb: 83 c4 20 add $0x20,%esp 1180ce: 85 c0 test %eax,%eax 1180d0: 75 16 jne 1180e8 _Region_Process_queue( the_region ); /* unlocks allocator */ 1180d2: 83 ec 0c sub $0xc,%esp 1180d5: 56 push %esi 1180d6: e8 b9 85 00 00 call 120694 <_Region_Process_queue> 1180db: 31 c0 xor %eax,%eax 1180dd: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 1180e0: 8d 65 f8 lea -0x8(%ebp),%esp 1180e3: 5b pop %ebx 1180e4: 5e pop %esi 1180e5: c9 leave 1180e6: c3 ret 1180e7: 90 nop _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1180e8: 83 ec 0c sub $0xc,%esp 1180eb: ff 35 b0 41 14 00 pushl 0x1441b0 1180f1: 89 45 e4 mov %eax,-0x1c(%ebp) 1180f4: e8 f3 1f 00 00 call 11a0ec <_API_Mutex_Unlock> if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 1180f9: 83 c4 10 add $0x10,%esp 1180fc: 8b 45 e4 mov -0x1c(%ebp),%eax 1180ff: 83 f8 01 cmp $0x1,%eax 118102: 74 0c je 118110 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 118104: b8 09 00 00 00 mov $0x9,%eax } 118109: 8d 65 f8 lea -0x8(%ebp),%esp 11810c: 5b pop %ebx 11810d: 5e pop %esi 11810e: c9 leave 11810f: c3 ret _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) 118110: b0 0d mov $0xd,%al 118112: eb 8f jmp 1180a3 =============================================================================== 00118114 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { 118114: 55 push %ebp 118115: 89 e5 mov %esp,%ebp 118117: 53 push %ebx 118118: 83 ec 20 sub $0x20,%esp uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); 11811b: ff 35 b0 41 14 00 pushl 0x1441b0 118121: e8 7e 1f 00 00 call 11a0a4 <_API_Mutex_Lock> 118126: 83 c4 0c add $0xc,%esp 118129: 8d 45 f4 lea -0xc(%ebp),%eax 11812c: 50 push %eax 11812d: ff 75 08 pushl 0x8(%ebp) 118130: 68 00 40 14 00 push $0x144000 118135: e8 62 38 00 00 call 11b99c <_Objects_Get_no_protection> 11813a: 89 c3 mov %eax,%ebx the_region = _Region_Get( id, &location ); switch ( location ) { 11813c: 83 c4 10 add $0x10,%esp 11813f: 8b 45 f4 mov -0xc(%ebp),%eax 118142: 85 c0 test %eax,%eax 118144: 74 1e je 118164 118146: bb 04 00 00 00 mov $0x4,%ebx default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11814b: 83 ec 0c sub $0xc,%esp 11814e: ff 35 b0 41 14 00 pushl 0x1441b0 118154: e8 93 1f 00 00 call 11a0ec <_API_Mutex_Unlock> return return_status; 118159: 83 c4 10 add $0x10,%esp } 11815c: 89 d8 mov %ebx,%eax 11815e: 8b 5d fc mov -0x4(%ebp),%ebx 118161: c9 leave 118162: c3 ret 118163: 90 nop RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 118164: 83 ec 08 sub $0x8,%esp 118167: ff 75 0c pushl 0xc(%ebp) 11816a: 8d 43 68 lea 0x68(%ebx),%eax 11816d: 50 push %eax 11816e: e8 05 2c 00 00 call 11ad78 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) 118173: 83 c4 10 add $0x10,%esp 118176: 84 c0 test %al,%al 118178: 75 0a jne 118184 else { the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator */ return RTEMS_SUCCESSFUL; 11817a: bb 09 00 00 00 mov $0x9,%ebx 11817f: eb ca jmp 11814b 118181: 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; 118184: ff 4b 64 decl 0x64(%ebx) _Region_Process_queue(the_region); /* unlocks allocator */ 118187: 83 ec 0c sub $0xc,%esp 11818a: 53 push %ebx 11818b: e8 04 85 00 00 call 120694 <_Region_Process_queue> 118190: 31 db xor %ebx,%ebx return RTEMS_SUCCESSFUL; 118192: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return return_status; } 118195: 89 d8 mov %ebx,%eax 118197: 8b 5d fc mov -0x4(%ebp),%ebx 11819a: c9 leave 11819b: c3 ret =============================================================================== 0010ba30 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 10ba30: 55 push %ebp 10ba31: 89 e5 mov %esp,%ebp 10ba33: 57 push %edi 10ba34: 56 push %esi 10ba35: 53 push %ebx 10ba36: 83 ec 3c sub $0x3c,%esp 10ba39: 8b 75 08 mov 0x8(%ebp),%esi 10ba3c: 8b 5d 10 mov 0x10(%ebp),%ebx 10ba3f: 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 ) ) 10ba42: 85 f6 test %esi,%esi 10ba44: 74 4a je 10ba90 return RTEMS_INVALID_NAME; if ( !id ) 10ba46: 85 ff test %edi,%edi 10ba48: 0f 84 f6 00 00 00 je 10bb44 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 10ba4e: 89 da mov %ebx,%edx 10ba50: 81 e2 c0 00 00 00 and $0xc0,%edx 10ba56: 74 48 je 10baa0 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10ba58: 89 d8 mov %ebx,%eax 10ba5a: 83 e0 30 and $0x30,%eax 10ba5d: 83 f8 10 cmp $0x10,%eax 10ba60: 74 0e je 10ba70 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10ba62: b8 0b 00 00 00 mov $0xb,%eax } 10ba67: 8d 65 f4 lea -0xc(%ebp),%esp 10ba6a: 5b pop %ebx 10ba6b: 5e pop %esi 10ba6c: 5f pop %edi 10ba6d: c9 leave 10ba6e: c3 ret 10ba6f: 90 nop #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && 10ba70: f6 c3 04 test $0x4,%bl 10ba73: 74 ed je 10ba62 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 10ba75: 81 fa c0 00 00 00 cmp $0xc0,%edx 10ba7b: 74 e5 je 10ba62 10ba7d: 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 ) ) 10ba82: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10ba86: 76 1f jbe 10baa7 10ba88: b8 0a 00 00 00 mov $0xa,%eax 10ba8d: eb d8 jmp 10ba67 10ba8f: 90 nop 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 ) ) 10ba90: b8 03 00 00 00 mov $0x3,%eax 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10ba95: 8d 65 f4 lea -0xc(%ebp),%esp 10ba98: 5b pop %ebx 10ba99: 5e pop %esi 10ba9a: 5f pop %edi 10ba9b: c9 leave 10ba9c: c3 ret 10ba9d: 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 ) ) 10baa0: 89 d9 mov %ebx,%ecx 10baa2: 83 e1 30 and $0x30,%ecx 10baa5: 75 db jne 10ba82 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10baa7: a1 b8 94 12 00 mov 0x1294b8,%eax 10baac: 40 inc %eax 10baad: a3 b8 94 12 00 mov %eax,0x1294b8 * 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 ); 10bab2: 83 ec 0c sub $0xc,%esp 10bab5: 68 00 94 12 00 push $0x129400 10baba: 89 4d c4 mov %ecx,-0x3c(%ebp) 10babd: e8 86 14 00 00 call 10cf48 <_Objects_Allocate> 10bac2: 89 c2 mov %eax,%edx _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 10bac4: 83 c4 10 add $0x10,%esp 10bac7: 85 c0 test %eax,%eax 10bac9: 8b 4d c4 mov -0x3c(%ebp),%ecx 10bacc: 0f 84 ba 00 00 00 je 10bb8c _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 10bad2: 89 58 10 mov %ebx,0x10(%eax) /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { 10bad5: 85 c9 test %ecx,%ecx 10bad7: 74 77 je 10bb50 /* * 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; 10bad9: 31 c0 xor %eax,%eax 10badb: f6 c3 04 test $0x4,%bl 10bade: 0f 95 c0 setne %al 10bae1: 89 45 d8 mov %eax,-0x28(%ebp) else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 10bae4: 83 f9 10 cmp $0x10,%ecx 10bae7: 0f 84 ae 00 00 00 je 10bb9b 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; 10baed: c7 45 d0 02 00 00 00 movl $0x2,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10baf4: c6 45 d4 00 movb $0x0,-0x2c(%ebp) } mutex_status = _CORE_mutex_Initialize( 10baf8: 50 push %eax 10baf9: 31 c0 xor %eax,%eax 10bafb: 83 7d 0c 01 cmpl $0x1,0xc(%ebp) 10baff: 0f 94 c0 sete %al 10bb02: 50 push %eax 10bb03: 8d 45 d0 lea -0x30(%ebp),%eax 10bb06: 50 push %eax 10bb07: 8d 42 14 lea 0x14(%edx),%eax 10bb0a: 50 push %eax 10bb0b: 89 55 c4 mov %edx,-0x3c(%ebp) 10bb0e: e8 4d 0c 00 00 call 10c760 <_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 ) { 10bb13: 83 c4 10 add $0x10,%esp 10bb16: 83 f8 06 cmp $0x6,%eax 10bb19: 8b 55 c4 mov -0x3c(%ebp),%edx 10bb1c: 0f 84 a9 00 00 00 je 10bbcb <== NEVER TAKEN #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bb22: 8b 42 08 mov 0x8(%edx),%eax 10bb25: 0f b7 d8 movzwl %ax,%ebx 10bb28: 8b 0d 1c 94 12 00 mov 0x12941c,%ecx 10bb2e: 89 14 99 mov %edx,(%ecx,%ebx,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10bb31: 89 72 0c mov %esi,0xc(%edx) &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 10bb34: 89 07 mov %eax,(%edi) the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 10bb36: e8 31 21 00 00 call 10dc6c <_Thread_Enable_dispatch> 10bb3b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bb3d: e9 25 ff ff ff jmp 10ba67 10bb42: 66 90 xchg %ax,%ax CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10bb44: b8 09 00 00 00 mov $0x9,%eax 10bb49: e9 19 ff ff ff jmp 10ba67 10bb4e: 66 90 xchg %ax,%ax */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; 10bb50: 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; 10bb57: 31 c0 xor %eax,%eax 10bb59: f6 c3 04 test $0x4,%bl 10bb5c: 0f 95 c0 setne %al 10bb5f: 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; 10bb62: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; 10bb69: c7 45 dc 00 00 00 00 movl $0x0,-0x24(%ebp) _CORE_semaphore_Initialize( 10bb70: 51 push %ecx 10bb71: ff 75 0c pushl 0xc(%ebp) 10bb74: 8d 45 e0 lea -0x20(%ebp),%eax 10bb77: 50 push %eax 10bb78: 8d 42 14 lea 0x14(%edx),%eax 10bb7b: 50 push %eax 10bb7c: 89 55 c4 mov %edx,-0x3c(%ebp) 10bb7f: e8 80 0e 00 00 call 10ca04 <_CORE_semaphore_Initialize> 10bb84: 83 c4 10 add $0x10,%esp 10bb87: 8b 55 c4 mov -0x3c(%ebp),%edx 10bb8a: eb 96 jmp 10bb22 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 10bb8c: e8 db 20 00 00 call 10dc6c <_Thread_Enable_dispatch> 10bb91: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10bb96: e9 cc fe ff ff jmp 10ba67 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; 10bb9b: 8b 45 14 mov 0x14(%ebp),%eax 10bb9e: 89 45 dc mov %eax,-0x24(%ebp) the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 10bba1: c7 45 d0 00 00 00 00 movl $0x0,-0x30(%ebp) the_mutex_attr.only_owner_release = false; 10bba8: c6 45 d4 00 movb $0x0,-0x2c(%ebp) if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { 10bbac: 83 7d d8 01 cmpl $0x1,-0x28(%ebp) 10bbb0: 0f 85 42 ff ff ff jne 10baf8 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { 10bbb6: f6 c3 40 test $0x40,%bl 10bbb9: 74 30 je 10bbeb the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 10bbbb: c7 45 d8 02 00 00 00 movl $0x2,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10bbc2: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10bbc6: e9 2d ff ff ff jmp 10baf8 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10bbcb: 83 ec 08 sub $0x8,%esp 10bbce: 52 push %edx 10bbcf: 68 00 94 12 00 push $0x129400 10bbd4: e8 ef 16 00 00 call 10d2c8 <_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(); 10bbd9: e8 8e 20 00 00 call 10dc6c <_Thread_Enable_dispatch> 10bbde: b8 13 00 00 00 mov $0x13,%eax return RTEMS_INVALID_PRIORITY; 10bbe3: 83 c4 10 add $0x10,%esp 10bbe6: e9 7c fe ff ff jmp 10ba67 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 ) ) { 10bbeb: 84 db test %bl,%bl 10bbed: 0f 89 05 ff ff ff jns 10baf8 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 10bbf3: c7 45 d8 03 00 00 00 movl $0x3,-0x28(%ebp) the_mutex_attr.only_owner_release = true; 10bbfa: c6 45 d4 01 movb $0x1,-0x2c(%ebp) 10bbfe: e9 f5 fe ff ff jmp 10baf8 =============================================================================== 0010bc04 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 10bc04: 55 push %ebp 10bc05: 89 e5 mov %esp,%ebp 10bc07: 53 push %ebx 10bc08: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10bc0b: 8d 45 f4 lea -0xc(%ebp),%eax 10bc0e: 50 push %eax 10bc0f: ff 75 08 pushl 0x8(%ebp) 10bc12: 68 00 94 12 00 push $0x129400 10bc17: e8 dc 17 00 00 call 10d3f8 <_Objects_Get> 10bc1c: 89 c3 mov %eax,%ebx register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10bc1e: 83 c4 10 add $0x10,%esp 10bc21: 8b 4d f4 mov -0xc(%ebp),%ecx 10bc24: 85 c9 test %ecx,%ecx 10bc26: 74 0c je 10bc34 10bc28: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc2d: 8b 5d fc mov -0x4(%ebp),%ebx 10bc30: c9 leave 10bc31: c3 ret 10bc32: 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); 10bc34: 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) ) { 10bc37: 83 e0 30 and $0x30,%eax 10bc3a: 74 58 je 10bc94 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 10bc3c: 8b 53 64 mov 0x64(%ebx),%edx 10bc3f: 85 d2 test %edx,%edx 10bc41: 75 15 jne 10bc58 10bc43: 83 f8 20 cmp $0x20,%eax 10bc46: 74 10 je 10bc58 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 10bc48: e8 1f 20 00 00 call 10dc6c <_Thread_Enable_dispatch> 10bc4d: b8 0c 00 00 00 mov $0xc,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc52: 8b 5d fc mov -0x4(%ebp),%ebx 10bc55: c9 leave 10bc56: c3 ret 10bc57: 90 nop !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 10bc58: 50 push %eax 10bc59: 6a 04 push $0x4 10bc5b: 6a 00 push $0x0 10bc5d: 8d 43 14 lea 0x14(%ebx),%eax 10bc60: 50 push %eax 10bc61: e8 ee 0a 00 00 call 10c754 <_CORE_mutex_Flush> 10bc66: 83 c4 10 add $0x10,%esp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 10bc69: 83 ec 08 sub $0x8,%esp 10bc6c: 53 push %ebx 10bc6d: 68 00 94 12 00 push $0x129400 10bc72: e8 4d 13 00 00 call 10cfc4 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 10bc77: 58 pop %eax 10bc78: 5a pop %edx 10bc79: 53 push %ebx 10bc7a: 68 00 94 12 00 push $0x129400 10bc7f: e8 44 16 00 00 call 10d2c8 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 10bc84: e8 e3 1f 00 00 call 10dc6c <_Thread_Enable_dispatch> 10bc89: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bc8b: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bc8e: 8b 5d fc mov -0x4(%ebp),%ebx 10bc91: c9 leave 10bc92: c3 ret 10bc93: 90 nop &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 10bc94: 51 push %ecx 10bc95: 6a 02 push $0x2 10bc97: 6a 00 push $0x0 10bc99: 8d 43 14 lea 0x14(%ebx),%eax 10bc9c: 50 push %eax 10bc9d: e8 56 0d 00 00 call 10c9f8 <_CORE_semaphore_Flush> 10bca2: 83 c4 10 add $0x10,%esp 10bca5: eb c2 jmp 10bc69 =============================================================================== 0010bca8 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 10bca8: 55 push %ebp 10bca9: 89 e5 mov %esp,%ebp 10bcab: 57 push %edi 10bcac: 56 push %esi 10bcad: 53 push %ebx 10bcae: 83 ec 1c sub $0x1c,%esp 10bcb1: 8b 5d 08 mov 0x8(%ebp),%ebx 10bcb4: 8b 75 0c mov 0xc(%ebp),%esi 10bcb7: 8b 7d 10 mov 0x10(%ebp),%edi Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 10bcba: 8d 45 e0 lea -0x20(%ebp),%eax 10bcbd: 50 push %eax 10bcbe: 8d 45 e4 lea -0x1c(%ebp),%eax 10bcc1: 50 push %eax 10bcc2: 53 push %ebx 10bcc3: 68 00 94 12 00 push $0x129400 10bcc8: e8 d3 16 00 00 call 10d3a0 <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 10bccd: 83 c4 10 add $0x10,%esp 10bcd0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10bcd3: 85 c9 test %ecx,%ecx 10bcd5: 74 0d je 10bce4 10bcd7: b8 04 00 00 00 mov $0x4,%eax break; } return RTEMS_INVALID_ID; } 10bcdc: 8d 65 f4 lea -0xc(%ebp),%esp 10bcdf: 5b pop %ebx 10bce0: 5e pop %esi 10bce1: 5f pop %edi 10bce2: c9 leave 10bce3: 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) ) { 10bce4: f6 40 10 30 testb $0x30,0x10(%eax) 10bce8: 74 36 je 10bd20 _CORE_mutex_Seize( 10bcea: 83 ec 0c sub $0xc,%esp 10bced: ff 75 e0 pushl -0x20(%ebp) 10bcf0: 57 push %edi 10bcf1: 83 e6 01 and $0x1,%esi 10bcf4: 83 f6 01 xor $0x1,%esi 10bcf7: 56 push %esi 10bcf8: 53 push %ebx 10bcf9: 83 c0 14 add $0x14,%eax 10bcfc: 50 push %eax 10bcfd: e8 56 0b 00 00 call 10c858 <_CORE_mutex_Seize> id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 10bd02: 83 c4 14 add $0x14,%esp 10bd05: a1 78 95 12 00 mov 0x129578,%eax 10bd0a: ff 70 34 pushl 0x34(%eax) 10bd0d: e8 12 01 00 00 call 10be24 <_Semaphore_Translate_core_mutex_return_code> 10bd12: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10bd15: 8d 65 f4 lea -0xc(%ebp),%esp 10bd18: 5b pop %ebx 10bd19: 5e pop %esi 10bd1a: 5f pop %edi 10bd1b: c9 leave 10bd1c: c3 ret 10bd1d: 8d 76 00 lea 0x0(%esi),%esi { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 10bd20: 8b 15 78 95 12 00 mov 0x129578,%edx executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 10bd26: c7 42 34 00 00 00 00 movl $0x0,0x34(%edx) if ( the_semaphore->count != 0 ) { 10bd2d: 8b 48 5c mov 0x5c(%eax),%ecx 10bd30: 85 c9 test %ecx,%ecx 10bd32: 75 2c jne 10bd60 the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 10bd34: 83 e6 01 and $0x1,%esi 10bd37: 74 33 je 10bd6c _ISR_Enable( *level_p ); 10bd39: ff 75 e0 pushl -0x20(%ebp) 10bd3c: 9d popf executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 10bd3d: 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( 10bd44: 83 ec 0c sub $0xc,%esp 10bd47: a1 78 95 12 00 mov 0x129578,%eax 10bd4c: ff 70 34 pushl 0x34(%eax) 10bd4f: e8 e0 00 00 00 call 10be34 <_Semaphore_Translate_core_semaphore_return_code> 10bd54: 83 c4 10 add $0x10,%esp break; } return RTEMS_INVALID_ID; } 10bd57: 8d 65 f4 lea -0xc(%ebp),%esp 10bd5a: 5b pop %ebx 10bd5b: 5e pop %esi 10bd5c: 5f pop %edi 10bd5d: c9 leave 10bd5e: c3 ret 10bd5f: 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; 10bd60: 49 dec %ecx 10bd61: 89 48 5c mov %ecx,0x5c(%eax) _ISR_Enable( *level_p ); 10bd64: ff 75 e0 pushl -0x20(%ebp) 10bd67: 9d popf 10bd68: eb da jmp 10bd44 10bd6a: 66 90 xchg %ax,%ax 10bd6c: 8b 0d b8 94 12 00 mov 0x1294b8,%ecx 10bd72: 41 inc %ecx 10bd73: 89 0d b8 94 12 00 mov %ecx,0x1294b8 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; 10bd79: 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; 10bd80: 83 c0 14 add $0x14,%eax 10bd83: 89 42 44 mov %eax,0x44(%edx) executing->Wait.id = id; 10bd86: 89 5a 20 mov %ebx,0x20(%edx) _ISR_Enable( *level_p ); 10bd89: ff 75 e0 pushl -0x20(%ebp) 10bd8c: 9d popf _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 10bd8d: 52 push %edx 10bd8e: 68 b4 e4 10 00 push $0x10e4b4 10bd93: 57 push %edi 10bd94: 50 push %eax 10bd95: e8 0a 24 00 00 call 10e1a4 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10bd9a: e8 cd 1e 00 00 call 10dc6c <_Thread_Enable_dispatch> 10bd9f: 83 c4 10 add $0x10,%esp 10bda2: eb a0 jmp 10bd44 =============================================================================== 0010bda4 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 10bda4: 55 push %ebp 10bda5: 89 e5 mov %esp,%ebp 10bda7: 53 push %ebx 10bda8: 83 ec 18 sub $0x18,%esp 10bdab: 8b 5d 08 mov 0x8(%ebp),%ebx RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 10bdae: 8d 45 f4 lea -0xc(%ebp),%eax 10bdb1: 50 push %eax 10bdb2: 53 push %ebx 10bdb3: 68 00 94 12 00 push $0x129400 10bdb8: e8 3b 16 00 00 call 10d3f8 <_Objects_Get> Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 10bdbd: 83 c4 10 add $0x10,%esp 10bdc0: 8b 55 f4 mov -0xc(%ebp),%edx 10bdc3: 85 d2 test %edx,%edx 10bdc5: 74 0d je 10bdd4 10bdc7: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bdcc: 8b 5d fc mov -0x4(%ebp),%ebx 10bdcf: c9 leave 10bdd0: c3 ret 10bdd1: 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) ) { 10bdd4: f6 40 10 30 testb $0x30,0x10(%eax) 10bdd8: 75 26 jne 10be00 MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 10bdda: 52 push %edx 10bddb: 6a 00 push $0x0 10bddd: 53 push %ebx 10bdde: 83 c0 14 add $0x14,%eax 10bde1: 50 push %eax 10bde2: e8 5d 0c 00 00 call 10ca44 <_CORE_semaphore_Surrender> 10bde7: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10bde9: e8 7e 1e 00 00 call 10dc6c <_Thread_Enable_dispatch> return _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); 10bdee: 89 1c 24 mov %ebx,(%esp) 10bdf1: e8 3e 00 00 00 call 10be34 <_Semaphore_Translate_core_semaphore_return_code> &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 10bdf6: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10bdf9: 8b 5d fc mov -0x4(%ebp),%ebx 10bdfc: c9 leave 10bdfd: c3 ret 10bdfe: 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( 10be00: 51 push %ecx 10be01: 6a 00 push $0x0 10be03: 53 push %ebx 10be04: 83 c0 14 add $0x14,%eax 10be07: 50 push %eax 10be08: e8 eb 0a 00 00 call 10c8f8 <_CORE_mutex_Surrender> 10be0d: 89 c3 mov %eax,%ebx &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); 10be0f: e8 58 1e 00 00 call 10dc6c <_Thread_Enable_dispatch> return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 10be14: 89 1c 24 mov %ebx,(%esp) 10be17: e8 08 00 00 00 call 10be24 <_Semaphore_Translate_core_mutex_return_code> 10be1c: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10be1f: 8b 5d fc mov -0x4(%ebp),%ebx 10be22: c9 leave 10be23: c3 ret =============================================================================== 00118670 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 118670: 55 push %ebp 118671: 89 e5 mov %esp,%ebp 118673: 53 push %ebx 118674: 83 ec 14 sub $0x14,%esp 118677: 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 ) 11867a: 85 db test %ebx,%ebx 11867c: 75 0a jne 118688 11867e: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118683: 8b 5d fc mov -0x4(%ebp),%ebx 118686: c9 leave 118687: c3 ret ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 118688: 83 ec 08 sub $0x8,%esp 11868b: 8d 45 f4 lea -0xc(%ebp),%eax 11868e: 50 push %eax 11868f: ff 75 08 pushl 0x8(%ebp) 118692: e8 75 3c 00 00 call 11c30c <_Thread_Get> switch ( location ) { 118697: 83 c4 10 add $0x10,%esp 11869a: 8b 55 f4 mov -0xc(%ebp),%edx 11869d: 85 d2 test %edx,%edx 11869f: 74 0b je 1186ac 1186a1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186a6: 8b 5d fc mov -0x4(%ebp),%ebx 1186a9: c9 leave 1186aa: c3 ret 1186ab: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 1186ac: 8b 90 f4 00 00 00 mov 0xf4(%eax),%edx asr = &api->Signal; 1186b2: 8b 4a 0c mov 0xc(%edx),%ecx 1186b5: 85 c9 test %ecx,%ecx 1186b7: 74 43 je 1186fc if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 1186b9: 80 7a 08 00 cmpb $0x0,0x8(%edx) 1186bd: 74 29 je 1186e8 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1186bf: 9c pushf 1186c0: fa cli 1186c1: 59 pop %ecx *signal_set |= signals; 1186c2: 09 5a 14 or %ebx,0x14(%edx) _ISR_Enable( _level ); 1186c5: 51 push %ecx 1186c6: 9d popf _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = true; 1186c7: c6 40 74 01 movb $0x1,0x74(%eax) if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 1186cb: 8b 15 94 41 14 00 mov 0x144194,%edx 1186d1: 85 d2 test %edx,%edx 1186d3: 74 1b je 1186f0 1186d5: 3b 05 b8 41 14 00 cmp 0x1441b8,%eax 1186db: 75 13 jne 1186f0 <== NEVER TAKEN _ISR_Signals_to_thread_executing = true; 1186dd: c6 05 68 42 14 00 01 movb $0x1,0x144268 1186e4: eb 0a jmp 1186f0 1186e6: 66 90 xchg %ax,%ax rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 1186e8: 9c pushf 1186e9: fa cli 1186ea: 58 pop %eax *signal_set |= signals; 1186eb: 09 5a 18 or %ebx,0x18(%edx) _ISR_Enable( _level ); 1186ee: 50 push %eax 1186ef: 9d popf } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 1186f0: e8 c7 3b 00 00 call 11c2bc <_Thread_Enable_dispatch> 1186f5: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1186f7: 8b 5d fc mov -0x4(%ebp),%ebx 1186fa: c9 leave 1186fb: c3 ret _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 1186fc: e8 bb 3b 00 00 call 11c2bc <_Thread_Enable_dispatch> 118701: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_NOT_DEFINED; 118706: e9 78 ff ff ff jmp 118683 =============================================================================== 00107bec : * rtems_stack_checker_Begin_extension */ void rtems_stack_checker_begin_extension( Thread_Control *the_thread ) { 107bec: 55 push %ebp 107bed: 89 e5 mov %esp,%ebp 107bef: 57 push %edi 107bf0: 56 push %esi 107bf1: 8b 45 08 mov 0x8(%ebp),%eax Stack_check_Control *the_pattern; if ( the_thread->Object.id == 0 ) /* skip system tasks */ 107bf4: 8b 50 08 mov 0x8(%eax),%edx 107bf7: 85 d2 test %edx,%edx 107bf9: 74 15 je 107c10 <== NEVER TAKEN return; the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack); *the_pattern = Stack_check_Pattern; 107bfb: 8b b8 c8 00 00 00 mov 0xc8(%eax),%edi 107c01: 83 c7 08 add $0x8,%edi 107c04: be e0 99 12 00 mov $0x1299e0,%esi 107c09: b9 04 00 00 00 mov $0x4,%ecx 107c0e: f3 a5 rep movsl %ds:(%esi),%es:(%edi) } 107c10: 5e pop %esi 107c11: 5f pop %edi 107c12: c9 leave 107c13: c3 ret =============================================================================== 00108004 : */ bool rtems_stack_checker_create_extension( Thread_Control *running __attribute__((unused)), Thread_Control *the_thread ) { 108004: 55 push %ebp 108005: 89 e5 mov %esp,%ebp 108007: 57 push %edi 108008: 8b 7d 0c mov 0xc(%ebp),%edi Stack_check_Initialize(); 10800b: e8 94 ff ff ff call 107fa4 if (the_thread) 108010: 85 ff test %edi,%edi 108012: 74 12 je 108026 <== NEVER TAKEN Stack_check_Dope_stack(&the_thread->Start.Initial_stack); 108014: 8b 8f c4 00 00 00 mov 0xc4(%edi),%ecx 10801a: 8b 97 c8 00 00 00 mov 0xc8(%edi),%edx 108020: b0 a5 mov $0xa5,%al 108022: 89 d7 mov %edx,%edi 108024: f3 aa rep stos %al,%es:(%edi) return true; } 108026: b0 01 mov $0x1,%al 108028: 5f pop %edi 108029: c9 leave 10802a: c3 ret =============================================================================== 00107ed4 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 107ed4: 55 push %ebp 107ed5: 89 e5 mov %esp,%ebp 107ed7: 57 push %edi 107ed8: 56 push %esi Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 107ed9: a1 38 9c 12 00 mov 0x129c38,%eax ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107ede: 8b b0 c8 00 00 00 mov 0xc8(%eax),%esi 107ee4: 39 f5 cmp %esi,%ebp 107ee6: 73 48 jae 107f30 <== ALWAYS TAKEN 107ee8: 31 c0 xor %eax,%eax /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 107eea: 8b 0d 80 96 12 00 mov 0x129680,%ecx 107ef0: 85 c9 test %ecx,%ecx 107ef2: 75 28 jne 107f1c <== ALWAYS TAKEN 107ef4: b2 01 mov $0x1,%dl <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 107ef6: 84 c0 test %al,%al 107ef8: 74 04 je 107efe <== NEVER TAKEN 107efa: 84 d2 test %dl,%dl 107efc: 75 42 jne 107f40 <== ALWAYS TAKEN return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 107efe: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107f01: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107f04: 52 push %edx <== NOT EXECUTED 107f05: ff 35 38 9c 12 00 pushl 0x129c38 <== NOT EXECUTED 107f0b: e8 08 ff ff ff call 107e18 <== NOT EXECUTED 107f10: b0 01 mov $0x1,%al <== NOT EXECUTED return true; 107f12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107f15: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 107f18: 5e pop %esi <== NOT EXECUTED 107f19: 5f pop %edi <== NOT EXECUTED 107f1a: c9 leave <== NOT EXECUTED 107f1b: c3 ret <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 107f1c: 83 c6 08 add $0x8,%esi 107f1f: bf e0 99 12 00 mov $0x1299e0,%edi 107f24: b9 10 00 00 00 mov $0x10,%ecx 107f29: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107f2b: 0f 94 c2 sete %dl 107f2e: eb c6 jmp 107ef6 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 107f30: 8b 90 c4 00 00 00 mov 0xc4(%eax),%edx 107f36: 8d 04 16 lea (%esi,%edx,1),%eax 107f39: 39 c5 cmp %eax,%ebp 107f3b: 0f 96 c0 setbe %al 107f3e: eb aa jmp 107eea } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 107f40: 31 c0 xor %eax,%eax /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; } 107f42: 8d 65 f8 lea -0x8(%ebp),%esp 107f45: 5e pop %esi 107f46: 5f pop %edi 107f47: c9 leave 107f48: c3 ret =============================================================================== 00107e00 : void rtems_stack_checker_report_usage( void ) { 107e00: 55 push %ebp <== NOT EXECUTED 107e01: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107e03: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 107e06: 68 00 98 10 00 push $0x109800 <== NOT EXECUTED 107e0b: 6a 00 push $0x0 <== NOT EXECUTED 107e0d: e8 8a ff ff ff call 107d9c <== NOT EXECUTED 107e12: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107e15: c9 leave <== NOT EXECUTED 107e16: c3 ret <== NOT EXECUTED =============================================================================== 00107d9c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 107d9c: 55 push %ebp <== NOT EXECUTED 107d9d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 107d9f: 56 push %esi <== NOT EXECUTED 107da0: 53 push %ebx <== NOT EXECUTED 107da1: 8b 75 08 mov 0x8(%ebp),%esi <== NOT EXECUTED 107da4: 8b 5d 0c mov 0xc(%ebp),%ebx <== NOT EXECUTED print_context = context; 107da7: 89 35 84 96 12 00 mov %esi,0x129684 <== NOT EXECUTED print_handler = print; 107dad: 89 1d 88 96 12 00 mov %ebx,0x129688 <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 107db3: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 107db6: 68 83 2d 12 00 push $0x122d83 <== NOT EXECUTED 107dbb: 56 push %esi <== NOT EXECUTED 107dbc: ff d3 call *%ebx <== NOT EXECUTED (*print)( context, 107dbe: 58 pop %eax <== NOT EXECUTED 107dbf: 5a pop %edx <== NOT EXECUTED 107dc0: 68 04 2e 12 00 push $0x122e04 <== NOT EXECUTED 107dc5: 56 push %esi <== NOT EXECUTED 107dc6: 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 ); 107dc8: c7 04 24 4c 7c 10 00 movl $0x107c4c,(%esp) <== NOT EXECUTED 107dcf: e8 84 55 00 00 call 10d358 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 107dd4: c7 04 24 ff ff ff ff movl $0xffffffff,(%esp) <== NOT EXECUTED 107ddb: e8 6c fe ff ff call 107c4c <== NOT EXECUTED print_context = NULL; 107de0: c7 05 84 96 12 00 00 movl $0x0,0x129684 <== NOT EXECUTED 107de7: 00 00 00 print_handler = NULL; 107dea: c7 05 88 96 12 00 00 movl $0x0,0x129688 <== NOT EXECUTED 107df1: 00 00 00 107df4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 107df7: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 107dfa: 5b pop %ebx <== NOT EXECUTED 107dfb: 5e pop %esi <== NOT EXECUTED 107dfc: c9 leave <== NOT EXECUTED 107dfd: c3 ret <== NOT EXECUTED =============================================================================== 00107f4c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 107f4c: 55 push %ebp 107f4d: 89 e5 mov %esp,%ebp 107f4f: 57 push %edi 107f50: 56 push %esi 107f51: 8b 45 08 mov 0x8(%ebp),%eax Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 107f54: 8b 90 c8 00 00 00 mov 0xc8(%eax),%edx 107f5a: 8d 72 08 lea 0x8(%edx),%esi ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 107f5d: 39 d5 cmp %edx,%ebp 107f5f: 72 0a jb 107f6b <== NEVER TAKEN void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { Stack_Control *the_stack = &running->Start.Initial_stack; 107f61: 03 90 c4 00 00 00 add 0xc4(%eax),%edx 107f67: 39 d5 cmp %edx,%ebp 107f69: 76 21 jbe 107f8c <== 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, 107f6b: bf e0 99 12 00 mov $0x1299e0,%edi <== NOT EXECUTED 107f70: b9 10 00 00 00 mov $0x10,%ecx <== NOT EXECUTED 107f75: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) <== NOT EXECUTED 107f77: 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 ); 107f7a: 0f b6 d2 movzbl %dl,%edx <== NOT EXECUTED 107f7d: 89 55 0c mov %edx,0xc(%ebp) <== NOT EXECUTED 107f80: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED } } 107f83: 5e pop %esi <== NOT EXECUTED 107f84: 5f pop %edi <== NOT EXECUTED 107f85: c9 leave <== NOT EXECUTED pattern_ok = (!memcmp( pattern, (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 107f86: e9 8d fe ff ff jmp 107e18 <== NOT EXECUTED 107f8b: 90 nop <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 107f8c: bf e0 99 12 00 mov $0x1299e0,%edi 107f91: b9 10 00 00 00 mov $0x10,%ecx (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 107f96: f3 a6 repz cmpsb %es:(%edi),%ds:(%esi) 107f98: 74 06 je 107fa0 <== ALWAYS TAKEN 107f9a: 31 d2 xor %edx,%edx <== NOT EXECUTED 107f9c: eb dc jmp 107f7a <== NOT EXECUTED 107f9e: 66 90 xchg %ax,%ax <== NOT EXECUTED Stack_check_report_blown_task( running, pattern_ok ); } } 107fa0: 5e pop %esi 107fa1: 5f pop %edi 107fa2: c9 leave 107fa3: c3 ret =============================================================================== 00110e80 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { 110e80: 55 push %ebp 110e81: 89 e5 mov %esp,%ebp 110e83: 57 push %edi 110e84: 56 push %esi 110e85: 53 push %ebx 110e86: 83 ec 2c sub $0x2c,%esp 110e89: 8b 75 08 mov 0x8(%ebp),%esi 110e8c: 8b 5d 0c mov 0xc(%ebp),%ebx 110e8f: 8b 7d 10 mov 0x10(%ebp),%edi double result; char *end; if ( !n ) 110e92: 85 db test %ebx,%ebx 110e94: 0f 84 ae 00 00 00 je 110f48 return RTEMS_INVALID_ADDRESS; errno = 0; 110e9a: e8 fd 2b 00 00 call 113a9c <__errno> 110e9f: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110ea5: c7 03 00 00 00 00 movl $0x0,(%ebx) 110eab: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtod( s, &end ); 110eb2: 83 ec 08 sub $0x8,%esp 110eb5: 8d 45 e4 lea -0x1c(%ebp),%eax 110eb8: 50 push %eax 110eb9: 56 push %esi 110eba: e8 55 56 00 00 call 116514 if ( endptr ) 110ebf: 83 c4 10 add $0x10,%esp 110ec2: 85 ff test %edi,%edi 110ec4: 74 05 je 110ecb *endptr = end; 110ec6: 8b 45 e4 mov -0x1c(%ebp),%eax 110ec9: 89 07 mov %eax,(%edi) if ( end == s ) 110ecb: 39 75 e4 cmp %esi,-0x1c(%ebp) 110ece: 74 68 je 110f38 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110ed0: dd 5d c8 fstpl -0x38(%ebp) 110ed3: e8 c4 2b 00 00 call 113a9c <__errno> 110ed8: 83 38 22 cmpl $0x22,(%eax) 110edb: dd 45 c8 fldl -0x38(%ebp) 110ede: 74 0c je 110eec (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; 110ee0: dd 1b fstpl (%ebx) 110ee2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110ee4: 8d 65 f4 lea -0xc(%ebp),%esp 110ee7: 5b pop %ebx 110ee8: 5e pop %esi 110ee9: 5f pop %edi 110eea: c9 leave 110eeb: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110eec: d9 ee fldz 110eee: d9 c9 fxch %st(1) 110ef0: dd e1 fucom %st(1) 110ef2: df e0 fnstsw %ax 110ef4: dd d9 fstp %st(1) 110ef6: 80 e4 45 and $0x45,%ah 110ef9: 80 fc 40 cmp $0x40,%ah 110efc: 74 26 je 110f24 <== NEVER TAKEN 110efe: dd 05 d0 58 12 00 fldl 0x1258d0 110f04: d9 c9 fxch %st(1) 110f06: dd e1 fucom %st(1) 110f08: df e0 fnstsw %ax 110f0a: dd d9 fstp %st(1) 110f0c: f6 c4 45 test $0x45,%ah 110f0f: 74 17 je 110f28 <== ALWAYS TAKEN 110f11: dd 05 d8 58 12 00 fldl 0x1258d8 <== NOT EXECUTED 110f17: dd e9 fucomp %st(1) <== NOT EXECUTED 110f19: df e0 fnstsw %ax <== NOT EXECUTED 110f1b: f6 c4 45 test $0x45,%ah <== NOT EXECUTED 110f1e: 75 c0 jne 110ee0 <== NOT EXECUTED 110f20: dd d8 fstp %st(0) <== NOT EXECUTED 110f22: eb 06 jmp 110f2a <== NOT EXECUTED 110f24: dd d8 fstp %st(0) <== NOT EXECUTED 110f26: eb 02 jmp 110f2a <== NOT EXECUTED 110f28: dd d8 fstp %st(0) (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 110f2a: b8 0a 00 00 00 mov $0xa,%eax } 110f2f: 8d 65 f4 lea -0xc(%ebp),%esp 110f32: 5b pop %ebx 110f33: 5e pop %esi 110f34: 5f pop %edi 110f35: c9 leave 110f36: c3 ret 110f37: 90 nop 110f38: dd d8 fstp %st(0) result = strtod( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) 110f3a: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 110f3f: 8d 65 f4 lea -0xc(%ebp),%esp 110f42: 5b pop %ebx 110f43: 5e pop %esi 110f44: 5f pop %edi 110f45: c9 leave 110f46: c3 ret 110f47: 90 nop ) { double result; char *end; if ( !n ) 110f48: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 110f4d: 8d 65 f4 lea -0xc(%ebp),%esp 110f50: 5b pop %ebx 110f51: 5e pop %esi 110f52: 5f pop %edi 110f53: c9 leave 110f54: c3 ret =============================================================================== 00110f58 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { 110f58: 55 push %ebp 110f59: 89 e5 mov %esp,%ebp 110f5b: 57 push %edi 110f5c: 56 push %esi 110f5d: 53 push %ebx 110f5e: 83 ec 2c sub $0x2c,%esp 110f61: 8b 75 08 mov 0x8(%ebp),%esi 110f64: 8b 5d 0c mov 0xc(%ebp),%ebx 110f67: 8b 7d 10 mov 0x10(%ebp),%edi float result; char *end; if ( !n ) 110f6a: 85 db test %ebx,%ebx 110f6c: 0f 84 aa 00 00 00 je 11101c <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; errno = 0; 110f72: e8 25 2b 00 00 call 113a9c <__errno> 110f77: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 110f7d: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtof( s, &end ); 110f83: 83 ec 08 sub $0x8,%esp 110f86: 8d 45 e4 lea -0x1c(%ebp),%eax 110f89: 50 push %eax 110f8a: 56 push %esi 110f8b: e8 40 55 00 00 call 1164d0 if ( endptr ) 110f90: 83 c4 10 add $0x10,%esp 110f93: 85 ff test %edi,%edi 110f95: 74 05 je 110f9c *endptr = end; 110f97: 8b 45 e4 mov -0x1c(%ebp),%eax 110f9a: 89 07 mov %eax,(%edi) if ( end == s ) 110f9c: 39 75 e4 cmp %esi,-0x1c(%ebp) 110f9f: 74 6b je 11100c <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110fa1: d9 5d c8 fstps -0x38(%ebp) 110fa4: e8 f3 2a 00 00 call 113a9c <__errno> 110fa9: 83 38 22 cmpl $0x22,(%eax) 110fac: d9 45 c8 flds -0x38(%ebp) 110faf: 74 0f je 110fc0 (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; 110fb1: d9 1b fstps (%ebx) 110fb3: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 110fb5: 8d 65 f4 lea -0xc(%ebp),%esp 110fb8: 5b pop %ebx 110fb9: 5e pop %esi 110fba: 5f pop %edi 110fbb: c9 leave 110fbc: c3 ret 110fbd: 8d 76 00 lea 0x0(%esi),%esi *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 110fc0: d9 ee fldz 110fc2: d9 c9 fxch %st(1) 110fc4: dd e1 fucom %st(1) 110fc6: df e0 fnstsw %ax 110fc8: dd d9 fstp %st(1) 110fca: 80 e4 45 and $0x45,%ah 110fcd: 80 fc 40 cmp $0x40,%ah 110fd0: 74 26 je 110ff8 <== NEVER TAKEN 110fd2: d9 05 e0 58 12 00 flds 0x1258e0 110fd8: d9 c9 fxch %st(1) 110fda: dd e1 fucom %st(1) 110fdc: df e0 fnstsw %ax 110fde: dd d9 fstp %st(1) 110fe0: f6 c4 45 test $0x45,%ah 110fe3: 74 17 je 110ffc <== ALWAYS TAKEN 110fe5: d9 05 e4 58 12 00 flds 0x1258e4 <== NOT EXECUTED 110feb: dd e9 fucomp %st(1) <== NOT EXECUTED 110fed: df e0 fnstsw %ax <== NOT EXECUTED 110fef: f6 c4 45 test $0x45,%ah <== NOT EXECUTED 110ff2: 75 bd jne 110fb1 <== NOT EXECUTED 110ff4: dd d8 fstp %st(0) <== NOT EXECUTED 110ff6: eb 06 jmp 110ffe <== NOT EXECUTED 110ff8: dd d8 fstp %st(0) <== NOT EXECUTED 110ffa: eb 02 jmp 110ffe <== NOT EXECUTED 110ffc: dd d8 fstp %st(0) (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 110ffe: b8 0a 00 00 00 mov $0xa,%eax } 111003: 8d 65 f4 lea -0xc(%ebp),%esp 111006: 5b pop %ebx 111007: 5e pop %esi 111008: 5f pop %edi 111009: c9 leave 11100a: c3 ret 11100b: 90 nop 11100c: dd d8 fstp %st(0) result = strtof( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) 11100e: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111013: 8d 65 f4 lea -0xc(%ebp),%esp 111016: 5b pop %ebx 111017: 5e pop %esi 111018: 5f pop %edi 111019: c9 leave 11101a: c3 ret 11101b: 90 nop ) { float result; char *end; if ( !n ) 11101c: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111021: 8d 65 f4 lea -0xc(%ebp),%esp 111024: 5b pop %ebx 111025: 5e pop %esi 111026: 5f pop %edi 111027: c9 leave 111028: c3 ret =============================================================================== 0011102c : const char *s, int *n, char **endptr, int base ) { 11102c: 55 push %ebp 11102d: 89 e5 mov %esp,%ebp 11102f: 57 push %edi 111030: 56 push %esi 111031: 53 push %ebx 111032: 83 ec 2c sub $0x2c,%esp 111035: 8b 75 08 mov 0x8(%ebp),%esi 111038: 8b 5d 0c mov 0xc(%ebp),%ebx 11103b: 8b 7d 10 mov 0x10(%ebp),%edi long result; char *end; if ( !n ) 11103e: 85 db test %ebx,%ebx 111040: 0f 84 82 00 00 00 je 1110c8 return RTEMS_INVALID_ADDRESS; errno = 0; 111046: e8 51 2a 00 00 call 113a9c <__errno> 11104b: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 111051: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtol( s, &end, base ); 111057: 50 push %eax 111058: ff 75 14 pushl 0x14(%ebp) 11105b: 8d 45 e4 lea -0x1c(%ebp),%eax 11105e: 50 push %eax 11105f: 56 push %esi 111060: e8 4b 56 00 00 call 1166b0 111065: 89 c2 mov %eax,%edx if ( endptr ) 111067: 83 c4 10 add $0x10,%esp 11106a: 85 ff test %edi,%edi 11106c: 74 05 je 111073 *endptr = end; 11106e: 8b 45 e4 mov -0x1c(%ebp),%eax 111071: 89 07 mov %eax,(%edi) if ( end == s ) 111073: 39 75 e4 cmp %esi,-0x1c(%ebp) 111076: 74 40 je 1110b8 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111078: 89 55 d4 mov %edx,-0x2c(%ebp) 11107b: e8 1c 2a 00 00 call 113a9c <__errno> 111080: 83 38 22 cmpl $0x22,(%eax) 111083: 8b 55 d4 mov -0x2c(%ebp),%edx 111086: 74 0c je 111094 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 111088: 89 13 mov %edx,(%ebx) 11108a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11108c: 8d 65 f4 lea -0xc(%ebp),%esp 11108f: 5b pop %ebx 111090: 5e pop %esi 111091: 5f pop %edi 111092: c9 leave 111093: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111094: 85 d2 test %edx,%edx 111096: 74 10 je 1110a8 <== NEVER TAKEN 111098: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 11109e: 74 08 je 1110a8 <== ALWAYS TAKEN 1110a0: 81 fa 00 00 00 80 cmp $0x80000000,%edx <== NOT EXECUTED 1110a6: 75 e0 jne 111088 <== NOT EXECUTED } #endif *n = result; return RTEMS_SUCCESSFUL; 1110a8: b8 0a 00 00 00 mov $0xa,%eax } 1110ad: 8d 65 f4 lea -0xc(%ebp),%esp 1110b0: 5b pop %ebx 1110b1: 5e pop %esi 1110b2: 5f pop %edi 1110b3: c9 leave 1110b4: c3 ret 1110b5: 8d 76 00 lea 0x0(%esi),%esi result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 1110b8: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 1110bd: 8d 65 f4 lea -0xc(%ebp),%esp 1110c0: 5b pop %ebx 1110c1: 5e pop %esi 1110c2: 5f pop %edi 1110c3: c9 leave 1110c4: c3 ret 1110c5: 8d 76 00 lea 0x0(%esi),%esi ) { long result; char *end; if ( !n ) 1110c8: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 1110cd: 8d 65 f4 lea -0xc(%ebp),%esp 1110d0: 5b pop %ebx 1110d1: 5e pop %esi 1110d2: 5f pop %edi 1110d3: c9 leave 1110d4: c3 ret =============================================================================== 001111a0 : const char *s, long *n, char **endptr, int base ) { 1111a0: 55 push %ebp 1111a1: 89 e5 mov %esp,%ebp 1111a3: 57 push %edi 1111a4: 56 push %esi 1111a5: 53 push %ebx 1111a6: 83 ec 2c sub $0x2c,%esp 1111a9: 8b 75 08 mov 0x8(%ebp),%esi 1111ac: 8b 5d 0c mov 0xc(%ebp),%ebx 1111af: 8b 7d 10 mov 0x10(%ebp),%edi long result; char *end; if ( !n ) 1111b2: 85 db test %ebx,%ebx 1111b4: 0f 84 82 00 00 00 je 11123c return RTEMS_INVALID_ADDRESS; errno = 0; 1111ba: e8 dd 28 00 00 call 113a9c <__errno> 1111bf: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1111c5: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtol( s, &end, base ); 1111cb: 50 push %eax 1111cc: ff 75 14 pushl 0x14(%ebp) 1111cf: 8d 45 e4 lea -0x1c(%ebp),%eax 1111d2: 50 push %eax 1111d3: 56 push %esi 1111d4: e8 d7 54 00 00 call 1166b0 1111d9: 89 c2 mov %eax,%edx if ( endptr ) 1111db: 83 c4 10 add $0x10,%esp 1111de: 85 ff test %edi,%edi 1111e0: 74 05 je 1111e7 *endptr = end; 1111e2: 8b 45 e4 mov -0x1c(%ebp),%eax 1111e5: 89 07 mov %eax,(%edi) if ( end == s ) 1111e7: 39 75 e4 cmp %esi,-0x1c(%ebp) 1111ea: 74 40 je 11122c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1111ec: 89 55 d4 mov %edx,-0x2c(%ebp) 1111ef: e8 a8 28 00 00 call 113a9c <__errno> 1111f4: 83 38 22 cmpl $0x22,(%eax) 1111f7: 8b 55 d4 mov -0x2c(%ebp),%edx 1111fa: 74 0c je 111208 (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 1111fc: 89 13 mov %edx,(%ebx) 1111fe: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111200: 8d 65 f4 lea -0xc(%ebp),%esp 111203: 5b pop %ebx 111204: 5e pop %esi 111205: 5f pop %edi 111206: c9 leave 111207: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111208: 85 d2 test %edx,%edx 11120a: 74 10 je 11121c <== NEVER TAKEN 11120c: 81 fa ff ff ff 7f cmp $0x7fffffff,%edx 111212: 74 08 je 11121c 111214: 81 fa 00 00 00 80 cmp $0x80000000,%edx 11121a: 75 e0 jne 1111fc <== NEVER TAKEN (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 11121c: b8 0a 00 00 00 mov $0xa,%eax } 111221: 8d 65 f4 lea -0xc(%ebp),%esp 111224: 5b pop %ebx 111225: 5e pop %esi 111226: 5f pop %edi 111227: c9 leave 111228: c3 ret 111229: 8d 76 00 lea 0x0(%esi),%esi result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 11122c: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111231: 8d 65 f4 lea -0xc(%ebp),%esp 111234: 5b pop %ebx 111235: 5e pop %esi 111236: 5f pop %edi 111237: c9 leave 111238: c3 ret 111239: 8d 76 00 lea 0x0(%esi),%esi ) { long result; char *end; if ( !n ) 11123c: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111241: 8d 65 f4 lea -0xc(%ebp),%esp 111244: 5b pop %ebx 111245: 5e pop %esi 111246: 5f pop %edi 111247: c9 leave 111248: c3 ret =============================================================================== 001110d8 : const char *s, long long *n, char **endptr, int base ) { 1110d8: 55 push %ebp 1110d9: 89 e5 mov %esp,%ebp 1110db: 57 push %edi 1110dc: 56 push %esi 1110dd: 53 push %ebx 1110de: 83 ec 2c sub $0x2c,%esp 1110e1: 8b 75 08 mov 0x8(%ebp),%esi 1110e4: 8b 5d 0c mov 0xc(%ebp),%ebx long long result; char *end; if ( !n ) 1110e7: 85 db test %ebx,%ebx 1110e9: 0f 84 a1 00 00 00 je 111190 return RTEMS_INVALID_ADDRESS; errno = 0; 1110ef: e8 a8 29 00 00 call 113a9c <__errno> 1110f4: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1110fa: c7 03 00 00 00 00 movl $0x0,(%ebx) 111100: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoll( s, &end, base ); 111107: 52 push %edx 111108: ff 75 14 pushl 0x14(%ebp) 11110b: 8d 45 e4 lea -0x1c(%ebp),%eax 11110e: 50 push %eax 11110f: 56 push %esi 111110: e8 b7 55 00 00 call 1166cc 111115: 89 c7 mov %eax,%edi if ( endptr ) 111117: 83 c4 10 add $0x10,%esp 11111a: 8b 45 10 mov 0x10(%ebp),%eax 11111d: 85 c0 test %eax,%eax 11111f: 74 08 je 111129 *endptr = end; 111121: 8b 45 e4 mov -0x1c(%ebp),%eax 111124: 8b 4d 10 mov 0x10(%ebp),%ecx 111127: 89 01 mov %eax,(%ecx) if ( end == s ) 111129: 39 75 e4 cmp %esi,-0x1c(%ebp) 11112c: 74 52 je 111180 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11112e: 89 55 d4 mov %edx,-0x2c(%ebp) 111131: e8 66 29 00 00 call 113a9c <__errno> 111136: 83 38 22 cmpl $0x22,(%eax) 111139: 8b 55 d4 mov -0x2c(%ebp),%edx 11113c: 74 12 je 111150 (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; 11113e: 89 3b mov %edi,(%ebx) 111140: 89 53 04 mov %edx,0x4(%ebx) 111143: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 111145: 8d 65 f4 lea -0xc(%ebp),%esp 111148: 5b pop %ebx 111149: 5e pop %esi 11114a: 5f pop %edi 11114b: c9 leave 11114c: c3 ret 11114d: 8d 76 00 lea 0x0(%esi),%esi *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111150: 89 d0 mov %edx,%eax 111152: 09 f8 or %edi,%eax 111154: 74 1a je 111170 <== NEVER TAKEN 111156: 89 d1 mov %edx,%ecx 111158: 81 f1 ff ff ff 7f xor $0x7fffffff,%ecx 11115e: 89 f8 mov %edi,%eax 111160: f7 d0 not %eax 111162: 09 c1 or %eax,%ecx 111164: 74 0a je 111170 111166: 8d 82 00 00 00 80 lea -0x80000000(%edx),%eax 11116c: 09 f8 or %edi,%eax 11116e: 75 ce jne 11113e <== NEVER TAKEN (( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN ))) return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; 111170: b8 0a 00 00 00 mov $0xa,%eax } 111175: 8d 65 f4 lea -0xc(%ebp),%esp 111178: 5b pop %ebx 111179: 5e pop %esi 11117a: 5f pop %edi 11117b: c9 leave 11117c: c3 ret 11117d: 8d 76 00 lea 0x0(%esi),%esi result = strtoll( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 111180: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111185: 8d 65 f4 lea -0xc(%ebp),%esp 111188: 5b pop %ebx 111189: 5e pop %esi 11118a: 5f pop %edi 11118b: c9 leave 11118c: c3 ret 11118d: 8d 76 00 lea 0x0(%esi),%esi ) { long long result; char *end; if ( !n ) 111190: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111195: 8d 65 f4 lea -0xc(%ebp),%esp 111198: 5b pop %ebx 111199: 5e pop %esi 11119a: 5f pop %edi 11119b: c9 leave 11119c: c3 ret =============================================================================== 00111264 : const char *s, unsigned char *n, char **endptr, int base ) { 111264: 55 push %ebp 111265: 89 e5 mov %esp,%ebp 111267: 57 push %edi 111268: 56 push %esi 111269: 53 push %ebx 11126a: 83 ec 2c sub $0x2c,%esp 11126d: 8b 75 08 mov 0x8(%ebp),%esi 111270: 8b 5d 0c mov 0xc(%ebp),%ebx 111273: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 111276: 85 db test %ebx,%ebx 111278: 0f 84 8e 00 00 00 je 11130c return RTEMS_INVALID_ADDRESS; errno = 0; 11127e: e8 19 28 00 00 call 113a9c <__errno> 111283: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 111289: c6 03 00 movb $0x0,(%ebx) result = strtoul( s, &end, base ); 11128c: 50 push %eax 11128d: ff 75 14 pushl 0x14(%ebp) 111290: 8d 45 e4 lea -0x1c(%ebp),%eax 111293: 50 push %eax 111294: 56 push %esi 111295: e8 92 58 00 00 call 116b2c 11129a: 89 c2 mov %eax,%edx if ( endptr ) 11129c: 83 c4 10 add $0x10,%esp 11129f: 85 ff test %edi,%edi 1112a1: 74 05 je 1112a8 *endptr = end; 1112a3: 8b 45 e4 mov -0x1c(%ebp),%eax 1112a6: 89 07 mov %eax,(%edi) if ( end == s ) 1112a8: 39 75 e4 cmp %esi,-0x1c(%ebp) 1112ab: 74 4f je 1112fc return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1112ad: 89 55 d4 mov %edx,-0x2c(%ebp) 1112b0: e8 e7 27 00 00 call 113a9c <__errno> 1112b5: 83 38 22 cmpl $0x22,(%eax) 1112b8: 8b 55 d4 mov -0x2c(%ebp),%edx 1112bb: 74 17 je 1112d4 <== NEVER TAKEN (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 1112bd: 81 fa ff 00 00 00 cmp $0xff,%edx 1112c3: 77 1f ja 1112e4 <== NEVER TAKEN errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 1112c5: 88 13 mov %dl,(%ebx) 1112c7: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1112c9: 8d 65 f4 lea -0xc(%ebp),%esp 1112cc: 5b pop %ebx 1112cd: 5e pop %esi 1112ce: 5f pop %edi 1112cf: c9 leave 1112d0: c3 ret 1112d1: 8d 76 00 lea 0x0(%esi),%esi *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1112d4: 8d 42 ff lea -0x1(%edx),%eax <== NOT EXECUTED 1112d7: 83 f8 fd cmp $0xfffffffd,%eax <== NOT EXECUTED 1112da: 77 13 ja 1112ef <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { 1112dc: 81 fa ff 00 00 00 cmp $0xff,%edx <== NOT EXECUTED 1112e2: 76 e1 jbe 1112c5 <== NOT EXECUTED errno = ERANGE; 1112e4: e8 b3 27 00 00 call 113a9c <__errno> <== NOT EXECUTED 1112e9: c7 00 22 00 00 00 movl $0x22,(%eax) <== NOT EXECUTED 1112ef: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } 1112f4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1112f7: 5b pop %ebx <== NOT EXECUTED 1112f8: 5e pop %esi <== NOT EXECUTED 1112f9: 5f pop %edi <== NOT EXECUTED 1112fa: c9 leave <== NOT EXECUTED 1112fb: c3 ret <== NOT EXECUTED result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 1112fc: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 111301: 8d 65 f4 lea -0xc(%ebp),%esp 111304: 5b pop %ebx 111305: 5e pop %esi 111306: 5f pop %edi 111307: c9 leave 111308: c3 ret 111309: 8d 76 00 lea 0x0(%esi),%esi ) { unsigned long result; char *end; if ( !n ) 11130c: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 111311: 8d 65 f4 lea -0xc(%ebp),%esp 111314: 5b pop %ebx 111315: 5e pop %esi 111316: 5f pop %edi 111317: c9 leave 111318: c3 ret =============================================================================== 0011131c : const char *s, unsigned int *n, char **endptr, int base ) { 11131c: 55 push %ebp 11131d: 89 e5 mov %esp,%ebp 11131f: 57 push %edi 111320: 56 push %esi 111321: 53 push %ebx 111322: 83 ec 2c sub $0x2c,%esp 111325: 8b 75 08 mov 0x8(%ebp),%esi 111328: 8b 5d 0c mov 0xc(%ebp),%ebx 11132b: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 11132e: 85 db test %ebx,%ebx 111330: 74 76 je 1113a8 return RTEMS_INVALID_ADDRESS; errno = 0; 111332: e8 65 27 00 00 call 113a9c <__errno> 111337: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 11133d: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 111343: 50 push %eax 111344: ff 75 14 pushl 0x14(%ebp) 111347: 8d 45 e4 lea -0x1c(%ebp),%eax 11134a: 50 push %eax 11134b: 56 push %esi 11134c: e8 db 57 00 00 call 116b2c 111351: 89 c2 mov %eax,%edx if ( endptr ) 111353: 83 c4 10 add $0x10,%esp 111356: 85 ff test %edi,%edi 111358: 74 05 je 11135f *endptr = end; 11135a: 8b 45 e4 mov -0x1c(%ebp),%eax 11135d: 89 07 mov %eax,(%edi) if ( end == s ) 11135f: 39 75 e4 cmp %esi,-0x1c(%ebp) 111362: 74 34 je 111398 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111364: 89 55 d4 mov %edx,-0x2c(%ebp) 111367: e8 30 27 00 00 call 113a9c <__errno> 11136c: 83 38 22 cmpl $0x22,(%eax) 11136f: 8b 55 d4 mov -0x2c(%ebp),%edx 111372: 74 0c je 111380 errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; 111374: 89 13 mov %edx,(%ebx) 111376: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 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 *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111380: 8d 42 ff lea -0x1(%edx),%eax 111383: 83 f8 fd cmp $0xfffffffd,%eax 111386: 76 ec jbe 111374 <== NEVER TAKEN 111388: b8 0a 00 00 00 mov $0xa,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 11138d: 8d 65 f4 lea -0xc(%ebp),%esp 111390: 5b pop %ebx 111391: 5e pop %esi 111392: 5f pop %edi 111393: c9 leave 111394: c3 ret 111395: 8d 76 00 lea 0x0(%esi),%esi result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 111398: b8 0b 00 00 00 mov $0xb,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 11139d: 8d 65 f4 lea -0xc(%ebp),%esp 1113a0: 5b pop %ebx 1113a1: 5e pop %esi 1113a2: 5f pop %edi 1113a3: c9 leave 1113a4: c3 ret 1113a5: 8d 76 00 lea 0x0(%esi),%esi ) { unsigned long result; char *end; if ( !n ) 1113a8: b8 09 00 00 00 mov $0x9,%eax #endif *n = result; return RTEMS_SUCCESSFUL; } 1113ad: 8d 65 f4 lea -0xc(%ebp),%esp 1113b0: 5b pop %ebx 1113b1: 5e pop %esi 1113b2: 5f pop %edi 1113b3: c9 leave 1113b4: c3 ret =============================================================================== 00111478 : const char *s, unsigned long *n, char **endptr, int base ) { 111478: 55 push %ebp 111479: 89 e5 mov %esp,%ebp 11147b: 57 push %edi 11147c: 56 push %esi 11147d: 53 push %ebx 11147e: 83 ec 2c sub $0x2c,%esp 111481: 8b 75 08 mov 0x8(%ebp),%esi 111484: 8b 5d 0c mov 0xc(%ebp),%ebx 111487: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long result; char *end; if ( !n ) 11148a: 85 db test %ebx,%ebx 11148c: 74 76 je 111504 return RTEMS_INVALID_ADDRESS; errno = 0; 11148e: e8 09 26 00 00 call 113a9c <__errno> 111493: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 111499: c7 03 00 00 00 00 movl $0x0,(%ebx) result = strtoul( s, &end, base ); 11149f: 50 push %eax 1114a0: ff 75 14 pushl 0x14(%ebp) 1114a3: 8d 45 e4 lea -0x1c(%ebp),%eax 1114a6: 50 push %eax 1114a7: 56 push %esi 1114a8: e8 7f 56 00 00 call 116b2c 1114ad: 89 c2 mov %eax,%edx if ( endptr ) 1114af: 83 c4 10 add $0x10,%esp 1114b2: 85 ff test %edi,%edi 1114b4: 74 05 je 1114bb *endptr = end; 1114b6: 8b 45 e4 mov -0x1c(%ebp),%eax 1114b9: 89 07 mov %eax,(%edi) if ( end == s ) 1114bb: 39 75 e4 cmp %esi,-0x1c(%ebp) 1114be: 74 34 je 1114f4 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1114c0: 89 55 d4 mov %edx,-0x2c(%ebp) 1114c3: e8 d4 25 00 00 call 113a9c <__errno> 1114c8: 83 38 22 cmpl $0x22,(%eax) 1114cb: 8b 55 d4 mov -0x2c(%ebp),%edx 1114ce: 74 0c je 1114dc (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 1114d0: 89 13 mov %edx,(%ebx) 1114d2: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 1114d4: 8d 65 f4 lea -0xc(%ebp),%esp 1114d7: 5b pop %ebx 1114d8: 5e pop %esi 1114d9: 5f pop %edi 1114da: c9 leave 1114db: c3 ret *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 1114dc: 8d 42 ff lea -0x1(%edx),%eax 1114df: 83 f8 fd cmp $0xfffffffd,%eax 1114e2: 76 ec jbe 1114d0 <== NEVER TAKEN 1114e4: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1114e9: 8d 65 f4 lea -0xc(%ebp),%esp 1114ec: 5b pop %ebx 1114ed: 5e pop %esi 1114ee: 5f pop %edi 1114ef: c9 leave 1114f0: c3 ret 1114f1: 8d 76 00 lea 0x0(%esi),%esi result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 1114f4: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 1114f9: 8d 65 f4 lea -0xc(%ebp),%esp 1114fc: 5b pop %ebx 1114fd: 5e pop %esi 1114fe: 5f pop %edi 1114ff: c9 leave 111500: c3 ret 111501: 8d 76 00 lea 0x0(%esi),%esi ) { unsigned long result; char *end; if ( !n ) 111504: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 111509: 8d 65 f4 lea -0xc(%ebp),%esp 11150c: 5b pop %ebx 11150d: 5e pop %esi 11150e: 5f pop %edi 11150f: c9 leave 111510: c3 ret =============================================================================== 001113b8 : const char *s, unsigned long long *n, char **endptr, int base ) { 1113b8: 55 push %ebp 1113b9: 89 e5 mov %esp,%ebp 1113bb: 57 push %edi 1113bc: 56 push %esi 1113bd: 53 push %ebx 1113be: 83 ec 2c sub $0x2c,%esp 1113c1: 8b 75 08 mov 0x8(%ebp),%esi 1113c4: 8b 5d 0c mov 0xc(%ebp),%ebx 1113c7: 8b 7d 10 mov 0x10(%ebp),%edi unsigned long long result; char *end; if ( !n ) 1113ca: 85 db test %ebx,%ebx 1113cc: 0f 84 96 00 00 00 je 111468 return RTEMS_INVALID_ADDRESS; errno = 0; 1113d2: e8 c5 26 00 00 call 113a9c <__errno> 1113d7: c7 00 00 00 00 00 movl $0x0,(%eax) *n = 0; 1113dd: c7 03 00 00 00 00 movl $0x0,(%ebx) 1113e3: c7 43 04 00 00 00 00 movl $0x0,0x4(%ebx) result = strtoull( s, &end, base ); 1113ea: 50 push %eax 1113eb: ff 75 14 pushl 0x14(%ebp) 1113ee: 8d 45 e4 lea -0x1c(%ebp),%eax 1113f1: 50 push %eax 1113f2: 56 push %esi 1113f3: e8 50 57 00 00 call 116b48 1113f8: 89 d1 mov %edx,%ecx 1113fa: 89 c2 mov %eax,%edx if ( endptr ) 1113fc: 83 c4 10 add $0x10,%esp 1113ff: 85 ff test %edi,%edi 111401: 74 05 je 111408 *endptr = end; 111403: 8b 45 e4 mov -0x1c(%ebp),%eax 111406: 89 07 mov %eax,(%edi) if ( end == s ) 111408: 39 75 e4 cmp %esi,-0x1c(%ebp) 11140b: 74 4b je 111458 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 11140d: 89 55 d4 mov %edx,-0x2c(%ebp) 111410: 89 4d d0 mov %ecx,-0x30(%ebp) 111413: e8 84 26 00 00 call 113a9c <__errno> 111418: 83 38 22 cmpl $0x22,(%eax) 11141b: 8b 55 d4 mov -0x2c(%ebp),%edx 11141e: 8b 4d d0 mov -0x30(%ebp),%ecx 111421: 74 11 je 111434 (( result == 0 ) || ( result == ULONG_LONG_MAX ))) return RTEMS_INVALID_NUMBER; *n = result; 111423: 89 13 mov %edx,(%ebx) 111425: 89 4b 04 mov %ecx,0x4(%ebx) 111428: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 11142a: 8d 65 f4 lea -0xc(%ebp),%esp 11142d: 5b pop %ebx 11142e: 5e pop %esi 11142f: 5f pop %edi 111430: c9 leave 111431: c3 ret 111432: 66 90 xchg %ax,%ax *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && 111434: 89 d6 mov %edx,%esi 111436: 89 cf mov %ecx,%edi 111438: 83 c6 ff add $0xffffffff,%esi 11143b: 83 d7 ff adc $0xffffffff,%edi 11143e: 83 ff ff cmp $0xffffffff,%edi 111441: 72 e0 jb 111423 <== NEVER TAKEN 111443: 83 fe fd cmp $0xfffffffd,%esi 111446: 76 db jbe 111423 <== NEVER TAKEN 111448: b8 0a 00 00 00 mov $0xa,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 11144d: 8d 65 f4 lea -0xc(%ebp),%esp 111450: 5b pop %ebx 111451: 5e pop %esi 111452: 5f pop %edi 111453: c9 leave 111454: c3 ret 111455: 8d 76 00 lea 0x0(%esi),%esi result = strtoull( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) 111458: b8 0b 00 00 00 mov $0xb,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 11145d: 8d 65 f4 lea -0xc(%ebp),%esp 111460: 5b pop %ebx 111461: 5e pop %esi 111462: 5f pop %edi 111463: c9 leave 111464: c3 ret 111465: 8d 76 00 lea 0x0(%esi),%esi ) { unsigned long long result; char *end; if ( !n ) 111468: b8 09 00 00 00 mov $0x9,%eax return RTEMS_INVALID_NUMBER; *n = result; return RTEMS_SUCCESSFUL; } 11146d: 8d 65 f4 lea -0xc(%ebp),%esp 111470: 5b pop %ebx 111471: 5e pop %esi 111472: 5f pop %edi 111473: c9 leave 111474: c3 ret =============================================================================== 0010be44 : size_t stack_size, rtems_mode initial_modes, rtems_attribute attribute_set, rtems_id *id ) { 10be44: 55 push %ebp 10be45: 89 e5 mov %esp,%ebp 10be47: 57 push %edi 10be48: 56 push %esi 10be49: 53 push %ebx 10be4a: 83 ec 1c sub $0x1c,%esp 10be4d: 8b 5d 08 mov 0x8(%ebp),%ebx 10be50: 8b 4d 0c mov 0xc(%ebp),%ecx 10be53: 8b 7d 18 mov 0x18(%ebp),%edi 10be56: 8b 75 1c mov 0x1c(%ebp),%esi Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10be59: 85 f6 test %esi,%esi 10be5b: 0f 84 37 01 00 00 je 10bf98 return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10be61: 85 db test %ebx,%ebx 10be63: 0f 84 cb 00 00 00 je 10bf34 /* * Validate the RTEMS API priority and convert it to the core priority range. */ if ( !_Attributes_Is_system_task( the_attribute_set ) ) { 10be69: 66 85 ff test %di,%di 10be6c: 78 1d js 10be8b */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10be6e: 85 c9 test %ecx,%ecx 10be70: 75 0e jne 10be80 } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; 10be72: b8 13 00 00 00 mov $0x13,%eax } 10be77: 8d 65 f4 lea -0xc(%ebp),%esp 10be7a: 5b pop %ebx 10be7b: 5e pop %esi 10be7c: 5f pop %edi 10be7d: c9 leave 10be7e: c3 ret 10be7f: 90 nop 10be80: 0f b6 05 d4 52 12 00 movzbl 0x1252d4,%eax 10be87: 39 c1 cmp %eax,%ecx 10be89: 77 e7 ja 10be72 */ /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 10be8b: 83 ec 0c sub $0xc,%esp 10be8e: ff 35 70 95 12 00 pushl 0x129570 10be94: 89 4d e4 mov %ecx,-0x1c(%ebp) 10be97: e8 ac 06 00 00 call 10c548 <_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 ); 10be9c: c7 04 24 40 94 12 00 movl $0x129440,(%esp) 10bea3: e8 a0 10 00 00 call 10cf48 <_Objects_Allocate> 10bea8: 89 c2 mov %eax,%edx * the event of an error. */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { 10beaa: 83 c4 10 add $0x10,%esp 10bead: 85 c0 test %eax,%eax 10beaf: 8b 4d e4 mov -0x1c(%ebp),%ecx 10beb2: 0f 84 c0 00 00 00 je 10bf78 /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 10beb8: 50 push %eax 10beb9: 53 push %ebx 10beba: 8b 45 14 mov 0x14(%ebp),%eax 10bebd: 83 e0 01 and $0x1,%eax 10bec0: 50 push %eax 10bec1: 6a 00 push $0x0 10bec3: 8b 45 14 mov 0x14(%ebp),%eax 10bec6: c1 e8 09 shr $0x9,%eax 10bec9: 83 e0 01 and $0x1,%eax 10becc: 50 push %eax 10becd: 8b 45 14 mov 0x14(%ebp),%eax 10bed0: c1 e8 08 shr $0x8,%eax 10bed3: 83 f0 01 xor $0x1,%eax 10bed6: 83 e0 01 and $0x1,%eax 10bed9: 50 push %eax 10beda: 51 push %ecx 10bedb: 83 e7 01 and $0x1,%edi 10bede: 57 push %edi 10bedf: ff 75 10 pushl 0x10(%ebp) 10bee2: 6a 00 push $0x0 10bee4: 52 push %edx 10bee5: 68 40 94 12 00 push $0x129440 10beea: 89 55 e4 mov %edx,-0x1c(%ebp) 10beed: e8 16 1e 00 00 call 10dd08 <_Thread_Initialize> NULL, /* no budget algorithm callout */ _Modes_Get_interrupt_level(initial_modes), (Objects_Name) name ); if ( !status ) { 10bef2: 83 c4 30 add $0x30,%esp 10bef5: 84 c0 test %al,%al 10bef7: 8b 55 e4 mov -0x1c(%ebp),%edx 10befa: 74 48 je 10bf44 } api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true; 10befc: 8b 8a f4 00 00 00 mov 0xf4(%edx),%ecx 10bf02: 8b 45 14 mov 0x14(%ebp),%eax 10bf05: c1 e8 0a shr $0xa,%eax 10bf08: 83 f0 01 xor $0x1,%eax 10bf0b: 83 e0 01 and $0x1,%eax 10bf0e: 88 41 08 mov %al,0x8(%ecx) *id = the_thread->Object.id; 10bf11: 8b 42 08 mov 0x8(%edx),%eax 10bf14: 89 06 mov %eax,(%esi) ); } #endif _RTEMS_Unlock_allocator(); 10bf16: 83 ec 0c sub $0xc,%esp 10bf19: ff 35 70 95 12 00 pushl 0x129570 10bf1f: e8 6c 06 00 00 call 10c590 <_API_Mutex_Unlock> 10bf24: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10bf26: 83 c4 10 add $0x10,%esp } 10bf29: 8d 65 f4 lea -0xc(%ebp),%esp 10bf2c: 5b pop %ebx 10bf2d: 5e pop %esi 10bf2e: 5f pop %edi 10bf2f: c9 leave 10bf30: c3 ret 10bf31: 8d 76 00 lea 0x0(%esi),%esi if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !rtems_is_name_valid( name ) ) 10bf34: b8 03 00 00 00 mov $0x3,%eax } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf39: 8d 65 f4 lea -0xc(%ebp),%esp 10bf3c: 5b pop %ebx 10bf3d: 5e pop %esi 10bf3e: 5f pop %edi 10bf3f: c9 leave 10bf40: c3 ret 10bf41: 8d 76 00 lea 0x0(%esi),%esi */ RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free ( Thread_Control *the_task ) { _Objects_Free( 10bf44: 83 ec 0c sub $0xc,%esp 10bf47: ff 72 08 pushl 0x8(%edx) 10bf4a: e8 e9 13 00 00 call 10d338 <_Objects_Get_information_id> 10bf4f: 5a pop %edx 10bf50: 59 pop %ecx 10bf51: 8b 55 e4 mov -0x1c(%ebp),%edx 10bf54: 52 push %edx 10bf55: 50 push %eax 10bf56: e8 6d 13 00 00 call 10d2c8 <_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(); 10bf5b: 58 pop %eax 10bf5c: ff 35 70 95 12 00 pushl 0x129570 10bf62: e8 29 06 00 00 call 10c590 <_API_Mutex_Unlock> 10bf67: b8 0d 00 00 00 mov $0xd,%eax return RTEMS_UNSATISFIED; 10bf6c: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf6f: 8d 65 f4 lea -0xc(%ebp),%esp 10bf72: 5b pop %ebx 10bf73: 5e pop %esi 10bf74: 5f pop %edi 10bf75: c9 leave 10bf76: c3 ret 10bf77: 90 nop */ the_thread = _RTEMS_tasks_Allocate(); if ( !the_thread ) { _RTEMS_Unlock_allocator(); 10bf78: 83 ec 0c sub $0xc,%esp 10bf7b: ff 35 70 95 12 00 pushl 0x129570 10bf81: e8 0a 06 00 00 call 10c590 <_API_Mutex_Unlock> 10bf86: b8 05 00 00 00 mov $0x5,%eax return RTEMS_TOO_MANY; 10bf8b: 83 c4 10 add $0x10,%esp } #endif _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } 10bf8e: 8d 65 f4 lea -0xc(%ebp),%esp 10bf91: 5b pop %ebx 10bf92: 5e pop %esi 10bf93: 5f pop %edi 10bf94: c9 leave 10bf95: c3 ret 10bf96: 66 90 xchg %ax,%ax Priority_Control core_priority; RTEMS_API_Control *api; ASR_Information *asr; if ( !id ) 10bf98: b8 09 00 00 00 mov $0x9,%eax 10bf9d: e9 d5 fe ff ff jmp 10be77 =============================================================================== 0010bfa4 : */ rtems_status_code rtems_task_delete( rtems_id id ) { 10bfa4: 55 push %ebp 10bfa5: 89 e5 mov %esp,%ebp 10bfa7: 53 push %ebx 10bfa8: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; _RTEMS_Lock_allocator(); 10bfab: ff 35 70 95 12 00 pushl 0x129570 10bfb1: e8 92 05 00 00 call 10c548 <_API_Mutex_Lock> the_thread = _Thread_Get( id, &location ); 10bfb6: 5a pop %edx 10bfb7: 59 pop %ecx 10bfb8: 8d 45 f4 lea -0xc(%ebp),%eax 10bfbb: 50 push %eax 10bfbc: ff 75 08 pushl 0x8(%ebp) 10bfbf: e8 cc 1c 00 00 call 10dc90 <_Thread_Get> 10bfc4: 89 c3 mov %eax,%ebx switch ( location ) { 10bfc6: 83 c4 10 add $0x10,%esp 10bfc9: 8b 45 f4 mov -0xc(%ebp),%eax 10bfcc: 85 c0 test %eax,%eax 10bfce: 75 44 jne 10c014 case OBJECTS_LOCAL: the_information = _Objects_Get_information_id( the_thread->Object.id ); 10bfd0: 83 ec 0c sub $0xc,%esp 10bfd3: ff 73 08 pushl 0x8(%ebx) 10bfd6: e8 5d 13 00 00 call 10d338 <_Objects_Get_information_id> 0 /* Not used */ ); } #endif _Thread_Close( the_information, the_thread ); 10bfdb: 5a pop %edx 10bfdc: 59 pop %ecx 10bfdd: 53 push %ebx 10bfde: 50 push %eax 10bfdf: e8 74 19 00 00 call 10d958 <_Thread_Close> 10bfe4: 58 pop %eax 10bfe5: ff 73 08 pushl 0x8(%ebx) 10bfe8: e8 4b 13 00 00 call 10d338 <_Objects_Get_information_id> 10bfed: 5a pop %edx 10bfee: 59 pop %ecx 10bfef: 53 push %ebx 10bff0: 50 push %eax 10bff1: e8 d2 12 00 00 call 10d2c8 <_Objects_Free> _RTEMS_tasks_Free( the_thread ); _RTEMS_Unlock_allocator(); 10bff6: 58 pop %eax 10bff7: ff 35 70 95 12 00 pushl 0x129570 10bffd: e8 8e 05 00 00 call 10c590 <_API_Mutex_Unlock> _Thread_Enable_dispatch(); 10c002: e8 65 1c 00 00 call 10dc6c <_Thread_Enable_dispatch> 10c007: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c009: 83 c4 10 add $0x10,%esp break; } _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; } 10c00c: 8b 5d fc mov -0x4(%ebp),%ebx 10c00f: c9 leave 10c010: c3 ret 10c011: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_ERROR: break; } _RTEMS_Unlock_allocator(); 10c014: 83 ec 0c sub $0xc,%esp 10c017: ff 35 70 95 12 00 pushl 0x129570 10c01d: e8 6e 05 00 00 call 10c590 <_API_Mutex_Unlock> 10c022: b8 04 00 00 00 mov $0x4,%eax return RTEMS_INVALID_ID; 10c027: 83 c4 10 add $0x10,%esp } 10c02a: 8b 5d fc mov -0x4(%ebp),%ebx 10c02d: c9 leave 10c02e: c3 ret =============================================================================== 0010dac0 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { 10dac0: 55 push %ebp 10dac1: 89 e5 mov %esp,%ebp 10dac3: 56 push %esi 10dac4: 53 push %ebx 10dac5: 83 ec 10 sub $0x10,%esp 10dac8: 8b 45 08 mov 0x8(%ebp),%eax 10dacb: 8b 75 0c mov 0xc(%ebp),%esi 10dace: 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() ) 10dad1: 80 3d 44 8c 12 00 00 cmpb $0x0,0x128c44 10dad8: 74 6e je 10db48 return RTEMS_NOT_CONFIGURED; if ( !note ) 10dada: 85 db test %ebx,%ebx 10dadc: 74 7e je 10db5c /* * 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 ) 10dade: 83 fe 0f cmp $0xf,%esi 10dae1: 77 3d ja 10db20 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dae3: 85 c0 test %eax,%eax 10dae5: 74 45 je 10db2c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10dae7: 8b 15 f8 d1 12 00 mov 0x12d1f8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10daed: 3b 42 08 cmp 0x8(%edx),%eax 10daf0: 74 40 je 10db32 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10daf2: 83 ec 08 sub $0x8,%esp 10daf5: 8d 55 f4 lea -0xc(%ebp),%edx 10daf8: 52 push %edx 10daf9: 50 push %eax 10dafa: e8 b5 1f 00 00 call 10fab4 <_Thread_Get> switch ( location ) { 10daff: 83 c4 10 add $0x10,%esp 10db02: 8b 55 f4 mov -0xc(%ebp),%edx 10db05: 85 d2 test %edx,%edx 10db07: 75 4b jne 10db54 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10db09: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10db0f: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10db13: 89 03 mov %eax,(%ebx) _Thread_Enable_dispatch(); 10db15: e8 76 1f 00 00 call 10fa90 <_Thread_Enable_dispatch> 10db1a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10db1c: eb 07 jmp 10db25 10db1e: 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 ) 10db20: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db25: 8d 65 f8 lea -0x8(%ebp),%esp 10db28: 5b pop %ebx 10db29: 5e pop %esi 10db2a: c9 leave 10db2b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10db2c: 8b 15 f8 d1 12 00 mov 0x12d1f8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 10db32: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10db38: 8b 44 b0 20 mov 0x20(%eax,%esi,4),%eax 10db3c: 89 03 mov %eax,(%ebx) 10db3e: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db40: 8d 65 f8 lea -0x8(%ebp),%esp 10db43: 5b pop %ebx 10db44: 5e pop %esi 10db45: c9 leave 10db46: c3 ret 10db47: 90 nop { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 10db48: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10db4d: 8d 65 f8 lea -0x8(%ebp),%esp 10db50: 5b pop %ebx 10db51: 5e pop %esi 10db52: c9 leave 10db53: c3 ret *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10db54: b8 04 00 00 00 mov $0x4,%eax 10db59: eb ca jmp 10db25 10db5b: 90 nop RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) 10db5c: b8 09 00 00 00 mov $0x9,%eax 10db61: eb c2 jmp 10db25 =============================================================================== 00118a54 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { 118a54: 55 push %ebp 118a55: 89 e5 mov %esp,%ebp 118a57: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 118a5a: 8d 45 f4 lea -0xc(%ebp),%eax 118a5d: 50 push %eax 118a5e: ff 75 08 pushl 0x8(%ebp) 118a61: e8 a6 38 00 00 call 11c30c <_Thread_Get> switch ( location ) { 118a66: 83 c4 10 add $0x10,%esp 118a69: 8b 55 f4 mov -0xc(%ebp),%edx 118a6c: 85 d2 test %edx,%edx 118a6e: 74 08 je 118a78 118a70: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a75: c9 leave 118a76: c3 ret 118a77: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 118a78: f6 40 10 02 testb $0x2,0x10(%eax) 118a7c: 74 0e je 118a8c _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 118a7e: e8 39 38 00 00 call 11c2bc <_Thread_Enable_dispatch> 118a83: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a88: c9 leave 118a89: c3 ret 118a8a: 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(); 118a8c: e8 2b 38 00 00 call 11c2bc <_Thread_Enable_dispatch> 118a91: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118a93: c9 leave 118a94: c3 ret =============================================================================== 00114b24 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 114b24: 55 push %ebp 114b25: 89 e5 mov %esp,%ebp 114b27: 57 push %edi 114b28: 56 push %esi 114b29: 53 push %ebx 114b2a: 83 ec 1c sub $0x1c,%esp 114b2d: 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 ) 114b30: 85 c9 test %ecx,%ecx 114b32: 0f 84 1c 01 00 00 je 114c54 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 114b38: 8b 1d 78 95 12 00 mov 0x129578,%ebx api = executing->API_Extensions[ THREAD_API_RTEMS ]; 114b3e: 8b bb f4 00 00 00 mov 0xf4(%ebx),%edi asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 114b44: 80 7b 75 01 cmpb $0x1,0x75(%ebx) 114b48: 19 f6 sbb %esi,%esi 114b4a: 81 e6 00 01 00 00 and $0x100,%esi if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 114b50: 8b 53 7c mov 0x7c(%ebx),%edx 114b53: 85 d2 test %edx,%edx 114b55: 0f 85 b5 00 00 00 jne 114c10 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 114b5b: 80 7f 08 01 cmpb $0x1,0x8(%edi) 114b5f: 19 d2 sbb %edx,%edx 114b61: 81 e2 00 04 00 00 and $0x400,%edx old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); 114b67: 89 55 e4 mov %edx,-0x1c(%ebp) 114b6a: 89 4d e0 mov %ecx,-0x20(%ebp) 114b6d: e8 1a a5 ff ff call 10f08c <_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; 114b72: 8b 55 e4 mov -0x1c(%ebp),%edx 114b75: 09 d0 or %edx,%eax old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; 114b77: 09 f0 or %esi,%eax 114b79: 8b 4d e0 mov -0x20(%ebp),%ecx 114b7c: 89 01 mov %eax,(%ecx) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 114b7e: f7 45 0c 00 01 00 00 testl $0x100,0xc(%ebp) 114b85: 74 0f je 114b96 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 114b87: 8b 45 08 mov 0x8(%ebp),%eax 114b8a: c1 e8 08 shr $0x8,%eax 114b8d: 83 f0 01 xor $0x1,%eax 114b90: 83 e0 01 and $0x1,%eax 114b93: 88 43 75 mov %al,0x75(%ebx) if ( mask & RTEMS_TIMESLICE_MASK ) { 114b96: f7 45 0c 00 02 00 00 testl $0x200,0xc(%ebp) 114b9d: 74 18 je 114bb7 if ( _Modes_Is_timeslice(mode_set) ) { 114b9f: f7 45 08 00 02 00 00 testl $0x200,0x8(%ebp) 114ba6: 74 74 je 114c1c executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 114ba8: c7 43 7c 01 00 00 00 movl $0x1,0x7c(%ebx) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 114baf: a1 84 94 12 00 mov 0x129484,%eax 114bb4: 89 43 78 mov %eax,0x78(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 114bb7: f6 45 0c 01 testb $0x1,0xc(%ebp) 114bbb: 74 07 je 114bc4 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 114bbd: f6 45 08 01 testb $0x1,0x8(%ebp) 114bc1: 74 69 je 114c2c 114bc3: fa cli */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 114bc4: f7 45 0c 00 04 00 00 testl $0x400,0xc(%ebp) 114bcb: 74 2c je 114bf9 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 114bcd: 8b 45 08 mov 0x8(%ebp),%eax 114bd0: c1 e8 0a shr $0xa,%eax 114bd3: 83 f0 01 xor $0x1,%eax 114bd6: 83 e0 01 and $0x1,%eax if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 114bd9: 38 47 08 cmp %al,0x8(%edi) 114bdc: 74 1b je 114bf9 needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; 114bde: 88 47 08 mov %al,0x8(%edi) ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 114be1: 9c pushf 114be2: fa cli 114be3: 58 pop %eax _signals = information->signals_pending; 114be4: 8b 57 18 mov 0x18(%edi),%edx information->signals_pending = information->signals_posted; 114be7: 8b 4f 14 mov 0x14(%edi),%ecx 114bea: 89 4f 18 mov %ecx,0x18(%edi) information->signals_posted = _signals; 114bed: 89 57 14 mov %edx,0x14(%edi) _ISR_Enable( _level ); 114bf0: 50 push %eax 114bf1: 9d popf if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; 114bf2: 8b 47 14 mov 0x14(%edi),%eax 114bf5: 85 c0 test %eax,%eax 114bf7: 75 53 jne 114c4c if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 114bf9: 31 db xor %ebx,%ebx } } } if ( _System_state_Is_up( _System_state_Get() ) ) 114bfb: 83 3d 80 96 12 00 03 cmpl $0x3,0x129680 114c02: 74 2c je 114c30 <== ALWAYS TAKEN if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); 114c04: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 114c06: 83 c4 1c add $0x1c,%esp 114c09: 5b pop %ebx 114c0a: 5e pop %esi 114c0b: 5f pop %edi 114c0c: c9 leave 114c0d: c3 ret 114c0e: 66 90 xchg %ax,%ax 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; 114c10: 81 ce 00 02 00 00 or $0x200,%esi 114c16: e9 40 ff ff ff jmp 114b5b 114c1b: 90 nop 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; 114c1c: c7 43 7c 00 00 00 00 movl $0x0,0x7c(%ebx) /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 114c23: f6 45 0c 01 testb $0x1,0xc(%ebp) 114c27: 74 9b je 114bc4 114c29: eb 92 jmp 114bbd 114c2b: 90 nop 114c2c: fb sti 114c2d: eb 95 jmp 114bc4 114c2f: 90 nop } } } if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 114c30: e8 bf 01 00 00 call 114df4 <_Thread_Evaluate_mode> 114c35: 84 c0 test %al,%al 114c37: 75 04 jne 114c3d 114c39: 84 db test %bl,%bl 114c3b: 74 c7 je 114c04 _Thread_Dispatch(); 114c3d: e8 ce 8e ff ff call 10db10 <_Thread_Dispatch> 114c42: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 114c44: 83 c4 1c add $0x1c,%esp 114c47: 5b pop %ebx 114c48: 5e pop %esi 114c49: 5f pop %edi 114c4a: c9 leave 114c4b: c3 ret if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { needs_asr_dispatching = true; executing->do_post_task_switch_extension = true; 114c4c: c6 43 74 01 movb $0x1,0x74(%ebx) 114c50: b3 01 mov $0x1,%bl 114c52: eb a7 jmp 114bfb ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 114c54: b8 09 00 00 00 mov $0x9,%eax if ( _System_state_Is_up( _System_state_Get() ) ) if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 114c59: 83 c4 1c add $0x1c,%esp 114c5c: 5b pop %ebx 114c5d: 5e pop %esi 114c5e: 5f pop %edi 114c5f: c9 leave 114c60: c3 ret =============================================================================== 0010f2f0 : */ rtems_status_code rtems_task_resume( rtems_id id ) { 10f2f0: 55 push %ebp 10f2f1: 89 e5 mov %esp,%ebp 10f2f3: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 10f2f6: 8d 45 f4 lea -0xc(%ebp),%eax 10f2f9: 50 push %eax 10f2fa: ff 75 08 pushl 0x8(%ebp) 10f2fd: e8 12 1d 00 00 call 111014 <_Thread_Get> switch ( location ) { 10f302: 83 c4 10 add $0x10,%esp 10f305: 8b 55 f4 mov -0xc(%ebp),%edx 10f308: 85 d2 test %edx,%edx 10f30a: 74 08 je 10f314 10f30c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f311: c9 leave 10f312: c3 ret 10f313: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 10f314: f6 40 10 02 testb $0x2,0x10(%eax) 10f318: 75 0e jne 10f328 _Thread_Resume( the_thread, true ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10f31a: e8 a5 1c 00 00 call 110fc4 <_Thread_Enable_dispatch> 10f31f: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f324: c9 leave 10f325: c3 ret 10f326: 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, true ); 10f328: 83 ec 08 sub $0x8,%esp 10f32b: 6a 01 push $0x1 10f32d: 50 push %eax 10f32e: e8 3d 25 00 00 call 111870 <_Thread_Resume> _Thread_Enable_dispatch(); 10f333: e8 8c 1c 00 00 call 110fc4 <_Thread_Enable_dispatch> 10f338: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10f33a: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10f33d: c9 leave 10f33e: c3 ret =============================================================================== 0010dc38 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { 10dc38: 55 push %ebp 10dc39: 89 e5 mov %esp,%ebp 10dc3b: 56 push %esi 10dc3c: 53 push %ebx 10dc3d: 83 ec 10 sub $0x10,%esp 10dc40: 8b 45 08 mov 0x8(%ebp),%eax 10dc43: 8b 5d 0c mov 0xc(%ebp),%ebx 10dc46: 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() ) 10dc49: 80 3d 44 8c 12 00 00 cmpb $0x0,0x128c44 10dc50: 74 66 je 10dcb8 /* * 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 ) 10dc52: 83 fb 0f cmp $0xf,%ebx 10dc55: 77 39 ja 10dc90 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc57: 85 c0 test %eax,%eax 10dc59: 74 41 je 10dc9c _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { 10dc5b: 8b 15 f8 d1 12 00 mov 0x12d1f8,%edx /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc61: 3b 42 08 cmp 0x8(%edx),%eax 10dc64: 74 3c je 10dca2 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 10dc66: 83 ec 08 sub $0x8,%esp 10dc69: 8d 55 f4 lea -0xc(%ebp),%edx 10dc6c: 52 push %edx 10dc6d: 50 push %eax 10dc6e: e8 41 1e 00 00 call 10fab4 <_Thread_Get> switch ( location ) { 10dc73: 83 c4 10 add $0x10,%esp 10dc76: 8b 55 f4 mov -0xc(%ebp),%edx 10dc79: 85 d2 test %edx,%edx 10dc7b: 75 47 jne 10dcc4 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10dc7d: 8b 80 f4 00 00 00 mov 0xf4(%eax),%eax 10dc83: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) _Thread_Enable_dispatch(); 10dc87: e8 04 1e 00 00 call 10fa90 <_Thread_Enable_dispatch> 10dc8c: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10dc8e: eb 05 jmp 10dc95 /* * 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 ) 10dc90: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dc95: 8d 65 f8 lea -0x8(%ebp),%esp 10dc98: 5b pop %ebx 10dc99: 5e pop %esi 10dc9a: c9 leave 10dc9b: c3 ret /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 10dc9c: 8b 15 f8 d1 12 00 mov 0x12d1f8,%edx _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 10dca2: 8b 82 f4 00 00 00 mov 0xf4(%edx),%eax 10dca8: 89 74 98 20 mov %esi,0x20(%eax,%ebx,4) 10dcac: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcae: 8d 65 f8 lea -0x8(%ebp),%esp 10dcb1: 5b pop %ebx 10dcb2: 5e pop %esi 10dcb3: c9 leave 10dcb4: c3 ret 10dcb5: 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() ) 10dcb8: b8 16 00 00 00 mov $0x16,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcbd: 8d 65 f8 lea -0x8(%ebp),%esp 10dcc0: 5b pop %ebx 10dcc1: 5e pop %esi 10dcc2: c9 leave 10dcc3: c3 ret api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 10dcc4: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10dcc9: 8d 65 f8 lea -0x8(%ebp),%esp 10dccc: 5b pop %ebx 10dccd: 5e pop %esi 10dcce: c9 leave 10dccf: c3 ret =============================================================================== 0010ffac : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 10ffac: 55 push %ebp 10ffad: 89 e5 mov %esp,%ebp 10ffaf: 56 push %esi 10ffb0: 53 push %ebx 10ffb1: 83 ec 10 sub $0x10,%esp 10ffb4: 8b 5d 0c mov 0xc(%ebp),%ebx 10ffb7: 8b 75 10 mov 0x10(%ebp),%esi register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 10ffba: 85 db test %ebx,%ebx 10ffbc: 74 0b je 10ffc9 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 10ffbe: 0f b6 05 14 82 12 00 movzbl 0x128214,%eax 10ffc5: 39 c3 cmp %eax,%ebx 10ffc7: 77 5f ja 110028 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 10ffc9: 85 f6 test %esi,%esi 10ffcb: 74 67 je 110034 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10ffcd: 83 ec 08 sub $0x8,%esp 10ffd0: 8d 45 f4 lea -0xc(%ebp),%eax 10ffd3: 50 push %eax 10ffd4: ff 75 08 pushl 0x8(%ebp) 10ffd7: e8 68 1e 00 00 call 111e44 <_Thread_Get> switch ( location ) { 10ffdc: 83 c4 10 add $0x10,%esp 10ffdf: 8b 55 f4 mov -0xc(%ebp),%edx 10ffe2: 85 d2 test %edx,%edx 10ffe4: 75 36 jne 11001c case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 10ffe6: 8b 50 14 mov 0x14(%eax),%edx 10ffe9: 89 16 mov %edx,(%esi) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 10ffeb: 85 db test %ebx,%ebx 10ffed: 74 1c je 11000b the_thread->real_priority = new_priority; 10ffef: 89 58 18 mov %ebx,0x18(%eax) if ( the_thread->resource_count == 0 || 10fff2: 8b 48 1c mov 0x1c(%eax),%ecx 10fff5: 85 c9 test %ecx,%ecx 10fff7: 74 05 je 10fffe the_thread->current_priority > new_priority ) 10fff9: 3b 58 14 cmp 0x14(%eax),%ebx 10fffc: 73 0d jae 11000b <== ALWAYS TAKEN _Thread_Change_priority( the_thread, new_priority, false ); 10fffe: 52 push %edx 10ffff: 6a 00 push $0x0 110001: 53 push %ebx 110002: 50 push %eax 110003: e8 04 19 00 00 call 11190c <_Thread_Change_priority> 110008: 83 c4 10 add $0x10,%esp } _Thread_Enable_dispatch(); 11000b: e8 e4 1d 00 00 call 111df4 <_Thread_Enable_dispatch> 110010: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110012: 8d 65 f8 lea -0x8(%ebp),%esp 110015: 5b pop %ebx 110016: 5e pop %esi 110017: c9 leave 110018: c3 ret 110019: 8d 76 00 lea 0x0(%esi),%esi if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 11001c: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110021: 8d 65 f8 lea -0x8(%ebp),%esp 110024: 5b pop %ebx 110025: 5e pop %esi 110026: c9 leave 110027: c3 ret 110028: b8 13 00 00 00 mov $0x13,%eax 11002d: 8d 65 f8 lea -0x8(%ebp),%esp 110030: 5b pop %ebx 110031: 5e pop %esi 110032: c9 leave 110033: c3 ret if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 110034: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 110039: 8d 65 f8 lea -0x8(%ebp),%esp 11003c: 5b pop %ebx 11003d: 5e pop %esi 11003e: c9 leave 11003f: c3 ret =============================================================================== 0010c0e8 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 10c0e8: 55 push %ebp 10c0e9: 89 e5 mov %esp,%ebp 10c0eb: 53 push %ebx 10c0ec: 83 ec 14 sub $0x14,%esp 10c0ef: 8b 5d 0c mov 0xc(%ebp),%ebx register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10c0f2: 85 db test %ebx,%ebx 10c0f4: 74 4e je 10c144 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 10c0f6: 83 ec 08 sub $0x8,%esp 10c0f9: 8d 45 f4 lea -0xc(%ebp),%eax 10c0fc: 50 push %eax 10c0fd: ff 75 08 pushl 0x8(%ebp) 10c100: e8 8b 1b 00 00 call 10dc90 <_Thread_Get> switch ( location ) { 10c105: 83 c4 10 add $0x10,%esp 10c108: 8b 55 f4 mov -0xc(%ebp),%edx 10c10b: 85 d2 test %edx,%edx 10c10d: 75 29 jne 10c138 case OBJECTS_LOCAL: if ( _Thread_Start( 10c10f: 83 ec 0c sub $0xc,%esp 10c112: ff 75 10 pushl 0x10(%ebp) 10c115: 6a 00 push $0x0 10c117: 53 push %ebx 10c118: 6a 00 push $0x0 10c11a: 50 push %eax 10c11b: e8 84 26 00 00 call 10e7a4 <_Thread_Start> 10c120: 83 c4 20 add $0x20,%esp 10c123: 84 c0 test %al,%al 10c125: 75 29 jne 10c150 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 10c127: e8 40 1b 00 00 call 10dc6c <_Thread_Enable_dispatch> 10c12c: b8 0e 00 00 00 mov $0xe,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c131: 8b 5d fc mov -0x4(%ebp),%ebx 10c134: c9 leave 10c135: c3 ret 10c136: 66 90 xchg %ax,%ax if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 10c138: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c13d: 8b 5d fc mov -0x4(%ebp),%ebx 10c140: c9 leave 10c141: c3 ret 10c142: 66 90 xchg %ax,%ax ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 10c144: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c149: 8b 5d fc mov -0x4(%ebp),%ebx 10c14c: c9 leave 10c14d: c3 ret 10c14e: 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(); 10c150: e8 17 1b 00 00 call 10dc6c <_Thread_Enable_dispatch> 10c155: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c157: 8b 5d fc mov -0x4(%ebp),%ebx 10c15a: c9 leave 10c15b: c3 ret =============================================================================== 00111e48 : */ rtems_status_code rtems_task_suspend( rtems_id id ) { 111e48: 55 push %ebp 111e49: 89 e5 mov %esp,%ebp 111e4b: 83 ec 20 sub $0x20,%esp register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 111e4e: 8d 45 f4 lea -0xc(%ebp),%eax 111e51: 50 push %eax 111e52: ff 75 08 pushl 0x8(%ebp) 111e55: e8 36 be ff ff call 10dc90 <_Thread_Get> switch ( location ) { 111e5a: 83 c4 10 add $0x10,%esp 111e5d: 8b 55 f4 mov -0xc(%ebp),%edx 111e60: 85 d2 test %edx,%edx 111e62: 74 08 je 111e6c 111e64: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111e69: c9 leave 111e6a: c3 ret 111e6b: 90 nop the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 111e6c: f6 40 10 02 testb $0x2,0x10(%eax) 111e70: 74 0e je 111e80 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 111e72: e8 f5 bd ff ff call 10dc6c <_Thread_Enable_dispatch> 111e77: b8 0f 00 00 00 mov $0xf,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111e7c: c9 leave 111e7d: c3 ret 111e7e: 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 ); 111e80: 83 ec 0c sub $0xc,%esp 111e83: 50 push %eax 111e84: e8 d3 0a 00 00 call 11295c <_Thread_Suspend> _Thread_Enable_dispatch(); 111e89: e8 de bd ff ff call 10dc6c <_Thread_Enable_dispatch> 111e8e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 111e90: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 111e93: c9 leave 111e94: c3 ret =============================================================================== 0010c9c8 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 10c9c8: 55 push %ebp 10c9c9: 89 e5 mov %esp,%ebp 10c9cb: 57 push %edi 10c9cc: 56 push %esi 10c9cd: 53 push %ebx 10c9ce: 83 ec 1c sub $0x1c,%esp 10c9d1: 8b 5d 0c mov 0xc(%ebp),%ebx 10c9d4: 8b 7d 10 mov 0x10(%ebp),%edi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10c9d7: 85 db test %ebx,%ebx 10c9d9: 0f 84 9d 00 00 00 je 10ca7c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10c9df: 83 ec 08 sub $0x8,%esp 10c9e2: 8d 45 e4 lea -0x1c(%ebp),%eax 10c9e5: 50 push %eax 10c9e6: ff 75 08 pushl 0x8(%ebp) 10c9e9: e8 26 1d 00 00 call 10e714 <_Thread_Get> 10c9ee: 89 c6 mov %eax,%esi switch (location) { 10c9f0: 83 c4 10 add $0x10,%esp 10c9f3: 8b 45 e4 mov -0x1c(%ebp),%eax 10c9f6: 85 c0 test %eax,%eax 10c9f8: 74 0e je 10ca08 10c9fa: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c9ff: 8d 65 f4 lea -0xc(%ebp),%esp 10ca02: 5b pop %ebx 10ca03: 5e pop %esi 10ca04: 5f pop %edi 10ca05: c9 leave 10ca06: c3 ret 10ca07: 90 nop case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 10ca08: 8b 86 04 01 00 00 mov 0x104(%esi),%eax while (tvp) { 10ca0e: 85 c0 test %eax,%eax 10ca10: 75 44 jne 10ca56 10ca12: 66 90 xchg %ax,%ax } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 10ca14: 83 ec 0c sub $0xc,%esp 10ca17: 6a 14 push $0x14 10ca19: e8 82 2e 00 00 call 10f8a0 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 10ca1e: 83 c4 10 add $0x10,%esp 10ca21: 85 c0 test %eax,%eax 10ca23: 74 4b je 10ca70 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 10ca25: 8b 13 mov (%ebx),%edx 10ca27: 89 50 08 mov %edx,0x8(%eax) new->ptr = ptr; 10ca2a: 89 58 04 mov %ebx,0x4(%eax) new->dtor = dtor; 10ca2d: 89 78 10 mov %edi,0x10(%eax) new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 10ca30: 8b 96 04 01 00 00 mov 0x104(%esi),%edx 10ca36: 89 10 mov %edx,(%eax) the_thread->task_variables = new; 10ca38: 89 86 04 01 00 00 mov %eax,0x104(%esi) _Thread_Enable_dispatch(); 10ca3e: e8 ad 1c 00 00 call 10e6f0 <_Thread_Enable_dispatch> 10ca43: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca45: 8d 65 f4 lea -0xc(%ebp),%esp 10ca48: 5b pop %ebx 10ca49: 5e pop %esi 10ca4a: 5f pop %edi 10ca4b: c9 leave 10ca4c: c3 ret 10ca4d: 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; 10ca50: 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) { 10ca52: 85 c0 test %eax,%eax 10ca54: 74 be je 10ca14 if (tvp->ptr == ptr) { 10ca56: 39 58 04 cmp %ebx,0x4(%eax) 10ca59: 75 f5 jne 10ca50 tvp->dtor = dtor; 10ca5b: 89 78 10 mov %edi,0x10(%eax) _Thread_Enable_dispatch(); 10ca5e: e8 8d 1c 00 00 call 10e6f0 <_Thread_Enable_dispatch> 10ca63: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca65: 8d 65 f4 lea -0xc(%ebp),%esp 10ca68: 5b pop %ebx 10ca69: 5e pop %esi 10ca6a: 5f pop %edi 10ca6b: c9 leave 10ca6c: c3 ret 10ca6d: 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(); 10ca70: e8 7b 1c 00 00 call 10e6f0 <_Thread_Enable_dispatch> 10ca75: b8 1a 00 00 00 mov $0x1a,%eax return RTEMS_NO_MEMORY; 10ca7a: eb 83 jmp 10c9ff { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 10ca7c: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10ca81: 8d 65 f4 lea -0xc(%ebp),%esp 10ca84: 5b pop %ebx 10ca85: 5e pop %esi 10ca86: 5f pop %edi 10ca87: c9 leave 10ca88: c3 ret =============================================================================== 0010ca8c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 10ca8c: 55 push %ebp 10ca8d: 89 e5 mov %esp,%ebp 10ca8f: 53 push %ebx 10ca90: 83 ec 14 sub $0x14,%esp 10ca93: 8b 5d 0c mov 0xc(%ebp),%ebx Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 10ca96: 85 db test %ebx,%ebx 10ca98: 74 4c je 10cae6 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 10ca9a: 83 ec 08 sub $0x8,%esp 10ca9d: 8d 45 f4 lea -0xc(%ebp),%eax 10caa0: 50 push %eax 10caa1: ff 75 08 pushl 0x8(%ebp) 10caa4: e8 6b 1c 00 00 call 10e714 <_Thread_Get> switch (location) { 10caa9: 83 c4 10 add $0x10,%esp 10caac: 8b 55 f4 mov -0xc(%ebp),%edx 10caaf: 85 d2 test %edx,%edx 10cab1: 74 0d je 10cac0 10cab3: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cab8: 8b 5d fc mov -0x4(%ebp),%ebx 10cabb: c9 leave 10cabc: c3 ret 10cabd: 8d 76 00 lea 0x0(%esi),%esi the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; 10cac0: 8b 90 04 01 00 00 mov 0x104(%eax),%edx while (tvp) { 10cac6: 85 d2 test %edx,%edx 10cac8: 74 17 je 10cae1 if (tvp->ptr == ptr) { 10caca: 39 5a 04 cmp %ebx,0x4(%edx) 10cacd: 75 0a jne 10cad9 10cacf: eb 3c jmp 10cb0d 10cad1: 8d 76 00 lea 0x0(%esi),%esi 10cad4: 39 5a 04 cmp %ebx,0x4(%edx) 10cad7: 74 17 je 10caf0 else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10cad9: 89 d1 mov %edx,%ecx } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 10cadb: 8b 12 mov (%edx),%edx the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 10cadd: 85 d2 test %edx,%edx 10cadf: 75 f3 jne 10cad4 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10cae1: e8 0a 1c 00 00 call 10e6f0 <_Thread_Enable_dispatch> 10cae6: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10caeb: 8b 5d fc mov -0x4(%ebp),%ebx 10caee: c9 leave 10caef: c3 ret case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 10caf0: 8b 1a mov (%edx),%ebx 10caf2: 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 ); 10caf4: 83 ec 08 sub $0x8,%esp 10caf7: 52 push %edx 10caf8: 50 push %eax 10caf9: e8 a2 00 00 00 call 10cba0 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 10cafe: e8 ed 1b 00 00 call 10e6f0 <_Thread_Enable_dispatch> 10cb03: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10cb05: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb08: 8b 5d fc mov -0x4(%ebp),%ebx 10cb0b: c9 leave 10cb0c: 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; 10cb0d: 8b 0a mov (%edx),%ecx 10cb0f: 89 88 04 01 00 00 mov %ecx,0x104(%eax) 10cb15: eb dd jmp 10caf4 =============================================================================== 0010cb18 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 10cb18: 55 push %ebp 10cb19: 89 e5 mov %esp,%ebp 10cb1b: 56 push %esi 10cb1c: 53 push %ebx 10cb1d: 83 ec 10 sub $0x10,%esp 10cb20: 8b 5d 0c mov 0xc(%ebp),%ebx 10cb23: 8b 75 10 mov 0x10(%ebp),%esi Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 10cb26: 85 db test %ebx,%ebx 10cb28: 74 56 je 10cb80 return RTEMS_INVALID_ADDRESS; if ( !result ) 10cb2a: 85 f6 test %esi,%esi 10cb2c: 74 52 je 10cb80 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 10cb2e: 83 ec 08 sub $0x8,%esp 10cb31: 8d 45 f4 lea -0xc(%ebp),%eax 10cb34: 50 push %eax 10cb35: ff 75 08 pushl 0x8(%ebp) 10cb38: e8 d7 1b 00 00 call 10e714 <_Thread_Get> switch (location) { 10cb3d: 83 c4 10 add $0x10,%esp 10cb40: 8b 55 f4 mov -0xc(%ebp),%edx 10cb43: 85 d2 test %edx,%edx 10cb45: 75 2d jne 10cb74 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 10cb47: 8b 80 04 01 00 00 mov 0x104(%eax),%eax while (tvp) { 10cb4d: 85 c0 test %eax,%eax 10cb4f: 75 09 jne 10cb5a 10cb51: eb 39 jmp 10cb8c 10cb53: 90 nop */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 10cb54: 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) { 10cb56: 85 c0 test %eax,%eax 10cb58: 74 32 je 10cb8c <== NEVER TAKEN if (tvp->ptr == ptr) { 10cb5a: 39 58 04 cmp %ebx,0x4(%eax) 10cb5d: 75 f5 jne 10cb54 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 10cb5f: 8b 40 0c mov 0xc(%eax),%eax 10cb62: 89 06 mov %eax,(%esi) _Thread_Enable_dispatch(); 10cb64: e8 87 1b 00 00 call 10e6f0 <_Thread_Enable_dispatch> 10cb69: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb6b: 8d 65 f8 lea -0x8(%ebp),%esp 10cb6e: 5b pop %ebx 10cb6f: 5e pop %esi 10cb70: c9 leave 10cb71: c3 ret 10cb72: 66 90 xchg %ax,%ax if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 10cb74: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb79: 8d 65 f8 lea -0x8(%ebp),%esp 10cb7c: 5b pop %ebx 10cb7d: 5e pop %esi 10cb7e: c9 leave 10cb7f: c3 ret return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 10cb80: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb85: 8d 65 f8 lea -0x8(%ebp),%esp 10cb88: 5b pop %ebx 10cb89: 5e pop %esi 10cb8a: c9 leave 10cb8b: c3 ret _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 10cb8c: e8 5f 1b 00 00 call 10e6f0 <_Thread_Enable_dispatch> 10cb91: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cb96: 8d 65 f8 lea -0x8(%ebp),%esp 10cb99: 5b pop %ebx 10cb9a: 5e pop %esi 10cb9b: c9 leave 10cb9c: c3 ret =============================================================================== 0010cf88 : */ rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { 10cf88: 55 push %ebp 10cf89: 89 e5 mov %esp,%ebp 10cf8b: 53 push %ebx 10cf8c: 83 ec 14 sub $0x14,%esp 10cf8f: 8b 5d 08 mov 0x8(%ebp),%ebx Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10cf92: 80 3d 0c bd 12 00 00 cmpb $0x0,0x12bd0c 10cf99: 0f 84 a9 00 00 00 je 10d048 return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10cf9f: 85 db test %ebx,%ebx 10cfa1: 0f 84 ad 00 00 00 je 10d054 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; 10cfa7: c7 43 18 00 00 00 00 movl $0x0,0x18(%ebx) if ( !_TOD_Validate( time_buffer ) ) 10cfae: 83 ec 0c sub $0xc,%esp 10cfb1: 53 push %ebx 10cfb2: e8 d9 f3 ff ff call 10c390 <_TOD_Validate> 10cfb7: 83 c4 10 add $0x10,%esp 10cfba: 84 c0 test %al,%al 10cfbc: 75 0a jne 10cfc8 _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 10cfbe: b8 14 00 00 00 mov $0x14,%eax } 10cfc3: 8b 5d fc mov -0x4(%ebp),%ebx 10cfc6: c9 leave 10cfc7: c3 ret time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); 10cfc8: 83 ec 0c sub $0xc,%esp 10cfcb: 53 push %ebx 10cfcc: e8 33 f3 ff ff call 10c304 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 10cfd1: 83 c4 10 add $0x10,%esp 10cfd4: 3b 05 8c bd 12 00 cmp 0x12bd8c,%eax 10cfda: 76 e2 jbe 10cfbe 10cfdc: 8b 15 f8 bc 12 00 mov 0x12bcf8,%edx 10cfe2: 42 inc %edx 10cfe3: 89 15 f8 bc 12 00 mov %edx,0x12bcf8 return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); 10cfe9: 83 ec 08 sub $0x8,%esp 10cfec: 6a 10 push $0x10 10cfee: ff 35 b8 bd 12 00 pushl 0x12bdb8 10cff4: 89 45 f4 mov %eax,-0xc(%ebp) 10cff7: e8 74 24 00 00 call 10f470 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, 10cffc: 8b 15 b8 bd 12 00 mov 0x12bdb8,%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( 10d002: 8b 4a 08 mov 0x8(%edx),%ecx Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d005: c7 42 50 00 00 00 00 movl $0x0,0x50(%edx) the_watchdog->routine = routine; 10d00c: c7 42 64 ec e9 10 00 movl $0x10e9ec,0x64(%edx) the_watchdog->id = id; 10d013: 89 4a 68 mov %ecx,0x68(%edx) the_watchdog->user_data = user_data; 10d016: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10d01d: 8b 45 f4 mov -0xc(%ebp),%eax 10d020: 2b 05 8c bd 12 00 sub 0x12bd8c,%eax 10d026: 89 42 54 mov %eax,0x54(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 10d029: 58 pop %eax 10d02a: 59 pop %ecx 10d02b: 83 c2 48 add $0x48,%edx 10d02e: 52 push %edx 10d02f: 68 cc bd 12 00 push $0x12bdcc 10d034: e8 37 2b 00 00 call 10fb70 <_Watchdog_Insert> ); _Watchdog_Insert_seconds( &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 10d039: e8 46 1b 00 00 call 10eb84 <_Thread_Enable_dispatch> 10d03e: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10d040: 83 c4 10 add $0x10,%esp 10d043: e9 7b ff ff ff jmp 10cfc3 rtems_time_of_day *time_buffer ) { Watchdog_Interval seconds; if ( !_TOD_Is_set ) 10d048: b8 0b 00 00 00 mov $0xb,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d04d: 8b 5d fc mov -0x4(%ebp),%ebx 10d050: c9 leave 10d051: c3 ret 10d052: 66 90 xchg %ax,%ax Watchdog_Interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) 10d054: b8 09 00 00 00 mov $0x9,%eax &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10d059: 8b 5d fc mov -0x4(%ebp),%ebx 10d05c: c9 leave 10d05d: c3 ret =============================================================================== 0010a738 : #include int rtems_termios_baud_to_index( rtems_termios_baud_t termios_baud ) { 10a738: 55 push %ebp 10a739: 89 e5 mov %esp,%ebp 10a73b: 8b 45 08 mov 0x8(%ebp),%eax int baud_index; switch (termios_baud) { 10a73e: 83 f8 09 cmp $0x9,%eax 10a741: 0f 84 f1 00 00 00 je 10a838 <== NEVER TAKEN 10a747: 7e 37 jle 10a780 <== ALWAYS TAKEN 10a749: 83 f8 0e cmp $0xe,%eax <== NOT EXECUTED 10a74c: 0f 84 f6 00 00 00 je 10a848 <== NOT EXECUTED 10a752: 7e 5c jle 10a7b0 <== NOT EXECUTED 10a754: 3d 02 10 00 00 cmp $0x1002,%eax <== NOT EXECUTED 10a759: 0f 84 01 01 00 00 je 10a860 <== NOT EXECUTED 10a75f: 0f 8e 97 00 00 00 jle 10a7fc <== NOT EXECUTED 10a765: 3d 03 10 00 00 cmp $0x1003,%eax <== NOT EXECUTED 10a76a: 0f 84 e0 00 00 00 je 10a850 <== NOT EXECUTED 10a770: 3d 04 10 00 00 cmp $0x1004,%eax <== NOT EXECUTED 10a775: 75 51 jne 10a7c8 <== NOT EXECUTED case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 10a777: b8 13 00 00 00 mov $0x13,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a77c: c9 leave <== NOT EXECUTED 10a77d: c3 ret <== NOT EXECUTED 10a77e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a780: 83 f8 04 cmp $0x4,%eax 10a783: 0f 84 b7 00 00 00 je 10a840 <== NEVER TAKEN 10a789: 7f 45 jg 10a7d0 <== NEVER TAKEN 10a78b: 83 f8 01 cmp $0x1,%eax 10a78e: 0f 84 8c 00 00 00 je 10a820 <== NEVER TAKEN 10a794: 0f 8e de 00 00 00 jle 10a878 <== ALWAYS TAKEN 10a79a: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10a79d: 0f 84 c5 00 00 00 je 10a868 <== NOT EXECUTED 10a7a3: 83 f8 03 cmp $0x3,%eax <== NOT EXECUTED 10a7a6: 75 20 jne 10a7c8 <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; 10a7a8: b8 03 00 00 00 mov $0x3,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a7ad: c9 leave <== NOT EXECUTED 10a7ae: c3 ret <== NOT EXECUTED 10a7af: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a7b0: 83 f8 0b cmp $0xb,%eax <== NOT EXECUTED 10a7b3: 0f 84 9f 00 00 00 je 10a858 <== NOT EXECUTED 10a7b9: 7c 39 jl 10a7f4 <== NOT EXECUTED 10a7bb: 83 f8 0c cmp $0xc,%eax <== NOT EXECUTED 10a7be: 74 50 je 10a810 <== NOT EXECUTED 10a7c0: 83 f8 0d cmp $0xd,%eax <== NOT EXECUTED 10a7c3: 74 62 je 10a827 <== NOT EXECUTED 10a7c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; case B460800: baud_index = 19; break; 10a7c8: b8 ff ff ff ff mov $0xffffffff,%eax default: baud_index = -1; break; } return baud_index; } 10a7cd: c9 leave 10a7ce: c3 ret 10a7cf: 90 nop rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a7d0: 83 f8 06 cmp $0x6,%eax <== NOT EXECUTED 10a7d3: 74 43 je 10a818 <== NOT EXECUTED 10a7d5: 7c 15 jl 10a7ec <== NOT EXECUTED 10a7d7: 83 f8 07 cmp $0x7,%eax <== NOT EXECUTED 10a7da: 0f 84 90 00 00 00 je 10a870 <== NOT EXECUTED 10a7e0: 83 f8 08 cmp $0x8,%eax <== NOT EXECUTED 10a7e3: 75 e3 jne 10a7c8 <== NOT EXECUTED case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; 10a7e5: b8 08 00 00 00 mov $0x8,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a7ea: c9 leave <== NOT EXECUTED 10a7eb: c3 ret <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; 10a7ec: b8 05 00 00 00 mov $0x5,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a7f1: c9 leave <== NOT EXECUTED 10a7f2: c3 ret <== NOT EXECUTED 10a7f3: 90 nop <== NOT EXECUTED case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; 10a7f4: b8 0a 00 00 00 mov $0xa,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a7f9: c9 leave <== NOT EXECUTED 10a7fa: c3 ret <== NOT EXECUTED 10a7fb: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a7fc: 83 f8 0f cmp $0xf,%eax <== NOT EXECUTED 10a7ff: 74 2f je 10a830 <== NOT EXECUTED 10a801: 3d 01 10 00 00 cmp $0x1001,%eax <== NOT EXECUTED 10a806: 75 c0 jne 10a7c8 <== NOT EXECUTED case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; 10a808: b8 10 00 00 00 mov $0x10,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a80d: c9 leave <== NOT EXECUTED 10a80e: c3 ret <== NOT EXECUTED 10a80f: 90 nop <== NOT EXECUTED case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; 10a810: b8 0c 00 00 00 mov $0xc,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a815: c9 leave <== NOT EXECUTED 10a816: c3 ret <== NOT EXECUTED 10a817: 90 nop <== NOT EXECUTED case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; 10a818: b8 06 00 00 00 mov $0x6,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a81d: c9 leave <== NOT EXECUTED 10a81e: c3 ret <== NOT EXECUTED 10a81f: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a820: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a825: c9 leave <== NOT EXECUTED 10a826: c3 ret <== NOT EXECUTED case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; 10a827: b8 0d 00 00 00 mov $0xd,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a82c: c9 leave <== NOT EXECUTED 10a82d: c3 ret <== NOT EXECUTED 10a82e: 66 90 xchg %ax,%ax <== NOT EXECUTED case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; 10a830: b8 0f 00 00 00 mov $0xf,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a835: c9 leave <== NOT EXECUTED 10a836: c3 ret <== NOT EXECUTED 10a837: 90 nop <== NOT EXECUTED case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; 10a838: b8 09 00 00 00 mov $0x9,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a83d: c9 leave <== NOT EXECUTED 10a83e: c3 ret <== NOT EXECUTED 10a83f: 90 nop <== NOT EXECUTED switch (termios_baud) { case B0: baud_index = 0; break; case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; 10a840: b8 04 00 00 00 mov $0x4,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a845: c9 leave <== NOT EXECUTED 10a846: c3 ret <== NOT EXECUTED 10a847: 90 nop <== NOT EXECUTED case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; 10a848: b8 0e 00 00 00 mov $0xe,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a84d: c9 leave <== NOT EXECUTED 10a84e: c3 ret <== NOT EXECUTED 10a84f: 90 nop <== NOT EXECUTED case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; case B115200: baud_index = 17; break; 10a850: b8 12 00 00 00 mov $0x12,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a855: c9 leave <== NOT EXECUTED 10a856: c3 ret <== NOT EXECUTED 10a857: 90 nop <== NOT EXECUTED case B150: baud_index = 5; break; case B200: baud_index = 6; break; case B300: baud_index = 7; break; case B600: baud_index = 8; break; case B1200: baud_index = 9; break; case B1800: baud_index = 10; break; 10a858: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a85d: c9 leave <== NOT EXECUTED 10a85e: c3 ret <== NOT EXECUTED 10a85f: 90 nop <== NOT EXECUTED case B2400: baud_index = 11; break; case B4800: baud_index = 12; break; case B9600: baud_index = 13; break; case B19200: baud_index = 14; break; case B38400: baud_index = 15; break; case B57600: baud_index = 16; break; 10a860: b8 11 00 00 00 mov $0x11,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a865: c9 leave <== NOT EXECUTED 10a866: c3 ret <== NOT EXECUTED 10a867: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a868: b8 02 00 00 00 mov $0x2,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a86d: c9 leave <== NOT EXECUTED 10a86e: c3 ret <== NOT EXECUTED 10a86f: 90 nop <== NOT EXECUTED case B50: baud_index = 1; break; case B75: baud_index = 2; break; case B110: baud_index = 3; break; case B134: baud_index = 4; break; case B150: baud_index = 5; break; case B200: baud_index = 6; break; 10a870: b8 07 00 00 00 mov $0x7,%eax <== NOT EXECUTED case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a875: c9 leave <== NOT EXECUTED 10a876: c3 ret <== NOT EXECUTED 10a877: 90 nop <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 10a878: 85 c0 test %eax,%eax 10a87a: 0f 85 48 ff ff ff jne 10a7c8 <== ALWAYS TAKEN 10a880: 31 c0 xor %eax,%eax case B460800: baud_index = 19; break; default: baud_index = -1; break; } return baud_index; } 10a882: c9 leave <== NOT EXECUTED 10a883: c3 ret <== NOT EXECUTED =============================================================================== 00109454 : #include int32_t rtems_termios_baud_to_number( int termios_baud ) { 109454: 55 push %ebp 109455: 89 e5 mov %esp,%ebp 109457: 8b 45 08 mov 0x8(%ebp),%eax int32_t baud; switch (termios_baud) { 10945a: 83 f8 09 cmp $0x9,%eax 10945d: 0f 84 f1 00 00 00 je 109554 109463: 7e 37 jle 10949c 109465: 83 f8 0e cmp $0xe,%eax 109468: 0f 84 f6 00 00 00 je 109564 10946e: 7e 5c jle 1094cc 109470: 3d 02 10 00 00 cmp $0x1002,%eax 109475: 0f 84 01 01 00 00 je 10957c 10947b: 0f 8e 97 00 00 00 jle 109518 109481: 3d 03 10 00 00 cmp $0x1003,%eax 109486: 0f 84 e0 00 00 00 je 10956c 10948c: 3d 04 10 00 00 cmp $0x1004,%eax 109491: 75 51 jne 1094e4 <== NEVER TAKEN case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; 109493: b8 00 08 07 00 mov $0x70800,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109498: c9 leave 109499: c3 ret 10949a: 66 90 xchg %ax,%ax int termios_baud ) { int32_t baud; switch (termios_baud) { 10949c: 83 f8 04 cmp $0x4,%eax 10949f: 0f 84 b7 00 00 00 je 10955c 1094a5: 7f 45 jg 1094ec 1094a7: 83 f8 01 cmp $0x1,%eax 1094aa: 0f 84 8c 00 00 00 je 10953c 1094b0: 0f 8e de 00 00 00 jle 109594 1094b6: 83 f8 02 cmp $0x2,%eax 1094b9: 0f 84 c5 00 00 00 je 109584 1094bf: 83 f8 03 cmp $0x3,%eax 1094c2: 75 20 jne 1094e4 <== NEVER TAKEN case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; 1094c4: b8 6e 00 00 00 mov $0x6e,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 1094c9: c9 leave 1094ca: c3 ret 1094cb: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 1094cc: 83 f8 0b cmp $0xb,%eax 1094cf: 0f 84 9f 00 00 00 je 109574 1094d5: 7c 39 jl 109510 1094d7: 83 f8 0c cmp $0xc,%eax 1094da: 74 50 je 10952c 1094dc: 83 f8 0d cmp $0xd,%eax 1094df: 74 62 je 109543 <== ALWAYS TAKEN 1094e1: 8d 76 00 lea 0x0(%esi),%esi case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; case B230400: baud = 230400; break; case B460800: baud = 460800; break; 1094e4: b8 ff ff ff ff mov $0xffffffff,%eax default: baud = -1; break; } return baud; } 1094e9: c9 leave 1094ea: c3 ret 1094eb: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 1094ec: 83 f8 06 cmp $0x6,%eax 1094ef: 74 43 je 109534 1094f1: 7c 15 jl 109508 1094f3: 83 f8 07 cmp $0x7,%eax 1094f6: 0f 84 90 00 00 00 je 10958c 1094fc: 83 f8 08 cmp $0x8,%eax 1094ff: 75 e3 jne 1094e4 <== NEVER TAKEN case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; 109501: b8 58 02 00 00 mov $0x258,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109506: c9 leave 109507: c3 ret switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; 109508: b8 96 00 00 00 mov $0x96,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 10950d: c9 leave 10950e: c3 ret 10950f: 90 nop case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; 109510: b8 08 07 00 00 mov $0x708,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109515: c9 leave 109516: c3 ret 109517: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 109518: 83 f8 0f cmp $0xf,%eax 10951b: 74 2f je 10954c 10951d: 3d 01 10 00 00 cmp $0x1001,%eax 109522: 75 c0 jne 1094e4 <== NEVER TAKEN case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; 109524: b8 00 e1 00 00 mov $0xe100,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109529: c9 leave 10952a: c3 ret 10952b: 90 nop case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; 10952c: b8 c0 12 00 00 mov $0x12c0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109531: c9 leave 109532: c3 ret 109533: 90 nop case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; 109534: b8 c8 00 00 00 mov $0xc8,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109539: c9 leave 10953a: c3 ret 10953b: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 10953c: b8 32 00 00 00 mov $0x32,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109541: c9 leave 109542: c3 ret case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; 109543: b8 80 25 00 00 mov $0x2580,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109548: c9 leave 109549: c3 ret 10954a: 66 90 xchg %ax,%ax case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; 10954c: b8 00 96 00 00 mov $0x9600,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109551: c9 leave 109552: c3 ret 109553: 90 nop case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; 109554: b8 b0 04 00 00 mov $0x4b0,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109559: c9 leave 10955a: c3 ret 10955b: 90 nop switch (termios_baud) { case B0: baud = 0; break; case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; 10955c: b8 86 00 00 00 mov $0x86,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109561: c9 leave 109562: c3 ret 109563: 90 nop case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; 109564: b8 00 4b 00 00 mov $0x4b00,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109569: c9 leave 10956a: c3 ret 10956b: 90 nop case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; case B115200: baud = 115200; break; 10956c: b8 00 84 03 00 mov $0x38400,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109571: c9 leave 109572: c3 ret 109573: 90 nop case B150: baud = 150; break; case B200: baud = 200; break; case B300: baud = 300; break; case B600: baud = 600; break; case B1200: baud = 1200; break; case B1800: baud = 1800; break; 109574: b8 60 09 00 00 mov $0x960,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109579: c9 leave 10957a: c3 ret 10957b: 90 nop case B2400: baud = 2400; break; case B4800: baud = 4800; break; case B9600: baud = 9600; break; case B19200: baud = 19200; break; case B38400: baud = 38400; break; case B57600: baud = 57600; break; 10957c: b8 00 c2 01 00 mov $0x1c200,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109581: c9 leave 109582: c3 ret 109583: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 109584: b8 4b 00 00 00 mov $0x4b,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109589: c9 leave 10958a: c3 ret 10958b: 90 nop case B50: baud = 50; break; case B75: baud = 75; break; case B110: baud = 110; break; case B134: baud = 134; break; case B150: baud = 150; break; case B200: baud = 200; break; 10958c: b8 2c 01 00 00 mov $0x12c,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 109591: c9 leave 109592: c3 ret 109593: 90 nop int termios_baud ) { int32_t baud; switch (termios_baud) { 109594: 85 c0 test %eax,%eax 109596: 0f 85 48 ff ff ff jne 1094e4 10959c: 31 c0 xor %eax,%eax case B460800: baud = 460800; break; default: baud = -1; break; } return baud; } 10959e: c9 leave 10959f: c3 ret =============================================================================== 001095dc : rtems_status_code rtems_termios_bufsize ( int cbufsize, int raw_input, int raw_output ) { 1095dc: 55 push %ebp <== NOT EXECUTED 1095dd: 89 e5 mov %esp,%ebp <== NOT EXECUTED rtems_termios_cbufsize = cbufsize; 1095df: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 1095e2: a3 d4 70 12 00 mov %eax,0x1270d4 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 1095e7: 8b 45 0c mov 0xc(%ebp),%eax <== NOT EXECUTED 1095ea: a3 d8 70 12 00 mov %eax,0x1270d8 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 1095ef: 8b 45 10 mov 0x10(%ebp),%eax <== NOT EXECUTED 1095f2: a3 dc 70 12 00 mov %eax,0x1270dc <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 1095f7: 31 c0 xor %eax,%eax <== NOT EXECUTED 1095f9: c9 leave <== NOT EXECUTED 1095fa: c3 ret <== NOT EXECUTED =============================================================================== 0010aa98 : } } rtems_status_code rtems_termios_close (void *arg) { 10aa98: 55 push %ebp 10aa99: 89 e5 mov %esp,%ebp 10aa9b: 56 push %esi 10aa9c: 53 push %ebx 10aa9d: 8b 75 08 mov 0x8(%ebp),%esi rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10aaa0: 8b 06 mov (%esi),%eax 10aaa2: 8b 58 34 mov 0x34(%eax),%ebx rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10aaa5: 50 push %eax 10aaa6: 6a 00 push $0x0 10aaa8: 6a 00 push $0x0 10aaaa: ff 35 8c 93 12 00 pushl 0x12938c 10aab0: e8 f3 11 00 00 call 10bca8 if (sc != RTEMS_SUCCESSFUL) 10aab5: 83 c4 10 add $0x10,%esp 10aab8: 85 c0 test %eax,%eax 10aaba: 0f 85 92 01 00 00 jne 10ac52 <== NEVER TAKEN rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 10aac0: 8b 43 08 mov 0x8(%ebx),%eax 10aac3: 48 dec %eax 10aac4: 89 43 08 mov %eax,0x8(%ebx) 10aac7: 85 c0 test %eax,%eax 10aac9: 0f 85 bf 00 00 00 jne 10ab8e if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10aacf: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax 10aad5: c1 e0 05 shl $0x5,%eax 10aad8: 8b 80 04 90 12 00 mov 0x129004(%eax),%eax 10aade: 85 c0 test %eax,%eax 10aae0: 0f 84 12 01 00 00 je 10abf8 <== ALWAYS TAKEN /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10aae6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10aae9: 53 push %ebx <== NOT EXECUTED 10aaea: ff d0 call *%eax <== NOT EXECUTED 10aaec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_fatal_error_occurred (sc); } drainOutput (tty); } if (tty->device.outputUsesInterrupts 10aaef: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) <== NOT EXECUTED 10aaf6: 0f 84 24 01 00 00 je 10ac20 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 10aafc: 8b 83 9c 00 00 00 mov 0x9c(%ebx),%eax 10ab02: 85 c0 test %eax,%eax 10ab04: 74 0d je 10ab13 (*tty->device.lastClose)(tty->major, tty->minor, arg); 10ab06: 52 push %edx 10ab07: 56 push %esi 10ab08: ff 73 10 pushl 0x10(%ebx) 10ab0b: ff 73 0c pushl 0xc(%ebx) 10ab0e: ff d0 call *%eax 10ab10: 83 c4 10 add $0x10,%esp if (tty->forw == NULL) { 10ab13: 8b 03 mov (%ebx),%eax 10ab15: 85 c0 test %eax,%eax 10ab17: 0f 84 9b 00 00 00 je 10abb8 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 10ab1d: 8b 53 04 mov 0x4(%ebx),%edx 10ab20: 89 50 04 mov %edx,0x4(%eax) } if (tty->back == NULL) { 10ab23: 8b 53 04 mov 0x4(%ebx),%edx 10ab26: 85 d2 test %edx,%edx 10ab28: 0f 84 ae 00 00 00 je 10abdc <== ALWAYS TAKEN if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 10ab2e: 89 02 mov %eax,(%edx) <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 10ab30: 83 ec 0c sub $0xc,%esp 10ab33: ff 73 14 pushl 0x14(%ebx) 10ab36: e8 c9 10 00 00 call 10bc04 rtems_semaphore_delete (tty->osem); 10ab3b: 58 pop %eax 10ab3c: ff 73 18 pushl 0x18(%ebx) 10ab3f: e8 c0 10 00 00 call 10bc04 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 10ab44: 5e pop %esi 10ab45: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10ab4b: e8 b4 10 00 00 call 10bc04 if ((tty->device.pollRead == NULL) || 10ab50: 83 c4 10 add $0x10,%esp 10ab53: 8b 8b a0 00 00 00 mov 0xa0(%ebx),%ecx 10ab59: 85 c9 test %ecx,%ecx 10ab5b: 74 4b je 10aba8 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 10ab5d: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10ab64: 74 42 je 10aba8 <== NEVER TAKEN rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 10ab66: 83 ec 0c sub $0xc,%esp 10ab69: ff 73 58 pushl 0x58(%ebx) 10ab6c: e8 13 da ff ff call 108584 free (tty->rawOutBuf.theBuf); 10ab71: 5a pop %edx 10ab72: ff 73 7c pushl 0x7c(%ebx) 10ab75: e8 0a da ff ff call 108584 free (tty->cbuf); 10ab7a: 58 pop %eax 10ab7b: ff 73 1c pushl 0x1c(%ebx) 10ab7e: e8 01 da ff ff call 108584 free (tty); 10ab83: 89 1c 24 mov %ebx,(%esp) 10ab86: e8 f9 d9 ff ff call 108584 10ab8b: 83 c4 10 add $0x10,%esp } rtems_semaphore_release (rtems_termios_ttyMutex); 10ab8e: 83 ec 0c sub $0xc,%esp 10ab91: ff 35 8c 93 12 00 pushl 0x12938c 10ab97: e8 08 12 00 00 call 10bda4 return RTEMS_SUCCESSFUL; } 10ab9c: 31 c0 xor %eax,%eax 10ab9e: 8d 65 f8 lea -0x8(%ebp),%esp 10aba1: 5b pop %ebx 10aba2: 5e pop %esi 10aba3: c9 leave 10aba4: c3 ret 10aba5: 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); 10aba8: 83 ec 0c sub $0xc,%esp 10abab: ff 73 68 pushl 0x68(%ebx) 10abae: e8 51 10 00 00 call 10bc04 10abb3: 83 c4 10 add $0x10,%esp 10abb6: eb ae jmp 10ab66 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; 10abb8: 8b 43 04 mov 0x4(%ebx),%eax 10abbb: a3 90 93 12 00 mov %eax,0x129390 if ( rtems_termios_ttyTail != NULL ) { 10abc0: 85 c0 test %eax,%eax 10abc2: 0f 84 94 00 00 00 je 10ac5c <== ALWAYS TAKEN rtems_termios_ttyTail->forw = NULL; 10abc8: c7 00 00 00 00 00 movl $0x0,(%eax) <== NOT EXECUTED 10abce: 8b 03 mov (%ebx),%eax <== NOT EXECUTED } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 10abd0: 8b 53 04 mov 0x4(%ebx),%edx <== NOT EXECUTED 10abd3: 85 d2 test %edx,%edx <== NOT EXECUTED 10abd5: 0f 85 53 ff ff ff jne 10ab2e <== NOT EXECUTED 10abdb: 90 nop <== NOT EXECUTED rtems_termios_ttyHead = tty->forw; 10abdc: a3 94 93 12 00 mov %eax,0x129394 if ( rtems_termios_ttyHead != NULL ) { 10abe1: 85 c0 test %eax,%eax 10abe3: 0f 84 47 ff ff ff je 10ab30 <== NEVER TAKEN rtems_termios_ttyHead->back = NULL; 10abe9: c7 40 04 00 00 00 00 movl $0x0,0x4(%eax) 10abf0: e9 3b ff ff ff jmp 10ab30 10abf5: 8d 76 00 lea 0x0(%esi),%esi } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10abf8: 51 push %ecx 10abf9: 6a 00 push $0x0 10abfb: 6a 00 push $0x0 10abfd: ff 73 18 pushl 0x18(%ebx) 10ac00: e8 a3 10 00 00 call 10bca8 if (sc != RTEMS_SUCCESSFUL) { 10ac05: 83 c4 10 add $0x10,%esp 10ac08: 85 c0 test %eax,%eax 10ac0a: 75 46 jne 10ac52 <== NEVER TAKEN rtems_fatal_error_occurred (sc); } drainOutput (tty); 10ac0c: 89 d8 mov %ebx,%eax 10ac0e: e8 b1 f6 ff ff call 10a2c4 } if (tty->device.outputUsesInterrupts 10ac13: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10ac1a: 0f 85 dc fe ff ff jne 10aafc <== ALWAYS TAKEN == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 10ac20: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ac23: 6a 01 push $0x1 <== NOT EXECUTED 10ac25: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10ac2b: e8 68 0b 00 00 call 10b798 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10ac30: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ac33: 85 c0 test %eax,%eax <== NOT EXECUTED 10ac35: 75 1b jne 10ac52 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 10ac37: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ac3a: 6a 01 push $0x1 <== NOT EXECUTED 10ac3c: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10ac42: e8 51 0b 00 00 call 10b798 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 10ac47: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ac4a: 85 c0 test %eax,%eax <== NOT EXECUTED 10ac4c: 0f 84 aa fe ff ff je 10aafc <== NOT EXECUTED rtems_fatal_error_occurred (sc); 10ac52: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ac55: 50 push %eax <== NOT EXECUTED 10ac56: e8 89 16 00 00 call 10c2e4 <== NOT EXECUTED 10ac5b: 90 nop <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 10ac5c: c7 05 94 93 12 00 00 movl $0x0,0x129394 10ac63: 00 00 00 10ac66: e9 c5 fe ff ff jmp 10ab30 =============================================================================== 00109850 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 109850: 55 push %ebp 109851: 89 e5 mov %esp,%ebp 109853: 83 ec 08 sub $0x8,%esp 109856: 8b 45 08 mov 0x8(%ebp),%eax rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 109859: 8b 55 0c mov 0xc(%ebp),%edx 10985c: 01 90 90 00 00 00 add %edx,0x90(%eax) if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 109862: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 109869: 74 2d je 109898 <== NEVER TAKEN TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 10986b: 83 b8 cc 00 00 00 05 cmpl $0x5,0xcc(%eax) 109872: 74 0c je 109880 <== NEVER TAKEN rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 109874: 89 45 08 mov %eax,0x8(%ebp) } } 109877: c9 leave rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 109878: e9 9b fd ff ff jmp 109618 10987d: 8d 76 00 lea 0x0(%esi),%esi } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 109880: 8b 15 b4 90 12 00 mov 0x1290b4,%edx <== NOT EXECUTED 109886: 85 d2 test %edx,%edx <== NOT EXECUTED 109888: 74 09 je 109893 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 10988a: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10988d: 50 push %eax <== NOT EXECUTED 10988e: ff d2 call *%edx <== NOT EXECUTED 109890: 83 c4 10 add $0x10,%esp <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 109893: 31 c0 xor %eax,%eax <== NOT EXECUTED 109895: c9 leave <== NOT EXECUTED 109896: c3 ret <== NOT EXECUTED 109897: 90 nop <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 109898: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10989b: 6a 02 push $0x2 <== NOT EXECUTED 10989d: ff b0 c8 00 00 00 pushl 0xc8(%eax) <== NOT EXECUTED 1098a3: e8 f0 1e 00 00 call 10b798 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 1098a8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 1098ab: 85 c0 test %eax,%eax <== NOT EXECUTED 1098ad: 74 e4 je 109893 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 1098af: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1098b2: 50 push %eax <== NOT EXECUTED 1098b3: e8 2c 2a 00 00 call 10c2e4 <== NOT EXECUTED =============================================================================== 001098b8 : * 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) { 1098b8: 55 push %ebp <== NOT EXECUTED 1098b9: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1098bb: 57 push %edi <== NOT EXECUTED 1098bc: 56 push %esi <== NOT EXECUTED 1098bd: 53 push %ebx <== NOT EXECUTED 1098be: 83 ec 3c sub $0x3c,%esp <== NOT EXECUTED 1098c1: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 1098c4: 8b 75 0c mov 0xc(%ebp),%esi <== NOT EXECUTED 1098c7: 8b 7d 10 mov 0x10(%ebp),%edi <== NOT EXECUTED char c; int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 1098ca: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1098d0: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1098d3: 8b 80 10 90 12 00 mov 0x129010(%eax),%eax <== NOT EXECUTED 1098d9: 85 c0 test %eax,%eax <== NOT EXECUTED 1098db: 0f 84 8b 00 00 00 je 10996c <== NOT EXECUTED while (len--) { 1098e1: 85 ff test %edi,%edi <== NOT EXECUTED 1098e3: 74 2e je 109913 <== NOT EXECUTED 1098e5: 31 d2 xor %edx,%edx <== NOT EXECUTED 1098e7: 89 7d e4 mov %edi,-0x1c(%ebp) <== NOT EXECUTED 1098ea: 89 f7 mov %esi,%edi <== NOT EXECUTED 1098ec: 89 d6 mov %edx,%esi <== NOT EXECUTED 1098ee: eb 0f jmp 1098ff <== NOT EXECUTED 1098f0: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 1098f6: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 1098f9: 8b 80 10 90 12 00 mov 0x129010(%eax),%eax <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 1098ff: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109902: 53 push %ebx <== NOT EXECUTED 109903: 0f be 14 37 movsbl (%edi,%esi,1),%edx <== NOT EXECUTED 109907: 52 push %edx <== NOT EXECUTED 109908: ff d0 call *%eax <== NOT EXECUTED 10990a: 46 inc %esi <== NOT EXECUTED int dropped = 0; bool flow_rcv = false; /* true, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { while (len--) { 10990b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10990e: 39 75 e4 cmp %esi,-0x1c(%ebp) <== NOT EXECUTED 109911: 75 dd jne 1098f0 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 109913: 8b 93 e4 00 00 00 mov 0xe4(%ebx),%edx <== NOT EXECUTED 109919: 85 d2 test %edx,%edx <== NOT EXECUTED 10991b: 75 3b jne 109958 <== NOT EXECUTED 10991d: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 109923: 85 c0 test %eax,%eax <== NOT EXECUTED 109925: 74 31 je 109958 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109927: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10992a: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 109930: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 109933: 52 push %edx <== NOT EXECUTED 109934: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 109936: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 10993d: 00 00 00 109940: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED 109947: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 10994a: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10994d: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109950: 5b pop %ebx <== NOT EXECUTED 109951: 5e pop %esi <== NOT EXECUTED 109952: 5f pop %edi <== NOT EXECUTED 109953: c9 leave <== NOT EXECUTED 109954: c3 ret <== NOT EXECUTED 109955: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 109958: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED } 10995f: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109962: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109965: 5b pop %ebx <== NOT EXECUTED 109966: 5e pop %esi <== NOT EXECUTED 109967: 5f pop %edi <== NOT EXECUTED 109968: c9 leave <== NOT EXECUTED 109969: c3 ret <== NOT EXECUTED 10996a: 66 90 xchg %ax,%ax <== NOT EXECUTED if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor, 10996c: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 10996f: 89 45 cc mov %eax,-0x34(%ebp) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109972: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 109975: 89 55 d0 mov %edx,-0x30(%ebp) <== NOT EXECUTED 109978: c6 45 db 00 movb $0x0,-0x25(%ebp) <== NOT EXECUTED 10997c: c7 45 e0 00 00 00 00 movl $0x0,-0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 109983: 85 ff test %edi,%edi <== NOT EXECUTED 109985: 0f 84 0b 01 00 00 je 109a96 <== NOT EXECUTED 10998b: 90 nop <== NOT EXECUTED c = *buf++; 10998c: 8a 06 mov (%esi),%al <== NOT EXECUTED 10998e: 88 45 e4 mov %al,-0x1c(%ebp) <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 109991: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109997: f6 c4 02 test $0x2,%ah <== NOT EXECUTED 10999a: 74 1c je 1099b8 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 10999c: 0f be 45 e4 movsbl -0x1c(%ebp),%eax <== NOT EXECUTED 1099a0: 0f b6 53 4a movzbl 0x4a(%ebx),%edx <== NOT EXECUTED 1099a4: 39 d0 cmp %edx,%eax <== NOT EXECUTED 1099a6: 0f 84 0c 01 00 00 je 109ab8 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 1099ac: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 1099b0: 39 d0 cmp %edx,%eax <== NOT EXECUTED 1099b2: 0f 84 54 01 00 00 je 109b0c <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 1099b8: 80 7d db 00 cmpb $0x0,-0x25(%ebp) <== NOT EXECUTED 1099bc: 0f 85 11 01 00 00 jne 109ad3 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 1099c2: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 1099c5: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 1099c8: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 1099cb: 40 inc %eax <== NOT EXECUTED 1099cc: 31 d2 xor %edx,%edx <== NOT EXECUTED 1099ce: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED 1099d1: 89 d1 mov %edx,%ecx <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 1099d3: 9c pushf <== NOT EXECUTED 1099d4: fa cli <== NOT EXECUTED 1099d5: 8f 45 d4 popl -0x2c(%ebp) <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 1099d8: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 1099db: 89 45 c4 mov %eax,-0x3c(%ebp) <== NOT EXECUTED 1099de: 8b 43 64 mov 0x64(%ebx),%eax <== NOT EXECUTED 1099e1: 8b 53 64 mov 0x64(%ebx),%edx <== NOT EXECUTED 1099e4: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 1099e7: 2b 45 c4 sub -0x3c(%ebp),%eax <== NOT EXECUTED 1099ea: 01 c8 add %ecx,%eax <== NOT EXECUTED 1099ec: 31 d2 xor %edx,%edx <== NOT EXECUTED 1099ee: f7 75 dc divl -0x24(%ebp) <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 1099f1: 3b 93 c0 00 00 00 cmp 0xc0(%ebx),%edx <== NOT EXECUTED 1099f7: 76 47 jbe 109a40 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 1099f9: 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) 1099ff: a8 01 test $0x1,%al <== NOT EXECUTED 109a01: 75 3d jne 109a40 <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 109a03: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109a09: 83 c8 01 or $0x1,%eax <== NOT EXECUTED 109a0c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 109a12: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109a18: 25 02 04 00 00 and $0x402,%eax <== NOT EXECUTED 109a1d: 3d 00 04 00 00 cmp $0x400,%eax <== NOT EXECUTED 109a22: 0f 84 27 01 00 00 je 109b4f <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 109a28: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109a2e: 25 04 01 00 00 and $0x104,%eax <== NOT EXECUTED 109a33: 3d 00 01 00 00 cmp $0x100,%eax <== NOT EXECUTED 109a38: 0f 84 55 01 00 00 je 109b93 <== NOT EXECUTED 109a3e: 66 90 xchg %ax,%ax <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 109a40: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 109a43: 9d popf <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 109a44: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 109a47: 39 c8 cmp %ecx,%eax <== NOT EXECUTED 109a49: 0f 84 b5 00 00 00 je 109b04 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 109a4f: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 109a52: 8a 55 e4 mov -0x1c(%ebp),%dl <== NOT EXECUTED 109a55: 88 14 08 mov %dl,(%eax,%ecx,1) <== NOT EXECUTED tty->rawInBuf.Tail = newTail; 109a58: 89 4b 60 mov %ecx,0x60(%ebx) <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 109a5b: 8b 83 e4 00 00 00 mov 0xe4(%ebx),%eax <== NOT EXECUTED 109a61: 85 c0 test %eax,%eax <== NOT EXECUTED 109a63: 75 27 jne 109a8c <== NOT EXECUTED 109a65: 8b 83 dc 00 00 00 mov 0xdc(%ebx),%eax <== NOT EXECUTED 109a6b: 85 c0 test %eax,%eax <== NOT EXECUTED 109a6d: 74 1d je 109a8c <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 109a6f: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109a72: ff b3 e0 00 00 00 pushl 0xe0(%ebx) <== NOT EXECUTED 109a78: ff 75 d0 pushl -0x30(%ebp) <== NOT EXECUTED 109a7b: ff d0 call *%eax <== NOT EXECUTED tty->tty_rcvwakeup = 1; 109a7d: c7 83 e4 00 00 00 01 movl $0x1,0xe4(%ebx) <== NOT EXECUTED 109a84: 00 00 00 109a87: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109a8a: 66 90 xchg %ax,%ax <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109a8c: 46 inc %esi <== NOT EXECUTED 109a8d: 4f dec %edi <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 109a8e: 85 ff test %edi,%edi <== NOT EXECUTED 109a90: 0f 85 f6 fe ff ff jne 10998c <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 109a96: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109a99: 01 43 78 add %eax,0x78(%ebx) <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 109a9c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109a9f: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 109aa2: e8 fd 22 00 00 call 10bda4 <== NOT EXECUTED return dropped; 109aa7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109aaa: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 109aad: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109ab0: 5b pop %ebx <== NOT EXECUTED 109ab1: 5e pop %esi <== NOT EXECUTED 109ab2: 5f pop %edi <== NOT EXECUTED 109ab3: c9 leave <== NOT EXECUTED 109ab4: c3 ret <== NOT EXECUTED 109ab5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 109ab8: 0f b6 53 49 movzbl 0x49(%ebx),%edx <== NOT EXECUTED 109abc: 39 d0 cmp %edx,%eax <== NOT EXECUTED 109abe: 74 7e je 109b3e <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 109ac0: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109ac6: 83 c8 10 or $0x10,%eax <== NOT EXECUTED 109ac9: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 109acf: c6 45 db 01 movb $0x1,-0x25(%ebp) <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 109ad3: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109ad9: 83 e0 30 and $0x30,%eax <== NOT EXECUTED 109adc: 83 f8 20 cmp $0x20,%eax <== NOT EXECUTED 109adf: 75 ab jne 109a8c <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 109ae1: 9c pushf <== NOT EXECUTED 109ae2: fa cli <== NOT EXECUTED 109ae3: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 109ae4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109aea: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 109aed: 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) { 109af3: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 109af9: 85 c0 test %eax,%eax <== NOT EXECUTED 109afb: 75 20 jne 109b1d <== 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); 109afd: 52 push %edx <== NOT EXECUTED 109afe: 9d popf <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109aff: 46 inc %esi <== NOT EXECUTED 109b00: 4f dec %edi <== NOT EXECUTED 109b01: eb 8b jmp 109a8e <== NOT EXECUTED 109b03: 90 nop <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { dropped++; 109b04: ff 45 e0 incl -0x20(%ebp) <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 109b07: 46 inc %esi <== NOT EXECUTED 109b08: 4f dec %edi <== NOT EXECUTED 109b09: eb 83 jmp 109a8e <== NOT EXECUTED 109b0b: 90 nop <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 109b0c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b12: 83 e0 ef and $0xffffffef,%eax <== NOT EXECUTED 109b15: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 109b1b: eb b2 jmp 109acf <== 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); 109b1d: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 109b23: 51 push %ecx <== NOT EXECUTED 109b24: 6a 01 push $0x1 <== NOT EXECUTED 109b26: 03 43 7c add 0x7c(%ebx),%eax <== NOT EXECUTED 109b29: 50 push %eax <== NOT EXECUTED 109b2a: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109b2d: 89 55 c8 mov %edx,-0x38(%ebp) <== NOT EXECUTED 109b30: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109b36: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109b39: 8b 55 c8 mov -0x38(%ebp),%edx <== NOT EXECUTED 109b3c: eb bf jmp 109afd <== 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; 109b3e: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b44: 83 f0 10 xor $0x10,%eax <== NOT EXECUTED 109b47: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED 109b4d: eb 80 jmp 109acf <== 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) || 109b4f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b55: a8 20 test $0x20,%al <== NOT EXECUTED 109b57: 75 0e jne 109b67 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 109b59: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax <== NOT EXECUTED 109b5f: 85 c0 test %eax,%eax <== NOT EXECUTED 109b61: 0f 85 d9 fe ff ff jne 109a40 <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 109b67: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b6d: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 109b70: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED (*tty->device.write)(tty->minor, 109b76: 52 push %edx <== NOT EXECUTED 109b77: 6a 01 push $0x1 <== NOT EXECUTED 109b79: ff 75 cc pushl -0x34(%ebp) <== NOT EXECUTED 109b7c: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109b7f: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 109b82: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 109b88: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109b8b: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109b8e: e9 ad fe ff ff jmp 109a40 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 109b93: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 109b99: 83 c8 04 or $0x4,%eax <== NOT EXECUTED 109b9c: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 109ba2: 8b 83 ac 00 00 00 mov 0xac(%ebx),%eax <== NOT EXECUTED 109ba8: 85 c0 test %eax,%eax <== NOT EXECUTED 109baa: 0f 84 90 fe ff ff je 109a40 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 109bb0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109bb3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109bb6: 89 4d c8 mov %ecx,-0x38(%ebp) <== NOT EXECUTED 109bb9: ff d0 call *%eax <== NOT EXECUTED 109bbb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 109bbe: 8b 4d c8 mov -0x38(%ebp),%ecx <== NOT EXECUTED 109bc1: e9 7a fe ff ff jmp 109a40 <== NOT EXECUTED =============================================================================== 001095a0 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 1095a0: 55 push %ebp 1095a1: 89 e5 mov %esp,%ebp 1095a3: 83 ec 08 sub $0x8,%esp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 1095a6: a1 8c 93 12 00 mov 0x12938c,%eax 1095ab: 85 c0 test %eax,%eax 1095ad: 74 05 je 1095b4 RTEMS_NO_PRIORITY, &rtems_termios_ttyMutex); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } 1095af: c9 leave 1095b0: c3 ret 1095b1: 8d 76 00 lea 0x0(%esi),%esi /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { sc = rtems_semaphore_create ( 1095b4: 83 ec 0c sub $0xc,%esp 1095b7: 68 8c 93 12 00 push $0x12938c 1095bc: 6a 00 push $0x0 1095be: 6a 54 push $0x54 1095c0: 6a 01 push $0x1 1095c2: 68 69 6d 52 54 push $0x54526d69 1095c7: e8 64 24 00 00 call 10ba30 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) 1095cc: 83 c4 20 add $0x20,%esp 1095cf: 85 c0 test %eax,%eax 1095d1: 74 dc je 1095af <== ALWAYS TAKEN rtems_fatal_error_occurred (sc); 1095d3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1095d6: 50 push %eax <== NOT EXECUTED 1095d7: e8 08 2d 00 00 call 10c2e4 <== NOT EXECUTED =============================================================================== 0010a680 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 10a680: 55 push %ebp 10a681: 89 e5 mov %esp,%ebp 10a683: 57 push %edi 10a684: 56 push %esi 10a685: 53 push %ebx 10a686: 83 ec 20 sub $0x20,%esp 10a689: 8b 5d 08 mov 0x8(%ebp),%ebx rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a68c: 8b 03 mov (%ebx),%eax 10a68e: 8b 40 34 mov 0x34(%eax),%eax 10a691: 89 45 e4 mov %eax,-0x1c(%ebp) struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 10a694: 8b 73 08 mov 0x8(%ebx),%esi rtems_status_code sc; args->ioctl_return = 0; 10a697: c7 43 0c 00 00 00 00 movl $0x0,0xc(%ebx) sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a69e: 6a 00 push $0x0 10a6a0: 6a 00 push $0x0 10a6a2: ff 70 18 pushl 0x18(%eax) 10a6a5: e8 fe 15 00 00 call 10bca8 10a6aa: 89 45 e0 mov %eax,-0x20(%ebp) if (sc != RTEMS_SUCCESSFUL) { 10a6ad: 83 c4 10 add $0x10,%esp 10a6b0: 85 c0 test %eax,%eax 10a6b2: 75 24 jne 10a6d8 <== NEVER TAKEN args->ioctl_return = sc; return sc; } switch (args->command) { 10a6b4: 8b 43 04 mov 0x4(%ebx),%eax 10a6b7: 83 f8 04 cmp $0x4,%eax 10a6ba: 74 74 je 10a730 <== NEVER TAKEN 10a6bc: 77 2a ja 10a6e8 <== NEVER TAKEN 10a6be: 83 f8 02 cmp $0x2,%eax 10a6c1: 0f 84 a1 00 00 00 je 10a768 10a6c7: 0f 86 3b 02 00 00 jbe 10a908 if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 10a6cd: 8b 45 e4 mov -0x1c(%ebp),%eax 10a6d0: e8 ef fb ff ff call 10a2c4 break; 10a6d5: eb 6d jmp 10a744 10a6d7: 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; 10a6d8: 89 43 0c mov %eax,0xc(%ebx) <== NOT EXECUTED break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc; return sc; } 10a6db: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a6de: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a6e1: 5b pop %ebx <== NOT EXECUTED 10a6e2: 5e pop %esi <== NOT EXECUTED 10a6e3: 5f pop %edi <== NOT EXECUTED 10a6e4: c9 leave <== NOT EXECUTED 10a6e5: c3 ret <== NOT EXECUTED 10a6e6: 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) { 10a6e8: 3d 7f 66 04 40 cmp $0x4004667f,%eax <== NOT EXECUTED 10a6ed: 0f 84 ed 01 00 00 je 10a8e0 <== NOT EXECUTED 10a6f3: 0f 87 2f 02 00 00 ja 10a928 <== NOT EXECUTED 10a6f9: 83 f8 05 cmp $0x5,%eax <== NOT EXECUTED 10a6fc: 0f 84 aa 02 00 00 je 10a9ac <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 10a702: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a705: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED 10a70b: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a70e: 8b 80 18 90 12 00 mov 0x129018(%eax),%eax <== NOT EXECUTED 10a714: 85 c0 test %eax,%eax <== NOT EXECUTED 10a716: 0f 84 ac 02 00 00 je 10a9c8 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 10a71c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a71f: 53 push %ebx <== NOT EXECUTED 10a720: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10a723: ff d0 call *%eax <== NOT EXECUTED 10a725: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a728: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a72b: eb 17 jmp 10a744 <== NOT EXECUTED 10a72d: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 10a730: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10a732: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10a735: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a738: 89 81 dc 00 00 00 mov %eax,0xdc(%ecx) <== NOT EXECUTED 10a73e: 89 91 e0 00 00 00 mov %edx,0xe0(%ecx) <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 10a744: 83 ec 0c sub $0xc,%esp 10a747: 8b 45 e4 mov -0x1c(%ebp),%eax 10a74a: ff 70 18 pushl 0x18(%eax) 10a74d: e8 52 16 00 00 call 10bda4 args->ioctl_return = sc; 10a752: 8b 55 e0 mov -0x20(%ebp),%edx 10a755: 89 53 0c mov %edx,0xc(%ebx) return sc; 10a758: 83 c4 10 add $0x10,%esp } 10a75b: 8b 45 e0 mov -0x20(%ebp),%eax 10a75e: 8d 65 f4 lea -0xc(%ebp),%esp 10a761: 5b pop %ebx 10a762: 5e pop %esi 10a763: 5f pop %edi 10a764: c9 leave 10a765: c3 ret 10a766: 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; 10a768: 8b 73 08 mov 0x8(%ebx),%esi 10a76b: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a76e: 83 c1 30 add $0x30,%ecx 10a771: 89 4d dc mov %ecx,-0x24(%ebp) 10a774: b9 09 00 00 00 mov $0x9,%ecx 10a779: 8b 7d dc mov -0x24(%ebp),%edi 10a77c: 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) && 10a77e: 8b 55 e4 mov -0x1c(%ebp),%edx 10a781: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a787: f6 c4 02 test $0x2,%ah 10a78a: 74 44 je 10a7d0 10a78c: f6 42 31 04 testb $0x4,0x31(%edx) 10a790: 75 3e jne 10a7d0 <== ALWAYS TAKEN !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 10a792: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a798: 25 ef fd ff ff and $0xfffffdef,%eax <== NOT EXECUTED 10a79d: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 10a7a3: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a7a9: a8 20 test $0x20,%al <== NOT EXECUTED 10a7ab: 74 23 je 10a7d0 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 10a7ad: 9c pushf <== NOT EXECUTED 10a7ae: fa cli <== NOT EXECUTED 10a7af: 5e pop %esi <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 10a7b0: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a7b6: 83 e0 df and $0xffffffdf,%eax <== NOT EXECUTED 10a7b9: 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) { 10a7bf: 8b ba 94 00 00 00 mov 0x94(%edx),%edi <== NOT EXECUTED 10a7c5: 85 ff test %edi,%edi <== NOT EXECUTED 10a7c7: 0f 85 ab 02 00 00 jne 10aa78 <== 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); 10a7cd: 56 push %esi <== NOT EXECUTED 10a7ce: 9d popf <== NOT EXECUTED 10a7cf: 90 nop <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 10a7d0: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a7d3: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax 10a7d9: f6 c4 04 test $0x4,%ah 10a7dc: 74 24 je 10a802 <== ALWAYS TAKEN 10a7de: f6 41 31 10 testb $0x10,0x31(%ecx) <== NOT EXECUTED 10a7e2: 75 1e jne 10a802 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 10a7e4: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a7ea: 80 e4 fb and $0xfb,%ah <== NOT EXECUTED 10a7ed: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 10a7f3: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a7f9: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10a7fc: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 10a802: 8b 55 e4 mov -0x1c(%ebp),%edx 10a805: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a80b: f6 c4 01 test $0x1,%ah 10a80e: 74 4b je 10a85b <== ALWAYS TAKEN 10a810: 8b 7a 38 mov 0x38(%edx),%edi <== NOT EXECUTED 10a813: 85 ff test %edi,%edi <== NOT EXECUTED 10a815: 0f 88 09 02 00 00 js 10aa24 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 10a81b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a821: 80 e4 fe and $0xfe,%ah <== NOT EXECUTED 10a824: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 10a82a: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10a830: a8 04 test $0x4,%al <== NOT EXECUTED 10a832: 74 15 je 10a849 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 10a834: 8b 82 b0 00 00 00 mov 0xb0(%edx),%eax <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 10a83a: 85 c0 test %eax,%eax <== NOT EXECUTED 10a83c: 74 0b je 10a849 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 10a83e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a841: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 10a844: ff d0 call *%eax <== NOT EXECUTED 10a846: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 10a849: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a84c: 8b 81 b8 00 00 00 mov 0xb8(%ecx),%eax <== NOT EXECUTED 10a852: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a855: 89 81 b8 00 00 00 mov %eax,0xb8(%ecx) <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 10a85b: 8b 45 e4 mov -0x1c(%ebp),%eax 10a85e: 8b 70 38 mov 0x38(%eax),%esi 10a861: 85 f6 test %esi,%esi 10a863: 0f 88 bb 01 00 00 js 10aa24 <== NEVER TAKEN tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 10a869: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a86c: 8b 41 30 mov 0x30(%ecx),%eax 10a86f: f6 c4 10 test $0x10,%ah 10a872: 74 0f je 10a883 <== ALWAYS TAKEN tty->flow_ctrl |= FL_MDXOF; 10a874: 8b 91 b8 00 00 00 mov 0xb8(%ecx),%edx <== NOT EXECUTED 10a87a: 80 ce 04 or $0x4,%dh <== NOT EXECUTED 10a87d: 89 91 b8 00 00 00 mov %edx,0xb8(%ecx) <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 10a883: f6 c4 04 test $0x4,%ah 10a886: 74 12 je 10a89a <== NEVER TAKEN tty->flow_ctrl |= FL_MDXON; 10a888: 8b 55 e4 mov -0x1c(%ebp),%edx 10a88b: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax 10a891: 80 cc 02 or $0x2,%ah 10a894: 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) { 10a89a: 8b 4d e4 mov -0x1c(%ebp),%ecx 10a89d: f6 41 3c 02 testb $0x2,0x3c(%ecx) 10a8a1: 0f 84 2d 01 00 00 je 10a9d4 <== NEVER TAKEN tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a8a7: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 10a8ae: c7 41 70 00 00 00 00 movl $0x0,0x70(%ecx) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10a8b5: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 10a8bc: 8b 55 e4 mov -0x1c(%ebp),%edx 10a8bf: 8b 82 a8 00 00 00 mov 0xa8(%edx),%eax 10a8c5: 85 c0 test %eax,%eax 10a8c7: 0f 84 77 fe ff ff je 10a744 <== NEVER TAKEN (*tty->device.setAttributes)(tty->minor, &tty->termios); 10a8cd: 83 ec 08 sub $0x8,%esp 10a8d0: ff 75 dc pushl -0x24(%ebp) 10a8d3: ff 72 10 pushl 0x10(%edx) 10a8d6: ff d0 call *%eax 10a8d8: 83 c4 10 add $0x10,%esp 10a8db: e9 64 fe ff ff jmp 10a744 *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 10a8e0: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a8e3: 8b 42 60 mov 0x60(%edx),%eax <== NOT EXECUTED 10a8e6: 89 d1 mov %edx,%ecx <== NOT EXECUTED 10a8e8: 8b 52 5c mov 0x5c(%edx),%edx <== NOT EXECUTED if ( rawnc < 0 ) 10a8eb: 29 d0 sub %edx,%eax <== NOT EXECUTED 10a8ed: 0f 88 25 01 00 00 js 10aa18 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 10a8f3: 8b 53 08 mov 0x8(%ebx),%edx <== NOT EXECUTED 10a8f6: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a8f9: 03 41 20 add 0x20(%ecx),%eax <== NOT EXECUTED 10a8fc: 2b 41 24 sub 0x24(%ecx),%eax <== NOT EXECUTED 10a8ff: 89 02 mov %eax,(%edx) <== NOT EXECUTED 10a901: e9 3e fe ff ff jmp 10a744 <== NOT EXECUTED 10a906: 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) { 10a908: 48 dec %eax 10a909: 0f 85 f3 fd ff ff jne 10a702 <== NEVER TAKEN sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 10a90f: 8b 43 08 mov 0x8(%ebx),%eax 10a912: 8b 75 e4 mov -0x1c(%ebp),%esi 10a915: 83 c6 30 add $0x30,%esi 10a918: b9 09 00 00 00 mov $0x9,%ecx 10a91d: 89 c7 mov %eax,%edi 10a91f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) break; 10a921: e9 1e fe ff ff jmp 10a744 10a926: 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) { 10a928: 3d 1a 74 04 40 cmp $0x4004741a,%eax <== NOT EXECUTED 10a92d: 74 69 je 10a998 <== NOT EXECUTED 10a92f: 3d 1b 74 04 80 cmp $0x8004741b,%eax <== NOT EXECUTED 10a934: 0f 85 c8 fd ff ff jne 10a702 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 10a93a: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10a93d: 8b 82 cc 00 00 00 mov 0xcc(%edx),%eax <== NOT EXECUTED 10a943: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a946: 8b 80 04 90 12 00 mov 0x129004(%eax),%eax <== NOT EXECUTED 10a94c: 85 c0 test %eax,%eax <== NOT EXECUTED 10a94e: 74 0c je 10a95c <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 10a950: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a953: 52 push %edx <== NOT EXECUTED 10a954: ff d0 call *%eax <== NOT EXECUTED 10a956: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a959: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 10a95c: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a95f: 8b 00 mov (%eax),%eax <== NOT EXECUTED 10a961: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a964: 89 81 cc 00 00 00 mov %eax,0xcc(%ecx) <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 10a96a: c7 81 d0 00 00 00 00 movl $0x0,0xd0(%ecx) <== NOT EXECUTED 10a971: 00 00 00 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 10a974: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a977: 8b 80 00 90 12 00 mov 0x129000(%eax),%eax <== NOT EXECUTED 10a97d: 85 c0 test %eax,%eax <== NOT EXECUTED 10a97f: 0f 84 bf fd ff ff je 10a744 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 10a985: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a988: 51 push %ecx <== NOT EXECUTED 10a989: ff d0 call *%eax <== NOT EXECUTED 10a98b: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10a98e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a991: e9 ae fd ff ff jmp 10a744 <== NOT EXECUTED 10a996: 66 90 xchg %ax,%ax <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 10a998: 8b 43 08 mov 0x8(%ebx),%eax <== NOT EXECUTED 10a99b: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a99e: 8b 91 cc 00 00 00 mov 0xcc(%ecx),%edx <== NOT EXECUTED 10a9a4: 89 10 mov %edx,(%eax) <== NOT EXECUTED break; 10a9a6: e9 99 fd ff ff jmp 10a744 <== NOT EXECUTED 10a9ab: 90 nop <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 10a9ac: 8b 06 mov (%esi),%eax <== NOT EXECUTED 10a9ae: 8b 56 04 mov 0x4(%esi),%edx <== NOT EXECUTED 10a9b1: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a9b4: 89 81 d4 00 00 00 mov %eax,0xd4(%ecx) <== NOT EXECUTED 10a9ba: 89 91 d8 00 00 00 mov %edx,0xd8(%ecx) <== NOT EXECUTED break; 10a9c0: e9 7f fd ff ff jmp 10a744 <== NOT EXECUTED 10a9c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 10a9c8: c7 45 e0 0a 00 00 00 movl $0xa,-0x20(%ebp) <== NOT EXECUTED 10a9cf: e9 70 fd ff ff jmp 10a744 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; 10a9d4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a9d7: 0f b6 70 46 movzbl 0x46(%eax),%esi <== NOT EXECUTED 10a9db: e8 b8 0b 00 00 call 10b598 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 10a9e0: 0f af c6 imul %esi,%eax <== NOT EXECUTED 10a9e3: ba cd cc cc cc mov $0xcccccccd,%edx <== NOT EXECUTED 10a9e8: f7 e2 mul %edx <== NOT EXECUTED 10a9ea: c1 ea 03 shr $0x3,%edx <== NOT EXECUTED 10a9ed: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10a9f0: 89 51 54 mov %edx,0x54(%ecx) <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 10a9f3: 80 79 46 00 cmpb $0x0,0x46(%ecx) <== NOT EXECUTED 10a9f7: 74 42 je 10aa3b <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10a9f9: c7 41 6c 00 00 00 00 movl $0x0,0x6c(%ecx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 10aa00: 89 51 70 mov %edx,0x70(%ecx) <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) 10aa03: 80 79 47 00 cmpb $0x0,0x47(%ecx) <== NOT EXECUTED 10aa07: 74 55 je 10aa5e <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10aa09: c7 41 74 00 00 00 00 movl $0x0,0x74(%ecx) <== NOT EXECUTED 10aa10: e9 a7 fe ff ff jmp 10a8bc <== NOT EXECUTED 10aa15: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 10aa18: 8b 51 64 mov 0x64(%ecx),%edx <== NOT EXECUTED 10aa1b: 01 d0 add %edx,%eax <== NOT EXECUTED 10aa1d: e9 d1 fe ff ff jmp 10a8f3 <== NOT EXECUTED 10aa22: 66 90 xchg %ax,%ax <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 10aa24: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10aa27: 8b 82 b8 00 00 00 mov 0xb8(%edx),%eax <== NOT EXECUTED 10aa2d: 80 cc 01 or $0x1,%ah <== NOT EXECUTED 10aa30: 89 82 b8 00 00 00 mov %eax,0xb8(%edx) <== NOT EXECUTED 10aa36: e9 2e fe ff ff jmp 10a869 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 10aa3b: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 10aa3e: 80 7a 47 00 cmpb $0x0,0x47(%edx) <== NOT EXECUTED 10aa42: 74 25 je 10aa69 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 10aa44: c7 42 6c 00 00 00 00 movl $0x0,0x6c(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 10aa4b: c7 42 70 00 00 00 00 movl $0x0,0x70(%edx) <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 10aa52: c7 42 74 00 00 00 00 movl $0x0,0x74(%edx) <== NOT EXECUTED 10aa59: e9 5e fe ff ff jmp 10a8bc <== 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; 10aa5e: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10aa61: 89 50 74 mov %edx,0x74(%eax) <== NOT EXECUTED 10aa64: e9 53 fe ff ff jmp 10a8bc <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 10aa69: 8b 4d e4 mov -0x1c(%ebp),%ecx <== NOT EXECUTED 10aa6c: c7 41 6c 01 00 00 00 movl $0x1,0x6c(%ecx) <== NOT EXECUTED 10aa73: e9 44 fe ff ff jmp 10a8bc <== 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); 10aa78: 8b 82 84 00 00 00 mov 0x84(%edx),%eax <== NOT EXECUTED rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 10aa7e: 51 push %ecx <== NOT EXECUTED 10aa7f: 6a 01 push $0x1 <== NOT EXECUTED 10aa81: 03 42 7c add 0x7c(%edx),%eax <== NOT EXECUTED 10aa84: 50 push %eax <== NOT EXECUTED 10aa85: ff 72 10 pushl 0x10(%edx) <== NOT EXECUTED 10aa88: ff 92 a4 00 00 00 call *0xa4(%edx) <== NOT EXECUTED 10aa8e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10aa91: e9 37 fd ff ff jmp 10a7cd <== NOT EXECUTED =============================================================================== 0010aa0c : #include int rtems_termios_number_to_baud( int32_t baud ) { 10aa0c: 55 push %ebp 10aa0d: 89 e5 mov %esp,%ebp 10aa0f: 8b 45 08 mov 0x8(%ebp),%eax int termios_baud; switch (baud) { 10aa12: 3d b0 04 00 00 cmp $0x4b0,%eax 10aa17: 0f 84 47 01 00 00 je 10ab64 10aa1d: 7e 3d jle 10aa5c 10aa1f: 3d 00 4b 00 00 cmp $0x4b00,%eax 10aa24: 0f 84 4a 01 00 00 je 10ab74 10aa2a: 7e 64 jle 10aa90 10aa2c: 3d 00 c2 01 00 cmp $0x1c200,%eax 10aa31: 0f 84 15 01 00 00 je 10ab4c 10aa37: 0f 8e af 00 00 00 jle 10aaec 10aa3d: 3d 00 84 03 00 cmp $0x38400,%eax 10aa42: 0f 84 fc 00 00 00 je 10ab44 10aa48: 3d 00 08 07 00 cmp $0x70800,%eax 10aa4d: 0f 85 89 00 00 00 jne 10aadc <== NEVER TAKEN case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; 10aa53: b8 04 10 00 00 mov $0x1004,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aa58: c9 leave 10aa59: c3 ret 10aa5a: 66 90 xchg %ax,%ax int32_t baud ) { int termios_baud; switch (baud) { 10aa5c: 3d 86 00 00 00 cmp $0x86,%eax 10aa61: 0f 84 05 01 00 00 je 10ab6c 10aa67: 7e 4f jle 10aab8 10aa69: 3d c8 00 00 00 cmp $0xc8,%eax 10aa6e: 0f 84 b8 00 00 00 je 10ab2c 10aa74: 7e 5e jle 10aad4 10aa76: 3d 2c 01 00 00 cmp $0x12c,%eax 10aa7b: 0f 84 9b 00 00 00 je 10ab1c 10aa81: 3d 58 02 00 00 cmp $0x258,%eax 10aa86: 75 54 jne 10aadc <== NEVER TAKEN case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; 10aa88: b8 08 00 00 00 mov $0x8,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aa8d: c9 leave 10aa8e: c3 ret 10aa8f: 90 nop int32_t baud ) { int termios_baud; switch (baud) { 10aa90: 3d 60 09 00 00 cmp $0x960,%eax 10aa95: 0f 84 c1 00 00 00 je 10ab5c 10aa9b: 7e 67 jle 10ab04 10aa9d: 3d c0 12 00 00 cmp $0x12c0,%eax 10aaa2: 0f 84 8c 00 00 00 je 10ab34 10aaa8: 3d 80 25 00 00 cmp $0x2580,%eax 10aaad: 75 2d jne 10aadc case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; 10aaaf: b8 0d 00 00 00 mov $0xd,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aab4: c9 leave 10aab5: c3 ret 10aab6: 66 90 xchg %ax,%ax int32_t baud ) { int termios_baud; switch (baud) { 10aab8: 83 f8 32 cmp $0x32,%eax 10aabb: 74 7f je 10ab3c 10aabd: 7e 25 jle 10aae4 10aabf: 83 f8 4b cmp $0x4b,%eax 10aac2: 0f 84 8c 00 00 00 je 10ab54 10aac8: 83 f8 6e cmp $0x6e,%eax 10aacb: 75 0f jne 10aadc <== NEVER TAKEN case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; 10aacd: b8 03 00 00 00 mov $0x3,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aad2: c9 leave 10aad3: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10aad4: 3d 96 00 00 00 cmp $0x96,%eax 10aad9: 74 39 je 10ab14 <== ALWAYS TAKEN 10aadb: 90 nop case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; case 230400: termios_baud = B230400; break; case 460800: termios_baud = B460800; break; 10aadc: b8 ff ff ff ff mov $0xffffffff,%eax default: termios_baud = -1; break; } return termios_baud; } 10aae1: c9 leave 10aae2: c3 ret 10aae3: 90 nop int32_t baud ) { int termios_baud; switch (baud) { 10aae4: 85 c0 test %eax,%eax 10aae6: 75 f4 jne 10aadc 10aae8: 31 c0 xor %eax,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aaea: c9 leave 10aaeb: c3 ret int32_t baud ) { int termios_baud; switch (baud) { 10aaec: 3d 00 96 00 00 cmp $0x9600,%eax 10aaf1: 74 31 je 10ab24 10aaf3: 3d 00 e1 00 00 cmp $0xe100,%eax 10aaf8: 75 e2 jne 10aadc <== NEVER TAKEN case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; 10aafa: b8 01 10 00 00 mov $0x1001,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10aaff: c9 leave 10ab00: c3 ret 10ab01: 8d 76 00 lea 0x0(%esi),%esi int32_t baud ) { int termios_baud; switch (baud) { 10ab04: 3d 08 07 00 00 cmp $0x708,%eax 10ab09: 75 d1 jne 10aadc <== NEVER TAKEN case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; 10ab0b: b8 0a 00 00 00 mov $0xa,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab10: c9 leave 10ab11: c3 ret 10ab12: 66 90 xchg %ax,%ax switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; 10ab14: b8 05 00 00 00 mov $0x5,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab19: c9 leave 10ab1a: c3 ret 10ab1b: 90 nop case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; 10ab1c: b8 07 00 00 00 mov $0x7,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab21: c9 leave 10ab22: c3 ret 10ab23: 90 nop case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; 10ab24: b8 0f 00 00 00 mov $0xf,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab29: c9 leave 10ab2a: c3 ret 10ab2b: 90 nop case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; 10ab2c: b8 06 00 00 00 mov $0x6,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab31: c9 leave 10ab32: c3 ret 10ab33: 90 nop case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; 10ab34: b8 0c 00 00 00 mov $0xc,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab39: c9 leave 10ab3a: c3 ret 10ab3b: 90 nop int32_t baud ) { int termios_baud; switch (baud) { 10ab3c: b8 01 00 00 00 mov $0x1,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab41: c9 leave 10ab42: c3 ret 10ab43: 90 nop case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; case 115200: termios_baud = B115200; break; 10ab44: b8 03 10 00 00 mov $0x1003,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab49: c9 leave 10ab4a: c3 ret 10ab4b: 90 nop case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; case 19200: termios_baud = B19200; break; case 38400: termios_baud = B38400; break; case 57600: termios_baud = B57600; break; 10ab4c: b8 02 10 00 00 mov $0x1002,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab51: c9 leave 10ab52: c3 ret 10ab53: 90 nop int32_t baud ) { int termios_baud; switch (baud) { 10ab54: b8 02 00 00 00 mov $0x2,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab59: c9 leave 10ab5a: c3 ret 10ab5b: 90 nop case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; 10ab5c: b8 0b 00 00 00 mov $0xb,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab61: c9 leave 10ab62: c3 ret 10ab63: 90 nop case 110: termios_baud = B110; break; case 134: termios_baud = B134; break; case 150: termios_baud = B150; break; case 200: termios_baud = B200; break; case 300: termios_baud = B300; break; case 600: termios_baud = B600; break; 10ab64: b8 09 00 00 00 mov $0x9,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab69: c9 leave 10ab6a: c3 ret 10ab6b: 90 nop switch (baud) { case 0: termios_baud = B0; break; case 50: termios_baud = B50; break; case 75: termios_baud = B75; break; case 110: termios_baud = B110; break; 10ab6c: b8 04 00 00 00 mov $0x4,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab71: c9 leave 10ab72: c3 ret 10ab73: 90 nop case 600: termios_baud = B600; break; case 1200: termios_baud = B1200; break; case 1800: termios_baud = B1800; break; case 2400: termios_baud = B2400; break; case 4800: termios_baud = B4800; break; case 9600: termios_baud = B9600; break; 10ab74: b8 0e 00 00 00 mov $0xe,%eax case 460800: termios_baud = B460800; break; default: termios_baud = -1; break; } return termios_baud; } 10ab79: c9 leave 10ab7a: c3 ret =============================================================================== 0010ac6c : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 10ac6c: 55 push %ebp 10ac6d: 89 e5 mov %esp,%ebp 10ac6f: 57 push %edi 10ac70: 56 push %esi 10ac71: 53 push %ebx 10ac72: 83 ec 20 sub $0x20,%esp 10ac75: 8b 55 08 mov 0x8(%ebp),%edx struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 10ac78: 6a 00 push $0x0 10ac7a: 6a 00 push $0x0 10ac7c: ff 35 8c 93 12 00 pushl 0x12938c 10ac82: 89 55 dc mov %edx,-0x24(%ebp) 10ac85: e8 1e 10 00 00 call 10bca8 10ac8a: 89 45 e4 mov %eax,-0x1c(%ebp) RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 10ac8d: 83 c4 10 add $0x10,%esp 10ac90: 85 c0 test %eax,%eax 10ac92: 8b 55 dc mov -0x24(%ebp),%edx 10ac95: 75 6f jne 10ad06 <== NEVER TAKEN return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 10ac97: 8b 1d 94 93 12 00 mov 0x129394,%ebx 10ac9d: 85 db test %ebx,%ebx 10ac9f: 0f 84 a7 00 00 00 je 10ad4c 10aca5: 8b 45 0c mov 0xc(%ebp),%eax 10aca8: eb 0c jmp 10acb6 10acaa: 66 90 xchg %ax,%ax 10acac: 8b 1b mov (%ebx),%ebx 10acae: 85 db test %ebx,%ebx 10acb0: 0f 84 96 00 00 00 je 10ad4c <== ALWAYS TAKEN if ((tty->major == major) && (tty->minor == minor)) 10acb6: 39 53 0c cmp %edx,0xc(%ebx) 10acb9: 75 f1 jne 10acac 10acbb: 39 43 10 cmp %eax,0x10(%ebx) 10acbe: 75 ec jne 10acac <== NEVER TAKEN */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 10acc0: 8b 4d 10 mov 0x10(%ebp),%ecx 10acc3: 8b 01 mov (%ecx),%eax 10acc5: 89 58 34 mov %ebx,0x34(%eax) if (!tty->refcount++) { 10acc8: 8b 43 08 mov 0x8(%ebx),%eax 10accb: 8d 48 01 lea 0x1(%eax),%ecx 10acce: 89 4b 08 mov %ecx,0x8(%ebx) 10acd1: 85 c0 test %eax,%eax 10acd3: 75 20 jne 10acf5 if (tty->device.firstOpen) 10acd5: 8b 83 98 00 00 00 mov 0x98(%ebx),%eax 10acdb: 85 c0 test %eax,%eax 10acdd: 74 0d je 10acec (*tty->device.firstOpen)(major, minor, arg); 10acdf: 56 push %esi 10ace0: ff 75 10 pushl 0x10(%ebp) 10ace3: ff 75 0c pushl 0xc(%ebp) 10ace6: 52 push %edx 10ace7: ff d0 call *%eax 10ace9: 83 c4 10 add $0x10,%esp /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10acec: 83 bb b4 00 00 00 02 cmpl $0x2,0xb4(%ebx) 10acf3: 74 1c je 10ad11 <== NEVER TAKEN (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 10acf5: 83 ec 0c sub $0xc,%esp 10acf8: ff 35 8c 93 12 00 pushl 0x12938c 10acfe: e8 a1 10 00 00 call 10bda4 return RTEMS_SUCCESSFUL; 10ad03: 83 c4 10 add $0x10,%esp } 10ad06: 8b 45 e4 mov -0x1c(%ebp),%eax 10ad09: 8d 65 f4 lea -0xc(%ebp),%esp 10ad0c: 5b pop %ebx 10ad0d: 5e pop %esi 10ad0e: 5f pop %edi 10ad0f: c9 leave 10ad10: c3 ret (*tty->device.firstOpen)(major, minor, arg); /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_start(tty->rxTaskId, 10ad11: 51 push %ecx <== NOT EXECUTED 10ad12: 53 push %ebx <== NOT EXECUTED 10ad13: 68 80 b1 10 00 push $0x10b180 <== NOT EXECUTED 10ad18: ff b3 c4 00 00 00 pushl 0xc4(%ebx) <== NOT EXECUTED 10ad1e: e8 c5 13 00 00 call 10c0e8 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10ad23: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ad26: 85 c0 test %eax,%eax <== NOT EXECUTED 10ad28: 0f 85 3e 03 00 00 jne 10b06c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 10ad2e: 52 push %edx <== NOT EXECUTED 10ad2f: 53 push %ebx <== NOT EXECUTED 10ad30: 68 14 b1 10 00 push $0x10b114 <== NOT EXECUTED 10ad35: ff b3 c8 00 00 00 pushl 0xc8(%ebx) <== NOT EXECUTED 10ad3b: e8 a8 13 00 00 call 10c0e8 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 10ad40: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ad43: 85 c0 test %eax,%eax <== NOT EXECUTED 10ad45: 74 ae je 10acf5 <== NOT EXECUTED 10ad47: e9 20 03 00 00 jmp 10b06c <== NOT EXECUTED static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 10ad4c: 83 ec 08 sub $0x8,%esp 10ad4f: 68 e8 00 00 00 push $0xe8 10ad54: 6a 01 push $0x1 10ad56: 89 55 dc mov %edx,-0x24(%ebp) 10ad59: e8 0e d6 ff ff call 10836c 10ad5e: 89 45 e0 mov %eax,-0x20(%ebp) 10ad61: 89 c3 mov %eax,%ebx if (tty == NULL) { 10ad63: 83 c4 10 add $0x10,%esp 10ad66: 85 c0 test %eax,%eax 10ad68: 8b 55 dc mov -0x24(%ebp),%edx 10ad6b: 0f 84 79 02 00 00 je 10afea <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 10ad71: a1 d8 70 12 00 mov 0x1270d8,%eax 10ad76: 8b 4d e0 mov -0x20(%ebp),%ecx 10ad79: 89 41 64 mov %eax,0x64(%ecx) tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 10ad7c: 8b 41 64 mov 0x64(%ecx),%eax 10ad7f: 83 ec 0c sub $0xc,%esp 10ad82: 50 push %eax 10ad83: 89 55 dc mov %edx,-0x24(%ebp) 10ad86: e8 d1 da ff ff call 10885c 10ad8b: 8b 75 e0 mov -0x20(%ebp),%esi 10ad8e: 89 46 58 mov %eax,0x58(%esi) if (tty->rawInBuf.theBuf == NULL) { 10ad91: 83 c4 10 add $0x10,%esp 10ad94: 85 c0 test %eax,%eax 10ad96: 8b 55 dc mov -0x24(%ebp),%edx 10ad99: 0f 84 68 02 00 00 je 10b007 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 10ad9f: a1 dc 70 12 00 mov 0x1270dc,%eax 10ada4: 8b 4d e0 mov -0x20(%ebp),%ecx 10ada7: 89 81 88 00 00 00 mov %eax,0x88(%ecx) tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 10adad: 8b 81 88 00 00 00 mov 0x88(%ecx),%eax 10adb3: 83 ec 0c sub $0xc,%esp 10adb6: 50 push %eax 10adb7: 89 55 dc mov %edx,-0x24(%ebp) 10adba: e8 9d da ff ff call 10885c 10adbf: 8b 75 e0 mov -0x20(%ebp),%esi 10adc2: 89 46 7c mov %eax,0x7c(%esi) if (tty->rawOutBuf.theBuf == NULL) { 10adc5: 83 c4 10 add $0x10,%esp 10adc8: 85 c0 test %eax,%eax 10adca: 8b 55 dc mov -0x24(%ebp),%edx 10adcd: 0f 84 58 02 00 00 je 10b02b <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 10add3: 83 ec 0c sub $0xc,%esp 10add6: ff 35 d4 70 12 00 pushl 0x1270d4 10addc: 89 55 dc mov %edx,-0x24(%ebp) 10addf: e8 78 da ff ff call 10885c 10ade4: 8b 4d e0 mov -0x20(%ebp),%ecx 10ade7: 89 41 1c mov %eax,0x1c(%ecx) if (tty->cbuf == NULL) { 10adea: 83 c4 10 add $0x10,%esp 10aded: 85 c0 test %eax,%eax 10adef: 8b 55 dc mov -0x24(%ebp),%edx 10adf2: 0f 84 7d 02 00 00 je 10b075 <== NEVER TAKEN return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 10adf8: 8b 45 e0 mov -0x20(%ebp),%eax 10adfb: c7 80 d4 00 00 00 00 movl $0x0,0xd4(%eax) 10ae02: 00 00 00 tty->tty_snd.sw_arg = NULL; 10ae05: c7 80 d8 00 00 00 00 movl $0x0,0xd8(%eax) 10ae0c: 00 00 00 tty->tty_rcv.sw_pfn = NULL; 10ae0f: c7 80 dc 00 00 00 00 movl $0x0,0xdc(%eax) 10ae16: 00 00 00 tty->tty_rcv.sw_arg = NULL; 10ae19: c7 80 e0 00 00 00 00 movl $0x0,0xe0(%eax) 10ae20: 00 00 00 tty->tty_rcvwakeup = 0; 10ae23: c7 80 e4 00 00 00 00 movl $0x0,0xe4(%eax) 10ae2a: 00 00 00 /* * link tty */ tty->forw = rtems_termios_ttyHead; 10ae2d: a1 94 93 12 00 mov 0x129394,%eax 10ae32: 8b 4d e0 mov -0x20(%ebp),%ecx 10ae35: 89 01 mov %eax,(%ecx) tty->back = NULL; 10ae37: c7 41 04 00 00 00 00 movl $0x0,0x4(%ecx) if (rtems_termios_ttyHead != NULL) 10ae3e: 85 c0 test %eax,%eax 10ae40: 74 03 je 10ae45 rtems_termios_ttyHead->back = tty; 10ae42: 89 48 04 mov %ecx,0x4(%eax) rtems_termios_ttyHead = tty; 10ae45: 8b 75 e0 mov -0x20(%ebp),%esi 10ae48: 89 35 94 93 12 00 mov %esi,0x129394 if (rtems_termios_ttyTail == NULL) 10ae4e: 8b 3d 90 93 12 00 mov 0x129390,%edi 10ae54: 85 ff test %edi,%edi 10ae56: 0f 84 ac 02 00 00 je 10b108 rtems_termios_ttyTail = tty; tty->minor = minor; 10ae5c: 8b 4d 0c mov 0xc(%ebp),%ecx 10ae5f: 8b 45 e0 mov -0x20(%ebp),%eax 10ae62: 89 48 10 mov %ecx,0x10(%eax) tty->major = major; 10ae65: 89 50 0c mov %edx,0xc(%eax) /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 10ae68: 83 ec 0c sub $0xc,%esp 10ae6b: 83 c0 14 add $0x14,%eax 10ae6e: 50 push %eax 10ae6f: 6a 00 push $0x0 10ae71: 6a 54 push $0x54 10ae73: 6a 01 push $0x1 10ae75: 0f be 05 e0 70 12 00 movsbl 0x1270e0,%eax 10ae7c: 0d 00 69 52 54 or $0x54526900,%eax 10ae81: 50 push %eax 10ae82: 89 55 dc mov %edx,-0x24(%ebp) 10ae85: e8 a6 0b 00 00 call 10ba30 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) 10ae8a: 83 c4 20 add $0x20,%esp 10ae8d: 85 c0 test %eax,%eax 10ae8f: 8b 55 dc mov -0x24(%ebp),%edx 10ae92: 0f 85 d4 01 00 00 jne 10b06c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10ae98: 83 ec 0c sub $0xc,%esp 10ae9b: 8b 45 e0 mov -0x20(%ebp),%eax 10ae9e: 83 c0 18 add $0x18,%eax 10aea1: 50 push %eax 10aea2: 6a 00 push $0x0 10aea4: 6a 54 push $0x54 10aea6: 6a 01 push $0x1 10aea8: 0f be 05 e0 70 12 00 movsbl 0x1270e0,%eax 10aeaf: 0d 00 6f 52 54 or $0x54526f00,%eax 10aeb4: 50 push %eax 10aeb5: 89 55 dc mov %edx,-0x24(%ebp) 10aeb8: e8 73 0b 00 00 call 10ba30 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) 10aebd: 83 c4 20 add $0x20,%esp 10aec0: 85 c0 test %eax,%eax 10aec2: 8b 55 dc mov -0x24(%ebp),%edx 10aec5: 0f 85 a1 01 00 00 jne 10b06c <== NEVER TAKEN rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 10aecb: 83 ec 0c sub $0xc,%esp 10aece: 8b 45 e0 mov -0x20(%ebp),%eax 10aed1: 05 8c 00 00 00 add $0x8c,%eax 10aed6: 50 push %eax 10aed7: 6a 00 push $0x0 10aed9: 6a 20 push $0x20 10aedb: 6a 00 push $0x0 10aedd: 0f be 05 e0 70 12 00 movsbl 0x1270e0,%eax 10aee4: 0d 00 78 52 54 or $0x54527800,%eax 10aee9: 50 push %eax 10aeea: 89 55 dc mov %edx,-0x24(%ebp) 10aeed: e8 3e 0b 00 00 call 10ba30 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 10aef2: 83 c4 20 add $0x20,%esp 10aef5: 85 c0 test %eax,%eax 10aef7: 8b 55 dc mov -0x24(%ebp),%edx 10aefa: 0f 85 6c 01 00 00 jne 10b06c <== NEVER TAKEN rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 10af00: 8b 75 e0 mov -0x20(%ebp),%esi 10af03: c7 86 94 00 00 00 00 movl $0x0,0x94(%esi) 10af0a: 00 00 00 /* * Set callbacks */ tty->device = *callbacks; 10af0d: 89 f7 mov %esi,%edi 10af0f: 81 c7 98 00 00 00 add $0x98,%edi 10af15: b9 08 00 00 00 mov $0x8,%ecx 10af1a: 8b 75 14 mov 0x14(%ebp),%esi 10af1d: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 10af1f: 8b 45 e0 mov -0x20(%ebp),%eax 10af22: 83 b8 b4 00 00 00 02 cmpl $0x2,0xb4(%eax) 10af29: 0f 84 63 01 00 00 je 10b092 <== NEVER TAKEN &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 10af2f: 8b 4d e0 mov -0x20(%ebp),%ecx 10af32: 8b b9 a0 00 00 00 mov 0xa0(%ecx),%edi 10af38: 85 ff test %edi,%edi 10af3a: 0f 84 f9 00 00 00 je 10b039 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 10af40: 83 b9 b4 00 00 00 02 cmpl $0x2,0xb4(%ecx) 10af47: 0f 84 ec 00 00 00 je 10b039 <== NEVER TAKEN } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 10af4d: 8b 75 e0 mov -0x20(%ebp),%esi 10af50: c7 46 30 02 25 00 00 movl $0x2502,0x30(%esi) tty->termios.c_oflag = OPOST | ONLCR | XTABS; 10af57: c7 46 34 05 18 00 00 movl $0x1805,0x34(%esi) tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 10af5e: c7 46 38 bd 08 00 00 movl $0x8bd,0x38(%esi) tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 10af65: c7 46 3c 3b 82 00 00 movl $0x823b,0x3c(%esi) tty->termios.c_cc[VINTR] = '\003'; 10af6c: c6 46 41 03 movb $0x3,0x41(%esi) tty->termios.c_cc[VQUIT] = '\034'; 10af70: c6 46 42 1c movb $0x1c,0x42(%esi) tty->termios.c_cc[VERASE] = '\177'; 10af74: c6 46 43 7f movb $0x7f,0x43(%esi) tty->termios.c_cc[VKILL] = '\025'; 10af78: c6 46 44 15 movb $0x15,0x44(%esi) tty->termios.c_cc[VEOF] = '\004'; 10af7c: c6 46 45 04 movb $0x4,0x45(%esi) tty->termios.c_cc[VEOL] = '\000'; 10af80: c6 46 4c 00 movb $0x0,0x4c(%esi) tty->termios.c_cc[VEOL2] = '\000'; 10af84: c6 46 51 00 movb $0x0,0x51(%esi) tty->termios.c_cc[VSTART] = '\021'; 10af88: c6 46 49 11 movb $0x11,0x49(%esi) tty->termios.c_cc[VSTOP] = '\023'; 10af8c: c6 46 4a 13 movb $0x13,0x4a(%esi) tty->termios.c_cc[VSUSP] = '\032'; 10af90: c6 46 4b 1a movb $0x1a,0x4b(%esi) tty->termios.c_cc[VREPRINT] = '\022'; 10af94: c6 46 4d 12 movb $0x12,0x4d(%esi) tty->termios.c_cc[VDISCARD] = '\017'; 10af98: c6 46 4e 0f movb $0xf,0x4e(%esi) tty->termios.c_cc[VWERASE] = '\027'; 10af9c: c6 46 4f 17 movb $0x17,0x4f(%esi) tty->termios.c_cc[VLNEXT] = '\026'; 10afa0: c6 46 50 16 movb $0x16,0x50(%esi) /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 10afa4: c7 86 b8 00 00 00 00 movl $0x0,0xb8(%esi) 10afab: 00 00 00 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 10afae: 8b 46 64 mov 0x64(%esi),%eax 10afb1: d1 e8 shr %eax 10afb3: 89 86 bc 00 00 00 mov %eax,0xbc(%esi) tty->highwater = tty->rawInBuf.Size * 3/4; 10afb9: 8b 46 64 mov 0x64(%esi),%eax 10afbc: 8d 04 40 lea (%eax,%eax,2),%eax 10afbf: c1 e8 02 shr $0x2,%eax 10afc2: 89 86 c0 00 00 00 mov %eax,0xc0(%esi) /* * Bump name characer */ if (c++ == 'z') 10afc8: a0 e0 70 12 00 mov 0x1270e0,%al 10afcd: 8d 48 01 lea 0x1(%eax),%ecx 10afd0: 88 0d e0 70 12 00 mov %cl,0x1270e0 10afd6: 3c 7a cmp $0x7a,%al 10afd8: 0f 85 e2 fc ff ff jne 10acc0 <== ALWAYS TAKEN c = 'a'; 10afde: c6 05 e0 70 12 00 61 movb $0x61,0x1270e0 <== NOT EXECUTED 10afe5: e9 d6 fc ff ff jmp 10acc0 <== NOT EXECUTED /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); if (tty == NULL) { rtems_semaphore_release (rtems_termios_ttyMutex); 10afea: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10afed: ff 35 8c 93 12 00 pushl 0x12938c <== NOT EXECUTED 10aff3: e8 ac 0d 00 00 call 10bda4 <== NOT EXECUTED 10aff8: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED return RTEMS_NO_MEMORY; 10afff: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b002: e9 ff fc ff ff jmp 10ad06 <== NOT EXECUTED * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); 10b007: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); free(tty); 10b00a: 56 push %esi <== NOT EXECUTED 10b00b: e8 74 d5 ff ff call 108584 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 10b010: 59 pop %ecx <== NOT EXECUTED 10b011: ff 35 8c 93 12 00 pushl 0x12938c <== NOT EXECUTED 10b017: e8 88 0d 00 00 call 10bda4 <== NOT EXECUTED 10b01c: c7 45 e4 1a 00 00 00 movl $0x1a,-0x1c(%ebp) <== NOT EXECUTED return RTEMS_NO_MEMORY; 10b023: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b026: e9 db fc ff ff jmp 10ad06 <== NOT EXECUTED * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); if (tty->rawOutBuf.theBuf == NULL) { free((void *)(tty->rawInBuf.theBuf)); 10b02b: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b02e: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 10b031: e8 4e d5 ff ff call 108584 <== NOT EXECUTED free(tty); 10b036: 5b pop %ebx <== NOT EXECUTED 10b037: eb d1 jmp 10b00a <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 10b039: 83 ec 0c sub $0xc,%esp 10b03c: 8b 45 e0 mov -0x20(%ebp),%eax 10b03f: 83 c0 68 add $0x68,%eax 10b042: 50 push %eax 10b043: 6a 00 push $0x0 10b045: 6a 24 push $0x24 10b047: 6a 00 push $0x0 10b049: 0f be 05 e0 70 12 00 movsbl 0x1270e0,%eax 10b050: 0d 00 72 52 54 or $0x54527200,%eax 10b055: 50 push %eax 10b056: 89 55 dc mov %edx,-0x24(%ebp) 10b059: e8 d2 09 00 00 call 10ba30 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 10b05e: 83 c4 20 add $0x20,%esp 10b061: 85 c0 test %eax,%eax 10b063: 8b 55 dc mov -0x24(%ebp),%edx 10b066: 0f 84 e1 fe ff ff je 10af4d <== ALWAYS TAKEN sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 10b06c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b06f: 50 push %eax <== NOT EXECUTED 10b070: e8 6f 12 00 00 call 10c2e4 <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 10b075: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b078: ff 71 7c pushl 0x7c(%ecx) <== NOT EXECUTED 10b07b: e8 04 d5 ff ff call 108584 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 10b080: 5a pop %edx <== NOT EXECUTED 10b081: 8b 75 e0 mov -0x20(%ebp),%esi <== NOT EXECUTED 10b084: ff 76 58 pushl 0x58(%esi) <== NOT EXECUTED 10b087: e8 f8 d4 ff ff call 108584 <== NOT EXECUTED free(tty); 10b08c: 58 pop %eax <== NOT EXECUTED 10b08d: e9 78 ff ff ff jmp 10b00a <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 10b092: 51 push %ecx <== NOT EXECUTED 10b093: 51 push %ecx <== NOT EXECUTED 10b094: 05 c8 00 00 00 add $0xc8,%eax <== NOT EXECUTED 10b099: 50 push %eax <== NOT EXECUTED 10b09a: 6a 00 push $0x0 <== NOT EXECUTED 10b09c: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10b0a1: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 10b0a6: 6a 0a push $0xa <== NOT EXECUTED 10b0a8: 0f be 05 e0 70 12 00 movsbl 0x1270e0,%eax <== NOT EXECUTED 10b0af: 0d 00 54 78 54 or $0x54785400,%eax <== NOT EXECUTED 10b0b4: 50 push %eax <== NOT EXECUTED 10b0b5: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10b0b8: e8 87 0d 00 00 call 10be44 <== NOT EXECUTED TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 10b0bd: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b0c0: 85 c0 test %eax,%eax <== NOT EXECUTED 10b0c2: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 10b0c5: 75 a5 jne 10b06c <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 10b0c7: 50 push %eax <== NOT EXECUTED 10b0c8: 50 push %eax <== NOT EXECUTED 10b0c9: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10b0cc: 05 c4 00 00 00 add $0xc4,%eax <== NOT EXECUTED 10b0d1: 50 push %eax <== NOT EXECUTED 10b0d2: 6a 00 push $0x0 <== NOT EXECUTED 10b0d4: 68 00 05 00 00 push $0x500 <== NOT EXECUTED 10b0d9: 68 00 04 00 00 push $0x400 <== NOT EXECUTED 10b0de: 6a 09 push $0x9 <== NOT EXECUTED 10b0e0: 0f be 05 e0 70 12 00 movsbl 0x1270e0,%eax <== NOT EXECUTED 10b0e7: 0d 00 54 78 52 or $0x52785400,%eax <== NOT EXECUTED 10b0ec: 50 push %eax <== NOT EXECUTED 10b0ed: 89 55 dc mov %edx,-0x24(%ebp) <== NOT EXECUTED 10b0f0: e8 4f 0d 00 00 call 10be44 <== NOT EXECUTED TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 10b0f5: 83 c4 20 add $0x20,%esp <== NOT EXECUTED 10b0f8: 85 c0 test %eax,%eax <== NOT EXECUTED 10b0fa: 8b 55 dc mov -0x24(%ebp),%edx <== NOT EXECUTED 10b0fd: 0f 84 2c fe ff ff je 10af2f <== NOT EXECUTED 10b103: e9 64 ff ff ff jmp 10b06c <== 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; 10b108: 89 35 90 93 12 00 mov %esi,0x129390 10b10e: e9 49 fd ff ff jmp 10ae5c =============================================================================== 00109bc8 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 109bc8: 55 push %ebp 109bc9: 89 e5 mov %esp,%ebp 109bcb: 57 push %edi 109bcc: 56 push %esi 109bcd: 53 push %ebx 109bce: 83 ec 1c sub $0x1c,%esp 109bd1: 8b 45 08 mov 0x8(%ebp),%eax 109bd4: 8b 55 0c mov 0xc(%ebp),%edx 109bd7: 89 55 e4 mov %edx,-0x1c(%ebp) 109bda: 8b 5d 10 mov 0x10(%ebp),%ebx const unsigned char *buf = _buf; 109bdd: 89 c6 mov %eax,%esi unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 109bdf: 8b bb b4 00 00 00 mov 0xb4(%ebx),%edi 109be5: 85 ff test %edi,%edi 109be7: 0f 84 eb 00 00 00 je 109cd8 <== NEVER TAKEN (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 109bed: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109bf3: 89 45 e0 mov %eax,-0x20(%ebp) while (len) { 109bf6: 8b 4d e4 mov -0x1c(%ebp),%ecx 109bf9: 85 c9 test %ecx,%ecx 109bfb: 0f 84 cf 00 00 00 je 109cd0 <== NEVER TAKEN 109c01: 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; 109c04: 8b 45 e0 mov -0x20(%ebp),%eax 109c07: 40 inc %eax 109c08: 8b 8b 88 00 00 00 mov 0x88(%ebx),%ecx 109c0e: 31 d2 xor %edx,%edx 109c10: f7 f1 div %ecx 109c12: 89 55 dc mov %edx,-0x24(%ebp) 109c15: 89 55 e0 mov %edx,-0x20(%ebp) rtems_interrupt_disable (level); 109c18: 9c pushf 109c19: fa cli 109c1a: 5f pop %edi while (newHead == tty->rawOutBuf.Tail) { 109c1b: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109c21: 3b 55 e0 cmp -0x20(%ebp),%edx 109c24: 75 3e jne 109c64 109c26: 89 f8 mov %edi,%eax 109c28: 89 f7 mov %esi,%edi 109c2a: 89 d6 mov %edx,%esi tty->rawOutBufState = rob_wait; 109c2c: c7 83 94 00 00 00 02 movl $0x2,0x94(%ebx) 109c33: 00 00 00 rtems_interrupt_enable (level); 109c36: 50 push %eax 109c37: 9d popf sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 109c38: 52 push %edx 109c39: 6a 00 push $0x0 109c3b: 6a 00 push $0x0 109c3d: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 109c43: e8 60 20 00 00 call 10bca8 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 109c48: 83 c4 10 add $0x10,%esp 109c4b: 85 c0 test %eax,%eax 109c4d: 0f 85 a0 00 00 00 jne 109cf3 <== NEVER TAKEN rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 109c53: 9c pushf 109c54: fa cli 109c55: 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) { 109c56: 8b 93 84 00 00 00 mov 0x84(%ebx),%edx 109c5c: 39 f2 cmp %esi,%edx 109c5e: 74 cc je 109c2c <== NEVER TAKEN 109c60: 89 fe mov %edi,%esi 109c62: 89 c7 mov %eax,%edi RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109c64: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 109c6a: 8b 4b 7c mov 0x7c(%ebx),%ecx 109c6d: 8a 16 mov (%esi),%dl 109c6f: 88 14 01 mov %dl,(%ecx,%eax,1) tty->rawOutBuf.Head = newHead; 109c72: 8b 45 dc mov -0x24(%ebp),%eax 109c75: 89 83 80 00 00 00 mov %eax,0x80(%ebx) if (tty->rawOutBufState == rob_idle) { 109c7b: 8b 83 94 00 00 00 mov 0x94(%ebx),%eax 109c81: 85 c0 test %eax,%eax 109c83: 75 23 jne 109ca8 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 109c85: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109c8b: a8 10 test $0x10,%al 109c8d: 74 26 je 109cb5 <== 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; 109c8f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109c95: 83 c8 20 or $0x20,%eax 109c98: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 109c9e: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 109ca5: 00 00 00 } rtems_interrupt_enable (level); 109ca8: 57 push %edi 109ca9: 9d popf if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 109caa: ff 4d e4 decl -0x1c(%ebp) 109cad: 74 21 je 109cd0 RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 109caf: 46 inc %esi 109cb0: e9 4f ff ff ff jmp 109c04 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); 109cb5: 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, 109cbb: 51 push %ecx 109cbc: 6a 01 push $0x1 109cbe: 03 43 7c add 0x7c(%ebx),%eax 109cc1: 50 push %eax 109cc2: ff 73 10 pushl 0x10(%ebx) 109cc5: ff 93 a4 00 00 00 call *0xa4(%ebx) 109ccb: 83 c4 10 add $0x10,%esp 109cce: eb ce jmp 109c9e tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109cd0: 8d 65 f4 lea -0xc(%ebp),%esp 109cd3: 5b pop %ebx 109cd4: 5e pop %esi 109cd5: 5f pop %edi 109cd6: c9 leave 109cd7: 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); 109cd8: 89 55 10 mov %edx,0x10(%ebp) <== NOT EXECUTED 109cdb: 89 45 0c mov %eax,0xc(%ebp) <== NOT EXECUTED 109cde: 8b 43 10 mov 0x10(%ebx),%eax <== NOT EXECUTED 109ce1: 89 45 08 mov %eax,0x8(%ebp) <== NOT EXECUTED 109ce4: 8b 83 a4 00 00 00 mov 0xa4(%ebx),%eax <== NOT EXECUTED tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } } 109cea: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109ced: 5b pop %ebx <== NOT EXECUTED 109cee: 5e pop %esi <== NOT EXECUTED 109cef: 5f pop %edi <== NOT EXECUTED 109cf0: c9 leave <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 109cf1: ff e0 jmp *%eax <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 109cf3: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 109cf6: 50 push %eax <== NOT EXECUTED 109cf7: e8 e8 25 00 00 call 10c2e4 <== NOT EXECUTED =============================================================================== 0010a334 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 10a334: 55 push %ebp <== NOT EXECUTED 10a335: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a337: 57 push %edi <== NOT EXECUTED 10a338: 56 push %esi <== NOT EXECUTED 10a339: 53 push %ebx <== NOT EXECUTED 10a33a: 83 ec 30 sub $0x30,%esp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a33d: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10a340: 8b 02 mov (%edx),%eax <== NOT EXECUTED 10a342: 8b 58 34 mov 0x34(%eax),%ebx <== NOT EXECUTED uint32_t count = args->count; 10a345: 8b 4a 10 mov 0x10(%edx),%ecx <== NOT EXECUTED 10a348: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED char *buffer = args->buffer; 10a34b: 8b 42 0c mov 0xc(%edx),%eax <== NOT EXECUTED 10a34e: 89 45 d8 mov %eax,-0x28(%ebp) <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a351: 6a 00 push $0x0 <== NOT EXECUTED 10a353: 6a 00 push $0x0 <== NOT EXECUTED 10a355: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 10a358: e8 4b 19 00 00 call 10bca8 <== NOT EXECUTED 10a35d: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 10a360: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a363: 85 c0 test %eax,%eax <== NOT EXECUTED 10a365: 75 35 jne 10a39c <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 10a367: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10a36d: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10a370: 8b 80 08 90 12 00 mov 0x129008(%eax),%eax <== NOT EXECUTED 10a376: 85 c0 test %eax,%eax <== NOT EXECUTED 10a378: 74 2e je 10a3a8 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 10a37a: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a37d: ff 75 08 pushl 0x8(%ebp) <== NOT EXECUTED 10a380: 53 push %ebx <== NOT EXECUTED 10a381: ff d0 call *%eax <== NOT EXECUTED 10a383: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 10a386: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 10a38d: 00 00 00 rtems_semaphore_release (tty->isem); 10a390: 59 pop %ecx <== NOT EXECUTED 10a391: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 10a394: e8 0b 1a 00 00 call 10bda4 <== NOT EXECUTED return sc; 10a399: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } 10a39c: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a39f: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a3a2: 5b pop %ebx <== NOT EXECUTED 10a3a3: 5e pop %esi <== NOT EXECUTED 10a3a4: 5f pop %edi <== NOT EXECUTED 10a3a5: c9 leave <== NOT EXECUTED 10a3a6: c3 ret <== NOT EXECUTED 10a3a7: 90 nop <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 10a3a8: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 10a3ab: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 10a3ae: 74 5f je 10a40f <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a3b0: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10a3b3: 85 c9 test %ecx,%ecx <== NOT EXECUTED 10a3b5: 74 29 je 10a3e0 <== NOT EXECUTED 10a3b7: 8b 43 24 mov 0x24(%ebx),%eax <== NOT EXECUTED 10a3ba: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 10a3bd: 7d 21 jge 10a3e0 <== NOT EXECUTED 10a3bf: 8b 55 d8 mov -0x28(%ebp),%edx <== NOT EXECUTED 10a3c2: 8b 7d dc mov -0x24(%ebp),%edi <== NOT EXECUTED 10a3c5: eb 06 jmp 10a3cd <== NOT EXECUTED 10a3c7: 90 nop <== NOT EXECUTED 10a3c8: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a3cb: 7e 10 jle 10a3dd <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 10a3cd: 8b 73 1c mov 0x1c(%ebx),%esi <== NOT EXECUTED 10a3d0: 8a 0c 06 mov (%esi,%eax,1),%cl <== NOT EXECUTED 10a3d3: 88 0a mov %cl,(%edx) <== NOT EXECUTED 10a3d5: 42 inc %edx <== NOT EXECUTED 10a3d6: 40 inc %eax <== NOT EXECUTED 10a3d7: 89 43 24 mov %eax,0x24(%ebx) <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 10a3da: 4f dec %edi <== NOT EXECUTED 10a3db: 75 eb jne 10a3c8 <== NOT EXECUTED 10a3dd: 89 7d dc mov %edi,-0x24(%ebp) <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 10a3e0: 8b 55 08 mov 0x8(%ebp),%edx <== NOT EXECUTED 10a3e3: 8b 42 10 mov 0x10(%edx),%eax <== NOT EXECUTED 10a3e6: 2b 45 dc sub -0x24(%ebp),%eax <== NOT EXECUTED 10a3e9: 89 42 18 mov %eax,0x18(%edx) <== NOT EXECUTED tty->tty_rcvwakeup = 0; 10a3ec: c7 83 e4 00 00 00 00 movl $0x0,0xe4(%ebx) <== NOT EXECUTED 10a3f3: 00 00 00 rtems_semaphore_release (tty->isem); 10a3f6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a3f9: ff 73 14 pushl 0x14(%ebx) <== NOT EXECUTED 10a3fc: e8 a3 19 00 00 call 10bda4 <== NOT EXECUTED return sc; 10a401: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 10a404: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a407: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a40a: 5b pop %ebx <== NOT EXECUTED 10a40b: 5e pop %esi <== NOT EXECUTED 10a40c: 5f pop %edi <== NOT EXECUTED 10a40d: c9 leave <== NOT EXECUTED 10a40e: c3 ret <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 10a40f: c7 43 20 00 00 00 00 movl $0x0,0x20(%ebx) <== NOT EXECUTED 10a416: c7 43 24 00 00 00 00 movl $0x0,0x24(%ebx) <== NOT EXECUTED tty->read_start_column = tty->column; 10a41d: 8b 43 28 mov 0x28(%ebx),%eax <== NOT EXECUTED 10a420: 89 43 2c mov %eax,0x2c(%ebx) <== NOT EXECUTED if (tty->device.pollRead != NULL && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 10a423: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 10a429: 85 c0 test %eax,%eax <== NOT EXECUTED 10a42b: 74 0e je 10a43b <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 10a42d: 8b 93 b4 00 00 00 mov 0xb4(%ebx),%edx <== NOT EXECUTED 10a433: 85 d2 test %edx,%edx <== NOT EXECUTED 10a435: 0f 84 82 01 00 00 je 10a5bd <== NOT EXECUTED * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 10a43b: 8b 73 74 mov 0x74(%ebx),%esi <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 10a43e: 8d 53 49 lea 0x49(%ebx),%edx <== NOT EXECUTED 10a441: 89 55 d4 mov %edx,-0x2c(%ebp) <== NOT EXECUTED 10a444: c7 45 e4 01 00 00 00 movl $0x1,-0x1c(%ebp) <== NOT EXECUTED 10a44b: 90 nop <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a44c: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a44f: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a452: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a454: 0f 84 06 01 00 00 je 10a560 <== NOT EXECUTED 10a45a: a1 d4 70 12 00 mov 0x1270d4,%eax <== NOT EXECUTED 10a45f: 48 dec %eax <== NOT EXECUTED 10a460: 3b 43 20 cmp 0x20(%ebx),%eax <== NOT EXECUTED 10a463: 7f 3c jg 10a4a1 <== NOT EXECUTED 10a465: e9 f6 00 00 00 jmp 10a560 <== NOT EXECUTED 10a46a: 66 90 xchg %ax,%ax <== NOT EXECUTED } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) 10a46c: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 10a46f: 89 da mov %ebx,%edx <== NOT EXECUTED 10a471: e8 2e fd ff ff call 10a1a4 <== NOT EXECUTED 10a476: 85 c0 test %eax,%eax <== NOT EXECUTED 10a478: 74 07 je 10a481 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a47a: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp) <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 10a481: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a484: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a487: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a48a: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a48c: 0f 84 ce 00 00 00 je 10a560 <== NOT EXECUTED 10a492: a1 d4 70 12 00 mov 0x1270d4,%eax <== NOT EXECUTED 10a497: 48 dec %eax <== NOT EXECUTED 10a498: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a49b: 0f 8d bf 00 00 00 jge 10a560 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 10a4a1: 8b 43 5c mov 0x5c(%ebx),%eax <== NOT EXECUTED 10a4a4: 8b 4b 64 mov 0x64(%ebx),%ecx <== NOT EXECUTED 10a4a7: 40 inc %eax <== NOT EXECUTED 10a4a8: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a4aa: f7 f1 div %ecx <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 10a4ac: 8b 43 58 mov 0x58(%ebx),%eax <== NOT EXECUTED 10a4af: 8a 0c 10 mov (%eax,%edx,1),%cl <== NOT EXECUTED tty->rawInBuf.Head = newHead; 10a4b2: 89 53 5c mov %edx,0x5c(%ebx) <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 10a4b5: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a4b8: 8b 7b 64 mov 0x64(%ebx),%edi <== NOT EXECUTED 10a4bb: 8b 73 64 mov 0x64(%ebx),%esi <== NOT EXECUTED 10a4be: 8d 04 07 lea (%edi,%eax,1),%eax <== NOT EXECUTED 10a4c1: 29 d0 sub %edx,%eax <== NOT EXECUTED 10a4c3: 31 d2 xor %edx,%edx <== NOT EXECUTED 10a4c5: f7 f6 div %esi <== NOT EXECUTED 10a4c7: 3b 93 bc 00 00 00 cmp 0xbc(%ebx),%edx <== NOT EXECUTED 10a4cd: 73 5d jae 10a52c <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 10a4cf: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a4d5: 83 e0 fe and $0xfffffffe,%eax <== NOT EXECUTED 10a4d8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 10a4de: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a4e4: 25 02 02 00 00 and $0x202,%eax <== NOT EXECUTED 10a4e9: 3d 02 02 00 00 cmp $0x202,%eax <== NOT EXECUTED 10a4ee: 0f 84 94 00 00 00 je 10a588 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 10a4f4: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a4fa: f6 c4 01 test $0x1,%ah <== NOT EXECUTED 10a4fd: 74 2d je 10a52c <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 10a4ff: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10a505: 83 e0 fb and $0xfffffffb,%eax <== NOT EXECUTED 10a508: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 10a50e: 8b 83 b0 00 00 00 mov 0xb0(%ebx),%eax <== NOT EXECUTED 10a514: 85 c0 test %eax,%eax <== NOT EXECUTED 10a516: 74 14 je 10a52c <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 10a518: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a51b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a51e: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a521: ff d0 call *%eax <== NOT EXECUTED 10a523: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a526: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a529: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 10a52c: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 10a530: 0f 85 36 ff ff ff jne 10a46c <== NOT EXECUTED if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 10a536: 0f b6 c1 movzbl %cl,%eax <== NOT EXECUTED 10a539: 89 da mov %ebx,%edx <== NOT EXECUTED 10a53b: e8 64 fc ff ff call 10a1a4 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a540: 0f b6 43 47 movzbl 0x47(%ebx),%eax <== NOT EXECUTED 10a544: 39 43 20 cmp %eax,0x20(%ebx) <== NOT EXECUTED 10a547: 0f 8d 2d ff ff ff jge 10a47a <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 10a54d: 8b 73 70 mov 0x70(%ebx),%esi <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 10a550: 8b 53 5c mov 0x5c(%ebx),%edx <== NOT EXECUTED 10a553: 8b 43 60 mov 0x60(%ebx),%eax <== NOT EXECUTED 10a556: 39 c2 cmp %eax,%edx <== NOT EXECUTED 10a558: 0f 85 34 ff ff ff jne 10a492 <== NOT EXECUTED 10a55e: 66 90 xchg %ax,%ax <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 10a560: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a563: 85 c0 test %eax,%eax <== NOT EXECUTED 10a565: 0f 84 45 fe ff ff je 10a3b0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 10a56b: 57 push %edi <== NOT EXECUTED 10a56c: 56 push %esi <== NOT EXECUTED 10a56d: ff 73 6c pushl 0x6c(%ebx) <== NOT EXECUTED 10a570: ff 73 68 pushl 0x68(%ebx) <== NOT EXECUTED 10a573: e8 30 17 00 00 call 10bca8 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 10a578: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a57b: 85 c0 test %eax,%eax <== NOT EXECUTED 10a57d: 0f 84 c9 fe ff ff je 10a44c <== NOT EXECUTED 10a583: e9 28 fe ff ff jmp 10a3b0 <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 10a588: 8b b3 94 00 00 00 mov 0x94(%ebx),%esi <== NOT EXECUTED 10a58e: 85 f6 test %esi,%esi <== NOT EXECUTED 10a590: 74 0e je 10a5a0 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 10a592: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 10a598: a8 20 test $0x20,%al <== NOT EXECUTED 10a59a: 0f 84 54 ff ff ff je 10a4f4 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)(tty->minor, 10a5a0: 52 push %edx <== NOT EXECUTED 10a5a1: 6a 01 push $0x1 <== NOT EXECUTED 10a5a3: ff 75 d4 pushl -0x2c(%ebp) <== NOT EXECUTED 10a5a6: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a5a9: 88 4d d0 mov %cl,-0x30(%ebp) <== NOT EXECUTED 10a5ac: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED 10a5b2: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5b5: 8a 4d d0 mov -0x30(%ebp),%cl <== NOT EXECUTED 10a5b8: e9 6f ff ff ff jmp 10a52c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a5bd: f6 43 3c 02 testb $0x2,0x3c(%ebx) <== NOT EXECUTED 10a5c1: 75 1d jne 10a5e0 <== NOT EXECUTED 10a5c3: eb 39 jmp 10a5fe <== NOT EXECUTED 10a5c5: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 10a5c8: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a5cb: 89 da mov %ebx,%edx <== NOT EXECUTED 10a5cd: e8 d2 fb ff ff call 10a1a4 <== NOT EXECUTED 10a5d2: 85 c0 test %eax,%eax <== NOT EXECUTED 10a5d4: 0f 85 d6 fd ff ff jne 10a3b0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 10a5da: 8b 83 a0 00 00 00 mov 0xa0(%ebx),%eax <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a5e0: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a5e3: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a5e6: ff d0 call *%eax <== NOT EXECUTED if (n < 0) { 10a5e8: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5eb: 85 c0 test %eax,%eax <== NOT EXECUTED 10a5ed: 79 d9 jns 10a5c8 <== NOT EXECUTED rtems_task_wake_after (1); 10a5ef: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a5f2: 6a 01 push $0x1 <== NOT EXECUTED 10a5f4: e8 63 1b 00 00 call 10c15c <== NOT EXECUTED 10a5f9: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a5fc: eb dc jmp 10a5da <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 10a5fe: e8 a9 0f 00 00 call 10b5ac <== NOT EXECUTED 10a603: 89 c6 mov %eax,%esi <== NOT EXECUTED 10a605: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 10a608: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a60b: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10a60e: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (n < 0) { 10a614: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a617: 85 c0 test %eax,%eax <== NOT EXECUTED 10a619: 78 25 js 10a640 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 10a61b: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a61e: 89 da mov %ebx,%edx <== NOT EXECUTED 10a620: e8 7f fb ff ff call 10a1a4 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 10a625: 8a 43 47 mov 0x47(%ebx),%al <== NOT EXECUTED 10a628: 0f b6 d0 movzbl %al,%edx <== NOT EXECUTED 10a62b: 39 53 20 cmp %edx,0x20(%ebx) <== NOT EXECUTED 10a62e: 0f 8d 7c fd ff ff jge 10a3b0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 10a634: 84 c0 test %al,%al <== NOT EXECUTED 10a636: 74 d0 je 10a608 <== NOT EXECUTED 10a638: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a63c: 74 ca je 10a608 <== NOT EXECUTED 10a63e: eb be jmp 10a5fe <== NOT EXECUTED rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { if (tty->termios.c_cc[VMIN]) { 10a640: 80 7b 47 00 cmpb $0x0,0x47(%ebx) <== NOT EXECUTED 10a644: 74 1d je 10a663 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 10a646: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a64a: 74 08 je 10a654 <== NOT EXECUTED 10a64c: 8b 7b 20 mov 0x20(%ebx),%edi <== NOT EXECUTED 10a64f: 85 ff test %edi,%edi <== NOT EXECUTED 10a651: 75 1a jne 10a66d <== NOT EXECUTED 10a653: 90 nop <== NOT EXECUTED now = rtems_clock_get_ticks_since_boot(); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 10a654: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a657: 6a 01 push $0x1 <== NOT EXECUTED 10a659: e8 fe 1a 00 00 call 10c15c <== NOT EXECUTED 10a65e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a661: eb a5 jmp 10a608 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 10a663: 80 7b 46 00 cmpb $0x0,0x46(%ebx) <== NOT EXECUTED 10a667: 0f 84 43 fd ff ff je 10a3b0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 10a66d: e8 3a 0f 00 00 call 10b5ac <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 10a672: 29 f0 sub %esi,%eax <== NOT EXECUTED 10a674: 3b 43 54 cmp 0x54(%ebx),%eax <== NOT EXECUTED 10a677: 76 db jbe 10a654 <== NOT EXECUTED 10a679: e9 32 fd ff ff jmp 10a3b0 <== NOT EXECUTED =============================================================================== 00109618 : * 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) { 109618: 55 push %ebp 109619: 89 e5 mov %esp,%ebp 10961b: 57 push %edi 10961c: 56 push %esi 10961d: 53 push %ebx 10961e: 83 ec 0c sub $0xc,%esp 109621: 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)) 109624: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 10962a: 25 03 04 00 00 and $0x403,%eax 10962f: 3d 01 04 00 00 cmp $0x401,%eax 109634: 0f 84 86 01 00 00 je 1097c0 <== NEVER TAKEN tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 10963a: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109640: 83 e0 03 and $0x3,%eax 109643: 83 f8 02 cmp $0x2,%eax 109646: 0f 84 b0 01 00 00 je 1097fc <== NEVER TAKEN rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 10964c: 8b 93 80 00 00 00 mov 0x80(%ebx),%edx 109652: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 109658: 39 c2 cmp %eax,%edx 10965a: 0f 84 b0 00 00 00 je 109710 <== NEVER TAKEN rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 109660: 9c pushf 109661: fa cli 109662: 58 pop %eax len = tty->t_dqlen; 109663: 8b 8b 90 00 00 00 mov 0x90(%ebx),%ecx tty->t_dqlen = 0; 109669: c7 83 90 00 00 00 00 movl $0x0,0x90(%ebx) 109670: 00 00 00 rtems_interrupt_enable(level); 109673: 50 push %eax 109674: 9d popf newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 109675: 8b 83 84 00 00 00 mov 0x84(%ebx),%eax 10967b: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 109681: 8d 04 01 lea (%ecx,%eax,1),%eax 109684: 31 d2 xor %edx,%edx 109686: f7 f7 div %edi 109688: 89 d6 mov %edx,%esi tty->rawOutBuf.Tail = newTail; 10968a: 89 93 84 00 00 00 mov %edx,0x84(%ebx) if (tty->rawOutBufState == rob_wait) { 109690: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) 109697: 0f 84 e7 00 00 00 je 109784 /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 10969d: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1096a3: 39 f0 cmp %esi,%eax 1096a5: 0f 84 81 00 00 00 je 10972c 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)) 1096ab: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1096b1: 25 10 02 00 00 and $0x210,%eax 1096b6: 3d 10 02 00 00 cmp $0x210,%eax 1096bb: 0f 84 db 00 00 00 je 10979c <== NEVER TAKEN } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 1096c1: 8b 83 80 00 00 00 mov 0x80(%ebx),%eax 1096c7: 39 c6 cmp %eax,%esi 1096c9: 0f 87 95 00 00 00 ja 109764 nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 1096cf: 8b bb 80 00 00 00 mov 0x80(%ebx),%edi 1096d5: 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)) { 1096d7: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 1096dd: f6 c4 06 test $0x6,%ah 1096e0: 0f 84 95 00 00 00 je 10977b <== ALWAYS TAKEN 1096e6: b8 01 00 00 00 mov $0x1,%eax <== NOT EXECUTED 1096eb: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 1096f0: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) 1096f7: 00 00 00 (*tty->device.write)(tty->minor, 1096fa: 52 push %edx 1096fb: 50 push %eax 1096fc: 8b 43 7c mov 0x7c(%ebx),%eax 1096ff: 01 f0 add %esi,%eax 109701: 50 push %eax 109702: ff 73 10 pushl 0x10(%ebx) 109705: ff 93 a4 00 00 00 call *0xa4(%ebx) 10970b: 83 c4 10 add $0x10,%esp 10970e: eb 44 jmp 109754 else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 109710: 83 bb 94 00 00 00 02 cmpl $0x2,0x94(%ebx) <== NOT EXECUTED 109717: 0f 84 1b 01 00 00 je 109838 <== NOT EXECUTED 10971d: 31 ff xor %edi,%edi <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10971f: 89 f8 mov %edi,%eax <== NOT EXECUTED 109721: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109724: 5b pop %ebx <== NOT EXECUTED 109725: 5e pop %esi <== NOT EXECUTED 109726: 5f pop %edi <== NOT EXECUTED 109727: c9 leave <== NOT EXECUTED 109728: c3 ret <== NOT EXECUTED 109729: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 10972c: c7 83 94 00 00 00 00 movl $0x0,0x94(%ebx) 109733: 00 00 00 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 109736: 8b 83 d4 00 00 00 mov 0xd4(%ebx),%eax 10973c: 85 c0 test %eax,%eax 10973e: 74 7a je 1097ba <== ALWAYS TAKEN (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 109740: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 109743: ff b3 d8 00 00 00 pushl 0xd8(%ebx) <== NOT EXECUTED 109749: 8d 53 30 lea 0x30(%ebx),%edx <== NOT EXECUTED 10974c: 52 push %edx <== NOT EXECUTED 10974d: ff d0 call *%eax <== NOT EXECUTED 10974f: 31 ff xor %edi,%edi <== NOT EXECUTED 109751: 83 c4 10 add $0x10,%esp <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 109754: 89 b3 84 00 00 00 mov %esi,0x84(%ebx) } return nToSend; } 10975a: 89 f8 mov %edi,%eax 10975c: 8d 65 f4 lea -0xc(%ebp),%esp 10975f: 5b pop %ebx 109760: 5e pop %esi 109761: 5f pop %edi 109762: c9 leave 109763: c3 ret else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 109764: 8b bb 88 00 00 00 mov 0x88(%ebx),%edi 10976a: 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)) { 10976c: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax 109772: f6 c4 06 test $0x6,%ah 109775: 0f 85 6b ff ff ff jne 1096e6 <== NEVER TAKEN 10977b: 89 f8 mov %edi,%eax 10977d: e9 6e ff ff ff jmp 1096f0 109782: 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); 109784: 83 ec 0c sub $0xc,%esp 109787: ff b3 8c 00 00 00 pushl 0x8c(%ebx) 10978d: e8 12 26 00 00 call 10bda4 109792: 83 c4 10 add $0x10,%esp 109795: e9 03 ff ff ff jmp 10969d 10979a: 66 90 xchg %ax,%ax /* 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); 10979c: 9c pushf <== NOT EXECUTED 10979d: fa cli <== NOT EXECUTED 10979e: 5a pop %edx <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 10979f: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1097a5: 83 c8 20 or $0x20,%eax <== NOT EXECUTED 1097a8: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 1097ae: c7 83 94 00 00 00 01 movl $0x1,0x94(%ebx) <== NOT EXECUTED 1097b5: 00 00 00 rtems_interrupt_enable(level); 1097b8: 52 push %edx <== NOT EXECUTED 1097b9: 9d popf <== NOT EXECUTED 1097ba: 31 ff xor %edi,%edi 1097bc: eb 96 jmp 109754 1097be: 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, 1097c0: 56 push %esi <== NOT EXECUTED 1097c1: 6a 01 push $0x1 <== NOT EXECUTED 1097c3: 8d 43 4a lea 0x4a(%ebx),%eax <== NOT EXECUTED 1097c6: 50 push %eax <== NOT EXECUTED 1097c7: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 1097ca: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 1097d0: 9c pushf <== NOT EXECUTED 1097d1: fa cli <== NOT EXECUTED 1097d2: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 1097d3: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1097d9: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 1097df: 83 c8 02 or $0x2,%eax <== NOT EXECUTED 1097e2: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 1097e8: 52 push %edx <== NOT EXECUTED 1097e9: 9d popf <== NOT EXECUTED 1097ea: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 1097ef: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 1097f2: 89 f8 mov %edi,%eax <== NOT EXECUTED 1097f4: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1097f7: 5b pop %ebx <== NOT EXECUTED 1097f8: 5e pop %esi <== NOT EXECUTED 1097f9: 5f pop %edi <== NOT EXECUTED 1097fa: c9 leave <== NOT EXECUTED 1097fb: 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, 1097fc: 51 push %ecx <== NOT EXECUTED 1097fd: 6a 01 push $0x1 <== NOT EXECUTED 1097ff: 8d 43 49 lea 0x49(%ebx),%eax <== NOT EXECUTED 109802: 50 push %eax <== NOT EXECUTED 109803: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 109806: ff 93 a4 00 00 00 call *0xa4(%ebx) <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 10980c: 9c pushf <== NOT EXECUTED 10980d: fa cli <== NOT EXECUTED 10980e: 5a pop %edx <== NOT EXECUTED tty->t_dqlen--; 10980f: ff 8b 90 00 00 00 decl 0x90(%ebx) <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 109815: 8b 83 b8 00 00 00 mov 0xb8(%ebx),%eax <== NOT EXECUTED 10981b: 83 e0 fd and $0xfffffffd,%eax <== NOT EXECUTED 10981e: 89 83 b8 00 00 00 mov %eax,0xb8(%ebx) <== NOT EXECUTED rtems_interrupt_enable(level); 109824: 52 push %edx <== NOT EXECUTED 109825: 9d popf <== NOT EXECUTED 109826: bf 01 00 00 00 mov $0x1,%edi <== NOT EXECUTED 10982b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 10982e: 89 f8 mov %edi,%eax <== NOT EXECUTED 109830: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 109833: 5b pop %ebx <== NOT EXECUTED 109834: 5e pop %esi <== NOT EXECUTED 109835: 5f pop %edi <== NOT EXECUTED 109836: c9 leave <== NOT EXECUTED 109837: c3 ret <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 109838: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10983b: ff b3 8c 00 00 00 pushl 0x8c(%ebx) <== NOT EXECUTED 109841: e8 5e 25 00 00 call 10bda4 <== NOT EXECUTED 109846: 31 ff xor %edi,%edi <== NOT EXECUTED 109848: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10984b: e9 cf fe ff ff jmp 10971f <== NOT EXECUTED =============================================================================== 0010b180 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 10b180: 55 push %ebp <== NOT EXECUTED 10b181: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b183: 57 push %edi <== NOT EXECUTED 10b184: 56 push %esi <== NOT EXECUTED 10b185: 53 push %ebx <== NOT EXECUTED 10b186: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10b189: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10b18c: 8d 75 e0 lea -0x20(%ebp),%esi <== NOT EXECUTED 10b18f: 8d 7d e7 lea -0x19(%ebp),%edi <== NOT EXECUTED 10b192: 66 90 xchg %ax,%ax <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 10b194: 56 push %esi <== NOT EXECUTED 10b195: 6a 00 push $0x0 <== NOT EXECUTED 10b197: 6a 02 push $0x2 <== NOT EXECUTED 10b199: 6a 03 push $0x3 <== NOT EXECUTED 10b19b: e8 74 04 00 00 call 10b614 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 10b1a0: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b1a3: f6 45 e0 01 testb $0x1,-0x20(%ebp) <== NOT EXECUTED 10b1a7: 75 27 jne 10b1d0 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 10b1a9: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b1ac: ff 73 10 pushl 0x10(%ebx) <== NOT EXECUTED 10b1af: ff 93 a0 00 00 00 call *0xa0(%ebx) <== NOT EXECUTED if (c != EOF) { 10b1b5: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b1b8: 83 f8 ff cmp $0xffffffff,%eax <== NOT EXECUTED 10b1bb: 74 d7 je 10b194 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 10b1bd: 88 45 e7 mov %al,-0x19(%ebp) <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 10b1c0: 50 push %eax <== NOT EXECUTED 10b1c1: 6a 01 push $0x1 <== NOT EXECUTED 10b1c3: 57 push %edi <== NOT EXECUTED 10b1c4: 53 push %ebx <== NOT EXECUTED 10b1c5: e8 ee e6 ff ff call 1098b8 <== NOT EXECUTED 10b1ca: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b1cd: eb c5 jmp 10b194 <== NOT EXECUTED 10b1cf: 90 nop <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { tty->rxTaskId = 0; 10b1d0: c7 83 c4 00 00 00 00 movl $0x0,0xc4(%ebx) <== NOT EXECUTED 10b1d7: 00 00 00 rtems_task_delete(RTEMS_SELF); 10b1da: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b1dd: 6a 00 push $0x0 <== NOT EXECUTED 10b1df: e8 c0 0d 00 00 call 10bfa4 <== NOT EXECUTED 10b1e4: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b1e7: eb ab jmp 10b194 <== NOT EXECUTED =============================================================================== 001095fc : * signal receive interrupt to rx daemon * NOTE: This routine runs in the context of the * device receive interrupt handler. */ void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { 1095fc: 55 push %ebp <== NOT EXECUTED 1095fd: 89 e5 mov %esp,%ebp <== NOT EXECUTED 1095ff: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 109602: 6a 02 push $0x2 <== NOT EXECUTED 109604: 8b 45 08 mov 0x8(%ebp),%eax <== NOT EXECUTED 109607: ff b0 c4 00 00 00 pushl 0xc4(%eax) <== NOT EXECUTED 10960d: e8 86 21 00 00 call 10b798 <== NOT EXECUTED 109612: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 109615: c9 leave <== NOT EXECUTED 109616: c3 ret <== NOT EXECUTED =============================================================================== 0010b114 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 10b114: 55 push %ebp <== NOT EXECUTED 10b115: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10b117: 56 push %esi <== NOT EXECUTED 10b118: 53 push %ebx <== NOT EXECUTED 10b119: 83 ec 10 sub $0x10,%esp <== NOT EXECUTED 10b11c: 8b 5d 08 mov 0x8(%ebp),%ebx <== NOT EXECUTED 10b11f: 8d 75 f4 lea -0xc(%ebp),%esi <== NOT EXECUTED 10b122: 66 90 xchg %ax,%ax <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 10b124: 56 push %esi <== NOT EXECUTED 10b125: 6a 00 push $0x0 <== NOT EXECUTED 10b127: 6a 02 push $0x2 <== NOT EXECUTED 10b129: 6a 03 push $0x3 <== NOT EXECUTED 10b12b: e8 e4 04 00 00 call 10b614 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 10b130: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b133: f6 45 f4 01 testb $0x1,-0xc(%ebp) <== NOT EXECUTED 10b137: 75 2b jne 10b164 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 10b139: 8b 83 cc 00 00 00 mov 0xcc(%ebx),%eax <== NOT EXECUTED 10b13f: c1 e0 05 shl $0x5,%eax <== NOT EXECUTED 10b142: 8b 80 14 90 12 00 mov 0x129014(%eax),%eax <== NOT EXECUTED 10b148: 85 c0 test %eax,%eax <== NOT EXECUTED 10b14a: 74 09 je 10b155 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 10b14c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b14f: 53 push %ebx <== NOT EXECUTED 10b150: ff d0 call *%eax <== NOT EXECUTED 10b152: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 10b155: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b158: 53 push %ebx <== NOT EXECUTED 10b159: e8 ba e4 ff ff call 109618 <== NOT EXECUTED 10b15e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b161: eb c1 jmp 10b124 <== NOT EXECUTED 10b163: 90 nop <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { tty->txTaskId = 0; 10b164: c7 83 c8 00 00 00 00 movl $0x0,0xc8(%ebx) <== NOT EXECUTED 10b16b: 00 00 00 rtems_task_delete(RTEMS_SELF); 10b16e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10b171: 6a 00 push $0x0 <== NOT EXECUTED 10b173: e8 2c 0e 00 00 call 10bfa4 <== NOT EXECUTED 10b178: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10b17b: eb a7 jmp 10b124 <== NOT EXECUTED =============================================================================== 0010a1f8 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 10a1f8: 55 push %ebp 10a1f9: 89 e5 mov %esp,%ebp 10a1fb: 57 push %edi 10a1fc: 56 push %esi 10a1fd: 53 push %ebx 10a1fe: 83 ec 20 sub $0x20,%esp 10a201: 8b 7d 08 mov 0x8(%ebp),%edi rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 10a204: 8b 07 mov (%edi),%eax 10a206: 8b 70 34 mov 0x34(%eax),%esi rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 10a209: 6a 00 push $0x0 10a20b: 6a 00 push $0x0 10a20d: ff 76 18 pushl 0x18(%esi) 10a210: e8 93 1a 00 00 call 10bca8 10a215: 89 45 e4 mov %eax,-0x1c(%ebp) if (sc != RTEMS_SUCCESSFUL) 10a218: 83 c4 10 add $0x10,%esp 10a21b: 85 c0 test %eax,%eax 10a21d: 75 29 jne 10a248 <== NEVER TAKEN return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 10a21f: 8b 86 cc 00 00 00 mov 0xcc(%esi),%eax 10a225: c1 e0 05 shl $0x5,%eax 10a228: 8b 80 0c 90 12 00 mov 0x12900c(%eax),%eax 10a22e: 85 c0 test %eax,%eax 10a230: 74 22 je 10a254 <== ALWAYS TAKEN sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 10a232: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10a235: 57 push %edi <== NOT EXECUTED 10a236: 56 push %esi <== NOT EXECUTED 10a237: ff d0 call *%eax <== NOT EXECUTED 10a239: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED rtems_semaphore_release (tty->osem); 10a23c: 5f pop %edi <== NOT EXECUTED 10a23d: ff 76 18 pushl 0x18(%esi) <== NOT EXECUTED 10a240: e8 5f 1b 00 00 call 10bda4 <== NOT EXECUTED return sc; 10a245: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; } 10a248: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10a24b: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10a24e: 5b pop %ebx <== NOT EXECUTED 10a24f: 5e pop %esi <== NOT EXECUTED 10a250: 5f pop %edi <== NOT EXECUTED 10a251: c9 leave <== NOT EXECUTED 10a252: c3 ret <== NOT EXECUTED 10a253: 90 nop <== NOT EXECUTED if (rtems_termios_linesw[tty->t_line].l_write != NULL) { sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 10a254: f6 46 34 01 testb $0x1,0x34(%esi) 10a258: 74 4e je 10a2a8 <== NEVER TAKEN uint32_t count = args->count; 10a25a: 8b 47 10 mov 0x10(%edi),%eax 10a25d: 89 45 e0 mov %eax,-0x20(%ebp) char *buffer = args->buffer; 10a260: 8b 47 0c mov 0xc(%edi),%eax while (count--) 10a263: 8b 5d e0 mov -0x20(%ebp),%ebx 10a266: 85 db test %ebx,%ebx 10a268: 74 56 je 10a2c0 <== NEVER TAKEN 10a26a: 31 db xor %ebx,%ebx 10a26c: 89 7d dc mov %edi,-0x24(%ebp) 10a26f: 89 c7 mov %eax,%edi 10a271: 8d 76 00 lea 0x0(%esi),%esi oproc (*buffer++, tty); 10a274: 0f b6 04 1f movzbl (%edi,%ebx,1),%eax 10a278: 89 f2 mov %esi,%edx 10a27a: e8 7d fa ff ff call 109cfc 10a27f: 43 inc %ebx return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a280: 3b 5d e0 cmp -0x20(%ebp),%ebx 10a283: 75 ef jne 10a274 10a285: 8b 7d dc mov -0x24(%ebp),%edi 10a288: 8b 47 10 mov 0x10(%edi),%eax oproc (*buffer++, tty); args->bytes_moved = args->count; 10a28b: 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); 10a28e: 83 ec 0c sub $0xc,%esp 10a291: ff 76 18 pushl 0x18(%esi) 10a294: e8 0b 1b 00 00 call 10bda4 return sc; 10a299: 83 c4 10 add $0x10,%esp } 10a29c: 8b 45 e4 mov -0x1c(%ebp),%eax 10a29f: 8d 65 f4 lea -0xc(%ebp),%esp 10a2a2: 5b pop %ebx 10a2a3: 5e pop %esi 10a2a4: 5f pop %edi 10a2a5: c9 leave 10a2a6: c3 ret 10a2a7: 90 nop while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 10a2a8: 51 push %ecx <== NOT EXECUTED 10a2a9: 56 push %esi <== NOT EXECUTED 10a2aa: ff 77 10 pushl 0x10(%edi) <== NOT EXECUTED 10a2ad: ff 77 0c pushl 0xc(%edi) <== NOT EXECUTED 10a2b0: e8 13 f9 ff ff call 109bc8 <== NOT EXECUTED args->bytes_moved = args->count; 10a2b5: 8b 47 10 mov 0x10(%edi),%eax <== NOT EXECUTED 10a2b8: 89 47 18 mov %eax,0x18(%edi) <== NOT EXECUTED 10a2bb: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a2be: eb ce jmp 10a28e <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 10a2c0: 31 c0 xor %eax,%eax <== NOT EXECUTED 10a2c2: eb c7 jmp 10a28b <== NOT EXECUTED =============================================================================== 00118fc0 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 118fc0: 55 push %ebp 118fc1: 89 e5 mov %esp,%ebp 118fc3: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 118fc6: 8d 45 f4 lea -0xc(%ebp),%eax 118fc9: 50 push %eax 118fca: ff 75 08 pushl 0x8(%ebp) 118fcd: 68 60 4b 14 00 push $0x144b60 118fd2: e8 01 2a 00 00 call 11b9d8 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 118fd7: 83 c4 10 add $0x10,%esp 118fda: 8b 55 f4 mov -0xc(%ebp),%edx 118fdd: 85 d2 test %edx,%edx 118fdf: 74 07 je 118fe8 118fe1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 118fe6: c9 leave 118fe7: c3 ret the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 118fe8: 83 78 38 04 cmpl $0x4,0x38(%eax) 118fec: 74 0f je 118ffd <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 118fee: 83 ec 0c sub $0xc,%esp 118ff1: 83 c0 10 add $0x10,%eax 118ff4: 50 push %eax 118ff5: e8 2e 47 00 00 call 11d728 <_Watchdog_Remove> 118ffa: 83 c4 10 add $0x10,%esp _Thread_Enable_dispatch(); 118ffd: e8 ba 32 00 00 call 11c2bc <_Thread_Enable_dispatch> 119002: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119004: c9 leave 119005: c3 ret =============================================================================== 0010c494 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { 10c494: 55 push %ebp 10c495: 89 e5 mov %esp,%ebp 10c497: 57 push %edi 10c498: 56 push %esi 10c499: 53 push %ebx 10c49a: 83 ec 0c sub $0xc,%esp 10c49d: 8b 5d 08 mov 0x8(%ebp),%ebx 10c4a0: 8b 75 0c mov 0xc(%ebp),%esi Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10c4a3: 85 db test %ebx,%ebx 10c4a5: 74 6d je 10c514 return RTEMS_INVALID_NAME; if ( !id ) 10c4a7: 85 f6 test %esi,%esi 10c4a9: 0f 84 89 00 00 00 je 10c538 10c4af: a1 b8 a7 12 00 mov 0x12a7b8,%eax 10c4b4: 40 inc %eax 10c4b5: a3 b8 a7 12 00 mov %eax,0x12a7b8 * 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 ); 10c4ba: 83 ec 0c sub $0xc,%esp 10c4bd: 68 20 b2 12 00 push $0x12b220 10c4c2: e8 cd 0e 00 00 call 10d394 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { 10c4c7: 83 c4 10 add $0x10,%esp 10c4ca: 85 c0 test %eax,%eax 10c4cc: 74 56 je 10c524 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; 10c4ce: 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; 10c4d5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10c4dc: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10c4e3: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10c4ea: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10c4f1: 8b 50 08 mov 0x8(%eax),%edx 10c4f4: 0f b7 fa movzwl %dx,%edi 10c4f7: 8b 0d 3c b2 12 00 mov 0x12b23c,%ecx 10c4fd: 89 04 b9 mov %eax,(%ecx,%edi,4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 10c500: 89 58 0c mov %ebx,0xc(%eax) &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; 10c503: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10c505: e8 ae 1b 00 00 call 10e0b8 <_Thread_Enable_dispatch> 10c50a: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; } 10c50c: 8d 65 f4 lea -0xc(%ebp),%esp 10c50f: 5b pop %ebx 10c510: 5e pop %esi 10c511: 5f pop %edi 10c512: c9 leave 10c513: c3 ret rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) 10c514: b8 03 00 00 00 mov $0x3,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c519: 8d 65 f4 lea -0xc(%ebp),%esp 10c51c: 5b pop %ebx 10c51d: 5e pop %esi 10c51e: 5f pop %edi 10c51f: c9 leave 10c520: c3 ret 10c521: 8d 76 00 lea 0x0(%esi),%esi _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); 10c524: e8 8f 1b 00 00 call 10e0b8 <_Thread_Enable_dispatch> 10c529: b8 05 00 00 00 mov $0x5,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c52e: 8d 65 f4 lea -0xc(%ebp),%esp 10c531: 5b pop %ebx 10c532: 5e pop %esi 10c533: 5f pop %edi 10c534: c9 leave 10c535: c3 ret 10c536: 66 90 xchg %ax,%ax Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) 10c538: b8 09 00 00 00 mov $0x9,%eax ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 10c53d: 8d 65 f4 lea -0xc(%ebp),%esp 10c540: 5b pop %ebx 10c541: 5e pop %esi 10c542: 5f pop %edi 10c543: c9 leave 10c544: c3 ret =============================================================================== 001190bc : */ rtems_status_code rtems_timer_delete( rtems_id id ) { 1190bc: 55 push %ebp 1190bd: 89 e5 mov %esp,%ebp 1190bf: 53 push %ebx 1190c0: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 1190c3: 8d 45 f4 lea -0xc(%ebp),%eax 1190c6: 50 push %eax 1190c7: ff 75 08 pushl 0x8(%ebp) 1190ca: 68 60 4b 14 00 push $0x144b60 1190cf: e8 04 29 00 00 call 11b9d8 <_Objects_Get> 1190d4: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1190d6: 83 c4 10 add $0x10,%esp 1190d9: 8b 4d f4 mov -0xc(%ebp),%ecx 1190dc: 85 c9 test %ecx,%ecx 1190de: 75 38 jne 119118 case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); 1190e0: 83 ec 08 sub $0x8,%esp 1190e3: 50 push %eax 1190e4: 68 60 4b 14 00 push $0x144b60 1190e9: e8 7a 24 00 00 call 11b568 <_Objects_Close> (void) _Watchdog_Remove( &the_timer->Ticker ); 1190ee: 8d 43 10 lea 0x10(%ebx),%eax 1190f1: 89 04 24 mov %eax,(%esp) 1190f4: e8 2f 46 00 00 call 11d728 <_Watchdog_Remove> */ RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 1190f9: 58 pop %eax 1190fa: 5a pop %edx 1190fb: 53 push %ebx 1190fc: 68 60 4b 14 00 push $0x144b60 119101: e8 66 27 00 00 call 11b86c <_Objects_Free> _Timer_Free( the_timer ); _Thread_Enable_dispatch(); 119106: e8 b1 31 00 00 call 11c2bc <_Thread_Enable_dispatch> 11910b: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 11910d: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119110: 8b 5d fc mov -0x4(%ebp),%ebx 119113: c9 leave 119114: c3 ret 119115: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119118: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11911d: 8b 5d fc mov -0x4(%ebp),%ebx 119120: c9 leave 119121: c3 ret =============================================================================== 0010c548 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10c548: 55 push %ebp 10c549: 89 e5 mov %esp,%ebp 10c54b: 57 push %edi 10c54c: 56 push %esi 10c54d: 53 push %ebx 10c54e: 83 ec 2c sub $0x2c,%esp 10c551: 8b 5d 0c mov 0xc(%ebp),%ebx 10c554: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c557: 85 db test %ebx,%ebx 10c559: 0f 84 99 00 00 00 je 10c5f8 return RTEMS_INVALID_NUMBER; if ( !routine ) 10c55f: 85 f6 test %esi,%esi 10c561: 0f 84 b1 00 00 00 je 10c618 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 10c567: 57 push %edi 10c568: 8d 45 e4 lea -0x1c(%ebp),%eax 10c56b: 50 push %eax 10c56c: ff 75 08 pushl 0x8(%ebp) 10c56f: 68 20 b2 12 00 push $0x12b220 10c574: e8 cb 12 00 00 call 10d844 <_Objects_Get> 10c579: 89 c7 mov %eax,%edi return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10c57b: 83 c4 10 add $0x10,%esp 10c57e: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c581: 85 c9 test %ecx,%ecx 10c583: 74 0f je 10c594 10c585: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c58a: 8d 65 f4 lea -0xc(%ebp),%esp 10c58d: 5b pop %ebx 10c58e: 5e pop %esi 10c58f: 5f pop %edi 10c590: c9 leave 10c591: c3 ret 10c592: 66 90 xchg %ax,%ax the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10c594: 8d 50 10 lea 0x10(%eax),%edx 10c597: 83 ec 0c sub $0xc,%esp 10c59a: 52 push %edx 10c59b: 89 55 d4 mov %edx,-0x2c(%ebp) 10c59e: e8 c1 2b 00 00 call 10f164 <_Watchdog_Remove> _ISR_Disable( level ); 10c5a3: 9c pushf 10c5a4: fa cli 10c5a5: 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 ) { 10c5a6: 83 c4 10 add $0x10,%esp 10c5a9: 8b 57 18 mov 0x18(%edi),%edx 10c5ac: 85 d2 test %edx,%edx 10c5ae: 8b 55 d4 mov -0x2c(%ebp),%edx 10c5b1: 75 55 jne 10c608 /* * 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; 10c5b3: 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; 10c5ba: c7 47 18 00 00 00 00 movl $0x0,0x18(%edi) the_watchdog->routine = routine; 10c5c1: 89 77 2c mov %esi,0x2c(%edi) the_watchdog->id = id; 10c5c4: 8b 4d 08 mov 0x8(%ebp),%ecx 10c5c7: 89 4f 30 mov %ecx,0x30(%edi) the_watchdog->user_data = user_data; 10c5ca: 8b 4d 14 mov 0x14(%ebp),%ecx 10c5cd: 89 4f 34 mov %ecx,0x34(%edi) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10c5d0: 50 push %eax 10c5d1: 9d popf Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10c5d2: 89 5f 1c mov %ebx,0x1c(%edi) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10c5d5: 83 ec 08 sub $0x8,%esp 10c5d8: 52 push %edx 10c5d9: 68 98 a8 12 00 push $0x12a898 10c5de: e8 49 2a 00 00 call 10f02c <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10c5e3: e8 d0 1a 00 00 call 10e0b8 <_Thread_Enable_dispatch> 10c5e8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c5ea: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c5ed: 8d 65 f4 lea -0xc(%ebp),%esp 10c5f0: 5b pop %ebx 10c5f1: 5e pop %esi 10c5f2: 5f pop %edi 10c5f3: c9 leave 10c5f4: c3 ret 10c5f5: 8d 76 00 lea 0x0(%esi),%esi { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 10c5f8: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 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 * 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 ); 10c608: 50 push %eax 10c609: 9d popf _Thread_Enable_dispatch(); 10c60a: e8 a9 1a 00 00 call 10e0b8 <_Thread_Enable_dispatch> 10c60f: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 10c611: e9 74 ff ff ff jmp 10c58a 10c616: 66 90 xchg %ax,%ax ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) 10c618: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10c61d: 8d 65 f4 lea -0xc(%ebp),%esp 10c620: 5b pop %ebx 10c621: 5e pop %esi 10c622: 5f pop %edi 10c623: c9 leave 10c624: c3 ret =============================================================================== 00119204 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 119204: 55 push %ebp 119205: 89 e5 mov %esp,%ebp 119207: 57 push %edi 119208: 56 push %esi 119209: 53 push %ebx 11920a: 83 ec 2c sub $0x2c,%esp 11920d: 8b 75 08 mov 0x8(%ebp),%esi 119210: 8b 7d 0c mov 0xc(%ebp),%edi 119213: 8b 5d 10 mov 0x10(%ebp),%ebx Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 119216: 80 3d 0c 41 14 00 00 cmpb $0x0,0x14410c 11921d: 75 0d jne 11922c 11921f: b8 0b 00 00 00 mov $0xb,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119224: 8d 65 f4 lea -0xc(%ebp),%esp 119227: 5b pop %ebx 119228: 5e pop %esi 119229: 5f pop %edi 11922a: c9 leave 11922b: c3 ret rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 11922c: 83 ec 0c sub $0xc,%esp 11922f: 57 push %edi 119230: e8 67 d4 ff ff call 11669c <_TOD_Validate> 119235: 83 c4 10 add $0x10,%esp 119238: 84 c0 test %al,%al 11923a: 74 1e je 11925a return RTEMS_INVALID_CLOCK; if ( !routine ) 11923c: 85 db test %ebx,%ebx 11923e: 0f 84 a4 00 00 00 je 1192e8 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 119244: 83 ec 0c sub $0xc,%esp 119247: 57 push %edi 119248: e8 c3 d3 ff ff call 116610 <_TOD_To_seconds> 11924d: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 11924f: 83 c4 10 add $0x10,%esp 119252: 3b 05 8c 41 14 00 cmp 0x14418c,%eax 119258: 77 0e ja 119268 _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 11925a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11925f: 8d 65 f4 lea -0xc(%ebp),%esp 119262: 5b pop %ebx 119263: 5e pop %esi 119264: 5f pop %edi 119265: c9 leave 119266: c3 ret 119267: 90 nop 119268: 50 push %eax 119269: 8d 45 e4 lea -0x1c(%ebp),%eax 11926c: 50 push %eax 11926d: 56 push %esi 11926e: 68 60 4b 14 00 push $0x144b60 119273: e8 60 27 00 00 call 11b9d8 <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119278: 83 c4 10 add $0x10,%esp 11927b: 8b 4d e4 mov -0x1c(%ebp),%ecx 11927e: 85 c9 test %ecx,%ecx 119280: 75 5a jne 1192dc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 119282: 8d 48 10 lea 0x10(%eax),%ecx 119285: 83 ec 0c sub $0xc,%esp 119288: 51 push %ecx 119289: 89 45 d4 mov %eax,-0x2c(%ebp) 11928c: 89 4d d0 mov %ecx,-0x30(%ebp) 11928f: e8 94 44 00 00 call 11d728 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY; 119294: 8b 55 d4 mov -0x2c(%ebp),%edx 119297: 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; 11929e: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 1192a5: 89 5a 2c mov %ebx,0x2c(%edx) the_watchdog->id = id; 1192a8: 89 72 30 mov %esi,0x30(%edx) the_watchdog->user_data = user_data; 1192ab: 8b 45 14 mov 0x14(%ebp),%eax 1192ae: 89 42 34 mov %eax,0x34(%edx) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 1192b1: 2b 3d 8c 41 14 00 sub 0x14418c,%edi 1192b7: 89 7a 1c mov %edi,0x1c(%edx) _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 1192ba: 58 pop %eax 1192bb: 5a pop %edx 1192bc: 8b 4d d0 mov -0x30(%ebp),%ecx 1192bf: 51 push %ecx 1192c0: 68 cc 41 14 00 push $0x1441cc 1192c5: e8 26 43 00 00 call 11d5f0 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 1192ca: e8 ed 2f 00 00 call 11c2bc <_Thread_Enable_dispatch> 1192cf: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1192d1: 83 c4 10 add $0x10,%esp 1192d4: e9 4b ff ff ff jmp 119224 1192d9: 8d 76 00 lea 0x0(%esi),%esi seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1192dc: b8 04 00 00 00 mov $0x4,%eax 1192e1: e9 3e ff ff ff jmp 119224 1192e6: 66 90 xchg %ax,%ax return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) 1192e8: b8 09 00 00 00 mov $0x9,%eax 1192ed: e9 32 ff ff ff jmp 119224 =============================================================================== 00119604 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 119604: 55 push %ebp 119605: 89 e5 mov %esp,%ebp 119607: 56 push %esi 119608: 53 push %ebx 119609: 83 ec 10 sub $0x10,%esp 11960c: 8b 45 08 mov 0x8(%ebp),%eax 11960f: 85 c0 test %eax,%eax 119611: 75 0d jne 119620 if (status) { initialized = false; } #endif return status; 119613: b8 13 00 00 00 mov $0x13,%eax } 119618: 8d 65 f8 lea -0x8(%ebp),%esp 11961b: 5b pop %ebx 11961c: 5e pop %esi 11961d: c9 leave 11961e: c3 ret 11961f: 90 nop 119620: 0f b6 15 f4 ba 13 00 movzbl 0x13baf4,%edx 119627: 39 d0 cmp %edx,%eax 119629: 76 35 jbe 119660 * 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 ) 11962b: 40 inc %eax 11962c: 75 e5 jne 119613 11962e: 31 f6 xor %esi,%esi 119630: 8b 15 f8 40 14 00 mov 0x1440f8,%edx 119636: 42 inc %edx 119637: 89 15 f8 40 14 00 mov %edx,0x1440f8 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 11963d: 8a 1d 80 f9 13 00 mov 0x13f980,%bl initialized = true; 119643: c6 05 80 f9 13 00 01 movb $0x1,0x13f980 _Thread_Enable_dispatch(); 11964a: e8 6d 2c 00 00 call 11c2bc <_Thread_Enable_dispatch> if ( tmpInitialized ) 11964f: 84 db test %bl,%bl 119651: 74 11 je 119664 119653: b8 0e 00 00 00 mov $0xe,%eax initialized = false; } #endif return status; } 119658: 8d 65 f8 lea -0x8(%ebp),%esp 11965b: 5b pop %ebx 11965c: 5e pop %esi 11965d: c9 leave 11965e: c3 ret 11965f: 90 nop 119660: 89 c6 mov %eax,%esi 119662: eb cc jmp 119630 * 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( 119664: 83 ec 08 sub $0x8,%esp 119667: 8d 45 f4 lea -0xc(%ebp),%eax 11966a: 50 push %eax 11966b: 8b 45 10 mov 0x10(%ebp),%eax 11966e: 80 cc 80 or $0x80,%ah 119671: 50 push %eax 119672: 68 00 01 00 00 push $0x100 119677: ff 75 0c pushl 0xc(%ebp) 11967a: 56 push %esi 11967b: 68 45 4d 49 54 push $0x54494d45 119680: e8 87 f0 ff ff call 11870c /* 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) { 119685: 83 c4 20 add $0x20,%esp 119688: 85 c0 test %eax,%eax 11968a: 74 10 je 11969c initialized = false; 11968c: c6 05 80 f9 13 00 00 movb $0x0,0x13f980 initialized = false; } #endif return status; } 119693: 8d 65 f8 lea -0x8(%ebp),%esp 119696: 5b pop %ebx 119697: 5e pop %esi 119698: c9 leave 119699: c3 ret 11969a: 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) 11969c: 8b 45 f4 mov -0xc(%ebp),%eax /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 11969f: 0f b7 c8 movzwl %ax,%ecx 1196a2: 8b 15 9c 40 14 00 mov 0x14409c,%edx 1196a8: 8b 14 8a mov (%edx,%ecx,4),%edx 1196ab: 89 15 a0 f9 13 00 mov %edx,0x13f9a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1196b1: c7 05 d0 f9 13 00 d4 movl $0x13f9d4,0x13f9d0 1196b8: f9 13 00 the_chain->permanent_null = NULL; 1196bb: c7 05 d4 f9 13 00 00 movl $0x0,0x13f9d4 1196c2: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1196c5: c7 05 d8 f9 13 00 d0 movl $0x13f9d0,0x13f9d8 1196cc: f9 13 00 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1196cf: c7 05 08 fa 13 00 0c movl $0x13fa0c,0x13fa08 1196d6: fa 13 00 the_chain->permanent_null = NULL; 1196d9: c7 05 0c fa 13 00 00 movl $0x0,0x13fa0c 1196e0: 00 00 00 the_chain->last = _Chain_Head(the_chain); 1196e3: c7 05 10 fa 13 00 08 movl $0x13fa08,0x13fa10 1196ea: fa 13 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 1196ed: c7 05 b0 f9 13 00 00 movl $0x0,0x13f9b0 1196f4: 00 00 00 the_watchdog->routine = routine; 1196f7: c7 05 c4 f9 13 00 24 movl $0x11c124,0x13f9c4 1196fe: c1 11 00 the_watchdog->id = id; 119701: a3 c8 f9 13 00 mov %eax,0x13f9c8 the_watchdog->user_data = user_data; 119706: c7 05 cc f9 13 00 00 movl $0x0,0x13f9cc 11970d: 00 00 00 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 119710: c7 05 e8 f9 13 00 00 movl $0x0,0x13f9e8 119717: 00 00 00 the_watchdog->routine = routine; 11971a: c7 05 fc f9 13 00 24 movl $0x11c124,0x13f9fc 119721: c1 11 00 the_watchdog->id = id; 119724: a3 00 fa 13 00 mov %eax,0x13fa00 the_watchdog->user_data = user_data; 119729: c7 05 04 fa 13 00 00 movl $0x0,0x13fa04 119730: 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; 119733: c7 05 a4 f9 13 00 d8 movl $0x1199d8,0x13f9a4 11973a: 99 11 00 ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 11973d: 8b 15 64 42 14 00 mov 0x144264,%edx 119743: 89 15 dc f9 13 00 mov %edx,0x13f9dc ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 119749: 8b 15 8c 41 14 00 mov 0x14418c,%edx 11974f: 89 15 14 fa 13 00 mov %edx,0x13fa14 ts->insert_chain = NULL; 119755: c7 05 18 fa 13 00 00 movl $0x0,0x13fa18 11975c: 00 00 00 ts->active = false; 11975f: c6 05 1c fa 13 00 00 movb $0x0,0x13fa1c /* * The default timer server is now available. */ _Timer_server = ts; 119766: c7 05 a0 4b 14 00 a0 movl $0x13f9a0,0x144ba0 11976d: f9 13 00 /* * Start the timer server */ status = rtems_task_start( 119770: 52 push %edx 119771: 68 a0 f9 13 00 push $0x13f9a0 119776: 68 2c 98 11 00 push $0x11982c 11977b: 50 push %eax 11977c: e8 23 f6 ff ff call 118da4 if (status) { initialized = false; } #endif return status; 119781: 83 c4 10 add $0x10,%esp 119784: e9 8f fe ff ff jmp 119618 =============================================================================== 0011937c : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 11937c: 55 push %ebp 11937d: 89 e5 mov %esp,%ebp 11937f: 56 push %esi 119380: 53 push %ebx 119381: 83 ec 24 sub $0x24,%esp 119384: 8d 45 f4 lea -0xc(%ebp),%eax 119387: 50 push %eax 119388: ff 75 08 pushl 0x8(%ebp) 11938b: 68 60 4b 14 00 push $0x144b60 119390: e8 43 26 00 00 call 11b9d8 <_Objects_Get> 119395: 89 c3 mov %eax,%ebx Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119397: 83 c4 10 add $0x10,%esp 11939a: 8b 45 f4 mov -0xc(%ebp),%eax 11939d: 85 c0 test %eax,%eax 11939f: 74 0f je 1193b0 1193a1: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1193a6: 8d 65 f8 lea -0x8(%ebp),%esp 1193a9: 5b pop %ebx 1193aa: 5e pop %esi 1193ab: c9 leave 1193ac: c3 ret 1193ad: 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 ) { 1193b0: 8b 43 38 mov 0x38(%ebx),%eax 1193b3: 85 c0 test %eax,%eax 1193b5: 74 1d je 1193d4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1193b7: 48 dec %eax 1193b8: 74 3a je 1193f4 1193ba: b8 0b 00 00 00 mov $0xb,%eax * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 1193bf: 89 45 e4 mov %eax,-0x1c(%ebp) 1193c2: e8 f5 2e 00 00 call 11c2bc <_Thread_Enable_dispatch> 1193c7: 8b 45 e4 mov -0x1c(%ebp),%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1193ca: 8d 65 f8 lea -0x8(%ebp),%esp 1193cd: 5b pop %ebx 1193ce: 5e pop %esi 1193cf: c9 leave 1193d0: c3 ret 1193d1: 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 ); 1193d4: 83 c3 10 add $0x10,%ebx 1193d7: 83 ec 0c sub $0xc,%esp 1193da: 53 push %ebx 1193db: e8 48 43 00 00 call 11d728 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 1193e0: 59 pop %ecx 1193e1: 5e pop %esi 1193e2: 53 push %ebx 1193e3: 68 d8 41 14 00 push $0x1441d8 1193e8: e8 03 42 00 00 call 11d5f0 <_Watchdog_Insert> 1193ed: 31 c0 xor %eax,%eax 1193ef: 83 c4 10 add $0x10,%esp 1193f2: eb cb jmp 1193bf } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 1193f4: 8b 35 a0 4b 14 00 mov 0x144ba0,%esi if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 1193fa: 83 ec 0c sub $0xc,%esp 1193fd: 8d 43 10 lea 0x10(%ebx),%eax 119400: 50 push %eax 119401: e8 22 43 00 00 call 11d728 <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 119406: 58 pop %eax 119407: 5a pop %edx 119408: 53 push %ebx 119409: 56 push %esi 11940a: ff 56 04 call *0x4(%esi) 11940d: 31 c0 xor %eax,%eax 11940f: 83 c4 10 add $0x10,%esp 119412: eb ab jmp 1193bf =============================================================================== 00119414 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 119414: 55 push %ebp 119415: 89 e5 mov %esp,%ebp 119417: 57 push %edi 119418: 56 push %esi 119419: 53 push %ebx 11941a: 83 ec 2c sub $0x2c,%esp 11941d: 8b 7d 0c mov 0xc(%ebp),%edi 119420: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 119423: 8b 1d a0 4b 14 00 mov 0x144ba0,%ebx if ( !timer_server ) 119429: 85 db test %ebx,%ebx 11942b: 0f 84 9f 00 00 00 je 1194d0 return RTEMS_INCORRECT_STATE; if ( !routine ) 119431: 85 f6 test %esi,%esi 119433: 0f 84 a3 00 00 00 je 1194dc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 119439: 85 ff test %edi,%edi 11943b: 75 0f jne 11944c 11943d: b8 0a 00 00 00 mov $0xa,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 119442: 8d 65 f4 lea -0xc(%ebp),%esp 119445: 5b pop %ebx 119446: 5e pop %esi 119447: 5f pop %edi 119448: c9 leave 119449: c3 ret 11944a: 66 90 xchg %ax,%ax 11944c: 52 push %edx 11944d: 8d 45 e4 lea -0x1c(%ebp),%eax 119450: 50 push %eax 119451: ff 75 08 pushl 0x8(%ebp) 119454: 68 60 4b 14 00 push $0x144b60 119459: e8 7a 25 00 00 call 11b9d8 <_Objects_Get> 11945e: 89 c2 mov %eax,%edx if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119460: 83 c4 10 add $0x10,%esp 119463: 8b 45 e4 mov -0x1c(%ebp),%eax 119466: 85 c0 test %eax,%eax 119468: 75 56 jne 1194c0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11946a: 83 ec 0c sub $0xc,%esp 11946d: 8d 42 10 lea 0x10(%edx),%eax 119470: 50 push %eax 119471: 89 55 d4 mov %edx,-0x2c(%ebp) 119474: e8 af 42 00 00 call 11d728 <_Watchdog_Remove> _ISR_Disable( level ); 119479: 9c pushf 11947a: fa cli 11947b: 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 ) { 11947c: 83 c4 10 add $0x10,%esp 11947f: 8b 55 d4 mov -0x2c(%ebp),%edx 119482: 8b 4a 18 mov 0x18(%edx),%ecx 119485: 85 c9 test %ecx,%ecx 119487: 75 5f jne 1194e8 /* * 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; 119489: 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; 119490: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 119497: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 11949a: 8b 4d 08 mov 0x8(%ebp),%ecx 11949d: 89 4a 30 mov %ecx,0x30(%edx) the_watchdog->user_data = user_data; 1194a0: 8b 4d 14 mov 0x14(%ebp),%ecx 1194a3: 89 4a 34 mov %ecx,0x34(%edx) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 1194a6: 89 7a 1c mov %edi,0x1c(%edx) _ISR_Enable( level ); 1194a9: 50 push %eax 1194aa: 9d popf (*timer_server->schedule_operation)( timer_server, the_timer ); 1194ab: 83 ec 08 sub $0x8,%esp 1194ae: 52 push %edx 1194af: 53 push %ebx 1194b0: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1194b3: e8 04 2e 00 00 call 11c2bc <_Thread_Enable_dispatch> 1194b8: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1194ba: 83 c4 10 add $0x10,%esp 1194bd: eb 83 jmp 119442 1194bf: 90 nop if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1194c0: b8 04 00 00 00 mov $0x4,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1194c5: 8d 65 f4 lea -0xc(%ebp),%esp 1194c8: 5b pop %ebx 1194c9: 5e pop %esi 1194ca: 5f pop %edi 1194cb: c9 leave 1194cc: c3 ret 1194cd: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1194d0: b8 0e 00 00 00 mov $0xe,%eax 1194d5: e9 68 ff ff ff jmp 119442 1194da: 66 90 xchg %ax,%ax return RTEMS_INCORRECT_STATE; if ( !routine ) 1194dc: b8 09 00 00 00 mov $0x9,%eax 1194e1: e9 5c ff ff ff jmp 119442 1194e6: 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 ); 1194e8: 50 push %eax 1194e9: 9d popf _Thread_Enable_dispatch(); 1194ea: e8 cd 2d 00 00 call 11c2bc <_Thread_Enable_dispatch> 1194ef: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1194f1: e9 4c ff ff ff jmp 119442 =============================================================================== 001194f8 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 1194f8: 55 push %ebp 1194f9: 89 e5 mov %esp,%ebp 1194fb: 57 push %edi 1194fc: 56 push %esi 1194fd: 53 push %ebx 1194fe: 83 ec 2c sub $0x2c,%esp 119501: 8b 7d 0c mov 0xc(%ebp),%edi 119504: 8b 75 10 mov 0x10(%ebp),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 119507: 8b 1d a0 4b 14 00 mov 0x144ba0,%ebx if ( !timer_server ) 11950d: 85 db test %ebx,%ebx 11950f: 0f 84 d7 00 00 00 je 1195ec return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 119515: 80 3d 0c 41 14 00 00 cmpb $0x0,0x14410c 11951c: 0f 84 aa 00 00 00 je 1195cc <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) 119522: 85 f6 test %esi,%esi 119524: 0f 84 b2 00 00 00 je 1195dc return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 11952a: 83 ec 0c sub $0xc,%esp 11952d: 57 push %edi 11952e: e8 69 d1 ff ff call 11669c <_TOD_Validate> 119533: 83 c4 10 add $0x10,%esp 119536: 84 c0 test %al,%al 119538: 75 0e jne 119548 the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 11953a: b8 14 00 00 00 mov $0x14,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 11953f: 8d 65 f4 lea -0xc(%ebp),%esp 119542: 5b pop %ebx 119543: 5e pop %esi 119544: 5f pop %edi 119545: c9 leave 119546: c3 ret 119547: 90 nop return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 119548: 83 ec 0c sub $0xc,%esp 11954b: 57 push %edi 11954c: e8 bf d0 ff ff call 116610 <_TOD_To_seconds> 119551: 89 c7 mov %eax,%edi if ( seconds <= _TOD_Seconds_since_epoch() ) 119553: 83 c4 10 add $0x10,%esp 119556: 3b 05 8c 41 14 00 cmp 0x14418c,%eax 11955c: 76 dc jbe 11953a 11955e: 52 push %edx 11955f: 8d 45 e4 lea -0x1c(%ebp),%eax 119562: 50 push %eax 119563: ff 75 08 pushl 0x8(%ebp) 119566: 68 60 4b 14 00 push $0x144b60 11956b: e8 68 24 00 00 call 11b9d8 <_Objects_Get> 119570: 89 c2 mov %eax,%edx return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 119572: 83 c4 10 add $0x10,%esp 119575: 8b 45 e4 mov -0x1c(%ebp),%eax 119578: 85 c0 test %eax,%eax 11957a: 75 7c jne 1195f8 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 11957c: 83 ec 0c sub $0xc,%esp 11957f: 8d 42 10 lea 0x10(%edx),%eax 119582: 50 push %eax 119583: 89 55 d4 mov %edx,-0x2c(%ebp) 119586: e8 9d 41 00 00 call 11d728 <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 11958b: 8b 55 d4 mov -0x2c(%ebp),%edx 11958e: 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; 119595: c7 42 18 00 00 00 00 movl $0x0,0x18(%edx) the_watchdog->routine = routine; 11959c: 89 72 2c mov %esi,0x2c(%edx) the_watchdog->id = id; 11959f: 8b 45 08 mov 0x8(%ebp),%eax 1195a2: 89 42 30 mov %eax,0x30(%edx) the_watchdog->user_data = user_data; 1195a5: 8b 45 14 mov 0x14(%ebp),%eax 1195a8: 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(); 1195ab: 2b 3d 8c 41 14 00 sub 0x14418c,%edi 1195b1: 89 7a 1c mov %edi,0x1c(%edx) (*timer_server->schedule_operation)( timer_server, the_timer ); 1195b4: 58 pop %eax 1195b5: 59 pop %ecx 1195b6: 52 push %edx 1195b7: 53 push %ebx 1195b8: ff 53 04 call *0x4(%ebx) _Thread_Enable_dispatch(); 1195bb: e8 fc 2c 00 00 call 11c2bc <_Thread_Enable_dispatch> 1195c0: 31 c0 xor %eax,%eax return RTEMS_SUCCESSFUL; 1195c2: 83 c4 10 add $0x10,%esp 1195c5: e9 75 ff ff ff jmp 11953f 1195ca: 66 90 xchg %ax,%ax Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 1195cc: b8 0b 00 00 00 mov $0xb,%eax <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1195d1: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1195d4: 5b pop %ebx <== NOT EXECUTED 1195d5: 5e pop %esi <== NOT EXECUTED 1195d6: 5f pop %edi <== NOT EXECUTED 1195d7: c9 leave <== NOT EXECUTED 1195d8: c3 ret <== NOT EXECUTED 1195d9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) 1195dc: b8 09 00 00 00 mov $0x9,%eax case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1195e1: 8d 65 f4 lea -0xc(%ebp),%esp 1195e4: 5b pop %ebx 1195e5: 5e pop %esi 1195e6: 5f pop %edi 1195e7: c9 leave 1195e8: c3 ret 1195e9: 8d 76 00 lea 0x0(%esi),%esi Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) 1195ec: b8 0e 00 00 00 mov $0xe,%eax 1195f1: e9 49 ff ff ff jmp 11953f 1195f6: 66 90 xchg %ax,%ax seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 1195f8: b8 04 00 00 00 mov $0x4,%eax 1195fd: e9 3d ff ff ff jmp 11953f =============================================================================== 0010cc2c : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 10cc2c: 55 push %ebp <== NOT EXECUTED 10cc2d: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10cc2f: 57 push %edi <== NOT EXECUTED 10cc30: 56 push %esi <== NOT EXECUTED 10cc31: 53 push %ebx <== NOT EXECUTED 10cc32: 83 ec 1c sub $0x1c,%esp <== NOT EXECUTED 10cc35: 89 c3 mov %eax,%ebx <== NOT EXECUTED 10cc37: 89 d6 mov %edx,%esi <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 10cc39: 25 00 00 00 20 and $0x20000000,%eax <== NOT EXECUTED 10cc3e: 89 45 e0 mov %eax,-0x20(%ebp) <== NOT EXECUTED 10cc41: 74 2b je 10cc6e <== NOT EXECUTED { if (rtems_panic_in_progress++) 10cc43: 8b 15 20 fb 12 00 mov 0x12fb20,%edx <== NOT EXECUTED 10cc49: 8d 42 01 lea 0x1(%edx),%eax <== NOT EXECUTED 10cc4c: a3 20 fb 12 00 mov %eax,0x12fb20 <== NOT EXECUTED 10cc51: 85 d2 test %edx,%edx <== NOT EXECUTED 10cc53: 74 10 je 10cc65 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10cc55: a1 98 fc 12 00 mov 0x12fc98,%eax <== NOT EXECUTED 10cc5a: 40 inc %eax <== NOT EXECUTED 10cc5b: a3 98 fc 12 00 mov %eax,0x12fc98 <== NOT EXECUTED RTEMS_COMPILER_MEMORY_BARRIER(); 10cc60: a1 20 fb 12 00 mov 0x12fb20,%eax <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 10cc65: 83 f8 02 cmp $0x2,%eax <== NOT EXECUTED 10cc68: 0f 8f e6 00 00 00 jg 10cd54 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 10cc6e: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cc71: a1 c0 d8 12 00 mov 0x12d8c0,%eax <== NOT EXECUTED 10cc76: ff 70 08 pushl 0x8(%eax) <== NOT EXECUTED 10cc79: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 10cc7c: e8 27 d8 00 00 call 11a4a8 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 10cc81: 89 d8 mov %ebx,%eax <== NOT EXECUTED 10cc83: 25 ff ff ff 8f and $0x8fffffff,%eax <== NOT EXECUTED 10cc88: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 10cc8b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cc8e: f7 c3 00 00 00 40 test $0x40000000,%ebx <== NOT EXECUTED 10cc94: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10cc97: 0f 85 d7 00 00 00 jne 10cd74 <== NOT EXECUTED 10cc9d: 31 ff xor %edi,%edi <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 10cc9f: 52 push %edx <== NOT EXECUTED 10cca0: 51 push %ecx <== NOT EXECUTED 10cca1: 56 push %esi <== NOT EXECUTED 10cca2: a1 c0 d8 12 00 mov 0x12d8c0,%eax <== NOT EXECUTED 10cca7: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10ccaa: e8 e5 32 01 00 call 11ff94 <== NOT EXECUTED 10ccaf: 89 c6 mov %eax,%esi <== NOT EXECUTED if (status) 10ccb1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ccb4: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10ccb7: 85 c0 test %eax,%eax <== NOT EXECUTED 10ccb9: 0f 85 c9 00 00 00 jne 10cd88 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 10ccbf: 83 ff 00 cmp $0x0,%edi <== NOT EXECUTED 10ccc2: 74 30 je 10ccf4 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 10ccc4: 7e 15 jle 10ccdb <== NOT EXECUTED 10ccc6: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10ccc9: 57 push %edi <== NOT EXECUTED 10ccca: e8 9d e2 00 00 call 11af6c <== NOT EXECUTED 10cccf: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10ccd2: 80 38 00 cmpb $0x0,(%eax) <== NOT EXECUTED 10ccd5: 0f 85 d9 00 00 00 jne 10cdb4 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 10ccdb: 51 push %ecx <== NOT EXECUTED 10ccdc: 57 push %edi <== NOT EXECUTED 10ccdd: 68 a9 82 12 00 push $0x1282a9 <== NOT EXECUTED 10cce2: a1 c0 d8 12 00 mov 0x12d8c0,%eax <== NOT EXECUTED 10cce7: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10ccea: e8 01 db 00 00 call 11a7f0 <== NOT EXECUTED 10ccef: 01 c6 add %eax,%esi <== NOT EXECUTED 10ccf1: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 10ccf4: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10ccf7: 68 8b 75 12 00 push $0x12758b <== NOT EXECUTED 10ccfc: a1 c0 d8 12 00 mov 0x12d8c0,%eax <== NOT EXECUTED 10cd01: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cd04: e8 e7 da 00 00 call 11a7f0 <== NOT EXECUTED 10cd09: 89 45 e4 mov %eax,-0x1c(%ebp) <== NOT EXECUTED (void) fflush(stderr); 10cd0c: 5a pop %edx <== NOT EXECUTED 10cd0d: a1 c0 d8 12 00 mov 0x12d8c0,%eax <== NOT EXECUTED 10cd12: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cd15: e8 8e d7 00 00 call 11a4a8 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 10cd1a: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cd1d: 81 e3 00 00 00 30 and $0x30000000,%ebx <== NOT EXECUTED 10cd23: 74 1f je 10cd44 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 10cd25: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10cd28: 85 c0 test %eax,%eax <== NOT EXECUTED 10cd2a: 74 34 je 10cd60 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 10cd2c: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cd2f: 68 bd 82 12 00 push $0x1282bd <== NOT EXECUTED 10cd34: 6a 00 push $0x0 <== NOT EXECUTED 10cd36: e8 a9 00 00 00 call 10cde4 <== NOT EXECUTED _exit(local_errno); 10cd3b: 89 3c 24 mov %edi,(%esp) <== NOT EXECUTED 10cd3e: e8 1d 0b 00 00 call 10d860 <_exit> <== NOT EXECUTED 10cd43: 90 nop <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 10cd44: 8b 45 e4 mov -0x1c(%ebp),%eax <== NOT EXECUTED 10cd47: 01 f0 add %esi,%eax <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 10cd49: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cd4c: 5b pop %ebx <== NOT EXECUTED 10cd4d: 5e pop %esi <== NOT EXECUTED 10cd4e: 5f pop %edi <== NOT EXECUTED 10cd4f: c9 leave <== NOT EXECUTED 10cd50: c3 ret <== NOT EXECUTED 10cd51: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); abort(); 10cd54: 31 c0 xor %eax,%eax <== NOT EXECUTED } } return chars_written; } 10cd56: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 10cd59: 5b pop %ebx <== NOT EXECUTED 10cd5a: 5e pop %esi <== NOT EXECUTED 10cd5b: 5f pop %edi <== NOT EXECUTED 10cd5c: c9 leave <== NOT EXECUTED 10cd5d: c3 ret <== NOT EXECUTED 10cd5e: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 10cd60: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 10cd63: 68 d2 82 12 00 push $0x1282d2 <== NOT EXECUTED 10cd68: 6a 00 push $0x0 <== NOT EXECUTED 10cd6a: e8 75 00 00 00 call 10cde4 <== NOT EXECUTED abort(); 10cd6f: e8 84 d3 00 00 call 11a0f8 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 10cd74: 89 4d dc mov %ecx,-0x24(%ebp) <== NOT EXECUTED 10cd77: e8 b0 d3 00 00 call 11a12c <__errno> <== NOT EXECUTED 10cd7c: 8b 38 mov (%eax),%edi <== NOT EXECUTED 10cd7e: 8b 4d dc mov -0x24(%ebp),%ecx <== NOT EXECUTED 10cd81: e9 19 ff ff ff jmp 10cc9f <== NOT EXECUTED 10cd86: 66 90 xchg %ax,%ax <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 10cd88: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cd8b: ff 75 e4 pushl -0x1c(%ebp) <== NOT EXECUTED 10cd8e: e8 81 fe ff ff call 10cc14 <== NOT EXECUTED 10cd93: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10cd96: 50 push %eax <== NOT EXECUTED 10cd97: 68 8e 82 12 00 push $0x12828e <== NOT EXECUTED 10cd9c: a1 c0 d8 12 00 mov 0x12d8c0,%eax <== NOT EXECUTED 10cda1: ff 70 0c pushl 0xc(%eax) <== NOT EXECUTED 10cda4: e8 47 da 00 00 call 11a7f0 <== NOT EXECUTED 10cda9: 01 c6 add %eax,%esi <== NOT EXECUTED 10cdab: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10cdae: e9 0c ff ff ff jmp 10ccbf <== NOT EXECUTED 10cdb3: 90 nop <== NOT EXECUTED if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 10cdb4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10cdb7: 57 push %edi <== NOT EXECUTED 10cdb8: e8 af e1 00 00 call 11af6c <== NOT EXECUTED 10cdbd: 83 c4 0c add $0xc,%esp <== NOT EXECUTED 10cdc0: 50 push %eax <== NOT EXECUTED 10cdc1: 68 9c 82 12 00 push $0x12829c <== NOT EXECUTED 10cdc6: e9 17 ff ff ff jmp 10cce2 <== NOT EXECUTED =============================================================================== 00108770 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 108770: 55 push %ebp 108771: 89 e5 mov %esp,%ebp 108773: 57 push %edi 108774: 56 push %esi 108775: 53 push %ebx 108776: 83 ec 1c sub $0x1c,%esp 108779: 89 c6 mov %eax,%esi 10877b: 89 55 e0 mov %edx,-0x20(%ebp) 10877e: 31 ff xor %edi,%edi 108780: c7 45 e4 ff ff ff 7f movl $0x7fffffff,-0x1c(%ebp) 108787: 31 db xor %ebx,%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 108789: 8b 46 04 mov 0x4(%esi),%eax 10878c: 48 dec %eax 10878d: 89 46 04 mov %eax,0x4(%esi) 108790: 85 c0 test %eax,%eax 108792: 78 52 js 1087e6 <== NEVER TAKEN 108794: 8b 06 mov (%esi),%eax 108796: 0f b6 08 movzbl (%eax),%ecx 108799: 40 inc %eax 10879a: 89 06 mov %eax,(%esi) if (c == ':') 10879c: 83 f9 3a cmp $0x3a,%ecx 10879f: 74 5f je 108800 break; if (sign == 0) { 1087a1: 85 ff test %edi,%edi 1087a3: 75 0e jne 1087b3 <== NEVER TAKEN if (c == '-') { 1087a5: 83 f9 2d cmp $0x2d,%ecx 1087a8: 0f 84 8a 00 00 00 je 108838 <== NEVER TAKEN sign = -1; limit++; continue; 1087ae: bf 01 00 00 00 mov $0x1,%edi } sign = 1; } if (!isdigit(c)) 1087b3: a1 24 87 12 00 mov 0x128724,%eax 1087b8: f6 44 08 01 04 testb $0x4,0x1(%eax,%ecx,1) 1087bd: 74 6d je 10882c <== NEVER TAKEN return 0; d = c - '0'; if ((i > (limit / 10)) 1087bf: b8 cd cc cc cc mov $0xcccccccd,%eax 1087c4: f7 65 e4 mull -0x1c(%ebp) 1087c7: c1 ea 03 shr $0x3,%edx 1087ca: 39 d3 cmp %edx,%ebx 1087cc: 77 5e ja 10882c <== NEVER TAKEN } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 1087ce: 83 e9 30 sub $0x30,%ecx if ((i > (limit / 10)) 1087d1: 39 d3 cmp %edx,%ebx 1087d3: 74 47 je 10881c <== NEVER TAKEN || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 1087d5: 8d 04 9b lea (%ebx,%ebx,4),%eax 1087d8: 8d 1c 41 lea (%ecx,%eax,2),%ebx unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 1087db: 8b 46 04 mov 0x4(%esi),%eax 1087de: 48 dec %eax 1087df: 89 46 04 mov %eax,0x4(%esi) 1087e2: 85 c0 test %eax,%eax 1087e4: 79 ae jns 108794 <== ALWAYS TAKEN 1087e6: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 1087e9: 56 push %esi <== NOT EXECUTED 1087ea: ff 35 40 87 12 00 pushl 0x128740 <== NOT EXECUTED 1087f0: e8 87 e5 00 00 call 116d7c <__srget_r> <== NOT EXECUTED 1087f5: 89 c1 mov %eax,%ecx <== NOT EXECUTED 1087f7: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if (c == ':') 1087fa: 83 f9 3a cmp $0x3a,%ecx <== NOT EXECUTED 1087fd: 75 a2 jne 1087a1 <== NOT EXECUTED 1087ff: 90 nop <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 108800: 85 ff test %edi,%edi 108802: 74 28 je 10882c <== NEVER TAKEN return 0; *val = i * sign; 108804: 0f af df imul %edi,%ebx 108807: 8b 45 e0 mov -0x20(%ebp),%eax 10880a: 89 18 mov %ebx,(%eax) 10880c: b8 01 00 00 00 mov $0x1,%eax return 1; } 108811: 8d 65 f4 lea -0xc(%ebp),%esp 108814: 5b pop %ebx 108815: 5e pop %esi 108816: 5f pop %edi 108817: c9 leave 108818: c3 ret 108819: 8d 76 00 lea 0x0(%esi),%esi sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 10881c: 8d 04 9b lea (%ebx,%ebx,4),%eax <== NOT EXECUTED 10881f: d1 e0 shl %eax <== NOT EXECUTED 108821: 8b 55 e4 mov -0x1c(%ebp),%edx <== NOT EXECUTED 108824: 29 c2 sub %eax,%edx <== NOT EXECUTED 108826: 39 d1 cmp %edx,%ecx <== NOT EXECUTED 108828: 76 ab jbe 1087d5 <== NOT EXECUTED 10882a: 66 90 xchg %ax,%ax <== NOT EXECUTED i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; return 1; 10882c: 31 c0 xor %eax,%eax <== NOT EXECUTED } 10882e: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 108831: 5b pop %ebx <== NOT EXECUTED 108832: 5e pop %esi <== NOT EXECUTED 108833: 5f pop %edi <== NOT EXECUTED 108834: c9 leave <== NOT EXECUTED 108835: c3 ret <== NOT EXECUTED 108836: 66 90 xchg %ax,%ax <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 108838: ff 45 e4 incl -0x1c(%ebp) <== NOT EXECUTED 10883b: bf ff ff ff ff mov $0xffffffff,%edi <== NOT EXECUTED continue; 108840: e9 44 ff ff ff jmp 108789 <== NOT EXECUTED =============================================================================== 00108848 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 108848: 55 push %ebp 108849: 89 e5 mov %esp,%ebp 10884b: 57 push %edi 10884c: 56 push %esi 10884d: 53 push %ebx 10884e: 83 ec 0c sub $0xc,%esp 108851: 89 c3 mov %eax,%ebx 108853: 89 ce mov %ecx,%esi 108855: 8b 7d 08 mov 0x8(%ebp),%edi int c; *name = *bufp; 108858: 8b 01 mov (%ecx),%eax 10885a: 89 02 mov %eax,(%edx) 10885c: eb 26 jmp 108884 10885e: 66 90 xchg %ax,%ax for (;;) { c = getc(fp); 108860: 8b 13 mov (%ebx),%edx 108862: 0f b6 02 movzbl (%edx),%eax 108865: 42 inc %edx 108866: 89 13 mov %edx,(%ebx) if (c == ':') { 108868: 83 f8 3a cmp $0x3a,%eax 10886b: 74 3b je 1088a8 if (nlFlag) return 0; break; } if (c == '\n') { 10886d: 83 f8 0a cmp $0xa,%eax 108870: 74 56 je 1088c8 if (!nlFlag) return 0; break; } if (c == EOF) 108872: 83 f8 ff cmp $0xffffffff,%eax 108875: 74 59 je 1088d0 <== NEVER TAKEN return 0; if (*nleft < 2) 108877: 83 3f 01 cmpl $0x1,(%edi) 10887a: 76 54 jbe 1088d0 <== NEVER TAKEN return 0; **bufp = c; 10887c: 8b 16 mov (%esi),%edx 10887e: 88 02 mov %al,(%edx) ++(*bufp); 108880: ff 06 incl (%esi) --(*nleft); 108882: ff 0f decl (%edi) { int c; *name = *bufp; for (;;) { c = getc(fp); 108884: 8b 43 04 mov 0x4(%ebx),%eax 108887: 48 dec %eax 108888: 89 43 04 mov %eax,0x4(%ebx) 10888b: 85 c0 test %eax,%eax 10888d: 79 d1 jns 108860 10888f: 83 ec 08 sub $0x8,%esp 108892: 53 push %ebx 108893: ff 35 40 87 12 00 pushl 0x128740 108899: e8 de e4 00 00 call 116d7c <__srget_r> 10889e: 83 c4 10 add $0x10,%esp if (c == ':') { 1088a1: 83 f8 3a cmp $0x3a,%eax 1088a4: 75 c7 jne 10886d <== ALWAYS TAKEN 1088a6: 66 90 xchg %ax,%ax if (nlFlag) 1088a8: 8b 55 0c mov 0xc(%ebp),%edx 1088ab: 85 d2 test %edx,%edx 1088ad: 75 21 jne 1088d0 <== NEVER TAKEN return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 1088af: 8b 06 mov (%esi),%eax 1088b1: c6 00 00 movb $0x0,(%eax) ++(*bufp); 1088b4: ff 06 incl (%esi) --(*nleft); 1088b6: ff 0f decl (%edi) 1088b8: b8 01 00 00 00 mov $0x1,%eax return 1; } 1088bd: 8d 65 f4 lea -0xc(%ebp),%esp 1088c0: 5b pop %ebx 1088c1: 5e pop %esi 1088c2: 5f pop %edi 1088c3: c9 leave 1088c4: c3 ret 1088c5: 8d 76 00 lea 0x0(%esi),%esi if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 1088c8: 8b 45 0c mov 0xc(%ebp),%eax 1088cb: 85 c0 test %eax,%eax 1088cd: 75 e0 jne 1088af <== ALWAYS TAKEN 1088cf: 90 nop --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 1088d0: 31 c0 xor %eax,%eax } 1088d2: 8d 65 f4 lea -0xc(%ebp),%esp <== NOT EXECUTED 1088d5: 5b pop %ebx <== NOT EXECUTED 1088d6: 5e pop %esi <== NOT EXECUTED 1088d7: 5f pop %edi <== NOT EXECUTED 1088d8: c9 leave <== NOT EXECUTED 1088d9: c3 ret <== NOT EXECUTED =============================================================================== 001088dc : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 1088dc: 55 push %ebp 1088dd: 89 e5 mov %esp,%ebp 1088df: 57 push %edi 1088e0: 56 push %esi 1088e1: 53 push %ebx 1088e2: 83 ec 34 sub $0x34,%esp 1088e5: 89 c6 mov %eax,%esi 1088e7: 89 d3 mov %edx,%ebx 1088e9: 89 4d d4 mov %ecx,-0x2c(%ebp) int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 1088ec: 8d 7d d4 lea -0x2c(%ebp),%edi 1088ef: 6a 00 push $0x0 1088f1: 8d 45 08 lea 0x8(%ebp),%eax 1088f4: 50 push %eax 1088f5: 89 f9 mov %edi,%ecx 1088f7: 89 f0 mov %esi,%eax 1088f9: e8 4a ff ff ff call 108848 1088fe: 83 c4 10 add $0x10,%esp 108901: 85 c0 test %eax,%eax 108903: 75 0b jne 108910 <== ALWAYS TAKEN *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; 108905: 31 c0 xor %eax,%eax } 108907: 8d 65 f4 lea -0xc(%ebp),%esp 10890a: 5b pop %ebx 10890b: 5e pop %esi 10890c: 5f pop %edi 10890d: c9 leave 10890e: c3 ret 10890f: 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) 108910: 83 ec 08 sub $0x8,%esp 108913: 8d 53 04 lea 0x4(%ebx),%edx 108916: 6a 00 push $0x0 108918: 8d 45 08 lea 0x8(%ebp),%eax 10891b: 50 push %eax 10891c: 89 f9 mov %edi,%ecx 10891e: 89 f0 mov %esi,%eax 108920: e8 23 ff ff ff call 108848 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 108925: 83 c4 10 add $0x10,%esp 108928: 85 c0 test %eax,%eax 10892a: 74 d9 je 108905 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 10892c: 8d 55 e4 lea -0x1c(%ebp),%edx 10892f: 89 f0 mov %esi,%eax 108931: e8 3a fe ff ff call 108770 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 108936: 85 c0 test %eax,%eax 108938: 74 cb je 108905 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 10893a: 83 ec 08 sub $0x8,%esp 10893d: 8d 55 e0 lea -0x20(%ebp),%edx 108940: 6a 01 push $0x1 108942: 8d 45 08 lea 0x8(%ebp),%eax 108945: 50 push %eax 108946: 89 f9 mov %edi,%ecx 108948: 89 f0 mov %esi,%eax 10894a: e8 f9 fe ff ff call 108848 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 10894f: 83 c4 10 add $0x10,%esp 108952: 85 c0 test %eax,%eax 108954: 74 af je 108905 <== NEVER TAKEN || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 108956: 8b 45 e4 mov -0x1c(%ebp),%eax 108959: 66 89 43 08 mov %ax,0x8(%ebx) /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 10895d: 8b 75 e0 mov -0x20(%ebp),%esi 108960: 8a 06 mov (%esi),%al 108962: 84 c0 test %al,%al 108964: 74 7d je 1089e3 <== NEVER TAKEN 108966: 89 f2 mov %esi,%edx 108968: b9 01 00 00 00 mov $0x1,%ecx 10896d: eb 08 jmp 108977 10896f: 90 nop 108970: 42 inc %edx 108971: 8a 02 mov (%edx),%al 108973: 84 c0 test %al,%al 108975: 74 09 je 108980 if(*cp == ',') 108977: 3c 2c cmp $0x2c,%al 108979: 75 f5 jne 108970 <== ALWAYS TAKEN memcount++; 10897b: 41 inc %ecx <== NOT EXECUTED 10897c: eb f2 jmp 108970 <== NOT EXECUTED 10897e: 66 90 xchg %ax,%ax <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 108980: 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)) 108987: 39 45 08 cmp %eax,0x8(%ebp) 10898a: 0f 82 75 ff ff ff jb 108905 <== NEVER TAKEN return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 108990: 8b 45 d4 mov -0x2c(%ebp),%eax 108993: 83 c0 0f add $0xf,%eax 108996: 83 e0 f0 and $0xfffffff0,%eax 108999: 89 43 0c mov %eax,0xc(%ebx) /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 10899c: 89 30 mov %esi,(%eax) for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 10899e: 8b 45 e0 mov -0x20(%ebp),%eax 1089a1: 8a 10 mov (%eax),%dl 1089a3: 84 d2 test %dl,%dl 1089a5: 74 43 je 1089ea <== NEVER TAKEN 1089a7: 40 inc %eax 1089a8: b9 01 00 00 00 mov $0x1,%ecx 1089ad: eb 08 jmp 1089b7 1089af: 90 nop 1089b0: 8a 10 mov (%eax),%dl 1089b2: 40 inc %eax 1089b3: 84 d2 test %dl,%dl 1089b5: 74 15 je 1089cc if(*cp == ',') { 1089b7: 80 fa 2c cmp $0x2c,%dl 1089ba: 75 f4 jne 1089b0 <== ALWAYS TAKEN *cp = '\0'; 1089bc: c6 40 ff 00 movb $0x0,-0x1(%eax) <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 1089c0: 8b 53 0c mov 0xc(%ebx),%edx <== NOT EXECUTED 1089c3: 89 04 8a mov %eax,(%edx,%ecx,4) <== NOT EXECUTED 1089c6: 41 inc %ecx <== NOT EXECUTED 1089c7: eb e7 jmp 1089b0 <== NOT EXECUTED 1089c9: 8d 76 00 lea 0x0(%esi),%esi <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1089cc: c1 e1 02 shl $0x2,%ecx if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 1089cf: 8b 43 0c mov 0xc(%ebx),%eax 1089d2: c7 04 08 00 00 00 00 movl $0x0,(%eax,%ecx,1) 1089d9: b8 01 00 00 00 mov $0x1,%eax return 1; 1089de: e9 24 ff ff ff jmp 108907 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1089e3: b8 17 00 00 00 mov $0x17,%eax <== NOT EXECUTED 1089e8: eb 9d jmp 108987 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 1089ea: b9 04 00 00 00 mov $0x4,%ecx <== NOT EXECUTED 1089ef: eb de jmp 1089cf <== NOT EXECUTED =============================================================================== 00108a30 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 108a30: 55 push %ebp 108a31: 89 e5 mov %esp,%ebp 108a33: 57 push %edi 108a34: 56 push %esi 108a35: 53 push %ebx 108a36: 83 ec 34 sub $0x34,%esp 108a39: 89 c6 mov %eax,%esi 108a3b: 89 d3 mov %edx,%ebx 108a3d: 89 4d d4 mov %ecx,-0x2c(%ebp) int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108a40: 8d 7d d4 lea -0x2c(%ebp),%edi 108a43: 6a 00 push $0x0 108a45: 8d 45 08 lea 0x8(%ebp),%eax 108a48: 50 push %eax 108a49: 89 f9 mov %edi,%ecx 108a4b: 89 f0 mov %esi,%eax 108a4d: e8 f6 fd ff ff call 108848 108a52: 83 c4 10 add $0x10,%esp 108a55: 85 c0 test %eax,%eax 108a57: 75 0b jne 108a64 <== ALWAYS TAKEN || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; 108a59: 31 c0 xor %eax,%eax } 108a5b: 8d 65 f4 lea -0xc(%ebp),%esp 108a5e: 5b pop %ebx 108a5f: 5e pop %esi 108a60: 5f pop %edi 108a61: c9 leave 108a62: c3 ret 108a63: 90 nop ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 108a64: 83 ec 08 sub $0x8,%esp 108a67: 8d 53 04 lea 0x4(%ebx),%edx 108a6a: 6a 00 push $0x0 108a6c: 8d 45 08 lea 0x8(%ebp),%eax 108a6f: 50 push %eax 108a70: 89 f9 mov %edi,%ecx 108a72: 89 f0 mov %esi,%eax 108a74: e8 cf fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108a79: 83 c4 10 add $0x10,%esp 108a7c: 85 c0 test %eax,%eax 108a7e: 74 d9 je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 108a80: 8d 55 e4 lea -0x1c(%ebp),%edx 108a83: 89 f0 mov %esi,%eax 108a85: e8 e6 fc ff ff call 108770 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108a8a: 85 c0 test %eax,%eax 108a8c: 74 cb je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 108a8e: 8d 55 e0 lea -0x20(%ebp),%edx 108a91: 89 f0 mov %esi,%eax 108a93: e8 d8 fc ff ff call 108770 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108a98: 85 c0 test %eax,%eax 108a9a: 74 bd je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 108a9c: 83 ec 08 sub $0x8,%esp 108a9f: 8d 53 0c lea 0xc(%ebx),%edx 108aa2: 6a 00 push $0x0 108aa4: 8d 45 08 lea 0x8(%ebp),%eax 108aa7: 50 push %eax 108aa8: 89 f9 mov %edi,%ecx 108aaa: 89 f0 mov %esi,%eax 108aac: e8 97 fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108ab1: 83 c4 10 add $0x10,%esp 108ab4: 85 c0 test %eax,%eax 108ab6: 74 a1 je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) 108ab8: 83 ec 08 sub $0x8,%esp 108abb: 8d 53 10 lea 0x10(%ebx),%edx 108abe: 6a 00 push $0x0 108ac0: 8d 45 08 lea 0x8(%ebp),%eax 108ac3: 50 push %eax 108ac4: 89 f9 mov %edi,%ecx 108ac6: 89 f0 mov %esi,%eax 108ac8: e8 7b fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108acd: 83 c4 10 add $0x10,%esp 108ad0: 85 c0 test %eax,%eax 108ad2: 74 85 je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) 108ad4: 83 ec 08 sub $0x8,%esp 108ad7: 8d 53 14 lea 0x14(%ebx),%edx 108ada: 6a 00 push $0x0 108adc: 8d 45 08 lea 0x8(%ebp),%eax 108adf: 50 push %eax 108ae0: 89 f9 mov %edi,%ecx 108ae2: 89 f0 mov %esi,%eax 108ae4: e8 5f fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108ae9: 83 c4 10 add $0x10,%esp 108aec: 85 c0 test %eax,%eax 108aee: 0f 84 65 ff ff ff je 108a59 <== NEVER TAKEN || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) 108af4: 83 ec 08 sub $0x8,%esp 108af7: 8d 53 18 lea 0x18(%ebx),%edx 108afa: 6a 01 push $0x1 108afc: 8d 45 08 lea 0x8(%ebp),%eax 108aff: 50 push %eax 108b00: 89 f9 mov %edi,%ecx 108b02: 89 f0 mov %esi,%eax 108b04: e8 3f fd ff ff call 108848 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 108b09: 83 c4 10 add $0x10,%esp 108b0c: 85 c0 test %eax,%eax 108b0e: 0f 84 45 ff ff ff je 108a59 <== NEVER TAKEN || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; 108b14: 8b 45 e4 mov -0x1c(%ebp),%eax 108b17: 66 89 43 08 mov %ax,0x8(%ebx) pwd->pw_gid = pwgid; 108b1b: 8b 45 e0 mov -0x20(%ebp),%eax 108b1e: 66 89 43 0a mov %ax,0xa(%ebx) 108b22: b8 01 00 00 00 mov $0x1,%eax return 1; 108b27: e9 2f ff ff ff jmp 108a5b =============================================================================== 0010c420 : #include int sched_get_priority_max( int policy ) { 10c420: 55 push %ebp 10c421: 89 e5 mov %esp,%ebp 10c423: 83 ec 08 sub $0x8,%esp 10c426: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10c429: 85 c0 test %eax,%eax 10c42b: 78 0a js 10c437 10c42d: 83 f8 02 cmp $0x2,%eax 10c430: 7e 1a jle 10c44c 10c432: 83 f8 04 cmp $0x4,%eax 10c435: 74 15 je 10c44c <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10c437: e8 f0 98 00 00 call 115d2c <__errno> 10c43c: c7 00 16 00 00 00 movl $0x16,(%eax) 10c442: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 10c447: c9 leave 10c448: c3 ret 10c449: 8d 76 00 lea 0x0(%esi),%esi default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 10c44c: 0f b6 05 bc 64 12 00 movzbl 0x1264bc,%eax 10c453: 48 dec %eax } 10c454: c9 leave 10c455: c3 ret =============================================================================== 0010c458 : #include int sched_get_priority_min( int policy ) { 10c458: 55 push %ebp 10c459: 89 e5 mov %esp,%ebp 10c45b: 83 ec 08 sub $0x8,%esp 10c45e: 8b 45 08 mov 0x8(%ebp),%eax switch ( policy ) { 10c461: 85 c0 test %eax,%eax 10c463: 78 0a js 10c46f 10c465: 83 f8 02 cmp $0x2,%eax 10c468: 7e 1a jle 10c484 <== ALWAYS TAKEN 10c46a: 83 f8 04 cmp $0x4,%eax <== NOT EXECUTED 10c46d: 74 15 je 10c484 <== NOT EXECUTED case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 10c46f: e8 b8 98 00 00 call 115d2c <__errno> 10c474: c7 00 16 00 00 00 movl $0x16,(%eax) 10c47a: b8 ff ff ff ff mov $0xffffffff,%eax } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10c47f: c9 leave 10c480: c3 ret 10c481: 8d 76 00 lea 0x0(%esi),%esi int sched_get_priority_min( int policy ) { switch ( policy ) { 10c484: b8 01 00 00 00 mov $0x1,%eax default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 10c489: c9 leave 10c48a: c3 ret =============================================================================== 0010c48c : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 10c48c: 55 push %ebp 10c48d: 89 e5 mov %esp,%ebp 10c48f: 56 push %esi 10c490: 53 push %ebx 10c491: 8b 75 08 mov 0x8(%ebp),%esi 10c494: 8b 5d 0c mov 0xc(%ebp),%ebx /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10c497: 85 f6 test %esi,%esi 10c499: 75 21 jne 10c4bc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 10c49b: 85 db test %ebx,%ebx 10c49d: 74 38 je 10c4d7 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 10c49f: 83 ec 08 sub $0x8,%esp 10c4a2: 53 push %ebx 10c4a3: ff 35 64 a6 12 00 pushl 0x12a664 10c4a9: e8 8a 34 00 00 call 10f938 <_Timespec_From_ticks> 10c4ae: 31 c0 xor %eax,%eax return 0; 10c4b0: 83 c4 10 add $0x10,%esp } 10c4b3: 8d 65 f8 lea -0x8(%ebp),%esp 10c4b6: 5b pop %ebx 10c4b7: 5e pop %esi 10c4b8: c9 leave 10c4b9: c3 ret 10c4ba: 66 90 xchg %ax,%ax { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 10c4bc: e8 df c7 ff ff call 108ca0 10c4c1: 39 f0 cmp %esi,%eax 10c4c3: 74 d6 je 10c49b rtems_set_errno_and_return_minus_one( ESRCH ); 10c4c5: e8 62 98 00 00 call 115d2c <__errno> 10c4ca: c7 00 03 00 00 00 movl $0x3,(%eax) 10c4d0: b8 ff ff ff ff mov $0xffffffff,%eax 10c4d5: eb dc jmp 10c4b3 if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c4d7: e8 50 98 00 00 call 115d2c <__errno> 10c4dc: c7 00 16 00 00 00 movl $0x16,(%eax) 10c4e2: b8 ff ff ff ff mov $0xffffffff,%eax 10c4e7: eb ca jmp 10c4b3 =============================================================================== 0010ea1c : */ int sem_close( sem_t *sem ) { 10ea1c: 55 push %ebp 10ea1d: 89 e5 mov %esp,%ebp 10ea1f: 83 ec 1c sub $0x1c,%esp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 10ea22: 8d 45 f4 lea -0xc(%ebp),%eax 10ea25: 50 push %eax 10ea26: 8b 45 08 mov 0x8(%ebp),%eax 10ea29: ff 30 pushl (%eax) 10ea2b: 68 80 f3 12 00 push $0x12f380 10ea30: e8 7b 21 00 00 call 110bb0 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10ea35: 83 c4 10 add $0x10,%esp 10ea38: 8b 55 f4 mov -0xc(%ebp),%edx 10ea3b: 85 d2 test %edx,%edx 10ea3d: 74 15 je 10ea54 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10ea3f: e8 10 a7 00 00 call 119154 <__errno> 10ea44: c7 00 16 00 00 00 movl $0x16,(%eax) 10ea4a: b8 ff ff ff ff mov $0xffffffff,%eax } 10ea4f: c9 leave 10ea50: c3 ret 10ea51: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 10ea54: ff 48 18 decl 0x18(%eax) _POSIX_Semaphore_Delete( the_semaphore ); 10ea57: 83 ec 0c sub $0xc,%esp 10ea5a: 50 push %eax 10ea5b: e8 d4 6a 00 00 call 115534 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10ea60: e8 0f 2a 00 00 call 111474 <_Thread_Enable_dispatch> 10ea65: 31 c0 xor %eax,%eax return 0; 10ea67: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ea6a: c9 leave 10ea6b: c3 ret =============================================================================== 0010ea6c : */ int sem_destroy( sem_t *sem ) { 10ea6c: 55 push %ebp 10ea6d: 89 e5 mov %esp,%ebp 10ea6f: 83 ec 1c sub $0x1c,%esp 10ea72: 8d 45 f4 lea -0xc(%ebp),%eax 10ea75: 50 push %eax 10ea76: 8b 45 08 mov 0x8(%ebp),%eax 10ea79: ff 30 pushl (%eax) 10ea7b: 68 80 f3 12 00 push $0x12f380 10ea80: e8 2b 21 00 00 call 110bb0 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10ea85: 83 c4 10 add $0x10,%esp 10ea88: 8b 55 f4 mov -0xc(%ebp),%edx 10ea8b: 85 d2 test %edx,%edx 10ea8d: 74 15 je 10eaa4 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10ea8f: e8 c0 a6 00 00 call 119154 <__errno> 10ea94: c7 00 16 00 00 00 movl $0x16,(%eax) 10ea9a: b8 ff ff ff ff mov $0xffffffff,%eax } 10ea9f: c9 leave 10eaa0: c3 ret 10eaa1: 8d 76 00 lea 0x0(%esi),%esi case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { 10eaa4: 80 78 14 00 cmpb $0x0,0x14(%eax) 10eaa8: 75 16 jne 10eac0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 10eaaa: 83 ec 0c sub $0xc,%esp 10eaad: 50 push %eax 10eaae: e8 81 6a 00 00 call 115534 <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 10eab3: e8 bc 29 00 00 call 111474 <_Thread_Enable_dispatch> 10eab8: 31 c0 xor %eax,%eax return 0; 10eaba: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10eabd: c9 leave 10eabe: c3 ret 10eabf: 90 nop /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == true ) { _Thread_Enable_dispatch(); 10eac0: e8 af 29 00 00 call 111474 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EINVAL ); 10eac5: e8 8a a6 00 00 call 119154 <__errno> 10eaca: c7 00 16 00 00 00 movl $0x16,(%eax) 10ead0: b8 ff ff ff ff mov $0xffffffff,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ead5: c9 leave 10ead6: c3 ret =============================================================================== 0010ead8 : int sem_getvalue( sem_t *sem, int *sval ) { 10ead8: 55 push %ebp 10ead9: 89 e5 mov %esp,%ebp 10eadb: 83 ec 1c sub $0x1c,%esp 10eade: 8d 45 f4 lea -0xc(%ebp),%eax 10eae1: 50 push %eax 10eae2: 8b 45 08 mov 0x8(%ebp),%eax 10eae5: ff 30 pushl (%eax) 10eae7: 68 80 f3 12 00 push $0x12f380 10eaec: e8 bf 20 00 00 call 110bb0 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10eaf1: 83 c4 10 add $0x10,%esp 10eaf4: 8b 55 f4 mov -0xc(%ebp),%edx 10eaf7: 85 d2 test %edx,%edx 10eaf9: 74 15 je 10eb10 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10eafb: e8 54 a6 00 00 call 119154 <__errno> 10eb00: c7 00 16 00 00 00 movl $0x16,(%eax) 10eb06: b8 ff ff ff ff mov $0xffffffff,%eax } 10eb0b: c9 leave 10eb0c: c3 ret 10eb0d: 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 ); 10eb10: 8b 50 64 mov 0x64(%eax),%edx 10eb13: 8b 45 0c mov 0xc(%ebp),%eax 10eb16: 89 10 mov %edx,(%eax) _Thread_Enable_dispatch(); 10eb18: e8 57 29 00 00 call 111474 <_Thread_Enable_dispatch> 10eb1d: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10eb1f: c9 leave 10eb20: c3 ret =============================================================================== 0010eb6c : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 10eb6c: 55 push %ebp 10eb6d: 89 e5 mov %esp,%ebp 10eb6f: 57 push %edi 10eb70: 56 push %esi 10eb71: 53 push %ebx 10eb72: 83 ec 2c sub $0x2c,%esp 10eb75: 8b 75 08 mov 0x8(%ebp),%esi rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10eb78: a1 38 f0 12 00 mov 0x12f038,%eax 10eb7d: 40 inc %eax 10eb7e: a3 38 f0 12 00 mov %eax,0x12f038 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 10eb83: 8b 7d 0c mov 0xc(%ebp),%edi 10eb86: 81 e7 00 02 00 00 and $0x200,%edi 10eb8c: 0f 85 86 00 00 00 jne 10ec18 10eb92: 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 ); 10eb99: 83 ec 08 sub $0x8,%esp 10eb9c: 8d 45 e4 lea -0x1c(%ebp),%eax 10eb9f: 50 push %eax 10eba0: 56 push %esi 10eba1: e8 de 69 00 00 call 115584 <_POSIX_Semaphore_Name_to_id> 10eba6: 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 ) { 10eba8: 83 c4 10 add $0x10,%esp 10ebab: 85 c0 test %eax,%eax 10ebad: 74 25 je 10ebd4 /* * 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) ) ) { 10ebaf: 83 f8 02 cmp $0x2,%eax 10ebb2: 75 04 jne 10ebb8 <== NEVER TAKEN 10ebb4: 85 ff test %edi,%edi 10ebb6: 75 6c jne 10ec24 _Thread_Enable_dispatch(); 10ebb8: e8 b7 28 00 00 call 111474 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 10ebbd: e8 92 a5 00 00 call 119154 <__errno> 10ebc2: 89 18 mov %ebx,(%eax) 10ebc4: b8 ff ff ff ff mov $0xffffffff,%eax id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 10ebc9: 8d 65 f4 lea -0xc(%ebp),%esp 10ebcc: 5b pop %ebx 10ebcd: 5e pop %esi 10ebce: 5f pop %edi 10ebcf: c9 leave 10ebd0: c3 ret 10ebd1: 8d 76 00 lea 0x0(%esi),%esi /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 10ebd4: 8b 45 0c mov 0xc(%ebp),%eax 10ebd7: 25 00 0a 00 00 and $0xa00,%eax 10ebdc: 3d 00 0a 00 00 cmp $0xa00,%eax 10ebe1: 74 65 je 10ec48 10ebe3: 50 push %eax 10ebe4: 8d 45 dc lea -0x24(%ebp),%eax 10ebe7: 50 push %eax 10ebe8: ff 75 e4 pushl -0x1c(%ebp) 10ebeb: 68 80 f3 12 00 push $0x12f380 10ebf0: e8 bb 1f 00 00 call 110bb0 <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); 10ebf5: 89 45 e0 mov %eax,-0x20(%ebp) the_semaphore->open_count += 1; 10ebf8: ff 40 18 incl 0x18(%eax) _Thread_Enable_dispatch(); 10ebfb: e8 74 28 00 00 call 111474 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); 10ec00: e8 6f 28 00 00 call 111474 <_Thread_Enable_dispatch> goto return_id; 10ec05: 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; 10ec08: 8b 45 e0 mov -0x20(%ebp),%eax 10ec0b: 83 c0 08 add $0x8,%eax #endif return id; } 10ec0e: 8d 65 f4 lea -0xc(%ebp),%esp 10ec11: 5b pop %ebx 10ec12: 5e pop %esi 10ec13: 5f pop %edi 10ec14: c9 leave 10ec15: c3 ret 10ec16: 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 ); 10ec18: 8b 45 14 mov 0x14(%ebp),%eax 10ec1b: 89 45 d4 mov %eax,-0x2c(%ebp) 10ec1e: e9 76 ff ff ff jmp 10eb99 10ec23: 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( 10ec24: 8d 45 e0 lea -0x20(%ebp),%eax 10ec27: 50 push %eax 10ec28: ff 75 d4 pushl -0x2c(%ebp) 10ec2b: 6a 00 push $0x0 10ec2d: 56 push %esi 10ec2e: e8 f5 67 00 00 call 115428 <_POSIX_Semaphore_Create_support> 10ec33: 89 c3 mov %eax,%ebx /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 10ec35: e8 3a 28 00 00 call 111474 <_Thread_Enable_dispatch> if ( status == -1 ) 10ec3a: 83 c4 10 add $0x10,%esp 10ec3d: 43 inc %ebx 10ec3e: 75 c8 jne 10ec08 10ec40: b8 ff ff ff ff mov $0xffffffff,%eax 10ec45: eb c7 jmp 10ec0e 10ec47: 90 nop /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 10ec48: e8 27 28 00 00 call 111474 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 10ec4d: e8 02 a5 00 00 call 119154 <__errno> 10ec52: c7 00 11 00 00 00 movl $0x11,(%eax) 10ec58: b8 ff ff ff ff mov $0xffffffff,%eax 10ec5d: eb af jmp 10ec0e =============================================================================== 0010ec60 : */ int sem_post( sem_t *sem ) { 10ec60: 55 push %ebp 10ec61: 89 e5 mov %esp,%ebp 10ec63: 83 ec 1c sub $0x1c,%esp 10ec66: 8d 45 f4 lea -0xc(%ebp),%eax 10ec69: 50 push %eax 10ec6a: 8b 45 08 mov 0x8(%ebp),%eax 10ec6d: ff 30 pushl (%eax) 10ec6f: 68 80 f3 12 00 push $0x12f380 10ec74: e8 37 1f 00 00 call 110bb0 <_Objects_Get> register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 10ec79: 83 c4 10 add $0x10,%esp 10ec7c: 8b 4d f4 mov -0xc(%ebp),%ecx 10ec7f: 85 c9 test %ecx,%ecx 10ec81: 74 15 je 10ec98 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10ec83: e8 cc a4 00 00 call 119154 <__errno> 10ec88: c7 00 16 00 00 00 movl $0x16,(%eax) 10ec8e: b8 ff ff ff ff mov $0xffffffff,%eax } 10ec93: c9 leave 10ec94: c3 ret 10ec95: 8d 76 00 lea 0x0(%esi),%esi the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 10ec98: 52 push %edx 10ec99: 6a 00 push $0x0 10ec9b: ff 70 08 pushl 0x8(%eax) 10ec9e: 83 c0 1c add $0x1c,%eax 10eca1: 50 push %eax 10eca2: e8 55 15 00 00 call 1101fc <_CORE_semaphore_Surrender> NULL /* XXX need to define a routine to handle this case */ #else NULL #endif ); _Thread_Enable_dispatch(); 10eca7: e8 c8 27 00 00 call 111474 <_Thread_Enable_dispatch> 10ecac: 31 c0 xor %eax,%eax return 0; 10ecae: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10ecb1: c9 leave 10ecb2: c3 ret =============================================================================== 0010ecb4 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 10ecb4: 55 push %ebp 10ecb5: 89 e5 mov %esp,%ebp 10ecb7: 53 push %ebx 10ecb8: 83 ec 1c sub $0x1c,%esp 10ecbb: 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 ); 10ecbe: 8d 45 f4 lea -0xc(%ebp),%eax 10ecc1: 50 push %eax 10ecc2: ff 75 0c pushl 0xc(%ebp) 10ecc5: e8 82 5e 00 00 call 114b4c <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 10ecca: 83 c4 10 add $0x10,%esp 10eccd: 83 f8 03 cmp $0x3,%eax 10ecd0: 74 16 je 10ece8 <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 10ecd2: 50 push %eax <== NOT EXECUTED 10ecd3: ff 75 f4 pushl -0xc(%ebp) <== NOT EXECUTED 10ecd6: 6a 00 push $0x0 <== NOT EXECUTED 10ecd8: 53 push %ebx <== NOT EXECUTED 10ecd9: e8 12 69 00 00 call 1155f0 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED 10ecde: 83 c4 10 add $0x10,%esp <== NOT EXECUTED break; } } return lock_status; } 10ece1: 8b 5d fc mov -0x4(%ebp),%ebx <== NOT EXECUTED 10ece4: c9 leave <== NOT EXECUTED 10ece5: c3 ret <== NOT EXECUTED 10ece6: 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 ); 10ece8: 52 push %edx 10ece9: ff 75 f4 pushl -0xc(%ebp) 10ecec: 6a 01 push $0x1 10ecee: 53 push %ebx 10ecef: e8 fc 68 00 00 call 1155f0 <_POSIX_Semaphore_Wait_support> 10ecf4: 83 c4 10 add $0x10,%esp break; } } return lock_status; } 10ecf7: 8b 5d fc mov -0x4(%ebp),%ebx 10ecfa: c9 leave 10ecfb: c3 ret =============================================================================== 00108c68 : return NULL; return &grent; } void setgrent(void) { 108c68: 55 push %ebp <== NOT EXECUTED 108c69: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108c6b: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 108c6e: e8 f5 fe ff ff call 108b68 <== NOT EXECUTED if (group_fp != NULL) 108c73: a1 44 a6 12 00 mov 0x12a644,%eax <== NOT EXECUTED 108c78: 85 c0 test %eax,%eax <== NOT EXECUTED 108c7a: 74 0c je 108c88 <== NOT EXECUTED fclose(group_fp); 108c7c: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108c7f: 50 push %eax <== NOT EXECUTED 108c80: e8 ef ce 00 00 call 115b74 <== NOT EXECUTED 108c85: 83 c4 10 add $0x10,%esp <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 108c88: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108c8b: 68 43 29 12 00 push $0x122943 <== NOT EXECUTED 108c90: 68 f9 3d 12 00 push $0x123df9 <== NOT EXECUTED 108c95: e8 3e d5 00 00 call 1161d8 <== NOT EXECUTED 108c9a: a3 44 a6 12 00 mov %eax,0x12a644 <== NOT EXECUTED 108c9f: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108ca2: c9 leave <== NOT EXECUTED 108ca3: c3 ret <== NOT EXECUTED =============================================================================== 0010b8f8 : int setitimer( int which, const struct itimerval *value, struct itimerval *ovalue ) { 10b8f8: 55 push %ebp 10b8f9: 89 e5 mov %esp,%ebp 10b8fb: 83 ec 08 sub $0x8,%esp if ( !value ) 10b8fe: 8b 55 0c mov 0xc(%ebp),%edx 10b901: 85 d2 test %edx,%edx 10b903: 74 33 je 10b938 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !ovalue ) 10b905: 8b 45 10 mov 0x10(%ebp),%eax 10b908: 85 c0 test %eax,%eax 10b90a: 74 2c je 10b938 rtems_set_errno_and_return_minus_one( EFAULT ); switch ( which ) { 10b90c: 83 7d 08 02 cmpl $0x2,0x8(%ebp) 10b910: 76 12 jbe 10b924 case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10b912: e8 6d 9e 00 00 call 115784 <__errno> 10b917: c7 00 16 00 00 00 movl $0x16,(%eax) } 10b91d: b8 ff ff ff ff mov $0xffffffff,%eax 10b922: c9 leave 10b923: c3 ret switch ( which ) { case ITIMER_REAL: case ITIMER_VIRTUAL: case ITIMER_PROF: rtems_set_errno_and_return_minus_one( ENOSYS ); 10b924: e8 5b 9e 00 00 call 115784 <__errno> 10b929: c7 00 58 00 00 00 movl $0x58,(%eax) default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10b92f: b8 ff ff ff ff mov $0xffffffff,%eax 10b934: c9 leave 10b935: c3 ret 10b936: 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 ); 10b938: e8 47 9e 00 00 call 115784 <__errno> 10b93d: c7 00 0e 00 00 00 movl $0xe,(%eax) 10b943: eb d8 jmp 10b91d =============================================================================== 00108e34 : return NULL; return &pwent; } void setpwent(void) { 108e34: 55 push %ebp <== NOT EXECUTED 108e35: 89 e5 mov %esp,%ebp <== NOT EXECUTED 108e37: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED init_etc_passwd_group(); 108e3a: e8 29 fd ff ff call 108b68 <== NOT EXECUTED if (passwd_fp != NULL) 108e3f: a1 44 a5 12 00 mov 0x12a544,%eax <== NOT EXECUTED 108e44: 85 c0 test %eax,%eax <== NOT EXECUTED 108e46: 74 0c je 108e54 <== NOT EXECUTED fclose(passwd_fp); 108e48: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 108e4b: 50 push %eax <== NOT EXECUTED 108e4c: e8 23 cd 00 00 call 115b74 <== NOT EXECUTED 108e51: 83 c4 10 add $0x10,%esp <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 108e54: 83 ec 08 sub $0x8,%esp <== NOT EXECUTED 108e57: 68 43 29 12 00 push $0x122943 <== NOT EXECUTED 108e5c: 68 ed 3d 12 00 push $0x123ded <== NOT EXECUTED 108e61: e8 72 d3 00 00 call 1161d8 <== NOT EXECUTED 108e66: a3 44 a5 12 00 mov %eax,0x12a544 <== NOT EXECUTED 108e6b: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } 108e6e: c9 leave <== NOT EXECUTED 108e6f: c3 ret <== NOT EXECUTED =============================================================================== 0010c360 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 10c360: 55 push %ebp 10c361: 89 e5 mov %esp,%ebp 10c363: 57 push %edi 10c364: 56 push %esi 10c365: 53 push %ebx 10c366: 83 ec 1c sub $0x1c,%esp 10c369: 8b 5d 08 mov 0x8(%ebp),%ebx 10c36c: 8b 45 0c mov 0xc(%ebp),%eax 10c36f: 8b 55 10 mov 0x10(%ebp),%edx ISR_Level level; if ( oact ) 10c372: 85 d2 test %edx,%edx 10c374: 74 13 je 10c389 *oact = _POSIX_signals_Vectors[ sig ]; 10c376: 8d 0c 5b lea (%ebx,%ebx,2),%ecx 10c379: 8d 34 8d 20 b9 12 00 lea 0x12b920(,%ecx,4),%esi 10c380: b9 03 00 00 00 mov $0x3,%ecx 10c385: 89 d7 mov %edx,%edi 10c387: f3 a5 rep movsl %ds:(%esi),%es:(%edi) if ( !sig ) 10c389: 85 db test %ebx,%ebx 10c38b: 74 6f je 10c3fc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 10c38d: 8d 53 ff lea -0x1(%ebx),%edx 10c390: 83 fa 1f cmp $0x1f,%edx 10c393: 77 67 ja 10c3fc * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 10c395: 83 fb 09 cmp $0x9,%ebx 10c398: 74 62 je 10c3fc /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 10c39a: 85 c0 test %eax,%eax 10c39c: 74 37 je 10c3d5 <== 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 ); 10c39e: 9c pushf 10c39f: fa cli 10c3a0: 8f 45 e4 popl -0x1c(%ebp) if ( act->sa_handler == SIG_DFL ) { 10c3a3: 8b 50 08 mov 0x8(%eax),%edx 10c3a6: 85 d2 test %edx,%edx 10c3a8: 74 36 je 10c3e0 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 10c3aa: 83 ec 0c sub $0xc,%esp 10c3ad: 53 push %ebx 10c3ae: 89 45 e0 mov %eax,-0x20(%ebp) 10c3b1: e8 1a 61 00 00 call 1124d0 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 10c3b6: 8d 14 5b lea (%ebx,%ebx,2),%edx 10c3b9: 8d 3c 95 20 b9 12 00 lea 0x12b920(,%edx,4),%edi 10c3c0: b9 03 00 00 00 mov $0x3,%ecx 10c3c5: 8b 45 e0 mov -0x20(%ebp),%eax 10c3c8: 89 c6 mov %eax,%esi 10c3ca: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10c3cc: 83 c4 10 add $0x10,%esp } _ISR_Enable( level ); 10c3cf: ff 75 e4 pushl -0x1c(%ebp) 10c3d2: 9d popf 10c3d3: 31 c0 xor %eax,%eax * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 10c3d5: 8d 65 f4 lea -0xc(%ebp),%esp 10c3d8: 5b pop %ebx 10c3d9: 5e pop %esi 10c3da: 5f pop %edi 10c3db: c9 leave 10c3dc: c3 ret 10c3dd: 8d 76 00 lea 0x0(%esi),%esi * 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 ]; 10c3e0: 8d 34 5b lea (%ebx,%ebx,2),%esi 10c3e3: c1 e6 02 shl $0x2,%esi 10c3e6: 8d be 20 b9 12 00 lea 0x12b920(%esi),%edi 10c3ec: 81 c6 60 4d 12 00 add $0x124d60,%esi 10c3f2: b9 03 00 00 00 mov $0x3,%ecx 10c3f7: f3 a5 rep movsl %ds:(%esi),%es:(%edi) 10c3f9: eb d4 jmp 10c3cf 10c3fb: 90 nop * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c3fc: e8 a7 9a 00 00 call 115ea8 <__errno> 10c401: c7 00 16 00 00 00 movl $0x16,(%eax) 10c407: b8 ff ff ff ff mov $0xffffffff,%eax 10c40c: eb c7 jmp 10c3d5 =============================================================================== 0010e064 : #include int sigsuspend( const sigset_t *sigmask ) { 10e064: 55 push %ebp 10e065: 89 e5 mov %esp,%ebp 10e067: 56 push %esi 10e068: 53 push %ebx 10e069: 83 ec 14 sub $0x14,%esp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 10e06c: 8d 5d f4 lea -0xc(%ebp),%ebx 10e06f: 53 push %ebx 10e070: ff 75 08 pushl 0x8(%ebp) 10e073: 6a 01 push $0x1 10e075: e8 c6 ff ff ff call 10e040 (void) sigfillset( &all_signals ); 10e07a: 8d 75 f0 lea -0x10(%ebp),%esi 10e07d: 89 34 24 mov %esi,(%esp) 10e080: e8 0f ff ff ff call 10df94 status = sigtimedwait( &all_signals, NULL, NULL ); 10e085: 83 c4 0c add $0xc,%esp 10e088: 6a 00 push $0x0 10e08a: 6a 00 push $0x0 10e08c: 56 push %esi 10e08d: e8 76 00 00 00 call 10e108 10e092: 89 c6 mov %eax,%esi (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 10e094: 83 c4 0c add $0xc,%esp 10e097: 6a 00 push $0x0 10e099: 53 push %ebx 10e09a: 6a 00 push $0x0 10e09c: e8 9f ff ff ff call 10e040 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 10e0a1: 83 c4 10 add $0x10,%esp 10e0a4: 46 inc %esi 10e0a5: 75 0d jne 10e0b4 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINTR ); return status; } 10e0a7: b8 ff ff ff ff mov $0xffffffff,%eax 10e0ac: 8d 65 f8 lea -0x8(%ebp),%esp 10e0af: 5b pop %ebx 10e0b0: 5e pop %esi 10e0b1: c9 leave 10e0b2: c3 ret 10e0b3: 90 nop /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 10e0b4: e8 9b 98 00 00 call 117954 <__errno> 10e0b9: c7 00 04 00 00 00 movl $0x4,(%eax) 10e0bf: eb e6 jmp 10e0a7 =============================================================================== 0010c70c : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 10c70c: 55 push %ebp 10c70d: 89 e5 mov %esp,%ebp 10c70f: 57 push %edi 10c710: 56 push %esi 10c711: 53 push %ebx 10c712: 83 ec 2c sub $0x2c,%esp 10c715: 8b 75 08 mov 0x8(%ebp),%esi 10c718: 8b 5d 0c mov 0xc(%ebp),%ebx 10c71b: 8b 7d 10 mov 0x10(%ebp),%edi ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) 10c71e: 85 f6 test %esi,%esi 10c720: 0f 84 7a 01 00 00 je 10c8a0 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 10c726: 85 ff test %edi,%edi 10c728: 0f 84 1e 01 00 00 je 10c84c if ( !_Timespec_Is_valid( timeout ) ) 10c72e: 83 ec 0c sub $0xc,%esp 10c731: 57 push %edi 10c732: e8 d1 34 00 00 call 10fc08 <_Timespec_Is_valid> 10c737: 83 c4 10 add $0x10,%esp 10c73a: 84 c0 test %al,%al 10c73c: 0f 84 5e 01 00 00 je 10c8a0 rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 10c742: 83 ec 0c sub $0xc,%esp 10c745: 57 push %edi 10c746: e8 21 35 00 00 call 10fc6c <_Timespec_To_ticks> if ( !interval ) 10c74b: 83 c4 10 add $0x10,%esp 10c74e: 85 c0 test %eax,%eax 10c750: 0f 84 4a 01 00 00 je 10c8a0 <== NEVER TAKEN /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c756: 85 db test %ebx,%ebx 10c758: 0f 84 f8 00 00 00 je 10c856 <== NEVER TAKEN the_thread = _Thread_Executing; 10c75e: 8b 15 98 b7 12 00 mov 0x12b798,%edx api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 10c764: 8b ba f8 00 00 00 mov 0xf8(%edx),%edi * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 10c76a: 9c pushf 10c76b: fa cli 10c76c: 8f 45 d0 popl -0x30(%ebp) if ( *set & api->signals_pending ) { 10c76f: 8b 0e mov (%esi),%ecx 10c771: 89 4d d4 mov %ecx,-0x2c(%ebp) 10c774: 8b 8f d0 00 00 00 mov 0xd0(%edi),%ecx 10c77a: 85 4d d4 test %ecx,-0x2c(%ebp) 10c77d: 0f 85 dd 00 00 00 jne 10c860 return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 10c783: 8b 0d c8 be 12 00 mov 0x12bec8,%ecx 10c789: 85 4d d4 test %ecx,-0x2c(%ebp) 10c78c: 75 7e jne 10c80c <== NEVER TAKEN the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 10c78e: c7 03 ff ff ff ff movl $0xffffffff,(%ebx) 10c794: 8b 0d d8 b6 12 00 mov 0x12b6d8,%ecx 10c79a: 41 inc %ecx 10c79b: 89 0d d8 b6 12 00 mov %ecx,0x12b6d8 _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 10c7a1: c7 42 44 60 be 12 00 movl $0x12be60,0x44(%edx) the_thread->Wait.return_code = EINTR; 10c7a8: c7 42 34 04 00 00 00 movl $0x4,0x34(%edx) the_thread->Wait.option = *set; 10c7af: 8b 0e mov (%esi),%ecx 10c7b1: 89 4a 30 mov %ecx,0x30(%edx) the_thread->Wait.return_argument = the_info; 10c7b4: 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; 10c7b7: c7 05 90 be 12 00 01 movl $0x1,0x12be90 10c7be: 00 00 00 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 10c7c1: ff 75 d0 pushl -0x30(%ebp) 10c7c4: 9d popf _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 10c7c5: 52 push %edx 10c7c6: 68 ac f7 10 00 push $0x10f7ac 10c7cb: 50 push %eax 10c7cc: 68 60 be 12 00 push $0x12be60 10c7d1: e8 c6 2c 00 00 call 10f49c <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 10c7d6: e8 89 27 00 00 call 10ef64 <_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 ); 10c7db: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c7e2: 6a 00 push $0x0 10c7e4: 53 push %ebx 10c7e5: ff 33 pushl (%ebx) 10c7e7: 57 push %edi 10c7e8: e8 3f 63 00 00 call 112b2c <_POSIX_signals_Clear_signals> errno = _Thread_Executing->Wait.return_code; 10c7ed: 83 c4 20 add $0x20,%esp 10c7f0: e8 b3 99 00 00 call 1161a8 <__errno> 10c7f5: 8b 15 98 b7 12 00 mov 0x12b798,%edx 10c7fb: 8b 52 34 mov 0x34(%edx),%edx 10c7fe: 89 10 mov %edx,(%eax) return the_info->si_signo; 10c800: 8b 33 mov (%ebx),%esi } 10c802: 89 f0 mov %esi,%eax 10c804: 8d 65 f4 lea -0xc(%ebp),%esp 10c807: 5b pop %ebx 10c808: 5e pop %esi 10c809: 5f pop %edi 10c80a: c9 leave 10c80b: c3 ret } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 10c80c: 83 ec 0c sub $0xc,%esp 10c80f: 51 push %ecx 10c810: e8 b3 fe ff ff call 10c6c8 <_POSIX_signals_Get_highest> 10c815: 89 c6 mov %eax,%esi _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); 10c817: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c81e: 6a 01 push $0x1 10c820: 53 push %ebx 10c821: 50 push %eax 10c822: 57 push %edi 10c823: e8 04 63 00 00 call 112b2c <_POSIX_signals_Clear_signals> _ISR_Enable( level ); 10c828: ff 75 d0 pushl -0x30(%ebp) 10c82b: 9d popf the_info->si_signo = signo; 10c82c: 89 33 mov %esi,(%ebx) the_info->si_code = SI_USER; 10c82e: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c835: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return signo; 10c83c: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10c83f: 89 f0 mov %esi,%eax 10c841: 8d 65 f4 lea -0xc(%ebp),%esp 10c844: 5b pop %ebx 10c845: 5e pop %esi 10c846: 5f pop %edi 10c847: c9 leave 10c848: c3 ret 10c849: 8d 76 00 lea 0x0(%esi),%esi rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c84c: 31 c0 xor %eax,%eax /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 10c84e: 85 db test %ebx,%ebx 10c850: 0f 85 08 ff ff ff jne 10c75e 10c856: 8d 5d dc lea -0x24(%ebp),%ebx 10c859: e9 00 ff ff ff jmp 10c75e 10c85e: 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_highest( api->signals_pending ); 10c860: 83 ec 0c sub $0xc,%esp 10c863: 51 push %ecx 10c864: e8 5f fe ff ff call 10c6c8 <_POSIX_signals_Get_highest> 10c869: 89 03 mov %eax,(%ebx) _POSIX_signals_Clear_signals( 10c86b: c7 04 24 00 00 00 00 movl $0x0,(%esp) 10c872: 6a 00 push $0x0 10c874: 53 push %ebx 10c875: 50 push %eax 10c876: 57 push %edi 10c877: e8 b0 62 00 00 call 112b2c <_POSIX_signals_Clear_signals> the_info->si_signo, the_info, false, false ); _ISR_Enable( level ); 10c87c: ff 75 d0 pushl -0x30(%ebp) 10c87f: 9d popf the_info->si_code = SI_USER; 10c880: c7 43 04 01 00 00 00 movl $0x1,0x4(%ebx) the_info->si_value.sival_int = 0; 10c887: c7 43 08 00 00 00 00 movl $0x0,0x8(%ebx) return the_info->si_signo; 10c88e: 8b 33 mov (%ebx),%esi 10c890: 83 c4 20 add $0x20,%esp */ _POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false ); errno = _Thread_Executing->Wait.return_code; return the_info->si_signo; } 10c893: 89 f0 mov %esi,%eax 10c895: 8d 65 f4 lea -0xc(%ebp),%esp 10c898: 5b pop %ebx 10c899: 5e pop %esi 10c89a: 5f pop %edi 10c89b: c9 leave 10c89c: c3 ret 10c89d: 8d 76 00 lea 0x0(%esi),%esi rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c8a0: e8 03 99 00 00 call 1161a8 <__errno> 10c8a5: c7 00 16 00 00 00 movl $0x16,(%eax) 10c8ab: be ff ff ff ff mov $0xffffffff,%esi 10c8b0: e9 4d ff ff ff jmp 10c802 =============================================================================== 0010e2cc : int sigwait( const sigset_t *set, int *sig ) { 10e2cc: 55 push %ebp 10e2cd: 89 e5 mov %esp,%ebp 10e2cf: 53 push %ebx 10e2d0: 83 ec 08 sub $0x8,%esp 10e2d3: 8b 5d 0c mov 0xc(%ebp),%ebx int status; status = sigtimedwait( set, NULL, NULL ); 10e2d6: 6a 00 push $0x0 10e2d8: 6a 00 push $0x0 10e2da: ff 75 08 pushl 0x8(%ebp) 10e2dd: e8 26 fe ff ff call 10e108 if ( status != -1 ) { 10e2e2: 83 c4 10 add $0x10,%esp 10e2e5: 83 f8 ff cmp $0xffffffff,%eax 10e2e8: 74 0e je 10e2f8 if ( sig ) 10e2ea: 85 db test %ebx,%ebx 10e2ec: 74 02 je 10e2f0 <== NEVER TAKEN *sig = status; 10e2ee: 89 03 mov %eax,(%ebx) 10e2f0: 31 c0 xor %eax,%eax return 0; } return errno; } 10e2f2: 8b 5d fc mov -0x4(%ebp),%ebx 10e2f5: c9 leave 10e2f6: c3 ret 10e2f7: 90 nop if ( sig ) *sig = status; return 0; } return errno; 10e2f8: e8 57 96 00 00 call 117954 <__errno> 10e2fd: 8b 00 mov (%eax),%eax } 10e2ff: 8b 5d fc mov -0x4(%ebp),%ebx 10e302: c9 leave 10e303: c3 ret =============================================================================== 0010a1a4 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 10a1a4: 55 push %ebp <== NOT EXECUTED 10a1a5: 89 e5 mov %esp,%ebp <== NOT EXECUTED 10a1a7: 56 push %esi <== NOT EXECUTED 10a1a8: 53 push %ebx <== NOT EXECUTED 10a1a9: 89 d3 mov %edx,%ebx <== NOT EXECUTED 10a1ab: 89 c6 mov %eax,%esi <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 10a1ad: f7 42 3c 78 0e 00 00 testl $0xe78,0x3c(%edx) <== NOT EXECUTED 10a1b4: 75 12 jne 10a1c8 <== 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); 10a1b6: 0f b6 c0 movzbl %al,%eax <== NOT EXECUTED 10a1b9: 89 da mov %ebx,%edx <== NOT EXECUTED } return i; } 10a1bb: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a1be: 5b pop %ebx <== NOT EXECUTED 10a1bf: 5e pop %esi <== NOT EXECUTED 10a1c0: 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); 10a1c1: e9 a2 fe ff ff jmp 10a068 <== NOT EXECUTED 10a1c6: 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); 10a1c8: 52 push %edx <== NOT EXECUTED 10a1c9: 6a 00 push $0x0 <== NOT EXECUTED 10a1cb: 6a 00 push $0x0 <== NOT EXECUTED 10a1cd: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 10a1d0: e8 d3 1a 00 00 call 10bca8 <== NOT EXECUTED i = iproc (c, tty); 10a1d5: 89 f2 mov %esi,%edx <== NOT EXECUTED 10a1d7: 0f b6 c2 movzbl %dl,%eax <== NOT EXECUTED 10a1da: 89 da mov %ebx,%edx <== NOT EXECUTED 10a1dc: e8 87 fe ff ff call 10a068 <== NOT EXECUTED 10a1e1: 89 c6 mov %eax,%esi <== NOT EXECUTED rtems_semaphore_release (tty->osem); 10a1e3: 58 pop %eax <== NOT EXECUTED 10a1e4: ff 73 18 pushl 0x18(%ebx) <== NOT EXECUTED 10a1e7: e8 b8 1b 00 00 call 10bda4 <== NOT EXECUTED 10a1ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 10a1ef: 89 f0 mov %esi,%eax <== NOT EXECUTED 10a1f1: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a1f4: 5b pop %ebx <== NOT EXECUTED 10a1f5: 5e pop %esi <== NOT EXECUTED 10a1f6: c9 leave <== NOT EXECUTED 10a1f7: c3 ret <== NOT EXECUTED =============================================================================== 0010a5a0 : int _STAT_NAME( const char *path, struct stat *buf ) { 10a5a0: 55 push %ebp 10a5a1: 89 e5 mov %esp,%ebp 10a5a3: 57 push %edi 10a5a4: 56 push %esi 10a5a5: 53 push %ebx 10a5a6: 83 ec 2c sub $0x2c,%esp 10a5a9: 8b 55 08 mov 0x8(%ebp),%edx 10a5ac: 8b 75 0c mov 0xc(%ebp),%esi /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 10a5af: 85 f6 test %esi,%esi 10a5b1: 0f 84 9d 00 00 00 je 10a654 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, strlen( path ), 10a5b7: b9 ff ff ff ff mov $0xffffffff,%ecx 10a5bc: 89 d7 mov %edx,%edi 10a5be: 31 c0 xor %eax,%eax 10a5c0: f2 ae repnz scas %es:(%edi),%al 10a5c2: f7 d1 not %ecx 10a5c4: 49 dec %ecx 10a5c5: 83 ec 0c sub $0xc,%esp 10a5c8: 6a 01 push $0x1 10a5ca: 8d 5d d4 lea -0x2c(%ebp),%ebx 10a5cd: 53 push %ebx 10a5ce: 6a 00 push $0x0 10a5d0: 51 push %ecx 10a5d1: 52 push %edx 10a5d2: e8 4d e9 ff ff call 108f24 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 10a5d7: 83 c4 20 add $0x20,%esp 10a5da: 85 c0 test %eax,%eax 10a5dc: 75 66 jne 10a644 return -1; if ( !loc.handlers->fstat_h ){ 10a5de: 8b 55 dc mov -0x24(%ebp),%edx 10a5e1: 8b 42 18 mov 0x18(%edx),%eax 10a5e4: 85 c0 test %eax,%eax 10a5e6: 74 39 je 10a621 <== NEVER TAKEN /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 10a5e8: b9 48 00 00 00 mov $0x48,%ecx 10a5ed: 89 f7 mov %esi,%edi 10a5ef: 31 c0 xor %eax,%eax 10a5f1: f3 aa rep stos %al,%es:(%edi) status = (*loc.handlers->fstat_h)( &loc, buf ); 10a5f3: 83 ec 08 sub $0x8,%esp 10a5f6: 56 push %esi 10a5f7: 53 push %ebx 10a5f8: ff 52 18 call *0x18(%edx) 10a5fb: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10a5fd: 8b 45 e0 mov -0x20(%ebp),%eax 10a600: 83 c4 10 add $0x10,%esp 10a603: 85 c0 test %eax,%eax 10a605: 74 10 je 10a617 <== NEVER TAKEN 10a607: 8b 40 1c mov 0x1c(%eax),%eax 10a60a: 85 c0 test %eax,%eax 10a60c: 74 09 je 10a617 <== NEVER TAKEN 10a60e: 83 ec 0c sub $0xc,%esp 10a611: 53 push %ebx 10a612: ff d0 call *%eax 10a614: 83 c4 10 add $0x10,%esp return status; } 10a617: 89 f0 mov %esi,%eax 10a619: 8d 65 f4 lea -0xc(%ebp),%esp 10a61c: 5b pop %ebx 10a61d: 5e pop %esi 10a61e: 5f pop %edi 10a61f: c9 leave 10a620: c3 ret 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 10a621: 8b 45 e0 mov -0x20(%ebp),%eax <== NOT EXECUTED 10a624: 85 c0 test %eax,%eax <== NOT EXECUTED 10a626: 74 10 je 10a638 <== NOT EXECUTED 10a628: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 10a62b: 85 c0 test %eax,%eax <== NOT EXECUTED 10a62d: 74 09 je 10a638 <== NOT EXECUTED 10a62f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a632: 53 push %ebx <== NOT EXECUTED 10a633: ff d0 call *%eax <== NOT EXECUTED 10a635: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a638: e8 a7 bb 00 00 call 1161e4 <__errno> <== NOT EXECUTED 10a63d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a643: 90 nop <== NOT EXECUTED 10a644: be ff ff ff ff mov $0xffffffff,%esi status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10a649: 89 f0 mov %esi,%eax 10a64b: 8d 65 f4 lea -0xc(%ebp),%esp 10a64e: 5b pop %ebx 10a64f: 5e pop %esi 10a650: 5f pop %edi 10a651: c9 leave 10a652: c3 ret 10a653: 90 nop /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 10a654: e8 8b bb 00 00 call 1161e4 <__errno> 10a659: c7 00 0e 00 00 00 movl $0xe,(%eax) 10a65f: be ff ff ff ff mov $0xffffffff,%esi status = (*loc.handlers->fstat_h)( &loc, buf ); rtems_filesystem_freenode( &loc ); return status; } 10a664: 89 f0 mov %esi,%eax 10a666: 8d 65 f4 lea -0xc(%ebp),%esp 10a669: 5b pop %ebx 10a66a: 5e pop %esi 10a66b: 5f pop %edi 10a66c: c9 leave 10a66d: c3 ret =============================================================================== 0010a6b4 : int symlink( const char *actualpath, const char *sympath ) { 10a6b4: 55 push %ebp 10a6b5: 89 e5 mov %esp,%ebp 10a6b7: 56 push %esi 10a6b8: 53 push %ebx 10a6b9: 83 ec 24 sub $0x24,%esp 10a6bc: 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 ); 10a6bf: 8d 5d dc lea -0x24(%ebp),%ebx 10a6c2: 53 push %ebx 10a6c3: 8d 45 f4 lea -0xc(%ebp),%eax 10a6c6: 50 push %eax 10a6c7: 56 push %esi 10a6c8: e8 63 ff ff ff call 10a630 if ( !loc.ops->evalformake_h ) { 10a6cd: 8b 45 e8 mov -0x18(%ebp),%eax 10a6d0: 8b 40 04 mov 0x4(%eax),%eax 10a6d3: 83 c4 10 add $0x10,%esp 10a6d6: 85 c0 test %eax,%eax 10a6d8: 74 5e je 10a738 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 10a6da: 51 push %ecx 10a6db: 8d 55 f0 lea -0x10(%ebp),%edx 10a6de: 52 push %edx 10a6df: 53 push %ebx 10a6e0: 03 75 f4 add -0xc(%ebp),%esi 10a6e3: 56 push %esi 10a6e4: ff d0 call *%eax if ( result != 0 ) 10a6e6: 83 c4 10 add $0x10,%esp 10a6e9: 85 c0 test %eax,%eax 10a6eb: 75 56 jne 10a743 return -1; if ( !loc.ops->symlink_h ) { 10a6ed: 8b 55 e8 mov -0x18(%ebp),%edx 10a6f0: 8b 42 38 mov 0x38(%edx),%eax 10a6f3: 85 c0 test %eax,%eax 10a6f5: 74 2f je 10a726 <== NEVER TAKEN rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 10a6f7: 52 push %edx 10a6f8: ff 75 f0 pushl -0x10(%ebp) 10a6fb: ff 75 08 pushl 0x8(%ebp) 10a6fe: 53 push %ebx 10a6ff: ff d0 call *%eax 10a701: 89 c6 mov %eax,%esi rtems_filesystem_freenode( &loc ); 10a703: 8b 45 e8 mov -0x18(%ebp),%eax 10a706: 83 c4 10 add $0x10,%esp 10a709: 85 c0 test %eax,%eax 10a70b: 74 10 je 10a71d <== NEVER TAKEN 10a70d: 8b 40 1c mov 0x1c(%eax),%eax 10a710: 85 c0 test %eax,%eax 10a712: 74 09 je 10a71d <== NEVER TAKEN 10a714: 83 ec 0c sub $0xc,%esp 10a717: 53 push %ebx 10a718: ff d0 call *%eax 10a71a: 83 c4 10 add $0x10,%esp return result; } 10a71d: 89 f0 mov %esi,%eax 10a71f: 8d 65 f8 lea -0x8(%ebp),%esp 10a722: 5b pop %ebx 10a723: 5e pop %esi 10a724: c9 leave 10a725: c3 ret result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 10a726: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10a729: 85 c0 test %eax,%eax <== NOT EXECUTED 10a72b: 74 0b je 10a738 <== NOT EXECUTED 10a72d: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10a730: 53 push %ebx <== NOT EXECUTED 10a731: ff d0 call *%eax <== NOT EXECUTED 10a733: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a736: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a738: e8 67 bb 00 00 call 1162a4 <__errno> <== NOT EXECUTED 10a73d: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10a743: be ff ff ff ff mov $0xffffffff,%esi result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); rtems_filesystem_freenode( &loc ); return result; } 10a748: 89 f0 mov %esi,%eax 10a74a: 8d 65 f8 lea -0x8(%ebp),%esp 10a74d: 5b pop %ebx 10a74e: 5e pop %esi 10a74f: c9 leave 10a750: c3 ret =============================================================================== 0010a70c : fdatasync(fn); } /* iterate over all FILE *'s for this thread */ static void sync_per_thread(Thread_Control *t) { 10a70c: 55 push %ebp 10a70d: 89 e5 mov %esp,%ebp 10a70f: 53 push %ebx 10a710: 83 ec 04 sub $0x4,%esp 10a713: 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; 10a716: 8b 90 f0 00 00 00 mov 0xf0(%eax),%edx if ( this_reent ) { 10a71c: 85 d2 test %edx,%edx 10a71e: 74 33 je 10a753 <== NEVER TAKEN current_reent = _Thread_Executing->libc_reent; 10a720: 8b 0d 18 b2 12 00 mov 0x12b218,%ecx 10a726: 8b 99 f0 00 00 00 mov 0xf0(%ecx),%ebx _Thread_Executing->libc_reent = this_reent; 10a72c: 89 91 f0 00 00 00 mov %edx,0xf0(%ecx) _fwalk (t->libc_reent, sync_wrapper); 10a732: 83 ec 08 sub $0x8,%esp 10a735: 68 80 a7 10 00 push $0x10a780 10a73a: ff b0 f0 00 00 00 pushl 0xf0(%eax) 10a740: e8 b3 c9 00 00 call 1170f8 <_fwalk> _Thread_Executing->libc_reent = current_reent; 10a745: a1 18 b2 12 00 mov 0x12b218,%eax 10a74a: 89 98 f0 00 00 00 mov %ebx,0xf0(%eax) 10a750: 83 c4 10 add $0x10,%esp } } 10a753: 8b 5d fc mov -0x4(%ebp),%ebx 10a756: c9 leave 10a757: c3 ret =============================================================================== 0010b7b8 : */ long sysconf( int name ) { 10b7b8: 55 push %ebp 10b7b9: 89 e5 mov %esp,%ebp 10b7bb: 83 ec 08 sub $0x8,%esp 10b7be: 8b 45 08 mov 0x8(%ebp),%eax if ( name == _SC_CLK_TCK ) 10b7c1: 83 f8 02 cmp $0x2,%eax 10b7c4: 74 16 je 10b7dc return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) 10b7c6: 83 f8 04 cmp $0x4,%eax 10b7c9: 74 21 je 10b7ec return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b7cb: 83 f8 33 cmp $0x33,%eax 10b7ce: 74 24 je 10b7f4 return 1024; if ( name == _SC_PAGESIZE ) 10b7d0: 83 f8 08 cmp $0x8,%eax 10b7d3: 75 27 jne 10b7fc 10b7d5: 66 b8 00 10 mov $0x1000,%ax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7d9: c9 leave 10b7da: c3 ret 10b7db: 90 nop long sysconf( int name ) { if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / 10b7dc: b8 40 42 0f 00 mov $0xf4240,%eax 10b7e1: 31 d2 xor %edx,%edx 10b7e3: f7 35 0c 64 12 00 divl 0x12640c if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7e9: c9 leave 10b7ea: c3 ret 10b7eb: 90 nop if ( name == _SC_CLK_TCK ) return (TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; 10b7ec: a1 ec 62 12 00 mov 0x1262ec,%eax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7f1: c9 leave 10b7f2: c3 ret 10b7f3: 90 nop rtems_configuration_get_microseconds_per_tick()); if ( name == _SC_OPEN_MAX ) return rtems_libio_number_iops; if ( name == _SC_GETPW_R_SIZE_MAX ) 10b7f4: 66 b8 00 04 mov $0x400,%ax if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); } 10b7f8: c9 leave 10b7f9: c3 ret 10b7fa: 66 90 xchg %ax,%ax #if defined(__sparc__) if ( name == 515 ) /* Solaris _SC_STACK_PROT */ return 0; #endif rtems_set_errno_and_return_minus_one( EINVAL ); 10b7fc: e8 43 9e 00 00 call 115644 <__errno> 10b801: c7 00 16 00 00 00 movl $0x16,(%eax) 10b807: b8 ff ff ff ff mov $0xffffffff,%eax } 10b80c: c9 leave 10b80d: c3 ret =============================================================================== 0010a6e0 : int tcsetattr( int fd, int opt, struct termios *tp ) { 10a6e0: 55 push %ebp 10a6e1: 89 e5 mov %esp,%ebp 10a6e3: 56 push %esi 10a6e4: 53 push %ebx 10a6e5: 8b 5d 08 mov 0x8(%ebp),%ebx 10a6e8: 8b 45 0c mov 0xc(%ebp),%eax 10a6eb: 8b 75 10 mov 0x10(%ebp),%esi switch (opt) { 10a6ee: 85 c0 test %eax,%eax 10a6f0: 74 2c je 10a71e <== ALWAYS TAKEN 10a6f2: 48 dec %eax <== NOT EXECUTED 10a6f3: 74 17 je 10a70c <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 10a6f5: e8 76 be 00 00 call 116570 <__errno> <== NOT EXECUTED 10a6fa: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 10a700: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10a705: 8d 65 f8 lea -0x8(%ebp),%esp <== NOT EXECUTED 10a708: 5b pop %ebx <== NOT EXECUTED 10a709: 5e pop %esi <== NOT EXECUTED 10a70a: c9 leave <== NOT EXECUTED 10a70b: c3 ret <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 10a70c: 50 push %eax <== NOT EXECUTED 10a70d: 6a 00 push $0x0 <== NOT EXECUTED 10a70f: 6a 03 push $0x3 <== NOT EXECUTED 10a711: 53 push %ebx <== NOT EXECUTED 10a712: e8 91 7d 00 00 call 1124a8 <== NOT EXECUTED 10a717: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10a71a: 85 c0 test %eax,%eax <== NOT EXECUTED 10a71c: 78 e2 js 10a700 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a71e: 89 75 10 mov %esi,0x10(%ebp) 10a721: c7 45 0c 02 00 00 00 movl $0x2,0xc(%ebp) 10a728: 89 5d 08 mov %ebx,0x8(%ebp) } } 10a72b: 8d 65 f8 lea -0x8(%ebp),%esp 10a72e: 5b pop %ebx 10a72f: 5e pop %esi 10a730: c9 leave return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 10a731: e9 72 7d 00 00 jmp 1124a8 =============================================================================== 0010baf8 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 10baf8: 55 push %ebp 10baf9: 89 e5 mov %esp,%ebp 10bafb: 56 push %esi 10bafc: 53 push %ebx 10bafd: 8b 5d 0c mov 0xc(%ebp),%ebx 10bb00: 8b 75 10 mov 0x10(%ebp),%esi POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 10bb03: 83 7d 08 01 cmpl $0x1,0x8(%ebp) 10bb07: 0f 85 db 00 00 00 jne 10bbe8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) 10bb0d: 85 f6 test %esi,%esi 10bb0f: 0f 84 d3 00 00 00 je 10bbe8 <== NEVER TAKEN /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 10bb15: 85 db test %ebx,%ebx 10bb17: 74 21 je 10bb3a /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 10bb19: 8b 03 mov (%ebx),%eax 10bb1b: 48 dec %eax 10bb1c: 83 f8 01 cmp $0x1,%eax 10bb1f: 0f 87 c3 00 00 00 ja 10bbe8 <== 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 ) 10bb25: 8b 43 04 mov 0x4(%ebx),%eax 10bb28: 85 c0 test %eax,%eax 10bb2a: 0f 84 b8 00 00 00 je 10bbe8 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 10bb30: 48 dec %eax 10bb31: 83 f8 1f cmp $0x1f,%eax 10bb34: 0f 87 ae 00 00 00 ja 10bbe8 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 10bb3a: a1 b8 b2 12 00 mov 0x12b2b8,%eax 10bb3f: 40 inc %eax 10bb40: a3 b8 b2 12 00 mov %eax,0x12b2b8 * 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 ); 10bb45: 83 ec 0c sub $0xc,%esp 10bb48: 68 40 b6 12 00 push $0x12b640 10bb4d: e8 42 1e 00 00 call 10d994 <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 10bb52: 83 c4 10 add $0x10,%esp 10bb55: 85 c0 test %eax,%eax 10bb57: 0f 84 a2 00 00 00 je 10bbff <== NEVER TAKEN 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; 10bb5d: c6 40 3c 02 movb $0x2,0x3c(%eax) ptimer->thread_id = _Thread_Executing->Object.id; 10bb61: 8b 15 78 b3 12 00 mov 0x12b378,%edx 10bb67: 8b 52 08 mov 0x8(%edx),%edx 10bb6a: 89 50 38 mov %edx,0x38(%eax) if ( evp != NULL ) { 10bb6d: 85 db test %ebx,%ebx 10bb6f: 74 11 je 10bb82 ptimer->inf.sigev_notify = evp->sigev_notify; 10bb71: 8b 13 mov (%ebx),%edx 10bb73: 89 50 40 mov %edx,0x40(%eax) ptimer->inf.sigev_signo = evp->sigev_signo; 10bb76: 8b 53 04 mov 0x4(%ebx),%edx 10bb79: 89 50 44 mov %edx,0x44(%eax) ptimer->inf.sigev_value = evp->sigev_value; 10bb7c: 8b 53 08 mov 0x8(%ebx),%edx 10bb7f: 89 50 48 mov %edx,0x48(%eax) } ptimer->overrun = 0; 10bb82: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) ptimer->timer_data.it_value.tv_sec = 0; 10bb89: c7 40 5c 00 00 00 00 movl $0x0,0x5c(%eax) ptimer->timer_data.it_value.tv_nsec = 0; 10bb90: c7 40 60 00 00 00 00 movl $0x0,0x60(%eax) ptimer->timer_data.it_interval.tv_sec = 0; 10bb97: c7 40 54 00 00 00 00 movl $0x0,0x54(%eax) ptimer->timer_data.it_interval.tv_nsec = 0; 10bb9e: 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; 10bba5: c7 40 18 00 00 00 00 movl $0x0,0x18(%eax) the_watchdog->routine = routine; 10bbac: c7 40 2c 00 00 00 00 movl $0x0,0x2c(%eax) the_watchdog->id = id; 10bbb3: c7 40 30 00 00 00 00 movl $0x0,0x30(%eax) the_watchdog->user_data = user_data; 10bbba: c7 40 34 00 00 00 00 movl $0x0,0x34(%eax) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 10bbc1: 8b 50 08 mov 0x8(%eax),%edx 10bbc4: 0f b7 da movzwl %dx,%ebx 10bbc7: 8b 0d 5c b6 12 00 mov 0x12b65c,%ecx 10bbcd: 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; 10bbd0: 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; 10bbd7: 89 16 mov %edx,(%esi) _Thread_Enable_dispatch(); 10bbd9: e8 da 2a 00 00 call 10e6b8 <_Thread_Enable_dispatch> 10bbde: 31 c0 xor %eax,%eax return 0; } 10bbe0: 8d 65 f8 lea -0x8(%ebp),%esp 10bbe3: 5b pop %ebx 10bbe4: 5e pop %esi 10bbe5: c9 leave 10bbe6: c3 ret 10bbe7: 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 ); 10bbe8: e8 b7 9f 00 00 call 115ba4 <__errno> 10bbed: c7 00 16 00 00 00 movl $0x16,(%eax) 10bbf3: 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; } 10bbf8: 8d 65 f8 lea -0x8(%ebp),%esp 10bbfb: 5b pop %ebx 10bbfc: 5e pop %esi 10bbfd: c9 leave 10bbfe: c3 ret /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); 10bbff: e8 b4 2a 00 00 call 10e6b8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 10bc04: e8 9b 9f 00 00 call 115ba4 <__errno> 10bc09: c7 00 0b 00 00 00 movl $0xb,(%eax) 10bc0f: b8 ff ff ff ff mov $0xffffffff,%eax 10bc14: eb ca jmp 10bbe0 =============================================================================== 0010c038 : int timer_delete( timer_t timerid ) { 10c038: 55 push %ebp 10c039: 89 e5 mov %esp,%ebp 10c03b: 53 push %ebx 10c03c: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10c03f: 8d 45 f4 lea -0xc(%ebp),%eax 10c042: 50 push %eax 10c043: ff 75 08 pushl 0x8(%ebp) 10c046: 68 40 b8 12 00 push $0x12b840 10c04b: e8 4c 21 00 00 call 10e19c <_Objects_Get> 10c050: 89 c3 mov %eax,%ebx */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10c052: 83 c4 10 add $0x10,%esp 10c055: 8b 4d f4 mov -0xc(%ebp),%ecx 10c058: 85 c9 test %ecx,%ecx 10c05a: 74 18 je 10c074 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10c05c: e8 a7 a2 00 00 call 116308 <__errno> 10c061: c7 00 16 00 00 00 movl $0x16,(%eax) 10c067: b8 ff ff ff ff mov $0xffffffff,%eax } 10c06c: 8b 5d fc mov -0x4(%ebp),%ebx 10c06f: c9 leave 10c070: c3 ret 10c071: 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 ); 10c074: 83 ec 08 sub $0x8,%esp 10c077: 50 push %eax 10c078: 68 40 b8 12 00 push $0x12b840 10c07d: e8 e6 1c 00 00 call 10dd68 <_Objects_Close> ptimer->state = POSIX_TIMER_STATE_FREE; 10c082: c6 43 3c 01 movb $0x1,0x3c(%ebx) (void) _Watchdog_Remove( &ptimer->Timer ); 10c086: 8d 43 10 lea 0x10(%ebx),%eax 10c089: 89 04 24 mov %eax,(%esp) 10c08c: e8 eb 3a 00 00 call 10fb7c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 10c091: 58 pop %eax 10c092: 5a pop %edx 10c093: 53 push %ebx 10c094: 68 40 b8 12 00 push $0x12b840 10c099: e8 ce 1f 00 00 call 10e06c <_Objects_Free> _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); 10c09e: e8 6d 29 00 00 call 10ea10 <_Thread_Enable_dispatch> 10c0a3: 31 c0 xor %eax,%eax return 0; 10c0a5: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10c0a8: 8b 5d fc mov -0x4(%ebp),%ebx 10c0ab: c9 leave 10c0ac: c3 ret =============================================================================== 0010cf00 : * its execution, _POSIX_Timer_TSR will have to set this counter to 0. */ int timer_getoverrun( timer_t timerid ) { 10cf00: 55 push %ebp 10cf01: 89 e5 mov %esp,%ebp 10cf03: 53 push %ebx 10cf04: 83 ec 18 sub $0x18,%esp RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10cf07: 8d 45 f4 lea -0xc(%ebp),%eax 10cf0a: 50 push %eax 10cf0b: ff 75 08 pushl 0x8(%ebp) 10cf0e: 68 e0 cf 12 00 push $0x12cfe0 10cf13: e8 d4 20 00 00 call 10efec <_Objects_Get> int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10cf18: 83 c4 10 add $0x10,%esp 10cf1b: 8b 55 f4 mov -0xc(%ebp),%edx 10cf1e: 85 d2 test %edx,%edx 10cf20: 74 1a je 10cf3c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cf22: e8 55 9e 00 00 call 116d7c <__errno> 10cf27: c7 00 16 00 00 00 movl $0x16,(%eax) 10cf2d: bb ff ff ff ff mov $0xffffffff,%ebx } 10cf32: 89 d8 mov %ebx,%eax 10cf34: 8b 5d fc mov -0x4(%ebp),%ebx 10cf37: c9 leave 10cf38: c3 ret 10cf39: 8d 76 00 lea 0x0(%esi),%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { case OBJECTS_LOCAL: overrun = ptimer->overrun; 10cf3c: 8b 58 68 mov 0x68(%eax),%ebx ptimer->overrun = 0; 10cf3f: c7 40 68 00 00 00 00 movl $0x0,0x68(%eax) _Thread_Enable_dispatch(); 10cf46: e8 15 29 00 00 call 10f860 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10cf4b: 89 d8 mov %ebx,%eax 10cf4d: 8b 5d fc mov -0x4(%ebp),%ebx 10cf50: c9 leave 10cf51: c3 ret =============================================================================== 0010cf54 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 10cf54: 55 push %ebp 10cf55: 89 e5 mov %esp,%ebp 10cf57: 56 push %esi 10cf58: 53 push %ebx 10cf59: 83 ec 10 sub $0x10,%esp 10cf5c: 8b 5d 0c mov 0xc(%ebp),%ebx POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; Watchdog_Interval left; if ( !value ) 10cf5f: 85 db test %ebx,%ebx 10cf61: 74 65 je 10cfc8 rtems_set_errno_and_return_minus_one( EINVAL ); /* Reads the current time */ _TOD_Get( ¤t_time ); 10cf63: 83 ec 0c sub $0xc,%esp 10cf66: 8d 45 ec lea -0x14(%ebp),%eax 10cf69: 50 push %eax 10cf6a: e8 e5 16 00 00 call 10e654 <_TOD_Get> 10cf6f: 83 c4 0c add $0xc,%esp 10cf72: 8d 45 f4 lea -0xc(%ebp),%eax 10cf75: 50 push %eax 10cf76: ff 75 08 pushl 0x8(%ebp) 10cf79: 68 e0 cf 12 00 push $0x12cfe0 10cf7e: e8 69 20 00 00 call 10efec <_Objects_Get> 10cf83: 89 c6 mov %eax,%esi ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10cf85: 83 c4 10 add $0x10,%esp 10cf88: 8b 45 f4 mov -0xc(%ebp),%eax 10cf8b: 85 c0 test %eax,%eax 10cf8d: 75 39 jne 10cfc8 case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ left = (ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */ 10cf8f: a1 c4 cd 12 00 mov 0x12cdc4,%eax _Watchdog_Ticks_since_boot; /* now */ _Timespec_From_ticks( left, &value->it_value ); 10cf94: 83 ec 08 sub $0x8,%esp 10cf97: 8d 53 08 lea 0x8(%ebx),%edx 10cf9a: 52 push %edx 10cf9b: 8b 56 1c mov 0x1c(%esi),%edx 10cf9e: 03 56 24 add 0x24(%esi),%edx 10cfa1: 29 c2 sub %eax,%edx 10cfa3: 52 push %edx 10cfa4: e8 5b 35 00 00 call 110504 <_Timespec_From_ticks> value->it_interval = ptimer->timer_data.it_interval; 10cfa9: 8b 46 54 mov 0x54(%esi),%eax 10cfac: 8b 56 58 mov 0x58(%esi),%edx 10cfaf: 89 03 mov %eax,(%ebx) 10cfb1: 89 53 04 mov %edx,0x4(%ebx) _Thread_Enable_dispatch(); 10cfb4: e8 a7 28 00 00 call 10f860 <_Thread_Enable_dispatch> 10cfb9: 31 c0 xor %eax,%eax return 0; 10cfbb: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10cfbe: 8d 65 f8 lea -0x8(%ebp),%esp 10cfc1: 5b pop %ebx 10cfc2: 5e pop %esi 10cfc3: c9 leave 10cfc4: c3 ret 10cfc5: 8d 76 00 lea 0x0(%esi),%esi #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10cfc8: e8 af 9d 00 00 call 116d7c <__errno> 10cfcd: c7 00 16 00 00 00 movl $0x16,(%eax) 10cfd3: b8 ff ff ff ff mov $0xffffffff,%eax 10cfd8: eb e4 jmp 10cfbe =============================================================================== 0010bc18 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 10bc18: 55 push %ebp 10bc19: 89 e5 mov %esp,%ebp 10bc1b: 57 push %edi 10bc1c: 56 push %esi 10bc1d: 53 push %ebx 10bc1e: 83 ec 3c sub $0x3c,%esp 10bc21: 8b 4d 0c mov 0xc(%ebp),%ecx 10bc24: 8b 5d 10 mov 0x10(%ebp),%ebx Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 10bc27: 85 db test %ebx,%ebx 10bc29: 0f 84 39 01 00 00 je 10bd68 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) || 10bc2f: 81 7b 0c ff c9 9a 3b cmpl $0x3b9ac9ff,0xc(%ebx) 10bc36: 0f 87 2c 01 00 00 ja 10bd68 ( value->it_value.tv_nsec < 0 ) || ( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) || 10bc3c: 81 7b 04 ff c9 9a 3b cmpl $0x3b9ac9ff,0x4(%ebx) 10bc43: 0f 87 1f 01 00 00 ja 10bd68 <== NEVER TAKEN ( value->it_interval.tv_nsec < 0 )) { /* The number of nanoseconds is not correct */ rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 10bc49: 83 f9 04 cmp $0x4,%ecx 10bc4c: 0f 84 da 00 00 00 je 10bd2c 10bc52: 85 c9 test %ecx,%ecx 10bc54: 0f 85 0e 01 00 00 jne 10bd68 rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10bc5a: 8d 45 cc lea -0x34(%ebp),%eax 10bc5d: 89 45 c4 mov %eax,-0x3c(%ebp) 10bc60: b9 04 00 00 00 mov $0x4,%ecx 10bc65: 89 c7 mov %eax,%edi 10bc67: 89 de mov %ebx,%esi 10bc69: f3 a5 rep movsl %ds:(%esi),%es:(%edi) RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 10bc6b: 50 push %eax 10bc6c: 8d 45 e4 lea -0x1c(%ebp),%eax 10bc6f: 50 push %eax 10bc70: ff 75 08 pushl 0x8(%ebp) 10bc73: 68 40 b6 12 00 push $0x12b640 10bc78: e8 c7 21 00 00 call 10de44 <_Objects_Get> 10bc7d: 89 c2 mov %eax,%edx * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 10bc7f: 83 c4 10 add $0x10,%esp 10bc82: 8b 7d e4 mov -0x1c(%ebp),%edi 10bc85: 85 ff test %edi,%edi 10bc87: 0f 85 db 00 00 00 jne 10bd68 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 ) { 10bc8d: 8b 75 d4 mov -0x2c(%ebp),%esi 10bc90: 85 f6 test %esi,%esi 10bc92: 75 0b jne 10bc9f 10bc94: 8b 4d d8 mov -0x28(%ebp),%ecx 10bc97: 85 c9 test %ecx,%ecx 10bc99: 0f 84 e1 00 00 00 je 10bd80 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 10bc9f: 83 ec 0c sub $0xc,%esp 10bca2: 53 push %ebx 10bca3: 89 55 c0 mov %edx,-0x40(%ebp) 10bca6: e8 11 37 00 00 call 10f3bc <_Timespec_To_ticks> 10bcab: 8b 55 c0 mov -0x40(%ebp),%edx 10bcae: 89 42 64 mov %eax,0x64(%edx) initial_period = _Timespec_To_ticks( &normalize.it_value ); 10bcb1: 8d 45 d4 lea -0x2c(%ebp),%eax 10bcb4: 89 04 24 mov %eax,(%esp) 10bcb7: e8 00 37 00 00 call 10f3bc <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( 10bcbc: 8b 55 c0 mov -0x40(%ebp),%edx 10bcbf: 89 14 24 mov %edx,(%esp) 10bcc2: 68 ec bd 10 00 push $0x10bdec 10bcc7: ff 72 08 pushl 0x8(%edx) 10bcca: 50 push %eax 10bccb: 8d 42 10 lea 0x10(%edx),%eax 10bcce: 50 push %eax 10bccf: e8 1c 68 00 00 call 1124f0 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 10bcd4: 83 c4 20 add $0x20,%esp 10bcd7: 84 c0 test %al,%al 10bcd9: 8b 55 c0 mov -0x40(%ebp),%edx 10bcdc: 0f 84 ea 00 00 00 je 10bdcc /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 10bce2: 8b 45 14 mov 0x14(%ebp),%eax 10bce5: 85 c0 test %eax,%eax 10bce7: 0f 84 ef 00 00 00 je 10bddc *ovalue = ptimer->timer_data; 10bced: 8d 42 54 lea 0x54(%edx),%eax 10bcf0: b9 04 00 00 00 mov $0x4,%ecx 10bcf5: 8b 7d 14 mov 0x14(%ebp),%edi 10bcf8: 89 c6 mov %eax,%esi 10bcfa: f3 a5 rep movsl %ds:(%esi),%es:(%edi) ptimer->timer_data = normalize; 10bcfc: b9 04 00 00 00 mov $0x4,%ecx 10bd01: 89 c7 mov %eax,%edi 10bd03: 8b 75 c4 mov -0x3c(%ebp),%esi 10bd06: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 10bd08: c6 42 3c 03 movb $0x3,0x3c(%edx) _TOD_Get( &ptimer->time ); 10bd0c: 83 ec 0c sub $0xc,%esp 10bd0f: 83 c2 6c add $0x6c,%edx 10bd12: 52 push %edx 10bd13: e8 b8 17 00 00 call 10d4d0 <_TOD_Get> _Thread_Enable_dispatch(); 10bd18: e8 9b 29 00 00 call 10e6b8 <_Thread_Enable_dispatch> 10bd1d: 31 c0 xor %eax,%eax return 0; 10bd1f: 83 c4 10 add $0x10,%esp case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10bd22: 8d 65 f4 lea -0xc(%ebp),%esp 10bd25: 5b pop %ebx 10bd26: 5e pop %esi 10bd27: 5f pop %edi 10bd28: c9 leave 10bd29: c3 ret 10bd2a: 66 90 xchg %ax,%ax if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 10bd2c: 8d 45 cc lea -0x34(%ebp),%eax 10bd2f: 89 45 c4 mov %eax,-0x3c(%ebp) 10bd32: 89 c7 mov %eax,%edi 10bd34: 89 de mov %ebx,%esi 10bd36: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; _TOD_Get( &now ); 10bd38: 83 ec 0c sub $0xc,%esp 10bd3b: 8d 75 dc lea -0x24(%ebp),%esi 10bd3e: 56 push %esi 10bd3f: e8 8c 17 00 00 call 10d4d0 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) 10bd44: 59 pop %ecx 10bd45: 5f pop %edi 10bd46: 8d 7d d4 lea -0x2c(%ebp),%edi 10bd49: 57 push %edi 10bd4a: 56 push %esi 10bd4b: e8 0c 36 00 00 call 10f35c <_Timespec_Greater_than> 10bd50: 83 c4 10 add $0x10,%esp 10bd53: 84 c0 test %al,%al 10bd55: 75 11 jne 10bd68 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); 10bd57: 52 push %edx 10bd58: 57 push %edi 10bd59: 57 push %edi 10bd5a: 56 push %esi 10bd5b: e8 20 36 00 00 call 10f380 <_Timespec_Subtract> 10bd60: 83 c4 10 add $0x10,%esp 10bd63: e9 03 ff ff ff jmp 10bc6b #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 10bd68: e8 37 9e 00 00 call 115ba4 <__errno> 10bd6d: c7 00 16 00 00 00 movl $0x16,(%eax) 10bd73: b8 ff ff ff ff mov $0xffffffff,%eax } 10bd78: 8d 65 f4 lea -0xc(%ebp),%esp 10bd7b: 5b pop %ebx 10bd7c: 5e pop %esi 10bd7d: 5f pop %edi 10bd7e: c9 leave 10bd7f: c3 ret case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 10bd80: 83 ec 0c sub $0xc,%esp 10bd83: 8d 40 10 lea 0x10(%eax),%eax 10bd86: 50 push %eax 10bd87: 89 55 c0 mov %edx,-0x40(%ebp) 10bd8a: e8 4d 3a 00 00 call 10f7dc <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) 10bd8f: 83 c4 10 add $0x10,%esp 10bd92: 8b 55 14 mov 0x14(%ebp),%edx 10bd95: 85 d2 test %edx,%edx 10bd97: 8b 55 c0 mov -0x40(%ebp),%edx 10bd9a: 74 48 je 10bde4 *ovalue = ptimer->timer_data; 10bd9c: 8d 42 54 lea 0x54(%edx),%eax 10bd9f: b9 04 00 00 00 mov $0x4,%ecx 10bda4: 8b 7d 14 mov 0x14(%ebp),%edi 10bda7: 89 c6 mov %eax,%esi 10bda9: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* The new data are set */ ptimer->timer_data = normalize; 10bdab: b9 04 00 00 00 mov $0x4,%ecx 10bdb0: 89 c7 mov %eax,%edi 10bdb2: 8b 75 c4 mov -0x3c(%ebp),%esi 10bdb5: f3 a5 rep movsl %ds:(%esi),%es:(%edi) /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 10bdb7: c6 42 3c 04 movb $0x4,0x3c(%edx) /* Returns with success */ _Thread_Enable_dispatch(); 10bdbb: e8 f8 28 00 00 call 10e6b8 <_Thread_Enable_dispatch> 10bdc0: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10bdc2: 8d 65 f4 lea -0xc(%ebp),%esp 10bdc5: 5b pop %ebx 10bdc6: 5e pop %esi 10bdc7: 5f pop %edi 10bdc8: c9 leave 10bdc9: c3 ret 10bdca: 66 90 xchg %ax,%ax ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { _Thread_Enable_dispatch(); 10bdcc: e8 e7 28 00 00 call 10e6b8 <_Thread_Enable_dispatch> 10bdd1: 31 c0 xor %eax,%eax case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 10bdd3: 8d 65 f4 lea -0xc(%ebp),%esp 10bdd6: 5b pop %ebx 10bdd7: 5e pop %esi 10bdd8: 5f pop %edi 10bdd9: c9 leave 10bdda: c3 ret 10bddb: 90 nop 10bddc: 8d 42 54 lea 0x54(%edx),%eax 10bddf: e9 18 ff ff ff jmp 10bcfc 10bde4: 8d 42 54 lea 0x54(%edx),%eax 10bde7: eb c2 jmp 10bdab =============================================================================== 0010b9d0 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 10b9d0: 55 push %ebp 10b9d1: 89 e5 mov %esp,%ebp 10b9d3: 57 push %edi 10b9d4: 56 push %esi 10b9d5: 53 push %ebx 10b9d6: 83 ec 2c sub $0x2c,%esp 10b9d9: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 10b9dc: 8b 0d 7c b8 12 00 mov 0x12b87c,%ecx 10b9e2: 85 c9 test %ecx,%ecx 10b9e4: 0f 84 8e 00 00 00 je 10ba78 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 10b9ea: 83 ec 0c sub $0xc,%esp 10b9ed: 68 60 b8 12 00 push $0x12b860 10b9f2: e8 91 39 00 00 call 10f388 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 10b9f7: 83 e8 02 sub $0x2,%eax 10b9fa: 83 c4 10 add $0x10,%esp 10b9fd: 83 f8 01 cmp $0x1,%eax 10ba00: 0f 86 a2 00 00 00 jbe 10baa8 <== ALWAYS TAKEN 10ba06: 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 ) { 10ba08: 85 db test %ebx,%ebx 10ba0a: 74 62 je 10ba6e Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 10ba0c: ba 83 de 1b 43 mov $0x431bde83,%edx 10ba11: 89 d8 mov %ebx,%eax 10ba13: f7 e2 mul %edx 10ba15: c1 ea 12 shr $0x12,%edx 10ba18: 89 55 e0 mov %edx,-0x20(%ebp) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 10ba1b: 8d 04 92 lea (%edx,%edx,4),%eax 10ba1e: 8d 04 80 lea (%eax,%eax,4),%eax 10ba21: 8d 04 80 lea (%eax,%eax,4),%eax 10ba24: 8d 04 80 lea (%eax,%eax,4),%eax 10ba27: 8d 04 80 lea (%eax,%eax,4),%eax 10ba2a: 8d 04 80 lea (%eax,%eax,4),%eax 10ba2d: c1 e0 06 shl $0x6,%eax 10ba30: 29 c3 sub %eax,%ebx 10ba32: 8d 04 9b lea (%ebx,%ebx,4),%eax 10ba35: 8d 04 80 lea (%eax,%eax,4),%eax 10ba38: 8d 04 80 lea (%eax,%eax,4),%eax 10ba3b: c1 e0 03 shl $0x3,%eax 10ba3e: 89 45 e4 mov %eax,-0x1c(%ebp) ticks = _Timespec_To_ticks( &tp ); 10ba41: 83 ec 0c sub $0xc,%esp 10ba44: 8d 5d e0 lea -0x20(%ebp),%ebx 10ba47: 53 push %ebx 10ba48: e8 a3 34 00 00 call 10eef0 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 10ba4d: 89 1c 24 mov %ebx,(%esp) 10ba50: e8 9b 34 00 00 call 10eef0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10ba55: a3 6c b8 12 00 mov %eax,0x12b86c _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10ba5a: 58 pop %eax 10ba5b: 5a pop %edx 10ba5c: 68 60 b8 12 00 push $0x12b860 10ba61: 68 b8 af 12 00 push $0x12afb8 10ba66: e8 e5 37 00 00 call 10f250 <_Watchdog_Insert> 10ba6b: 83 c4 10 add $0x10,%esp } return remaining; } 10ba6e: 89 f0 mov %esi,%eax 10ba70: 8d 65 f4 lea -0xc(%ebp),%esp 10ba73: 5b pop %ebx 10ba74: 5e pop %esi 10ba75: 5f pop %edi 10ba76: c9 leave 10ba77: c3 ret Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10ba78: c7 05 68 b8 12 00 00 movl $0x0,0x12b868 10ba7f: 00 00 00 the_watchdog->routine = routine; 10ba82: c7 05 7c b8 12 00 04 movl $0x10bb04,0x12b87c 10ba89: bb 10 00 the_watchdog->id = id; 10ba8c: c7 05 80 b8 12 00 00 movl $0x0,0x12b880 10ba93: 00 00 00 the_watchdog->user_data = user_data; 10ba96: c7 05 84 b8 12 00 00 movl $0x0,0x12b884 10ba9d: 00 00 00 10baa0: 31 f6 xor %esi,%esi 10baa2: e9 61 ff ff ff jmp 10ba08 10baa7: 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); 10baa8: a1 74 b8 12 00 mov 0x12b874,%eax 10baad: 03 05 6c b8 12 00 add 0x12b86c,%eax /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 10bab3: 83 ec 08 sub $0x8,%esp 10bab6: 8d 55 e0 lea -0x20(%ebp),%edx 10bab9: 52 push %edx 10baba: 2b 05 78 b8 12 00 sub 0x12b878,%eax 10bac0: 50 push %eax 10bac1: e8 a6 33 00 00 call 10ee6c <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 10bac6: 8b 45 e0 mov -0x20(%ebp),%eax 10bac9: 8d 04 80 lea (%eax,%eax,4),%eax 10bacc: 8d 04 80 lea (%eax,%eax,4),%eax 10bacf: 8d 04 80 lea (%eax,%eax,4),%eax 10bad2: 8d 04 80 lea (%eax,%eax,4),%eax 10bad5: 8d 04 80 lea (%eax,%eax,4),%eax 10bad8: 8d 3c 80 lea (%eax,%eax,4),%edi 10badb: c1 e7 06 shl $0x6,%edi remaining += tp.tv_nsec / 1000; 10bade: b9 d3 4d 62 10 mov $0x10624dd3,%ecx 10bae3: 8b 45 e4 mov -0x1c(%ebp),%eax 10bae6: f7 e9 imul %ecx 10bae8: 89 45 d0 mov %eax,-0x30(%ebp) 10baeb: 89 55 d4 mov %edx,-0x2c(%ebp) 10baee: 8b 75 d4 mov -0x2c(%ebp),%esi 10baf1: c1 fe 06 sar $0x6,%esi 10baf4: 8b 45 e4 mov -0x1c(%ebp),%eax 10baf7: 99 cltd 10baf8: 29 d6 sub %edx,%esi 10bafa: 01 fe add %edi,%esi 10bafc: 83 c4 10 add $0x10,%esp 10baff: e9 04 ff ff ff jmp 10ba08 =============================================================================== 0011415c : #include int unlink( const char *path ) { 11415c: 55 push %ebp 11415d: 89 e5 mov %esp,%ebp 11415f: 57 push %edi 114160: 56 push %esi 114161: 53 push %ebx 114162: 83 ec 58 sub $0x58,%esp 114165: 8b 5d 08 mov 0x8(%ebp),%ebx /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 114168: 53 push %ebx 114169: e8 8a 42 ff ff call 1083f8 if ( parentpathlen == 0 ) 11416e: 83 c4 10 add $0x10,%esp 114171: 85 c0 test %eax,%eax 114173: 0f 85 eb 00 00 00 jne 114264 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 114179: 50 push %eax 11417a: 8d 45 d0 lea -0x30(%ebp),%eax 11417d: 89 45 b4 mov %eax,-0x4c(%ebp) 114180: 50 push %eax 114181: 8d 45 e4 lea -0x1c(%ebp),%eax 114184: 50 push %eax 114185: 53 push %ebx 114186: e8 45 52 ff ff call 1093d0 11418b: 31 d2 xor %edx,%edx 11418d: c6 45 b3 00 movb $0x0,-0x4d(%ebp) 114191: 83 c4 10 add $0x10,%esp /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 114194: 8d 7d bc lea -0x44(%ebp),%edi 114197: b9 05 00 00 00 mov $0x5,%ecx 11419c: 8b 75 b4 mov -0x4c(%ebp),%esi 11419f: f3 a5 rep movsl %ds:(%esi),%es:(%edi) name = path + parentpathlen; 1141a1: 01 d3 add %edx,%ebx name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 1141a3: be ff ff ff ff mov $0xffffffff,%esi 1141a8: 89 f1 mov %esi,%ecx 1141aa: 89 df mov %ebx,%edi 1141ac: 31 c0 xor %eax,%eax 1141ae: f2 ae repnz scas %es:(%edi),%al 1141b0: f7 d1 not %ecx 1141b2: 49 dec %ecx 1141b3: 83 ec 08 sub $0x8,%esp 1141b6: 51 push %ecx 1141b7: 53 push %ebx 1141b8: e8 eb 41 ff ff call 1083a8 1141bd: 01 c3 add %eax,%ebx result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 1141bf: 89 f1 mov %esi,%ecx 1141c1: 89 df mov %ebx,%edi 1141c3: 31 c0 xor %eax,%eax 1141c5: f2 ae repnz scas %es:(%edi),%al 1141c7: f7 d1 not %ecx 1141c9: 49 dec %ecx 1141ca: c7 04 24 00 00 00 00 movl $0x0,(%esp) 1141d1: 8d 75 bc lea -0x44(%ebp),%esi 1141d4: 56 push %esi 1141d5: 6a 00 push $0x0 1141d7: 51 push %ecx 1141d8: 53 push %ebx 1141d9: e8 62 42 ff ff call 108440 0, &loc, false ); if ( result != 0 ) { 1141de: 83 c4 20 add $0x20,%esp 1141e1: 85 c0 test %eax,%eax 1141e3: 0f 85 b3 00 00 00 jne 11429c if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; } if ( !loc.ops->node_type_h ) { 1141e9: 8b 55 c8 mov -0x38(%ebp),%edx 1141ec: 8b 42 10 mov 0x10(%edx),%eax 1141ef: 85 c0 test %eax,%eax 1141f1: 0f 84 c9 00 00 00 je 1142c0 <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 1141f7: 83 ec 0c sub $0xc,%esp 1141fa: 56 push %esi 1141fb: ff d0 call *%eax 1141fd: 83 c4 10 add $0x10,%esp 114200: 48 dec %eax 114201: 0f 84 fd 00 00 00 je 114304 if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 114207: 8b 55 c8 mov -0x38(%ebp),%edx 11420a: 8b 42 0c mov 0xc(%edx),%eax 11420d: 85 c0 test %eax,%eax 11420f: 0f 84 ab 00 00 00 je 1142c0 <== NEVER TAKEN if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 114215: 83 ec 08 sub $0x8,%esp 114218: 56 push %esi 114219: ff 75 b4 pushl -0x4c(%ebp) 11421c: ff d0 call *%eax 11421e: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &loc ); 114220: 8b 45 c8 mov -0x38(%ebp),%eax 114223: 83 c4 10 add $0x10,%esp 114226: 85 c0 test %eax,%eax 114228: 74 10 je 11423a <== NEVER TAKEN 11422a: 8b 40 1c mov 0x1c(%eax),%eax 11422d: 85 c0 test %eax,%eax 11422f: 74 09 je 11423a <== NEVER TAKEN 114231: 83 ec 0c sub $0xc,%esp 114234: 56 push %esi 114235: ff d0 call *%eax 114237: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 11423a: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 11423e: 74 19 je 114259 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 114240: 8b 45 dc mov -0x24(%ebp),%eax 114243: 85 c0 test %eax,%eax 114245: 74 12 je 114259 <== NEVER TAKEN 114247: 8b 40 1c mov 0x1c(%eax),%eax 11424a: 85 c0 test %eax,%eax 11424c: 74 0b je 114259 <== NEVER TAKEN 11424e: 83 ec 0c sub $0xc,%esp 114251: ff 75 b4 pushl -0x4c(%ebp) 114254: ff d0 call *%eax 114256: 83 c4 10 add $0x10,%esp return result; } 114259: 89 d8 mov %ebx,%eax 11425b: 8d 65 f4 lea -0xc(%ebp),%esp 11425e: 5b pop %ebx 11425f: 5e pop %esi 114260: 5f pop %edi 114261: c9 leave 114262: c3 ret 114263: 90 nop parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 114264: 89 c2 mov %eax,%edx 114266: 83 ec 0c sub $0xc,%esp 114269: 6a 00 push $0x0 11426b: 8d 45 d0 lea -0x30(%ebp),%eax 11426e: 89 45 b4 mov %eax,-0x4c(%ebp) 114271: 50 push %eax 114272: 6a 02 push $0x2 114274: 52 push %edx 114275: 53 push %ebx 114276: 89 55 ac mov %edx,-0x54(%ebp) 114279: e8 96 42 ff ff call 108514 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 11427e: 83 c4 20 add $0x20,%esp 114281: 85 c0 test %eax,%eax 114283: 8b 55 ac mov -0x54(%ebp),%edx 114286: 75 0c jne 114294 <== NEVER TAKEN 114288: c6 45 b3 01 movb $0x1,-0x4d(%ebp) 11428c: e9 03 ff ff ff jmp 114194 114291: 8d 76 00 lea 0x0(%esi),%esi result = (*loc.ops->unlink_h)( &parentloc, &loc ); rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); 114294: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 114299: eb be jmp 114259 <== NOT EXECUTED 11429b: 90 nop <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) 11429c: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 1142a0: 74 f2 je 114294 <== NEVER TAKEN rtems_filesystem_freenode( &parentloc ); 1142a2: 8b 45 dc mov -0x24(%ebp),%eax 1142a5: 85 c0 test %eax,%eax 1142a7: 74 eb je 114294 <== NEVER TAKEN 1142a9: 8b 40 1c mov 0x1c(%eax),%eax 1142ac: 85 c0 test %eax,%eax 1142ae: 74 e4 je 114294 <== NEVER TAKEN 1142b0: 83 ec 0c sub $0xc,%esp 1142b3: ff 75 b4 pushl -0x4c(%ebp) 1142b6: ff d0 call *%eax 1142b8: 83 cb ff or $0xffffffff,%ebx 1142bb: 83 c4 10 add $0x10,%esp 1142be: eb 99 jmp 114259 rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 1142c0: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 1142c3: 85 c0 test %eax,%eax <== NOT EXECUTED 1142c5: 74 09 je 1142d0 <== NOT EXECUTED 1142c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1142ca: 56 push %esi <== NOT EXECUTED 1142cb: ff d0 call *%eax <== NOT EXECUTED 1142cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED if ( free_parentloc ) 1142d0: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) <== NOT EXECUTED 1142d4: 74 19 je 1142ef <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 1142d6: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 1142d9: 85 c0 test %eax,%eax <== NOT EXECUTED 1142db: 74 12 je 1142ef <== NOT EXECUTED 1142dd: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 1142e0: 85 c0 test %eax,%eax <== NOT EXECUTED 1142e2: 74 0b je 1142ef <== NOT EXECUTED 1142e4: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 1142e7: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 1142ea: ff d0 call *%eax <== NOT EXECUTED 1142ec: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 1142ef: e8 74 0d 00 00 call 115068 <__errno> <== NOT EXECUTED 1142f4: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 1142fa: bb ff ff ff ff mov $0xffffffff,%ebx <== NOT EXECUTED 1142ff: e9 55 ff ff ff jmp 114259 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 114304: 8b 45 c8 mov -0x38(%ebp),%eax 114307: 85 c0 test %eax,%eax 114309: 74 10 je 11431b <== NEVER TAKEN 11430b: 8b 40 1c mov 0x1c(%eax),%eax 11430e: 85 c0 test %eax,%eax 114310: 74 09 je 11431b <== NEVER TAKEN 114312: 83 ec 0c sub $0xc,%esp 114315: 56 push %esi 114316: ff d0 call *%eax 114318: 83 c4 10 add $0x10,%esp if ( free_parentloc ) 11431b: 80 7d b3 00 cmpb $0x0,-0x4d(%ebp) 11431f: 74 19 je 11433a <== ALWAYS TAKEN rtems_filesystem_freenode( &parentloc ); 114321: 8b 45 dc mov -0x24(%ebp),%eax <== NOT EXECUTED 114324: 85 c0 test %eax,%eax <== NOT EXECUTED 114326: 74 12 je 11433a <== NOT EXECUTED 114328: 8b 40 1c mov 0x1c(%eax),%eax <== NOT EXECUTED 11432b: 85 c0 test %eax,%eax <== NOT EXECUTED 11432d: 74 0b je 11433a <== NOT EXECUTED 11432f: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 114332: ff 75 b4 pushl -0x4c(%ebp) <== NOT EXECUTED 114335: ff d0 call *%eax <== NOT EXECUTED 114337: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); 11433a: e8 29 0d 00 00 call 115068 <__errno> 11433f: c7 00 15 00 00 00 movl $0x15,(%eax) 114345: bb ff ff ff ff mov $0xffffffff,%ebx 11434a: e9 0a ff ff ff jmp 114259 =============================================================================== 0010e5d0 : */ int unmount( const char *path ) { 10e5d0: 55 push %ebp 10e5d1: 89 e5 mov %esp,%ebp 10e5d3: 57 push %edi 10e5d4: 56 push %esi 10e5d5: 53 push %ebx 10e5d6: 83 ec 38 sub $0x38,%esp 10e5d9: 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 ) ) 10e5dc: 31 c0 xor %eax,%eax 10e5de: b9 ff ff ff ff mov $0xffffffff,%ecx 10e5e3: 89 d7 mov %edx,%edi 10e5e5: f2 ae repnz scas %es:(%edi),%al 10e5e7: f7 d1 not %ecx 10e5e9: 49 dec %ecx 10e5ea: 6a 01 push $0x1 10e5ec: 8d 75 d4 lea -0x2c(%ebp),%esi 10e5ef: 56 push %esi 10e5f0: 6a 00 push $0x0 10e5f2: 51 push %ecx 10e5f3: 52 push %edx 10e5f4: e8 df c3 ff ff call 10a9d8 10e5f9: 83 c4 20 add $0x20,%esp 10e5fc: 85 c0 test %eax,%eax 10e5fe: 0f 85 8f 00 00 00 jne 10e693 return -1; mt_entry = loc.mt_entry; 10e604: 8b 5d e4 mov -0x1c(%ebp),%ebx fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 10e607: 8b 43 1c mov 0x1c(%ebx),%eax 10e60a: 3b 45 d4 cmp -0x2c(%ebp),%eax 10e60d: 0f 85 f9 00 00 00 jne 10e70c /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 10e613: 8b 45 e0 mov -0x20(%ebp),%eax 10e616: 85 c0 test %eax,%eax 10e618: 74 10 je 10e62a <== NEVER TAKEN 10e61a: 8b 40 1c mov 0x1c(%eax),%eax 10e61d: 85 c0 test %eax,%eax 10e61f: 74 09 je 10e62a <== NEVER TAKEN 10e621: 83 ec 0c sub $0xc,%esp 10e624: 56 push %esi 10e625: ff d0 call *%eax 10e627: 83 c4 10 add $0x10,%esp if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) return -1; mt_entry = loc.mt_entry; fs_mount_loc = &mt_entry->mt_point_node; 10e62a: 8b 43 14 mov 0x14(%ebx),%eax 10e62d: 8b 70 28 mov 0x28(%eax),%esi 10e630: 85 f6 test %esi,%esi 10e632: 0f 84 3c 01 00 00 je 10e774 <== NEVER TAKEN fs_root_loc = &mt_entry->mt_fs_root; 10e638: 8b 43 28 mov 0x28(%ebx),%eax 10e63b: 8b 48 2c mov 0x2c(%eax),%ecx 10e63e: 85 c9 test %ecx,%ecx 10e640: 0f 84 2e 01 00 00 je 10e774 <== NEVER TAKEN * that made the current node thread based instead * of system based? I thought it was but it doesn't * look like it in this version. */ if ( rtems_filesystem_current.mt_entry == mt_entry ) 10e646: a1 6c c0 12 00 mov 0x12c06c,%eax 10e64b: 39 58 14 cmp %ebx,0x14(%eax) 10e64e: 0f 84 e8 00 00 00 je 10e73c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 10e654: 83 ec 08 sub $0x8,%esp 10e657: ff 73 2c pushl 0x2c(%ebx) 10e65a: 68 bc e5 10 00 push $0x10e5bc 10e65f: e8 90 ce ff ff call 10b4f4 10e664: 83 c4 10 add $0x10,%esp 10e667: 84 c0 test %al,%al 10e669: 0f 85 cd 00 00 00 jne 10e73c * 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 ) 10e66f: 83 ec 0c sub $0xc,%esp 10e672: 53 push %ebx 10e673: e8 1c c6 ff ff call 10ac94 10e678: 83 c4 10 add $0x10,%esp 10e67b: 48 dec %eax 10e67c: 0f 84 ba 00 00 00 je 10e73c * 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 ) 10e682: 83 ec 0c sub $0xc,%esp 10e685: 8b 43 14 mov 0x14(%ebx),%eax 10e688: 53 push %ebx 10e689: ff 50 28 call *0x28(%eax) 10e68c: 83 c4 10 add $0x10,%esp 10e68f: 85 c0 test %eax,%eax 10e691: 74 0d je 10e6a0 <== ALWAYS TAKEN */ rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; 10e693: b8 ff ff ff ff mov $0xffffffff,%eax } 10e698: 8d 65 f4 lea -0xc(%ebp),%esp 10e69b: 5b pop %ebx 10e69c: 5e pop %esi 10e69d: 5f pop %edi 10e69e: c9 leave 10e69f: c3 ret * 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){ 10e6a0: 83 ec 0c sub $0xc,%esp 10e6a3: 8b 43 28 mov 0x28(%ebx),%eax 10e6a6: 53 push %ebx 10e6a7: ff 50 2c call *0x2c(%eax) 10e6aa: 83 c4 10 add $0x10,%esp 10e6ad: 85 c0 test %eax,%eax 10e6af: 0f 85 9f 00 00 00 jne 10e754 <== 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 ); 10e6b5: 52 push %edx 10e6b6: 6a 00 push $0x0 10e6b8: 6a 00 push $0x0 10e6ba: ff 35 e8 eb 12 00 pushl 0x12ebe8 10e6c0: e8 a3 0d 00 00 call 10f468 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 10e6c5: 89 1c 24 mov %ebx,(%esp) 10e6c8: e8 93 16 00 00 call 10fd60 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 10e6cd: 58 pop %eax 10e6ce: ff 35 e8 eb 12 00 pushl 0x12ebe8 10e6d4: e8 8b 0e 00 00 call 10f564 /* * 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 ); 10e6d9: 8b 43 14 mov 0x14(%ebx),%eax 10e6dc: 83 c4 10 add $0x10,%esp 10e6df: 85 c0 test %eax,%eax 10e6e1: 74 13 je 10e6f6 <== NEVER TAKEN 10e6e3: 8b 40 1c mov 0x1c(%eax),%eax 10e6e6: 85 c0 test %eax,%eax 10e6e8: 74 0c je 10e6f6 <== NEVER TAKEN 10e6ea: 83 ec 0c sub $0xc,%esp 10e6ed: 8d 53 08 lea 0x8(%ebx),%edx 10e6f0: 52 push %edx 10e6f1: ff d0 call *%eax 10e6f3: 83 c4 10 add $0x10,%esp free( mt_entry ); 10e6f6: 83 ec 0c sub $0xc,%esp 10e6f9: 53 push %ebx 10e6fa: e8 49 c3 ff ff call 10aa48 10e6ff: 31 c0 xor %eax,%eax return 0; 10e701: 83 c4 10 add $0x10,%esp } 10e704: 8d 65 f4 lea -0xc(%ebp),%esp 10e707: 5b pop %ebx 10e708: 5e pop %esi 10e709: 5f pop %edi 10e70a: c9 leave 10e70b: c3 ret /* * 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 ); 10e70c: 8b 45 e0 mov -0x20(%ebp),%eax 10e70f: 85 c0 test %eax,%eax 10e711: 74 10 je 10e723 <== NEVER TAKEN 10e713: 8b 40 1c mov 0x1c(%eax),%eax 10e716: 85 c0 test %eax,%eax 10e718: 74 09 je 10e723 <== NEVER TAKEN 10e71a: 83 ec 0c sub $0xc,%esp 10e71d: 56 push %esi 10e71e: ff d0 call *%eax 10e720: 83 c4 10 add $0x10,%esp rtems_set_errno_and_return_minus_one( EACCES ); 10e723: e8 00 9a 00 00 call 118128 <__errno> 10e728: c7 00 0d 00 00 00 movl $0xd,(%eax) 10e72e: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10e733: 8d 65 f4 lea -0xc(%ebp),%esp 10e736: 5b pop %ebx 10e737: 5e pop %esi 10e738: 5f pop %edi 10e739: c9 leave 10e73a: c3 ret 10e73b: 90 nop * 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 ); 10e73c: e8 e7 99 00 00 call 118128 <__errno> 10e741: c7 00 10 00 00 00 movl $0x10,(%eax) 10e747: b8 ff ff ff ff mov $0xffffffff,%eax rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 10e74c: 8d 65 f4 lea -0xc(%ebp),%esp 10e74f: 5b pop %ebx 10e750: 5e pop %esi 10e751: 5f pop %edi 10e752: c9 leave 10e753: 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 ) 10e754: 83 ec 0c sub $0xc,%esp 10e757: 8b 43 14 mov 0x14(%ebx),%eax <== NOT EXECUTED 10e75a: 53 push %ebx <== NOT EXECUTED 10e75b: ff 50 20 call *0x20(%eax) <== NOT EXECUTED 10e75e: 83 c4 10 add $0x10,%esp <== NOT EXECUTED 10e761: 85 c0 test %eax,%eax <== NOT EXECUTED 10e763: 0f 84 2a ff ff ff je 10e693 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 10e769: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10e76c: 6a 00 push $0x0 <== NOT EXECUTED 10e76e: e8 ed 12 00 00 call 10fa60 <== NOT EXECUTED 10e773: 90 nop <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10e774: e8 af 99 00 00 call 118128 <__errno> <== NOT EXECUTED 10e779: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10e77f: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 10e784: e9 0f ff ff ff jmp 10e698 <== NOT EXECUTED =============================================================================== 0010c554 : int utime( const char *path, const struct utimbuf *times ) { 10c554: 55 push %ebp 10c555: 89 e5 mov %esp,%ebp 10c557: 57 push %edi 10c558: 56 push %esi 10c559: 53 push %ebx 10c55a: 83 ec 38 sub $0x38,%esp 10c55d: 8b 55 08 mov 0x8(%ebp),%edx 10c560: 8b 5d 0c mov 0xc(%ebp),%ebx rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 10c563: 31 c0 xor %eax,%eax 10c565: b9 ff ff ff ff mov $0xffffffff,%ecx 10c56a: 89 d7 mov %edx,%edi 10c56c: f2 ae repnz scas %es:(%edi),%al 10c56e: f7 d1 not %ecx 10c570: 49 dec %ecx 10c571: 6a 01 push $0x1 10c573: 8d 75 d4 lea -0x2c(%ebp),%esi 10c576: 56 push %esi 10c577: 6a 00 push $0x0 10c579: 51 push %ecx 10c57a: 52 push %edx 10c57b: e8 a4 c9 ff ff call 108f24 10c580: 83 c4 20 add $0x20,%esp 10c583: 85 c0 test %eax,%eax 10c585: 75 55 jne 10c5dc return -1; if ( !temp_loc.ops->utime_h ){ 10c587: 8b 55 e0 mov -0x20(%ebp),%edx 10c58a: 8b 42 30 mov 0x30(%edx),%eax 10c58d: 85 c0 test %eax,%eax 10c58f: 74 2f je 10c5c0 <== NEVER TAKEN rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 10c591: 52 push %edx 10c592: ff 73 04 pushl 0x4(%ebx) 10c595: ff 33 pushl (%ebx) 10c597: 56 push %esi 10c598: ff d0 call *%eax 10c59a: 89 c3 mov %eax,%ebx rtems_filesystem_freenode( &temp_loc ); 10c59c: 8b 45 e0 mov -0x20(%ebp),%eax 10c59f: 83 c4 10 add $0x10,%esp 10c5a2: 85 c0 test %eax,%eax 10c5a4: 74 10 je 10c5b6 <== NEVER TAKEN 10c5a6: 8b 40 1c mov 0x1c(%eax),%eax 10c5a9: 85 c0 test %eax,%eax 10c5ab: 74 09 je 10c5b6 <== NEVER TAKEN 10c5ad: 83 ec 0c sub $0xc,%esp 10c5b0: 56 push %esi 10c5b1: ff d0 call *%eax 10c5b3: 83 c4 10 add $0x10,%esp return result; } 10c5b6: 89 d8 mov %ebx,%eax 10c5b8: 8d 65 f4 lea -0xc(%ebp),%esp 10c5bb: 5b pop %ebx 10c5bc: 5e pop %esi 10c5bd: 5f pop %edi 10c5be: c9 leave 10c5bf: c3 ret if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 10c5c0: 8b 42 1c mov 0x1c(%edx),%eax <== NOT EXECUTED 10c5c3: 85 c0 test %eax,%eax <== NOT EXECUTED 10c5c5: 74 09 je 10c5d0 <== NOT EXECUTED 10c5c7: 83 ec 0c sub $0xc,%esp <== NOT EXECUTED 10c5ca: 56 push %esi <== NOT EXECUTED 10c5cb: ff d0 call *%eax <== NOT EXECUTED 10c5cd: 83 c4 10 add $0x10,%esp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c5d0: e8 0f 9c 00 00 call 1161e4 <__errno> <== NOT EXECUTED 10c5d5: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10c5db: 90 nop <== NOT EXECUTED 10c5dc: bb ff ff ff ff mov $0xffffffff,%ebx result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); rtems_filesystem_freenode( &temp_loc ); return result; } 10c5e1: 89 d8 mov %ebx,%eax 10c5e3: 8d 65 f4 lea -0xc(%ebp),%esp 10c5e6: 5b pop %ebx 10c5e7: 5e pop %esi 10c5e8: 5f pop %edi 10c5e9: c9 leave 10c5ea: c3 ret =============================================================================== 0010b1ec : */ void vprintk( const char *fmt, va_list ap ) { 10b1ec: 55 push %ebp 10b1ed: 89 e5 mov %esp,%ebp 10b1ef: 57 push %edi 10b1f0: 56 push %esi 10b1f1: 53 push %ebx 10b1f2: 83 ec 4c sub $0x4c,%esp 10b1f5: 8b 75 08 mov 0x8(%ebp),%esi 10b1f8: 8b 7d 0c mov 0xc(%ebp),%edi for (; *fmt != '\0'; fmt++) { 10b1fb: 8a 06 mov (%esi),%al 10b1fd: 84 c0 test %al,%al 10b1ff: 75 28 jne 10b229 <== ALWAYS TAKEN 10b201: e9 d1 01 00 00 jmp 10b3d7 <== NOT EXECUTED 10b206: 66 90 xchg %ax,%ax <== NOT EXECUTED bool sign = false; char lead = ' '; char c; if (*fmt != '%') { BSP_output_char(*fmt); 10b208: 83 ec 0c sub $0xc,%esp 10b20b: 0f be c0 movsbl %al,%eax 10b20e: 50 push %eax 10b20f: ff 15 44 53 12 00 call *0x125344 10b215: 89 7d bc mov %edi,-0x44(%ebp) continue; 10b218: 83 c4 10 add $0x10,%esp void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 10b21b: 46 inc %esi 10b21c: 8a 06 mov (%esi),%al 10b21e: 84 c0 test %al,%al 10b220: 0f 84 b1 01 00 00 je 10b3d7 10b226: 8b 7d bc mov -0x44(%ebp),%edi bool minus = false; bool sign = false; char lead = ' '; char c; if (*fmt != '%') { 10b229: 3c 25 cmp $0x25,%al 10b22b: 75 db jne 10b208 BSP_output_char(*fmt); continue; } fmt++; 10b22d: 46 inc %esi if (*fmt == '0' ) { 10b22e: 8a 0e mov (%esi),%cl 10b230: 80 f9 30 cmp $0x30,%cl 10b233: 0f 84 b7 01 00 00 je 10b3f0 10b239: b2 20 mov $0x20,%dl lead = '0'; fmt++; } if (*fmt == '-' ) { 10b23b: 80 f9 2d cmp $0x2d,%cl 10b23e: 0f 84 ba 01 00 00 je 10b3fe 10b244: c6 45 c4 00 movb $0x0,-0x3c(%ebp) minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 10b248: 8d 41 d0 lea -0x30(%ecx),%eax 10b24b: 3c 09 cmp $0x9,%al 10b24d: 0f 87 bd 01 00 00 ja 10b410 10b253: 31 db xor %ebx,%ebx 10b255: 8d 76 00 lea 0x0(%esi),%esi width *= 10; width += ((unsigned) *fmt - '0'); 10b258: 8d 04 9b lea (%ebx,%ebx,4),%eax 10b25b: 0f be c9 movsbl %cl,%ecx 10b25e: 8d 5c 41 d0 lea -0x30(%ecx,%eax,2),%ebx fmt++; 10b262: 46 inc %esi } if (*fmt == '-' ) { minus = true; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 10b263: 8a 0e mov (%esi),%cl 10b265: 8d 41 d0 lea -0x30(%ecx),%eax 10b268: 3c 09 cmp $0x9,%al 10b26a: 76 ec jbe 10b258 width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10b26c: 80 f9 6c cmp $0x6c,%cl 10b26f: 0f 84 a7 01 00 00 je 10b41c lflag = true; c = *++fmt; } if ( c == 'c' ) { 10b275: 80 f9 63 cmp $0x63,%cl 10b278: 0f 84 aa 01 00 00 je 10b428 /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); BSP_output_char(chr); continue; } if ( c == 's' ) { 10b27e: 80 f9 73 cmp $0x73,%cl 10b281: 0f 84 bd 01 00 00 je 10b444 continue; } /* must be a numeric format or something unsupported */ if ( c == 'o' || c == 'O' ) { 10b287: 80 f9 6f cmp $0x6f,%cl 10b28a: 0f 84 50 01 00 00 je 10b3e0 <== NEVER TAKEN 10b290: 80 f9 4f cmp $0x4f,%cl 10b293: 0f 84 47 01 00 00 je 10b3e0 base = 8; sign = false; } else if ( c == 'i' || c == 'I' || 10b299: 80 f9 69 cmp $0x69,%cl 10b29c: 74 56 je 10b2f4 10b29e: 80 f9 49 cmp $0x49,%cl 10b2a1: 74 51 je 10b2f4 10b2a3: 80 f9 64 cmp $0x64,%cl 10b2a6: 74 4c je 10b2f4 10b2a8: 80 f9 44 cmp $0x44,%cl 10b2ab: 74 47 je 10b2f4 c == 'd' || c == 'D' ) { base = 10; sign = true; } else if ( c == 'u' || c == 'U' ) { 10b2ad: 80 f9 75 cmp $0x75,%cl 10b2b0: 0f 84 62 02 00 00 je 10b518 10b2b6: 80 f9 55 cmp $0x55,%cl 10b2b9: 0f 84 59 02 00 00 je 10b518 base = 10; sign = false; } else if ( c == 'x' || c == 'X' ) { 10b2bf: 80 f9 78 cmp $0x78,%cl 10b2c2: 0f 84 97 02 00 00 je 10b55f 10b2c8: 80 f9 58 cmp $0x58,%cl 10b2cb: 0f 84 8e 02 00 00 je 10b55f base = 16; sign = false; } else if ( c == 'p' ) { 10b2d1: 80 f9 70 cmp $0x70,%cl 10b2d4: 0f 84 a8 02 00 00 je 10b582 base = 16; sign = false; lflag = true; } else { BSP_output_char(c); 10b2da: 83 ec 0c sub $0xc,%esp 10b2dd: 0f be c9 movsbl %cl,%ecx 10b2e0: 51 push %ecx 10b2e1: ff 15 44 53 12 00 call *0x125344 10b2e7: 89 7d bc mov %edi,-0x44(%ebp) continue; 10b2ea: 83 c4 10 add $0x10,%esp 10b2ed: e9 29 ff ff ff jmp 10b21b 10b2f2: 66 90 xchg %ax,%ax 10b2f4: b1 01 mov $0x1,%cl 10b2f6: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp) } printNum( 10b2fd: 0f be d2 movsbl %dl,%edx 10b300: 89 55 b4 mov %edx,-0x4c(%ebp) lflag ? va_arg(ap, long) : (long) va_arg(ap, int), 10b303: 8d 47 04 lea 0x4(%edi),%eax 10b306: 89 45 bc mov %eax,-0x44(%ebp) } else { BSP_output_char(c); continue; } printNum( 10b309: 8b 3f mov (%edi),%edi unsigned long unsigned_num; unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { 10b30b: 84 c9 test %cl,%cl 10b30d: 74 08 je 10b317 10b30f: 85 ff test %edi,%edi 10b311: 0f 88 0f 02 00 00 js 10b526 BSP_output_char('-'); unsigned_num = (unsigned long) -num; if (maxwidth) maxwidth--; } else { unsigned_num = (unsigned long) num; 10b317: 89 7d c0 mov %edi,-0x40(%ebp) } count = 0; while ((n = unsigned_num / base) > 0) { 10b31a: 8b 45 c0 mov -0x40(%ebp),%eax 10b31d: 31 d2 xor %edx,%edx 10b31f: f7 75 b8 divl -0x48(%ebp) 10b322: 89 c1 mov %eax,%ecx 10b324: 85 c0 test %eax,%eax 10b326: 0f 84 25 02 00 00 je 10b551 10b32c: 8a 45 b8 mov -0x48(%ebp),%al 10b32f: 88 45 c4 mov %al,-0x3c(%ebp) 10b332: 31 ff xor %edi,%edi 10b334: 89 5d b0 mov %ebx,-0x50(%ebp) 10b337: 8b 55 c0 mov -0x40(%ebp),%edx 10b33a: 8b 5d b8 mov -0x48(%ebp),%ebx 10b33d: eb 05 jmp 10b344 10b33f: 90 nop 10b340: 89 ca mov %ecx,%edx 10b342: 89 c1 mov %eax,%ecx toPrint[count++] = (char) (unsigned_num - (n * base)); 10b344: 8a 45 c4 mov -0x3c(%ebp),%al 10b347: f6 e1 mul %cl 10b349: 28 c2 sub %al,%dl 10b34b: 88 54 3d d4 mov %dl,-0x2c(%ebp,%edi,1) 10b34f: 47 inc %edi } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 10b350: 89 c8 mov %ecx,%eax 10b352: 31 d2 xor %edx,%edx 10b354: f7 f3 div %ebx 10b356: 85 c0 test %eax,%eax 10b358: 75 e6 jne 10b340 10b35a: 8b 5d b0 mov -0x50(%ebp),%ebx 10b35d: 8d 47 01 lea 0x1(%edi),%eax 10b360: 89 45 c4 mov %eax,-0x3c(%ebp) 10b363: 89 4d c0 mov %ecx,-0x40(%ebp) toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; 10b366: 8a 45 c0 mov -0x40(%ebp),%al 10b369: 88 44 3d d4 mov %al,-0x2c(%ebp,%edi,1) for (n=maxwidth ; n > count; n-- ) 10b36d: 3b 5d c4 cmp -0x3c(%ebp),%ebx 10b370: 76 1f jbe 10b391 10b372: 8b 7d c4 mov -0x3c(%ebp),%edi 10b375: 89 75 c0 mov %esi,-0x40(%ebp) 10b378: 8b 75 b4 mov -0x4c(%ebp),%esi 10b37b: 90 nop BSP_output_char(lead); 10b37c: 83 ec 0c sub $0xc,%esp 10b37f: 56 push %esi 10b380: ff 15 44 53 12 00 call *0x125344 toPrint[count++] = (char) (unsigned_num - (n * base)); unsigned_num = n; } toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) 10b386: 4b dec %ebx 10b387: 83 c4 10 add $0x10,%esp 10b38a: 39 fb cmp %edi,%ebx 10b38c: 77 ee ja 10b37c 10b38e: 8b 75 c0 mov -0x40(%ebp),%esi BSP_output_char(lead); for (n = 0; n < count; n++) { 10b391: 8b 45 c4 mov -0x3c(%ebp),%eax 10b394: 85 c0 test %eax,%eax 10b396: 0f 84 7f fe ff ff je 10b21b <== NEVER TAKEN 10b39c: 8b 45 c4 mov -0x3c(%ebp),%eax 10b39f: 8d 7c 05 d3 lea -0x2d(%ebp,%eax,1),%edi 10b3a3: 31 db xor %ebx,%ebx 10b3a5: 89 75 c0 mov %esi,-0x40(%ebp) 10b3a8: 89 c6 mov %eax,%esi 10b3aa: 66 90 xchg %ax,%ax BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 10b3ac: 83 ec 0c sub $0xc,%esp 10b3af: 0f be 07 movsbl (%edi),%eax 10b3b2: 0f be 80 96 29 12 00 movsbl 0x122996(%eax),%eax 10b3b9: 50 push %eax 10b3ba: ff 15 44 53 12 00 call *0x125344 toPrint[count++] = (char) unsigned_num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 10b3c0: 43 inc %ebx 10b3c1: 4f dec %edi 10b3c2: 83 c4 10 add $0x10,%esp 10b3c5: 39 f3 cmp %esi,%ebx 10b3c7: 72 e3 jb 10b3ac 10b3c9: 8b 75 c0 mov -0x40(%ebp),%esi void vprintk( const char *fmt, va_list ap ) { for (; *fmt != '\0'; fmt++) { 10b3cc: 46 inc %esi 10b3cd: 8a 06 mov (%esi),%al 10b3cf: 84 c0 test %al,%al 10b3d1: 0f 85 4f fe ff ff jne 10b226 <== ALWAYS TAKEN sign, width, lead ); } } 10b3d7: 8d 65 f4 lea -0xc(%ebp),%esp 10b3da: 5b pop %ebx 10b3db: 5e pop %esi 10b3dc: 5f pop %edi 10b3dd: c9 leave 10b3de: c3 ret 10b3df: 90 nop base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10b3e0: 31 c9 xor %ecx,%ecx 10b3e2: c7 45 b8 08 00 00 00 movl $0x8,-0x48(%ebp) 10b3e9: e9 0f ff ff ff jmp 10b2fd 10b3ee: 66 90 xchg %ax,%ax continue; } fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 10b3f0: 46 inc %esi 10b3f1: 8a 0e mov (%esi),%cl 10b3f3: b2 30 mov $0x30,%dl } if (*fmt == '-' ) { 10b3f5: 80 f9 2d cmp $0x2d,%cl 10b3f8: 0f 85 46 fe ff ff jne 10b244 <== ALWAYS TAKEN minus = true; fmt++; 10b3fe: 46 inc %esi 10b3ff: 8a 0e mov (%esi),%cl 10b401: c6 45 c4 01 movb $0x1,-0x3c(%ebp) } while (*fmt >= '0' && *fmt <= '9' ) { 10b405: 8d 41 d0 lea -0x30(%ecx),%eax 10b408: 3c 09 cmp $0x9,%al 10b40a: 0f 86 43 fe ff ff jbe 10b253 <== ALWAYS TAKEN 10b410: 31 db xor %ebx,%ebx width *= 10; width += ((unsigned) *fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 10b412: 80 f9 6c cmp $0x6c,%cl 10b415: 0f 85 5a fe ff ff jne 10b275 10b41b: 90 nop lflag = true; c = *++fmt; 10b41c: 46 inc %esi 10b41d: 8a 0e mov (%esi),%cl } if ( c == 'c' ) { 10b41f: 80 f9 63 cmp $0x63,%cl 10b422: 0f 85 56 fe ff ff jne 10b27e <== ALWAYS TAKEN /* need a cast here since va_arg() only takes fully promoted types */ char chr = (char) va_arg(ap, int); 10b428: 8d 47 04 lea 0x4(%edi),%eax 10b42b: 89 45 bc mov %eax,-0x44(%ebp) BSP_output_char(chr); 10b42e: 83 ec 0c sub $0xc,%esp 10b431: 0f be 07 movsbl (%edi),%eax 10b434: 50 push %eax 10b435: ff 15 44 53 12 00 call *0x125344 continue; 10b43b: 83 c4 10 add $0x10,%esp 10b43e: e9 d8 fd ff ff jmp 10b21b 10b443: 90 nop } if ( c == 's' ) { unsigned i, len; char *s, *str; str = va_arg(ap, char *); 10b444: 8d 47 04 lea 0x4(%edi),%eax 10b447: 89 45 bc mov %eax,-0x44(%ebp) 10b44a: 8b 07 mov (%edi),%eax if ( str == NULL ) { 10b44c: 85 c0 test %eax,%eax 10b44e: 0f 84 19 01 00 00 je 10b56d str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 10b454: 80 38 00 cmpb $0x0,(%eax) 10b457: 0f 84 1e 01 00 00 je 10b57b 10b45d: 31 ff xor %edi,%edi 10b45f: 90 nop 10b460: 47 inc %edi 10b461: 80 3c 38 00 cmpb $0x0,(%eax,%edi,1) 10b465: 75 f9 jne 10b460 ; /* leading spaces */ if ( !minus ) 10b467: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp) 10b46b: 75 30 jne 10b49d for ( i=len ; i 10b471: 89 fa mov %edi,%edx 10b473: 89 7d c0 mov %edi,-0x40(%ebp) 10b476: 89 c7 mov %eax,%edi 10b478: 89 75 b8 mov %esi,-0x48(%ebp) 10b47b: 89 de mov %ebx,%esi 10b47d: 89 d3 mov %edx,%ebx 10b47f: 90 nop BSP_output_char(' '); 10b480: 83 ec 0c sub $0xc,%esp 10b483: 6a 20 push $0x20 10b485: ff 15 44 53 12 00 call *0x125344 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 10b493: 89 f3 mov %esi,%ebx 10b495: 89 f8 mov %edi,%eax 10b497: 8b 7d c0 mov -0x40(%ebp),%edi 10b49a: 8b 75 b8 mov -0x48(%ebp),%esi BSP_output_char(' '); /* no width option */ if (width == 0) { 10b49d: 85 db test %ebx,%ebx 10b49f: 75 06 jne 10b4a7 width = len; } /* output the string */ for ( i=0 ; i 10b4a5: 89 fb mov %edi,%ebx 10b4a7: 8a 10 mov (%eax),%dl 10b4a9: 84 d2 test %dl,%dl 10b4ab: 74 3f je 10b4ec <== NEVER TAKEN BSP_output_char(*str); 10b4ad: 83 ec 0c sub $0xc,%esp 10b4b0: 0f be d2 movsbl %dl,%edx 10b4b3: 52 push %edx 10b4b4: 89 45 ac mov %eax,-0x54(%ebp) 10b4b7: ff 15 44 53 12 00 call *0x125344 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 10b4cd: 8d 76 00 lea 0x0(%esi),%esi BSP_output_char(*str); 10b4d0: 83 ec 0c sub $0xc,%esp 10b4d3: 0f be d2 movsbl %dl,%edx 10b4d6: 52 push %edx 10b4d7: ff 15 44 53 12 00 call *0x125344 if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 10b4e7: 89 f3 mov %esi,%ebx 10b4e9: 8b 75 c0 mov -0x40(%ebp),%esi BSP_output_char(*str); /* trailing spaces */ if ( minus ) 10b4ec: 80 7d c4 00 cmpb $0x0,-0x3c(%ebp) 10b4f0: 0f 84 25 fd ff ff je 10b21b for ( i=len ; i 10b4fe: 66 90 xchg %ax,%ax BSP_output_char(' '); 10b500: 83 ec 0c sub $0xc,%esp 10b503: 6a 20 push $0x20 10b505: ff 15 44 53 12 00 call *0x125344 for ( i=0 ; i 10b513: e9 03 fd ff ff jmp 10b21b base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10b518: 31 c9 xor %ecx,%ecx 10b51a: c7 45 b8 0a 00 00 00 movl $0xa,-0x48(%ebp) 10b521: e9 d7 fd ff ff jmp 10b2fd unsigned long n; unsigned count; char toPrint[20]; if ( sign && (num < 0) ) { BSP_output_char('-'); 10b526: 83 ec 0c sub $0xc,%esp 10b529: 6a 2d push $0x2d 10b52b: ff 15 44 53 12 00 call *0x125344 unsigned_num = (unsigned long) -num; 10b531: f7 df neg %edi 10b533: 89 7d c0 mov %edi,-0x40(%ebp) if (maxwidth) maxwidth--; 10b536: 83 c4 10 add $0x10,%esp 10b539: 83 fb 01 cmp $0x1,%ebx 10b53c: 83 d3 ff adc $0xffffffff,%ebx } else { unsigned_num = (unsigned long) num; } count = 0; while ((n = unsigned_num / base) > 0) { 10b53f: 8b 45 c0 mov -0x40(%ebp),%eax 10b542: 31 d2 xor %edx,%edx 10b544: f7 75 b8 divl -0x48(%ebp) 10b547: 89 c1 mov %eax,%ecx 10b549: 85 c0 test %eax,%eax 10b54b: 0f 85 db fd ff ff jne 10b32c <== ALWAYS TAKEN 10b551: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp) 10b558: 31 ff xor %edi,%edi 10b55a: e9 07 fe ff ff jmp 10b366 base = 16; sign = false; } else if ( c == 'p' ) { base = 16; sign = false; lflag = true; } else { BSP_output_char(c); continue; 10b55f: 31 c9 xor %ecx,%ecx 10b561: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp) 10b568: e9 90 fd ff ff jmp 10b2fd unsigned i, len; char *s, *str; str = va_arg(ap, char *); if ( str == NULL ) { 10b56d: b8 95 29 12 00 mov $0x122995,%eax str = ""; } /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 10b572: 80 38 00 cmpb $0x0,(%eax) 10b575: 0f 85 e2 fe ff ff jne 10b45d <== NEVER TAKEN 10b57b: 31 ff xor %edi,%edi 10b57d: e9 e5 fe ff ff jmp 10b467 } else { BSP_output_char(c); continue; } printNum( 10b582: 0f be d2 movsbl %dl,%edx 10b585: 89 55 b4 mov %edx,-0x4c(%ebp) 10b588: 31 c9 xor %ecx,%ecx 10b58a: c7 45 b8 10 00 00 00 movl $0x10,-0x48(%ebp) 10b591: e9 6d fd ff ff jmp 10b303 =============================================================================== 00120a44 : ssize_t write( int fd, const void *buffer, size_t count ) { 120a44: 55 push %ebp 120a45: 89 e5 mov %esp,%ebp 120a47: 53 push %ebx 120a48: 83 ec 04 sub $0x4,%esp 120a4b: 8b 5d 08 mov 0x8(%ebp),%ebx 120a4e: 8b 45 0c mov 0xc(%ebp),%eax 120a51: 8b 55 10 mov 0x10(%ebp),%edx ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 120a54: 3b 1d 0c 52 12 00 cmp 0x12520c,%ebx 120a5a: 73 50 jae 120aac <== NEVER TAKEN iop = rtems_libio_iop( fd ); 120a5c: c1 e3 06 shl $0x6,%ebx 120a5f: 03 1d 40 93 12 00 add 0x129340,%ebx rtems_libio_check_is_open( iop ); 120a65: 8b 4b 14 mov 0x14(%ebx),%ecx 120a68: f6 c5 01 test $0x1,%ch 120a6b: 74 3f je 120aac <== NEVER TAKEN rtems_libio_check_buffer( buffer ); 120a6d: 85 c0 test %eax,%eax 120a6f: 74 4f je 120ac0 <== NEVER TAKEN rtems_libio_check_count( count ); 120a71: 85 d2 test %edx,%edx 120a73: 74 2f je 120aa4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 120a75: 83 e1 04 and $0x4,%ecx 120a78: 74 46 je 120ac0 <== NEVER TAKEN /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 120a7a: 8b 4b 3c mov 0x3c(%ebx),%ecx 120a7d: 8b 49 0c mov 0xc(%ecx),%ecx 120a80: 85 c9 test %ecx,%ecx 120a82: 74 4e je 120ad2 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 120a84: 83 ec 04 sub $0x4,%esp 120a87: 52 push %edx 120a88: 50 push %eax 120a89: 53 push %ebx 120a8a: ff d1 call *%ecx if ( rc > 0 ) 120a8c: 83 c4 10 add $0x10,%esp 120a8f: 85 c0 test %eax,%eax 120a91: 7e 0b jle 120a9e <== NEVER TAKEN iop->offset += rc; 120a93: 89 c1 mov %eax,%ecx 120a95: c1 f9 1f sar $0x1f,%ecx 120a98: 01 43 0c add %eax,0xc(%ebx) 120a9b: 11 4b 10 adc %ecx,0x10(%ebx) return rc; } 120a9e: 8b 5d fc mov -0x4(%ebp),%ebx 120aa1: c9 leave 120aa2: c3 ret 120aa3: 90 nop 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 ); 120aa4: 31 c0 xor %eax,%eax if ( rc > 0 ) iop->offset += rc; return rc; } 120aa6: 8b 5d fc mov -0x4(%ebp),%ebx 120aa9: c9 leave 120aaa: c3 ret 120aab: 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 ); 120aac: e8 b7 45 ff ff call 115068 <__errno> <== NOT EXECUTED 120ab1: c7 00 09 00 00 00 movl $0x9,(%eax) <== NOT EXECUTED 120ab7: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 120abc: eb e0 jmp 120a9e <== NOT EXECUTED 120abe: 66 90 xchg %ax,%ax <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 120ac0: e8 a3 45 ff ff call 115068 <__errno> <== NOT EXECUTED 120ac5: c7 00 16 00 00 00 movl $0x16,(%eax) <== NOT EXECUTED 120acb: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 120ad0: eb cc jmp 120a9e <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 120ad2: e8 91 45 ff ff call 115068 <__errno> <== NOT EXECUTED 120ad7: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 120add: b8 ff ff ff ff mov $0xffffffff,%eax <== NOT EXECUTED 120ae2: eb ba jmp 120a9e <== NOT EXECUTED =============================================================================== 0010c398 : ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 10c398: 55 push %ebp 10c399: 89 e5 mov %esp,%ebp 10c39b: 57 push %edi 10c39c: 56 push %esi 10c39d: 53 push %ebx 10c39e: 83 ec 3c sub $0x3c,%esp 10c3a1: 8b 45 08 mov 0x8(%ebp),%eax 10c3a4: 8b 5d 0c mov 0xc(%ebp),%ebx 10c3a7: 8b 7d 10 mov 0x10(%ebp),%edi int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 10c3aa: 3b 05 8c 75 12 00 cmp 0x12758c,%eax 10c3b0: 0f 83 f2 00 00 00 jae 10c4a8 <== NEVER TAKEN iop = rtems_libio_iop( fd ); 10c3b6: c1 e0 06 shl $0x6,%eax 10c3b9: 8b 15 c0 be 12 00 mov 0x12bec0,%edx 10c3bf: 01 d0 add %edx,%eax 10c3c1: 89 45 e4 mov %eax,-0x1c(%ebp) rtems_libio_check_is_open( iop ); 10c3c4: 8b 40 14 mov 0x14(%eax),%eax 10c3c7: f6 c4 01 test $0x1,%ah 10c3ca: 0f 84 d8 00 00 00 je 10c4a8 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 10c3d0: a8 04 test $0x4,%al 10c3d2: 74 7c je 10c450 <== NEVER TAKEN /* * Argument validation on IO vector */ if ( !iov ) 10c3d4: 85 db test %ebx,%ebx 10c3d6: 74 78 je 10c450 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 10c3d8: 85 ff test %edi,%edi 10c3da: 7e 74 jle 10c450 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 10c3dc: 81 ff 00 04 00 00 cmp $0x400,%edi 10c3e2: 7f 6c jg 10c450 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 10c3e4: 8b 55 e4 mov -0x1c(%ebp),%edx 10c3e7: 8b 42 3c mov 0x3c(%edx),%eax 10c3ea: 8b 48 0c mov 0xc(%eax),%ecx 10c3ed: 85 c9 test %ecx,%ecx 10c3ef: 0f 84 c5 00 00 00 je 10c4ba <== NEVER TAKEN rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c3f5: be 01 00 00 00 mov $0x1,%esi 10c3fa: 31 c0 xor %eax,%eax 10c3fc: 31 c9 xor %ecx,%ecx 10c3fe: eb 02 jmp 10c402 * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 10c400: 89 d1 mov %edx,%ecx if ( !iov[v].iov_base ) 10c402: 8b 14 c3 mov (%ebx,%eax,8),%edx 10c405: 85 d2 test %edx,%edx 10c407: 74 47 je 10c450 rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len ) 10c409: 8b 54 c3 04 mov 0x4(%ebx,%eax,8),%edx 10c40d: 85 d2 test %edx,%edx 10c40f: 74 02 je 10c413 <== NEVER TAKEN 10c411: 31 f6 xor %esi,%esi all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 10c413: 8d 14 11 lea (%ecx,%edx,1),%edx if ( total < old || total > SSIZE_MAX ) 10c416: 39 d1 cmp %edx,%ecx 10c418: 7f 36 jg 10c450 10c41a: 81 fa ff 7f 00 00 cmp $0x7fff,%edx 10c420: 7f 2e jg 10c450 <== NEVER TAKEN * this loop does that check as well and sets "all-zero" appropriately. * The variable "all_zero" is used as an early exit point before * entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { 10c422: 40 inc %eax 10c423: 39 c7 cmp %eax,%edi 10c425: 7f d9 jg 10c400 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10c427: 89 f1 mov %esi,%ecx 10c429: 84 c9 test %cl,%cl 10c42b: 75 3d jne 10c46a <== NEVER TAKEN 10c42d: 31 f6 xor %esi,%esi 10c42f: 31 d2 xor %edx,%edx 10c431: 89 55 c0 mov %edx,-0x40(%ebp) /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 10c434: 8b 44 f3 04 mov 0x4(%ebx,%esi,8),%eax 10c438: 85 c0 test %eax,%eax 10c43a: 75 32 jne 10c46e <== ALWAYS TAKEN } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 10c43c: 46 inc %esi 10c43d: 39 f7 cmp %esi,%edi 10c43f: 7f f3 jg 10c434 10c441: 8b 55 c0 mov -0x40(%ebp),%edx if (bytes != iov[ v ].iov_len) break; } return total; } 10c444: 89 d0 mov %edx,%eax 10c446: 8d 65 f4 lea -0xc(%ebp),%esp 10c449: 5b pop %ebx 10c44a: 5e pop %esi 10c44b: 5f pop %edi 10c44c: c9 leave 10c44d: c3 ret 10c44e: 66 90 xchg %ax,%ax /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 10c450: e8 0b 99 00 00 call 115d60 <__errno> 10c455: c7 00 16 00 00 00 movl $0x16,(%eax) 10c45b: ba ff ff ff ff mov $0xffffffff,%edx if (bytes != iov[ v ].iov_len) break; } return total; } 10c460: 89 d0 mov %edx,%eax 10c462: 8d 65 f4 lea -0xc(%ebp),%esp 10c465: 5b pop %ebx 10c466: 5e pop %esi 10c467: 5f pop %edi 10c468: c9 leave 10c469: c3 ret } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 10c46a: 31 d2 xor %edx,%edx <== NOT EXECUTED 10c46c: eb f2 jmp 10c460 <== NOT EXECUTED for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 10c46e: 52 push %edx 10c46f: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c472: 8b 51 3c mov 0x3c(%ecx),%edx 10c475: 50 push %eax 10c476: ff 34 f3 pushl (%ebx,%esi,8) 10c479: 51 push %ecx 10c47a: ff 52 0c call *0xc(%edx) 10c47d: 89 45 c4 mov %eax,-0x3c(%ebp) if ( bytes < 0 ) 10c480: 83 c4 10 add $0x10,%esp 10c483: 83 f8 00 cmp $0x0,%eax 10c486: 7c 42 jl 10c4ca <== NEVER TAKEN return -1; if ( bytes > 0 ) { 10c488: 74 13 je 10c49d <== NEVER TAKEN iop->offset += bytes; 10c48a: 8b 45 c4 mov -0x3c(%ebp),%eax 10c48d: 99 cltd 10c48e: 8b 4d e4 mov -0x1c(%ebp),%ecx 10c491: 01 41 0c add %eax,0xc(%ecx) 10c494: 11 51 10 adc %edx,0x10(%ecx) total += bytes; 10c497: 8b 45 c4 mov -0x3c(%ebp),%eax 10c49a: 01 45 c0 add %eax,-0x40(%ebp) } if (bytes != iov[ v ].iov_len) 10c49d: 8b 55 c4 mov -0x3c(%ebp),%edx 10c4a0: 3b 54 f3 04 cmp 0x4(%ebx,%esi,8),%edx 10c4a4: 74 96 je 10c43c <== ALWAYS TAKEN 10c4a6: eb 99 jmp 10c441 <== NOT EXECUTED ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 10c4a8: e8 b3 98 00 00 call 115d60 <__errno> 10c4ad: c7 00 09 00 00 00 movl $0x9,(%eax) 10c4b3: ba ff ff ff ff mov $0xffffffff,%edx 10c4b8: eb a6 jmp 10c460 if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 10c4ba: e8 a1 98 00 00 call 115d60 <__errno> <== NOT EXECUTED 10c4bf: c7 00 86 00 00 00 movl $0x86,(%eax) <== NOT EXECUTED 10c4c5: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10c4c8: eb 96 jmp 10c460 <== NOT EXECUTED if ( iov[v].iov_len == 0 ) continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 10c4ca: 83 ca ff or $0xffffffff,%edx <== NOT EXECUTED 10c4cd: eb 91 jmp 10c460 <== NOT EXECUTED