40021054 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 40021054: 9d e3 bf 90 save %sp, -112, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 40021058: 40 00 07 76 call 40022e30 4002105c: f0 06 00 00 ld [ %i0 ], %i0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 40021060: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 40021064: 91 2a 20 10 sll %o0, 0x10, %o0 40021068: 91 32 20 10 srl %o0, 0x10, %o0 4002106c: 80 a2 00 01 cmp %o0, %g1 40021070: 02 80 00 04 be 40021080 40021074: 80 a2 20 00 cmp %o0, 0 40021078: 12 80 00 0c bne 400210a8 <== NOT EXECUTED 4002107c: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 40021080: f2 36 20 38 sth %i1, [ %i0 + 0x38 ] jnode->st_gid = group; 40021084: f4 36 20 3a sth %i2, [ %i0 + 0x3a ] IMFS_update_ctime( jnode ); 40021088: 90 07 bf f0 add %fp, -16, %o0 4002108c: 7f ff 96 43 call 40006998 40021090: 92 10 20 00 clr %o1 40021094: c2 07 bf f0 ld [ %fp + -16 ], %g1 40021098: 84 10 20 00 clr %g2 4002109c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 400210a0: 81 c7 e0 08 ret 400210a4: 91 e8 00 02 restore %g0, %g2, %o0 #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 ); 400210a8: 40 00 49 bc call 40033798 <__errno> <== NOT EXECUTED 400210ac: 01 00 00 00 nop <== NOT EXECUTED 400210b0: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 400210b4: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 400210b8: 10 bf ff fa b 400210a0 <== NOT EXECUTED 400210bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000dc30 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000dc30: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *node; struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; if ( parent_loc != NULL ) 4000dc34: a2 96 20 00 orcc %i0, 0, %l1 4000dc38: 02 80 00 03 be 4000dc44 4000dc3c: a0 10 20 00 clr %l0 parent = parent_loc->node_access; 4000dc40: e0 04 40 00 ld [ %l1 ], %l0 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000dc44: 90 10 20 01 mov 1, %o0 4000dc48: 7f ff f6 bf call 4000b744 4000dc4c: 92 10 20 5c mov 0x5c, %o1 if ( !node ) 4000dc50: b0 92 20 00 orcc %o0, 0, %i0 4000dc54: 02 80 00 30 be 4000dd14 4000dc58: 82 10 20 01 mov 1, %g1 * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4000dc5c: 92 10 00 1a mov %i2, %o1 4000dc60: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; 4000dc64: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] node->type = type; 4000dc68: f2 26 20 48 st %i1, [ %i0 + 0x48 ] strncpy( node->name, name, IMFS_NAME_MAX ); 4000dc6c: 40 00 08 7a call 4000fe54 4000dc70: 90 06 20 0c add %i0, 0xc, %o0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000dc74: 05 10 00 68 sethi %hi(0x4001a000), %g2 4000dc78: c6 00 a0 1c ld [ %g2 + 0x1c ], %g3 ! 4001a01c 4000dc7c: c2 10 e0 24 lduh [ %g3 + 0x24 ], %g1 4000dc80: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4000dc84: 7f ff f7 6c call 4000ba34 4000dc88: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] node->st_gid = getegid(); 4000dc8c: 7f ff f7 66 call 4000ba24 4000dc90: d0 36 20 38 sth %o0, [ %i0 + 0x38 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000dc94: 92 10 20 00 clr %o1 node->st_mode = mode & ~rtems_filesystem_umask; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 4000dc98: d0 36 20 3a sth %o0, [ %i0 + 0x3a ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000dc9c: 7f ff f7 6a call 4000ba44 4000dca0: 90 07 bf f0 add %fp, -16, %o0 node->stat_atime = (time_t) tv.tv_sec; 4000dca4: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 4000dca8: 80 a6 60 06 cmp %i1, 6 gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 4000dcac: c2 26 20 44 st %g1, [ %i0 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4000dcb0: c2 26 20 3c st %g1, [ %i0 + 0x3c ] /* * Set the type specific information */ switch (type) { 4000dcb4: 08 80 00 1a bleu 4000dd1c 4000dcb8: c2 26 20 40 st %g1, [ %i0 + 0x40 ] node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; default: assert(0); 4000dcbc: 11 10 00 64 sethi %hi(0x40019000), %o0 <== NOT EXECUTED 4000dcc0: 15 10 00 64 sethi %hi(0x40019000), %o2 <== NOT EXECUTED 4000dcc4: 17 10 00 62 sethi %hi(0x40018800), %o3 <== NOT EXECUTED 4000dcc8: 90 12 23 88 or %o0, 0x388, %o0 <== NOT EXECUTED 4000dccc: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4000dcd0: 96 12 e1 f8 or %o3, 0x1f8, %o3 <== NOT EXECUTED 4000dcd4: 7f ff d4 ea call 4000307c <__assert_func> <== NOT EXECUTED 4000dcd8: 92 10 20 74 mov 0x74, %o1 <== NOT EXECUTED case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 4000dcdc: c2 07 00 00 ld [ %i4 ], %g1 4000dce0: c2 26 20 4c st %g1, [ %i0 + 0x4c ] /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000dce4: 80 a4 20 00 cmp %l0, 0 4000dce8: 02 80 00 0b be 4000dd14 4000dcec: 90 04 20 4c add %l0, 0x4c, %o0 RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 4000dcf0: 7f ff e5 f1 call 400074b4 <_Chain_Append> 4000dcf4: 92 10 00 18 mov %i0, %o1 rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; 4000dcf8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 * If this node has a parent, then put it in that directory list. */ if ( parent ) { rtems_chain_append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; 4000dcfc: e0 26 20 08 st %l0, [ %i0 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 4000dd00: c6 00 60 2c ld [ %g1 + 0x2c ], %g3 node->st_ino = ++fs_info->ino_count; 4000dd04: c4 00 c0 00 ld [ %g3 ], %g2 4000dd08: 84 00 a0 01 inc %g2 4000dd0c: c4 20 c0 00 st %g2, [ %g3 ] 4000dd10: c4 26 20 34 st %g2, [ %i0 + 0x34 ] } return node; } 4000dd14: 81 c7 e0 08 ret 4000dd18: 81 e8 00 00 restore /* * Set the type specific information */ switch (type) { 4000dd1c: 83 2e 60 02 sll %i1, 2, %g1 4000dd20: 05 10 00 37 sethi %hi(0x4000dc00), %g2 4000dd24: 84 10 a0 14 or %g2, 0x14, %g2 ! 4000dc14 4000dd28: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000dd2c: 81 c0 c0 00 jmp %g3 4000dd30: 01 00 00 00 nop node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000dd34: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000dd38: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000dd3c: c0 26 20 4c clr [ %i0 + 0x4c ] node->info.file.indirect = 0; 4000dd40: c0 26 20 50 clr [ %i0 + 0x50 ] node->info.file.doubly_indirect = 0; 4000dd44: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.triply_indirect = 0; 4000dd48: 10 bf ff e7 b 4000dce4 4000dd4c: c0 26 20 58 clr [ %i0 + 0x58 ] node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 4000dd50: c2 07 20 04 ld [ %i4 + 4 ], %g1 case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000dd54: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 4000dd58: c2 26 20 50 st %g1, [ %i0 + 0x50 ] case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000dd5c: 10 bf ff e2 b 4000dce4 4000dd60: c4 26 20 4c st %g2, [ %i0 + 0x4c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000dd64: 82 06 20 50 add %i0, 0x50, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000dd68: 84 06 20 4c add %i0, 0x4c, %g2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000dd6c: c0 26 20 50 clr [ %i0 + 0x50 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000dd70: c2 26 20 4c st %g1, [ %i0 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000dd74: 10 bf ff dc b 4000dce4 4000dd78: c4 26 20 54 st %g2, [ %i0 + 0x54 ] 40004c84 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40004c84: 9d e3 bf 98 save %sp, -104, %sp rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40004c88: 80 a6 20 00 cmp %i0, 0 40004c8c: 02 80 00 2c be 40004d3c 40004c90: 80 a6 60 00 cmp %i1, 0 assert( level >= 0 ); 40004c94: 06 80 00 38 bl 40004d74 40004c98: 11 10 00 7f sethi %hi(0x4001fc00), %o0 assert( the_directory->type == IMFS_DIRECTORY ); 40004c9c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40004ca0: 80 a0 60 01 cmp %g1, 1 40004ca4: 12 80 00 2e bne 40004d5c 40004ca8: 15 10 00 80 sethi %hi(0x40020000), %o2 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004cac: e2 06 20 4c ld [ %i0 + 0x4c ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40004cb0: b0 06 20 50 add %i0, 0x50, %i0 !rtems_chain_is_tail( the_chain, the_node ); 40004cb4: 80 a4 40 18 cmp %l1, %i0 40004cb8: 02 80 00 1b be 40004d24 40004cbc: 03 10 00 88 sethi %hi(0x40022000), %g1 40004cc0: 05 10 00 80 sethi %hi(0x40020000), %g2 40004cc4: a6 10 61 50 or %g1, 0x150, %l3 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40004cc8: a4 10 a0 28 or %g2, 0x28, %l2 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40004ccc: a8 06 60 01 add %i1, 1, %l4 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; 40004cd0: a0 10 20 00 clr %l0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40004cd4: c2 04 c0 00 ld [ %l3 ], %g1 40004cd8: 90 10 00 12 mov %l2, %o0 40004cdc: d6 00 60 08 ld [ %g1 + 8 ], %o3 40004ce0: 92 10 20 01 mov 1, %o1 40004ce4: 40 00 3d 1b call 40014150 40004ce8: 94 10 20 04 mov 4, %o2 !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++ ) 40004cec: a0 04 20 01 inc %l0 40004cf0: 80 a6 40 10 cmp %i1, %l0 40004cf4: 36 bf ff f9 bge,a 40004cd8 40004cf8: c2 04 c0 00 ld [ %l3 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40004cfc: 7f ff ff 85 call 40004b10 40004d00: 90 10 00 11 mov %l1, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40004d04: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 40004d08: 80 a0 60 01 cmp %g1, 1 40004d0c: 22 80 00 08 be,a 40004d2c 40004d10: 90 10 00 11 mov %l1, %o0 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 ) { 40004d14: e2 04 40 00 ld [ %l1 ], %l1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 40004d18: 80 a4 40 18 cmp %l1, %i0 40004d1c: 12 bf ff ee bne 40004cd4 40004d20: a0 10 20 00 clr %l0 40004d24: 81 c7 e0 08 ret 40004d28: 81 e8 00 00 restore 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 ); 40004d2c: 7f ff ff d6 call 40004c84 40004d30: 92 10 00 14 mov %l4, %o1 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 ) { 40004d34: 10 bf ff f9 b 40004d18 40004d38: e2 04 40 00 ld [ %l1 ], %l1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40004d3c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40004d40: 15 10 00 80 sethi %hi(0x40020000), %o2 <== NOT EXECUTED 40004d44: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40004d48: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 40004d4c: 94 12 a0 d8 or %o2, 0xd8, %o2 <== NOT EXECUTED 40004d50: 96 12 e3 e0 or %o3, 0x3e0, %o3 <== NOT EXECUTED 40004d54: 40 00 01 c5 call 40005468 <__assert_func> <== NOT EXECUTED 40004d58: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 40004d5c: 17 10 00 80 sethi %hi(0x40020000), %o3 <== NOT EXECUTED 40004d60: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 40004d64: 94 12 a0 d8 or %o2, 0xd8, %o2 <== NOT EXECUTED 40004d68: 96 12 e0 00 mov %o3, %o3 <== NOT EXECUTED 40004d6c: 40 00 01 bf call 40005468 <__assert_func> <== NOT EXECUTED 40004d70: 92 10 20 83 mov 0x83, %o1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 40004d74: 15 10 00 80 sethi %hi(0x40020000), %o2 <== NOT EXECUTED 40004d78: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40004d7c: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 40004d80: 94 12 a0 d8 or %o2, 0xd8, %o2 <== NOT EXECUTED 40004d84: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 40004d88: 40 00 01 b8 call 40005468 <__assert_func> <== NOT EXECUTED 40004d8c: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED 40004d90: 01 00 00 00 nop 4000aaf8 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000aaf8: 9d e3 bf 70 save %sp, -144, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000aafc: e0 06 80 00 ld [ %i2 ], %l0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000ab00: 03 10 00 68 sethi %hi(0x4001a000), %g1 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000ab04: a6 10 00 18 mov %i0, %l3 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000ab08: ac 10 60 1c or %g1, 0x1c, %l6 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000ab0c: a4 10 20 00 clr %l2 4000ab10: a8 07 bf d0 add %fp, -48, %l4 4000ab14: aa 07 bf f4 add %fp, -12, %l5 * 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], token, &len ); 4000ab18: 90 04 c0 12 add %l3, %l2, %o0 4000ab1c: 92 10 00 14 mov %l4, %o1 4000ab20: 40 00 01 b2 call 4000b1e8 4000ab24: 94 10 00 15 mov %l5, %o2 i += len; if ( !pathloc->node_access ) 4000ab28: c6 06 80 00 ld [ %i2 ], %g3 * 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], token, &len ); 4000ab2c: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 4000ab30: 80 a0 e0 00 cmp %g3, 0 4000ab34: 02 80 00 57 be 4000ac90 4000ab38: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000ab3c: 80 a2 20 00 cmp %o0, 0 4000ab40: 12 80 00 10 bne 4000ab80 4000ab44: a4 04 80 01 add %l2, %g1, %l2 * 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 ) { 4000ab48: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 4000ab4c: 80 a0 60 01 cmp %g1, 1 4000ab50: 12 80 00 6f bne 4000ad0c 4000ab54: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 4000ab58: c6 00 e0 58 ld [ %g3 + 0x58 ], %g3 4000ab5c: 80 a0 e0 00 cmp %g3, 0 4000ab60: 02 80 00 6b be 4000ad0c 4000ab64: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 4000ab68: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 *pathloc = newloc; 4000ab6c: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1 * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4000ab70: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000ab74: da 01 00 00 ld [ %g4 ], %o5 * 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4000ab78: 10 80 00 59 b 4000acdc 4000ab7c: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4000ab80: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000ab84: 80 a0 60 01 cmp %g1, 1 4000ab88: 02 80 00 3b be 4000ac74 4000ab8c: 90 10 00 1a mov %i2, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000ab90: 80 a4 60 03 cmp %l1, 3 4000ab94: 02 80 00 0b be 4000abc0 4000ab98: a0 10 00 03 mov %g3, %l0 4000ab9c: 80 a4 60 04 cmp %l1, 4 4000aba0: 02 80 00 2f be 4000ac5c 4000aba4: 80 a4 60 02 cmp %l1, 2 4000aba8: 02 80 00 1a be 4000ac10 4000abac: 80 a4 60 04 cmp %l1, 4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4000abb0: 12 bf ff db bne 4000ab1c 4000abb4: 90 04 c0 12 add %l3, %l2, %o0 * 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 ) { 4000abb8: 10 bf ff e5 b 4000ab4c <== NOT EXECUTED 4000abbc: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 <== NOT EXECUTED case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4000abc0: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 4000abc4: 80 a0 60 03 cmp %g1, 3 4000abc8: 02 80 00 38 be 4000aca8 4000abcc: 80 a0 60 04 cmp %g1, 4 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4000abd0: 02 80 00 66 be 4000ad68 4000abd4: 90 10 00 1a mov %i2, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000abd8: 80 a0 60 01 cmp %g1, 1 4000abdc: 12 80 00 57 bne 4000ad38 4000abe0: 01 00 00 00 nop /* * 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 ) { 4000abe4: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 4000abe8: 80 a0 e0 00 cmp %g3, 0 4000abec: 12 bf ff df bne 4000ab68 4000abf0: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000abf4: 40 00 01 4f call 4000b130 4000abf8: 92 10 00 14 mov %l4, %o1 if ( !node ) 4000abfc: a0 92 20 00 orcc %o0, 0, %l0 4000ac00: 02 80 00 24 be 4000ac90 4000ac04: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4000ac08: 10 bf ff c4 b 4000ab18 4000ac0c: e0 26 80 00 st %l0, [ %i2 ] case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000ac10: c2 05 80 00 ld [ %l6 ], %g1 4000ac14: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 4000ac18: 80 a0 80 03 cmp %g2, %g3 4000ac1c: 02 bf ff c0 be 4000ab1c 4000ac20: 90 04 c0 12 add %l3, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000ac24: d8 06 a0 0c ld [ %i2 + 0xc ], %o4 4000ac28: c2 03 20 18 ld [ %o4 + 0x18 ], %g1 4000ac2c: 80 a0 40 03 cmp %g1, %g3 4000ac30: 22 80 00 27 be,a 4000accc 4000ac34: c8 03 20 10 ld [ %o4 + 0x10 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 4000ac38: e0 00 e0 08 ld [ %g3 + 8 ], %l0 4000ac3c: 80 a4 20 00 cmp %l0, 0 4000ac40: 32 bf ff b7 bne,a 4000ab1c 4000ac44: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000ac48: 40 00 0f 41 call 4000e94c <__errno> 4000ac4c: b0 10 3f ff mov -1, %i0 4000ac50: e2 22 00 00 st %l1, [ %o0 ] 4000ac54: 81 c7 e0 08 ret 4000ac58: 81 e8 00 00 restore case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000ac5c: 40 00 0f 3c call 4000e94c <__errno> 4000ac60: b0 10 3f ff mov -1, %i0 4000ac64: 82 10 20 5b mov 0x5b, %g1 4000ac68: c2 22 00 00 st %g1, [ %o0 ] 4000ac6c: 81 c7 e0 08 ret 4000ac70: 81 e8 00 00 restore /* * 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 ) ) 4000ac74: 7f ff ff 35 call 4000a948 4000ac78: 92 10 20 01 mov 1, %o1 4000ac7c: 80 a2 20 00 cmp %o0, 0 4000ac80: 02 80 00 43 be 4000ad8c 4000ac84: 01 00 00 00 nop 4000ac88: 10 bf ff c2 b 4000ab90 4000ac8c: c6 06 80 00 ld [ %i2 ], %g3 * 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 ); 4000ac90: 40 00 0f 2f call 4000e94c <__errno> 4000ac94: b0 10 3f ff mov -1, %i0 4000ac98: 82 10 20 02 mov 2, %g1 4000ac9c: c2 22 00 00 st %g1, [ %o0 ] 4000aca0: 81 c7 e0 08 ret 4000aca4: 81 e8 00 00 restore * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 4000aca8: 90 10 00 1a mov %i2, %o0 4000acac: 7f ff ff 3f call 4000a9a8 4000acb0: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000acb4: e0 06 80 00 ld [ %i2 ], %l0 if ( !node ) 4000acb8: 80 a4 20 00 cmp %l0, 0 4000acbc: 02 80 00 1f be 4000ad38 4000acc0: 01 00 00 00 nop } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4000acc4: 10 bf ff c5 b 4000abd8 4000acc8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4000accc: c2 03 20 14 ld [ %o4 + 0x14 ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); 4000acd0: da 01 00 00 ld [ %g4 ], %o5 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4000acd4: c4 03 20 0c ld [ %o4 + 0xc ], %g2 4000acd8: c6 03 20 08 ld [ %o4 + 8 ], %g3 if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000acdc: d0 07 bf f4 ld [ %fp + -12 ], %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000ace0: c2 26 a0 0c st %g1, [ %i2 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000ace4: 90 24 80 08 sub %l2, %o0, %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000ace8: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000acec: c6 26 80 00 st %g3, [ %i2 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000acf0: 90 04 c0 08 add %l3, %o0, %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000acf4: c8 26 a0 08 st %g4, [ %i2 + 8 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000acf8: 92 10 00 19 mov %i1, %o1 4000acfc: 9f c3 40 00 call %o5 4000ad00: 94 10 00 1a mov %i2, %o2 4000ad04: 81 c7 e0 08 ret 4000ad08: 91 e8 00 08 restore %g0, %o0, %o0 } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000ad0c: 7f ff fe f1 call 4000a8d0 4000ad10: 90 10 00 1a mov %i2, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000ad14: 92 10 00 19 mov %i1, %o1 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000ad18: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000ad1c: 7f ff ff 0b call 4000a948 4000ad20: 90 10 00 1a mov %i2, %o0 4000ad24: 80 a2 20 00 cmp %o0, 0 4000ad28: 02 80 00 0a be 4000ad50 4000ad2c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000ad30: 81 c7 e0 08 ret 4000ad34: 81 e8 00 00 restore /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000ad38: 40 00 0f 05 call 4000e94c <__errno> 4000ad3c: b0 10 3f ff mov -1, %i0 4000ad40: 82 10 20 14 mov 0x14, %g1 4000ad44: c2 22 00 00 st %g1, [ %o0 ] 4000ad48: 81 c7 e0 08 ret 4000ad4c: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000ad50: 40 00 0e ff call 4000e94c <__errno> 4000ad54: b0 10 3f ff mov -1, %i0 4000ad58: 82 10 20 0d mov 0xd, %g1 4000ad5c: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000ad60: 81 c7 e0 08 ret 4000ad64: 81 e8 00 00 restore if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4000ad68: 7f ff ff 2b call 4000aa14 4000ad6c: 92 10 20 00 clr %o1 4000ad70: b0 10 00 08 mov %o0, %i0 node = pathloc->node_access; if ( result == -1 ) 4000ad74: 80 a2 3f ff cmp %o0, -1 4000ad78: 02 bf ff b7 be 4000ac54 4000ad7c: d0 06 80 00 ld [ %i2 ], %o0 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4000ad80: a0 10 00 08 mov %o0, %l0 4000ad84: 10 bf ff 95 b 4000abd8 4000ad88: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 * 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 ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000ad8c: 40 00 0e f0 call 4000e94c <__errno> 4000ad90: b0 10 3f ff mov -1, %i0 4000ad94: 82 10 20 0d mov 0xd, %g1 4000ad98: c2 22 00 00 st %g1, [ %o0 ] 4000ad9c: 81 c7 e0 08 ret 4000ada0: 81 e8 00 00 restore 4000a9a8 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000a9a8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000a9ac: c4 06 00 00 ld [ %i0 ], %g2 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000a9b0: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 4000a9b4: 80 a0 60 03 cmp %g1, 3 4000a9b8: 12 80 00 14 bne 4000aa08 4000a9bc: 90 10 00 18 mov %i0, %o0 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 4000a9c0: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 IMFS_Set_handlers( node ); 4000a9c4: 7f ff ff c3 call 4000a8d0 4000a9c8: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000a9cc: 90 10 00 18 mov %i0, %o0 4000a9d0: 92 10 00 19 mov %i1, %o1 4000a9d4: 7f ff ff dd call 4000a948 4000a9d8: b0 10 20 00 clr %i0 4000a9dc: 80 a2 20 00 cmp %o0, 0 4000a9e0: 02 80 00 04 be 4000a9f0 4000a9e4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000a9e8: 81 c7 e0 08 ret 4000a9ec: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000a9f0: 40 00 0f d7 call 4000e94c <__errno> <== NOT EXECUTED 4000a9f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000a9f8: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000a9fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000aa00: 81 c7 e0 08 ret <== NOT EXECUTED 4000aa04: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 4000aa08: 7f ff f1 97 call 40007064 <== NOT EXECUTED 4000aa0c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000aa10: 01 00 00 00 nop 4000ada4 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000ada4: 9d e3 bf 98 save %sp, -104, %sp 4000ada8: 25 10 00 68 sethi %hi(0x4001a000), %l2 4000adac: 10 80 00 07 b 4000adc8 4000adb0: a2 14 a0 1c or %l2, 0x1c, %l1 ! 4001a01c */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4000adb4: 02 80 00 23 be 4000ae40 4000adb8: 82 00 7f fd add %g1, -3, %g1 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000adbc: 80 a0 60 01 cmp %g1, 1 4000adc0: 18 80 00 1c bgu 4000ae30 4000adc4: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000adc8: c4 04 40 00 ld [ %l1 ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4000adcc: e0 06 00 00 ld [ %i0 ], %l0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000add0: c2 10 a0 26 lduh [ %g2 + 0x26 ], %g1 4000add4: 82 00 60 01 inc %g1 4000add8: c2 30 a0 26 sth %g1, [ %g2 + 0x26 ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4000addc: 83 28 60 10 sll %g1, 0x10, %g1 4000ade0: 83 30 60 10 srl %g1, 0x10, %g1 4000ade4: 80 a0 60 05 cmp %g1, 5 4000ade8: 18 80 00 1b bgu 4000ae54 4000adec: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4000adf0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000adf4: 80 a0 60 03 cmp %g1, 3 4000adf8: 12 bf ff ef bne 4000adb4 4000adfc: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_hard_link( node, flags ); 4000ae00: 90 10 00 18 mov %i0, %o0 4000ae04: 7f ff fe e9 call 4000a9a8 4000ae08: 92 10 00 19 mov %i1, %o1 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 ) ) ); 4000ae0c: 80 a2 20 00 cmp %o0, 0 4000ae10: 12 80 00 09 bne 4000ae34 4000ae14: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 4000ae18: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000ae1c: 82 00 7f fd add %g1, -3, %g1 4000ae20: 80 a0 60 01 cmp %g1, 1 4000ae24: 28 bf ff ea bleu,a 4000adcc 4000ae28: c4 04 40 00 ld [ %l1 ], %g2 4000ae2c: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4000ae30: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 4000ae34: c0 30 60 26 clrh [ %g1 + 0x26 ] return result; } 4000ae38: 81 c7 e0 08 ret 4000ae3c: 91 e8 00 08 restore %g0, %o0, %o0 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 ); 4000ae40: 90 10 00 18 mov %i0, %o0 4000ae44: 7f ff fe f4 call 4000aa14 4000ae48: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000ae4c: 10 bf ff f1 b 4000ae10 4000ae50: 80 a2 20 00 cmp %o0, 0 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4000ae54: 40 00 0e be call 4000e94c <__errno> 4000ae58: c0 30 a0 26 clrh [ %g2 + 0x26 ] 4000ae5c: 82 10 20 5c mov 0x5c, %g1 4000ae60: c2 22 00 00 st %g1, [ %o0 ] 4000ae64: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 4000ae68: 81 c7 e0 08 ret 4000ae6c: 91 e8 00 08 restore %g0, %o0, %o0 4000a948 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 4000a948: 9d e3 bf 98 save %sp, -104, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000a94c: 40 00 04 3a call 4000ba34 4000a950: e2 06 00 00 ld [ %i0 ], %l1 st_gid = getegid(); 4000a954: 40 00 04 34 call 4000ba24 4000a958: a0 10 00 08 mov %o0, %l0 * Check if I am owner or a group member or someone else. */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) 4000a95c: c2 14 60 38 lduh [ %l1 + 0x38 ], %g1 4000a960: a1 2c 20 10 sll %l0, 0x10, %l0 4000a964: a1 34 20 10 srl %l0, 0x10, %l0 4000a968: 80 a4 00 01 cmp %l0, %g1 4000a96c: 02 80 00 09 be 4000a990 4000a970: b1 2e 60 06 sll %i1, 6, %i0 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 4000a974: c4 14 60 3a lduh [ %l1 + 0x3a ], %g2 4000a978: 83 2a 20 10 sll %o0, 0x10, %g1 4000a97c: 83 30 60 10 srl %g1, 0x10, %g1 4000a980: 80 a0 40 02 cmp %g1, %g2 4000a984: 02 80 00 03 be 4000a990 4000a988: b1 2e 60 03 sll %i1, 3, %i0 4000a98c: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED flags_to_test <<= 3; 4000a990: c2 14 60 2e lduh [ %l1 + 0x2e ], %g1 4000a994: 82 2e 00 01 andn %i0, %g1, %g1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 4000a998: 80 a0 00 01 cmp %g0, %g1 4000a99c: b0 60 3f ff subx %g0, -1, %i0 4000a9a0: 81 c7 e0 08 ret 4000a9a4: 81 e8 00 00 restore 4000aa14 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000aa14: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000aa18: c8 06 00 00 ld [ %i0 ], %g4 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000aa1c: c2 01 20 48 ld [ %g4 + 0x48 ], %g1 4000aa20: 80 a0 60 04 cmp %g1, 4 4000aa24: 12 80 00 30 bne 4000aae4 4000aa28: 01 00 00 00 nop rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 4000aa2c: c2 01 20 08 ld [ %g4 + 8 ], %g1 4000aa30: 80 a0 60 00 cmp %g1, 0 4000aa34: 02 80 00 2e be 4000aaec 4000aa38: 01 00 00 00 nop /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 4000aa3c: c2 26 00 00 st %g1, [ %i0 ] rtems_filesystem_get_sym_start_loc( 4000aa40: d0 01 20 4c ld [ %g4 + 0x4c ], %o0 4000aa44: c2 4a 00 00 ldsb [ %o0 ], %g1 4000aa48: 80 a0 60 2f cmp %g1, 0x2f 4000aa4c: 02 80 00 06 be 4000aa64 4000aa50: 80 a0 60 5c cmp %g1, 0x5c 4000aa54: 02 80 00 04 be 4000aa64 4000aa58: 80 a0 60 00 cmp %g1, 0 4000aa5c: 12 80 00 0e bne 4000aa94 4000aa60: 9a 10 20 00 clr %o5 4000aa64: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000aa68: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 ! 4001a01c 4000aa6c: 9a 10 20 01 mov 1, %o5 4000aa70: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 4000aa74: c2 26 00 00 st %g1, [ %i0 ] 4000aa78: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 4000aa7c: c4 26 20 04 st %g2, [ %i0 + 4 ] 4000aa80: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000aa84: c2 26 20 08 st %g1, [ %i0 + 8 ] 4000aa88: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 4000aa8c: c4 26 20 0c st %g2, [ %i0 + 0xc ] 4000aa90: d0 01 20 4c ld [ %g4 + 0x4c ], %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000aa94: 90 02 00 0d add %o0, %o5, %o0 4000aa98: 94 10 00 18 mov %i0, %o2 4000aa9c: 40 00 00 17 call 4000aaf8 4000aaa0: 92 10 00 19 mov %i1, %o1 4000aaa4: a0 10 00 08 mov %o0, %l0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 4000aaa8: 7f ff ff 8a call 4000a8d0 4000aaac: 90 10 00 18 mov %i0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000aab0: 90 10 00 18 mov %i0, %o0 4000aab4: 7f ff ff a5 call 4000a948 4000aab8: 92 10 00 19 mov %i1, %o1 4000aabc: 80 a2 20 00 cmp %o0, 0 4000aac0: 02 80 00 04 be 4000aad0 4000aac4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000aac8: 81 c7 e0 08 ret 4000aacc: 91 e8 00 10 restore %g0, %l0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000aad0: 40 00 0f 9f call 4000e94c <__errno> <== NOT EXECUTED 4000aad4: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED 4000aad8: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000aadc: 10 bf ff fb b 4000aac8 <== NOT EXECUTED 4000aae0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 4000aae4: 7f ff f1 60 call 40007064 <== NOT EXECUTED 4000aae8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 4000aaec: 7f ff f1 5e call 40007064 <== NOT EXECUTED 4000aaf0: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 4000aaf4: 01 00 00 00 nop 4000dd7c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000dd7c: 9d e3 bf 90 save %sp, -112, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000dd80: 7f ff f7 2d call 4000ba34 4000dd84: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000dd88: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 4000dd8c: 91 2a 20 10 sll %o0, 0x10, %o0 4000dd90: 91 32 20 10 srl %o0, 0x10, %o0 4000dd94: 80 a2 00 01 cmp %o0, %g1 4000dd98: 02 80 00 04 be 4000dda8 4000dd9c: 80 a2 20 00 cmp %o0, 0 4000dda0: 12 80 00 12 bne 4000dde8 <== NOT EXECUTED 4000dda4: 01 00 00 00 nop <== NOT EXECUTED #endif /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) 4000dda8: 83 2e 60 10 sll %i1, 0x10, %g1 4000ddac: 83 30 60 10 srl %g1, 0x10, %g1 4000ddb0: 82 08 7e 00 and %g1, -512, %g1 4000ddb4: 80 a0 60 00 cmp %g1, 0 4000ddb8: 12 80 00 0c bne 4000dde8 4000ddbc: 90 07 bf f0 add %fp, -16, %o0 rtems_set_errno_and_return_minus_one( EPERM ); jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; 4000ddc0: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 4000ddc4: 82 08 7e 00 and %g1, -512, %g1 4000ddc8: 82 16 40 01 or %i1, %g1, %g1 IMFS_update_ctime( jnode ); 4000ddcc: 92 10 20 00 clr %o1 4000ddd0: 7f ff f7 1d call 4000ba44 4000ddd4: c2 34 20 2e sth %g1, [ %l0 + 0x2e ] 4000ddd8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000dddc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000dde0: 81 c7 e0 08 ret 4000dde4: 91 e8 20 00 restore %g0, 0, %o0 /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4000dde8: 40 00 02 d9 call 4000e94c <__errno> 4000ddec: b0 10 3f ff mov -1, %i0 4000ddf0: 82 10 20 01 mov 1, %g1 4000ddf4: c2 22 00 00 st %g1, [ %o0 ] 4000ddf8: 81 c7 e0 08 ret 4000ddfc: 81 e8 00 00 restore 4000b130 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000b130: 9d e3 bf 98 save %sp, -104, %sp /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000b134: 80 a6 20 00 cmp %i0, 0 4000b138: 02 80 00 15 be 4000b18c 4000b13c: 80 a6 60 00 cmp %i1, 0 if ( !name ) 4000b140: 02 80 00 11 be 4000b184 4000b144: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000b148: 13 10 00 63 sethi %hi(0x40018c00), %o1 4000b14c: 40 00 12 d0 call 4000fc8c 4000b150: 92 12 63 08 or %o1, 0x308, %o1 ! 40018f08 4000b154: 80 a2 20 00 cmp %o0, 0 4000b158: 02 80 00 09 be 4000b17c 4000b15c: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000b160: 13 10 00 63 sethi %hi(0x40018c00), %o1 4000b164: 40 00 12 ca call 4000fc8c 4000b168: 92 12 63 10 or %o1, 0x310, %o1 ! 40018f10 4000b16c: 80 a2 20 00 cmp %o0, 0 4000b170: 32 80 00 0f bne,a 4000b1ac 4000b174: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 return directory->Parent; 4000b178: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b17c: 81 c7 e0 08 ret <== NOT EXECUTED 4000b180: 81 e8 00 00 restore <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000b184: 81 c7 e0 08 ret 4000b188: 91 e8 20 00 restore %g0, 0, %o0 /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000b18c: 11 10 00 63 sethi %hi(0x40018c00), %o0 <== NOT EXECUTED 4000b190: 15 10 00 63 sethi %hi(0x40018c00), %o2 <== NOT EXECUTED 4000b194: 17 10 00 63 sethi %hi(0x40018c00), %o3 <== NOT EXECUTED 4000b198: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED 4000b19c: 94 12 a3 18 or %o2, 0x318, %o2 <== NOT EXECUTED 4000b1a0: 96 12 e2 f8 or %o3, 0x2f8, %o3 <== NOT EXECUTED 4000b1a4: 7f ff df b6 call 4000307c <__assert_func> <== NOT EXECUTED 4000b1a8: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000b1ac: b0 06 20 50 add %i0, 0x50, %i0 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 4000b1b0: 80 a4 00 18 cmp %l0, %i0 4000b1b4: 12 80 00 06 bne 4000b1cc 4000b1b8: 90 10 00 19 mov %i1, %o0 4000b1bc: 30 bf ff f2 b,a 4000b184 4000b1c0: 80 a4 00 18 cmp %l0, %i0 4000b1c4: 02 bf ff f0 be 4000b184 4000b1c8: 90 10 00 19 mov %i1, %o0 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 4000b1cc: 40 00 12 b0 call 4000fc8c 4000b1d0: 92 04 20 0c add %l0, 0xc, %o1 4000b1d4: 80 a2 20 00 cmp %o0, 0 4000b1d8: 32 bf ff fa bne,a 4000b1c0 4000b1dc: e0 04 00 00 ld [ %l0 ], %l0 4000b1e0: 81 c7 e0 08 ret 4000b1e4: 91 e8 00 10 restore %g0, %l0, %o0 40021aac : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40021aac: 9d e3 bf 88 save %sp, -120, %sp * 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; loc = temp_mt_entry->mt_fs_root; 40021ab0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 40021ab4: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40021ab8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 /* * 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; 40021abc: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 loc = temp_mt_entry->mt_fs_root; 40021ac0: c2 27 bf ec st %g1, [ %fp + -20 ] 40021ac4: c4 3f bf f0 std %g2, [ %fp + -16 ] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 40021ac8: c0 26 20 18 clr [ %i0 + 0x18 ] 40021acc: a2 07 bf e8 add %fp, -24, %l1 do { next = jnode->Parent; loc.node_access = (void *)jnode; 40021ad0: e0 27 bf e8 st %l0, [ %fp + -24 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 40021ad4: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40021ad8: 7f ff fd db call 40021244 40021adc: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 40021ae0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40021ae4: 80 a0 60 01 cmp %g1, 1 40021ae8: 12 80 00 17 bne 40021b44 40021aec: 84 04 20 50 add %l0, 0x50, %g2 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 40021af0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40021af4: 80 a0 40 02 cmp %g1, %g2 40021af8: 02 80 00 13 be 40021b44 40021afc: 01 00 00 00 nop result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 40021b00: 80 a4 20 00 cmp %l0, 0 40021b04: 02 80 00 0e be 40021b3c 40021b08: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 40021b0c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40021b10: 80 a0 60 01 cmp %g1, 1 40021b14: 32 bf ff f0 bne,a 40021ad4 40021b18: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 40021b1c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40021b20: 82 04 20 50 add %l0, 0x50, %g1 40021b24: 80 a0 80 01 cmp %g2, %g1 40021b28: 22 bf ff eb be,a 40021ad4 40021b2c: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 40021b30: a0 90 a0 00 orcc %g2, 0, %l0 40021b34: 32 bf ff e8 bne,a 40021ad4 40021b38: e0 27 bf e8 st %l0, [ %fp + -24 ] return 0; } 40021b3c: 81 c7 e0 08 ret 40021b40: 91 e8 20 00 restore %g0, 0, %o0 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( &loc ); 40021b44: 7f ff 91 9f call 400061c0 40021b48: 90 10 00 11 mov %l1, %o0 if (result != 0) 40021b4c: 80 a2 20 00 cmp %o0, 0 40021b50: 02 bf ff ec be 40021b00 40021b54: a0 10 00 18 mov %i0, %l0 if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 40021b58: 81 c7 e0 08 ret <== NOT EXECUTED 40021b5c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000b2f0 : 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 ) { 4000b2f0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 4000b2f4: 03 10 00 66 sethi %hi(0x40019800), %g1 4000b2f8: c6 00 62 fc ld [ %g1 + 0x2fc ], %g3 ! 40019afc * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 4000b2fc: 84 10 20 20 mov 0x20, %g2 4000b300: 80 a0 e0 10 cmp %g3, 0x10 4000b304: 02 80 00 09 be 4000b328 4000b308: 82 10 20 00 clr %g1 4000b30c: 80 a0 c0 02 cmp %g3, %g2 4000b310: 02 80 00 06 be 4000b328 4000b314: 82 00 60 01 inc %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 4000b318: 80 a0 60 05 cmp %g1, 5 4000b31c: 12 bf ff fc bne 4000b30c 4000b320: 85 28 a0 01 sll %g2, 1, %g2 4000b324: 86 10 20 80 mov 0x80, %g3 <== NOT EXECUTED bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4000b328: 03 10 00 69 sethi %hi(0x4001a400), %g1 * 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_node( 4000b32c: 98 10 20 00 clr %o4 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 4000b330: c6 20 62 c4 st %g3, [ %g1 + 0x2c4 ] * 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_node( 4000b334: 92 10 20 01 mov 1, %o1 4000b338: 90 10 20 00 clr %o0 4000b33c: 15 10 00 62 sethi %hi(0x40018800), %o2 4000b340: 17 00 00 10 sethi %hi(0x4000), %o3 4000b344: 94 12 a3 c8 or %o2, 0x3c8, %o2 4000b348: 40 00 0a 3a call 4000dc30 4000b34c: 96 12 e1 ed or %o3, 0x1ed, %o3 NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4000b350: 94 10 20 30 mov 0x30, %o2 * 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_node( 4000b354: d0 26 20 18 st %o0, [ %i0 + 0x18 ] ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 4000b358: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4000b35c: f6 26 20 1c st %i3, [ %i0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4000b360: 13 10 00 64 sethi %hi(0x40019000), %o1 4000b364: 90 06 20 30 add %i0, 0x30, %o0 4000b368: 40 00 0f 6b call 4000f114 4000b36c: 92 12 63 58 or %o1, 0x358, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000b370: 90 10 20 01 mov 1, %o0 4000b374: 40 00 00 f4 call 4000b744 4000b378: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 4000b37c: 80 a2 20 00 cmp %o0, 0 4000b380: 02 80 00 0a be 4000b3a8 4000b384: 82 10 20 01 mov 1, %g1 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000b388: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000b38c: c2 22 00 00 st %g1, [ %o0 ] fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ){ free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 4000b390: d0 26 20 2c st %o0, [ %i0 + 0x2c ] * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 4000b394: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000b398: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 4000b39c: f4 22 20 04 st %i2, [ %o0 + 4 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 4000b3a0: 81 c7 e0 08 ret 4000b3a4: 91 e8 20 00 restore %g0, 0, %o0 /* * 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); 4000b3a8: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 <== NOT EXECUTED 4000b3ac: 40 00 01 2c call 4000b85c <== NOT EXECUTED 4000b3b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000b3b4: 40 00 0d 66 call 4000e94c <__errno> <== NOT EXECUTED 4000b3b8: 01 00 00 00 nop <== NOT EXECUTED 4000b3bc: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000b3c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b3c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b3c8: 81 e8 00 00 restore <== NOT EXECUTED 40005ee0 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40005ee0: 9d e3 bf 58 save %sp, -168, %sp /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 40005ee4: c2 06 00 00 ld [ %i0 ], %g1 40005ee8: c2 27 bf dc st %g1, [ %fp + -36 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40005eec: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 40005ef0: 80 a0 a0 07 cmp %g2, 7 40005ef4: 18 80 00 1b bgu 40005f60 40005ef8: 90 10 00 1a mov %i2, %o0 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 40005efc: a0 07 bf b8 add %fp, -72, %l0 40005f00: 94 07 bf f4 add %fp, -12, %o2 40005f04: 7f ff ff 74 call 40005cd4 40005f08: 92 10 00 10 mov %l0, %o1 /* * Create a new link node. */ new_node = IMFS_create_node( 40005f0c: 90 10 00 19 mov %i1, %o0 40005f10: 94 10 00 10 mov %l0, %o2 40005f14: 92 10 20 03 mov 3, %o1 40005f18: 17 00 00 28 sethi %hi(0xa000), %o3 40005f1c: 98 07 bf dc add %fp, -36, %o4 40005f20: 40 00 6c 6f call 400210dc 40005f24: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40005f28: 80 a2 20 00 cmp %o0, 0 40005f2c: 02 80 00 13 be 40005f78 40005f30: c4 07 bf dc ld [ %fp + -36 ], %g2 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 40005f34: 90 07 bf ec add %fp, -20, %o0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40005f38: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 IMFS_update_ctime( info.hard_link.link_node ); 40005f3c: 92 10 20 00 clr %o1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40005f40: 82 00 60 01 inc %g1 IMFS_update_ctime( info.hard_link.link_node ); 40005f44: 40 00 02 95 call 40006998 40005f48: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] 40005f4c: c4 07 bf ec ld [ %fp + -20 ], %g2 40005f50: c2 07 bf dc ld [ %fp + -36 ], %g1 40005f54: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40005f58: 81 c7 e0 08 ret 40005f5c: 91 e8 20 00 restore %g0, 0, %o0 * 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 ); 40005f60: 40 00 b6 0e call 40033798 <__errno> 40005f64: b0 10 3f ff mov -1, %i0 40005f68: 82 10 20 1f mov 0x1f, %g1 40005f6c: c2 22 00 00 st %g1, [ %o0 ] 40005f70: 81 c7 e0 08 ret 40005f74: 81 e8 00 00 restore ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 40005f78: 40 00 b6 08 call 40033798 <__errno> <== NOT EXECUTED 40005f7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005f80: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40005f84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005f88: 81 c7 e0 08 ret <== NOT EXECUTED 40005f8c: 81 e8 00 00 restore <== NOT EXECUTED 4002a134 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4002a134: 9d e3 bf 98 save %sp, -104, %sp 4002a138: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4002a13c: 80 a6 20 00 cmp %i0, 0 4002a140: 02 80 00 17 be 4002a19c 4002a144: 92 10 00 19 mov %i1, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002a148: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4002a14c: 80 a0 60 05 cmp %g1, 5 4002a150: 32 80 00 1b bne,a 4002a1bc 4002a154: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED 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 ); 4002a158: 7f ff fe 74 call 40029b28 4002a15c: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 4002a160: c2 02 00 00 ld [ %o0 ], %g1 assert( the_jnode->type == IMFS_MEMORY_FILE ); 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 ); 4002a164: b2 10 00 08 mov %o0, %i1 if ( *block_entry_ptr ) 4002a168: 80 a0 60 00 cmp %g1, 0 4002a16c: 02 80 00 04 be 4002a17c 4002a170: b0 10 20 00 clr %i0 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 4002a174: 81 c7 e0 08 ret 4002a178: 81 e8 00 00 restore #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4002a17c: 7f ff fe 5e call 40029af4 4002a180: b0 10 20 01 mov 1, %i0 if ( !memory ) 4002a184: 80 a2 20 00 cmp %o0, 0 4002a188: 02 bf ff fb be 4002a174 4002a18c: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 4002a190: d0 26 40 00 st %o0, [ %i1 ] return 0; } 4002a194: 81 c7 e0 08 ret 4002a198: 91 e8 20 00 restore %g0, 0, %o0 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4002a19c: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED 4002a1a0: 15 10 01 26 sethi %hi(0x40049800), %o2 <== NOT EXECUTED 4002a1a4: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a1a8: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a1ac: 94 12 a0 40 or %o2, 0x40, %o2 <== NOT EXECUTED 4002a1b0: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 4002a1b4: 7f ff 70 a2 call 4000643c <__assert_func> <== NOT EXECUTED 4002a1b8: 92 10 21 69 mov 0x169, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002a1bc: 15 10 01 26 sethi %hi(0x40049800), %o2 <== NOT EXECUTED 4002a1c0: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a1c4: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a1c8: 94 12 a0 40 or %o2, 0x40, %o2 <== NOT EXECUTED 4002a1cc: 96 12 e3 10 or %o3, 0x310, %o3 <== NOT EXECUTED 4002a1d0: 7f ff 70 9b call 4000643c <__assert_func> <== NOT EXECUTED 4002a1d4: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 4002a1d8: 01 00 00 00 nop 4002a1dc : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4002a1dc: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4002a1e0: a6 96 20 00 orcc %i0, 0, %l3 4002a1e4: 02 80 00 44 be 4002a2f4 4002a1e8: 11 10 01 25 sethi %hi(0x40049400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002a1ec: c2 04 e0 48 ld [ %l3 + 0x48 ], %g1 4002a1f0: 80 a0 60 05 cmp %g1, 5 4002a1f4: 12 80 00 47 bne 4002a310 4002a1f8: 03 10 01 38 sethi %hi(0x4004e000), %g1 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4002a1fc: e2 00 60 74 ld [ %g1 + 0x74 ], %l1 ! 4004e074 4002a200: a1 34 60 02 srl %l1, 2, %l0 4002a204: 92 10 00 10 mov %l0, %o1 4002a208: 7f ff 63 f6 call 400031e0 <.umul> 4002a20c: 90 04 20 01 add %l0, 1, %o0 4002a210: 92 10 00 10 mov %l0, %o1 4002a214: 7f ff 63 f3 call 400031e0 <.umul> 4002a218: 90 02 20 01 inc %o0 4002a21c: 92 10 00 11 mov %l1, %o1 4002a220: 7f ff 63 f0 call 400031e0 <.umul> 4002a224: 90 02 3f ff add %o0, -1, %o0 4002a228: 80 a6 40 08 cmp %i1, %o0 4002a22c: 1a 80 00 2c bcc 4002a2dc 4002a230: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 4002a234: e0 04 e0 4c ld [ %l3 + 0x4c ], %l0 4002a238: 80 a6 40 10 cmp %i1, %l0 4002a23c: 04 80 00 26 ble 4002a2d4 4002a240: b0 10 20 00 clr %i0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a244: 92 10 00 11 mov %l1, %o1 4002a248: 40 00 66 c6 call 40043d60 <.div> 4002a24c: 90 10 00 19 mov %i1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a250: 92 10 00 11 mov %l1, %o1 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a254: a4 10 00 08 mov %o0, %l2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a258: 40 00 66 c2 call 40043d60 <.div> 4002a25c: 90 10 00 10 mov %l0, %o0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4002a260: 80 a4 80 08 cmp %l2, %o0 4002a264: 0a 80 00 0f bcs 4002a2a0 4002a268: a2 10 00 08 mov %o0, %l1 4002a26c: 10 80 00 05 b 4002a280 4002a270: a0 10 00 08 mov %o0, %l0 4002a274: 80 a4 80 10 cmp %l2, %l0 4002a278: 2a 80 00 0b bcs,a 4002a2a4 4002a27c: f2 24 e0 4c st %i1, [ %l3 + 0x4c ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4002a280: 90 10 00 13 mov %l3, %o0 4002a284: 7f ff ff ac call 4002a134 4002a288: 92 10 00 10 mov %l0, %o1 4002a28c: 80 a2 20 00 cmp %o0, 0 4002a290: 22 bf ff f9 be,a 4002a274 4002a294: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 4002a298: 10 80 00 09 b 4002a2bc <== NOT EXECUTED 4002a29c: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4002a2a0: f2 24 e0 4c st %i1, [ %l3 + 0x4c ] <== NOT EXECUTED return 0; } 4002a2a4: 81 c7 e0 08 ret 4002a2a8: 91 e8 20 00 restore %g0, 0, %o0 */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 4002a2ac: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4002a2b0: 7f ff fe cb call 40029ddc <== NOT EXECUTED 4002a2b4: a0 04 3f ff add %l0, -1, %l0 <== 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-- ) { 4002a2b8: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED 4002a2bc: 08 bf ff fc bleu 4002a2ac <== NOT EXECUTED 4002a2c0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4002a2c4: 40 00 25 35 call 40033798 <__errno> <== NOT EXECUTED 4002a2c8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a2cc: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4002a2d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a2d4: 81 c7 e0 08 ret 4002a2d8: 81 e8 00 00 restore assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 4002a2dc: 40 00 25 2f call 40033798 <__errno> <== NOT EXECUTED 4002a2e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a2e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a2e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a2ec: 81 c7 e0 08 ret <== NOT EXECUTED 4002a2f0: 81 e8 00 00 restore <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4002a2f4: 15 10 01 26 sethi %hi(0x40049800), %o2 <== NOT EXECUTED 4002a2f8: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a2fc: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a300: 94 12 a0 58 or %o2, 0x58, %o2 <== NOT EXECUTED 4002a304: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 4002a308: 7f ff 70 4d call 4000643c <__assert_func> <== NOT EXECUTED 4002a30c: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002a310: 15 10 01 26 sethi %hi(0x40049800), %o2 <== NOT EXECUTED 4002a314: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a318: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a31c: 94 12 a0 58 or %o2, 0x58, %o2 <== NOT EXECUTED 4002a320: 96 12 e3 10 or %o3, 0x310, %o3 <== NOT EXECUTED 4002a324: 7f ff 70 46 call 4000643c <__assert_func> <== NOT EXECUTED 4002a328: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 4002a32c: 01 00 00 00 nop 40029b28 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40029b28: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40029b2c: 80 a6 20 00 cmp %i0, 0 40029b30: 02 80 00 32 be 40029bf8 40029b34: 11 10 01 25 sethi %hi(0x40049400), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40029b38: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40029b3c: 80 a0 60 05 cmp %g1, 5 40029b40: 12 80 00 35 bne 40029c14 40029b44: 03 10 01 38 sethi %hi(0x4004e000), %g1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40029b48: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 ! 4004e074 40029b4c: a3 30 a0 02 srl %g2, 2, %l1 40029b50: 82 04 7f ff add %l1, -1, %g1 40029b54: 80 a6 40 01 cmp %i1, %g1 40029b58: 08 80 00 20 bleu 40029bd8 40029b5c: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40029b60: 90 04 60 01 add %l1, 1, %o0 <== NOT EXECUTED 40029b64: 7f ff 65 9f call 400031e0 <.umul> <== NOT EXECUTED 40029b68: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40029b6c: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 40029b70: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40029b74: 18 80 00 3f bgu 40029c70 <== NOT EXECUTED 40029b78: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40029b7c: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40029b80: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40029b84: 40 00 69 21 call 40044008 <.urem> <== NOT EXECUTED 40029b88: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40029b8c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40029b90: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40029b94: 40 00 68 71 call 40043d58 <.udiv> <== NOT EXECUTED 40029b98: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40029b9c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40029ba0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40029ba4: 02 80 00 29 be 40029c48 <== NOT EXECUTED 40029ba8: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( !p ) { 40029bac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029bb0: 02 80 00 6b be 40029d5c <== NOT EXECUTED 40029bb4: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 40029bb8: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED 40029bbc: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 40029bc0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40029bc4: 02 80 00 5f be 40029d40 <== NOT EXECUTED 40029bc8: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 40029bcc: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 40029bd0: 81 c7 e0 08 ret <== NOT EXECUTED 40029bd4: 91 e8 80 01 restore %g2, %g1, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40029bd8: 02 80 00 16 be 40029c30 40029bdc: d0 06 20 50 ld [ %i0 + 0x50 ], %o0 if ( !p ) { 40029be0: 80 a2 20 00 cmp %o0, 0 40029be4: 02 80 00 50 be 40029d24 40029be8: 01 00 00 00 nop p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 40029bec: 83 2e 60 02 sll %i1, 2, %g1 40029bf0: 81 c7 e0 08 ret 40029bf4: 91 ea 00 01 restore %o0, %g1, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 40029bf8: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 40029bfc: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 40029c00: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 40029c04: 94 12 a3 b8 or %o2, 0x3b8, %o2 <== NOT EXECUTED 40029c08: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 40029c0c: 7f ff 72 0c call 4000643c <__assert_func> <== NOT EXECUTED 40029c10: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40029c14: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 40029c18: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 40029c1c: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 40029c20: 94 12 a3 b8 or %o2, 0x3b8, %o2 <== NOT EXECUTED 40029c24: 96 12 e3 10 or %o3, 0x310, %o3 <== NOT EXECUTED 40029c28: 7f ff 72 05 call 4000643c <__assert_func> <== NOT EXECUTED 40029c2c: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 40029c30: 83 2e 60 02 sll %i1, 2, %g1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 40029c34: 80 a2 20 00 cmp %o0, 0 40029c38: 02 80 00 0c be 40029c68 40029c3c: b0 02 00 01 add %o0, %g1, %i0 /* * This means the requested block number is out of range. */ return 0; } 40029c40: 81 c7 e0 08 ret 40029c44: 81 e8 00 00 restore } return (block_p *)&p1[ singly ]; } if ( !p ) 40029c48: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029c4c: 02 80 00 07 be 40029c68 <== NOT EXECUTED 40029c50: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40029c54: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== 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 ]; 40029c58: 87 2c a0 02 sll %l2, 2, %g3 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40029c5c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40029c60: 12 bf ff f8 bne 40029c40 <== NOT EXECUTED 40029c64: b0 00 80 03 add %g2, %g3, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40029c68: 81 c7 e0 08 ret <== NOT EXECUTED 40029c6c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 40029c70: 90 02 20 01 inc %o0 <== NOT EXECUTED 40029c74: 7f ff 65 5b call 400031e0 <.umul> <== NOT EXECUTED 40029c78: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40029c7c: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40029c80: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40029c84: 18 bf ff f9 bgu 40029c68 <== NOT EXECUTED 40029c88: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40029c8c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40029c90: 40 00 68 de call 40044008 <.urem> <== NOT EXECUTED 40029c94: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40029c98: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40029c9c: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40029ca0: 40 00 68 2e call 40043d58 <.udiv> <== NOT EXECUTED 40029ca4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40029ca8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40029cac: 40 00 68 2b call 40043d58 <.udiv> <== NOT EXECUTED 40029cb0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40029cb4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40029cb8: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40029cbc: 40 00 68 d3 call 40044008 <.urem> <== NOT EXECUTED 40029cc0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40029cc4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40029cc8: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40029ccc: 02 80 00 2b be 40029d78 <== NOT EXECUTED 40029cd0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) { 40029cd4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029cd8: 02 80 00 3a be 40029dc0 <== NOT EXECUTED 40029cdc: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 40029ce0: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 40029ce4: c8 02 00 01 ld [ %o0 + %g1 ], %g4 <== NOT EXECUTED if ( !p1 ) { 40029ce8: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 40029cec: 02 80 00 2e be 40029da4 <== NOT EXECUTED 40029cf0: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 40029cf4: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 40029cf8: d0 01 00 01 ld [ %g4 + %g1 ], %o0 <== NOT EXECUTED if ( !p2 ) { 40029cfc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029d00: 12 bf ff bb bne 40029bec <== NOT EXECUTED 40029d04: a0 01 00 01 add %g4, %g1, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40029d08: 7f ff ff 7b call 40029af4 <== NOT EXECUTED 40029d0c: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40029d10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029d14: 02 bf ff d5 be 40029c68 <== NOT EXECUTED 40029d18: 01 00 00 00 nop <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40029d1c: 10 bf ff b4 b 40029bec <== NOT EXECUTED 40029d20: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40029d24: 7f ff ff 74 call 40029af4 40029d28: 01 00 00 00 nop if ( !p ) 40029d2c: 80 a2 20 00 cmp %o0, 0 40029d30: 02 bf ff ce be 40029c68 40029d34: 01 00 00 00 nop return 0; info->indirect = p; 40029d38: 10 bf ff ad b 40029bec 40029d3c: d0 26 20 50 st %o0, [ %i0 + 0x50 ] info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 40029d40: 7f ff ff 6d call 40029af4 <== NOT EXECUTED 40029d44: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40029d48: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40029d4c: 02 bf ff c7 be 40029c68 <== NOT EXECUTED 40029d50: 01 00 00 00 nop <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40029d54: 10 bf ff 9e b 40029bcc <== NOT EXECUTED 40029d58: c4 24 00 00 st %g2, [ %l0 ] <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40029d5c: 7f ff ff 66 call 40029af4 <== NOT EXECUTED 40029d60: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40029d64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029d68: 02 bf ff c0 be 40029c68 <== NOT EXECUTED 40029d6c: 01 00 00 00 nop <== NOT EXECUTED return 0; info->doubly_indirect = p; 40029d70: 10 bf ff 92 b 40029bb8 <== NOT EXECUTED 40029d74: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 40029d78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029d7c: 02 bf ff bb be 40029c68 <== NOT EXECUTED 40029d80: 83 2c a0 02 sll %l2, 2, %g1 <== 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 ]; 40029d84: d0 02 00 01 ld [ %o0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 40029d88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029d8c: 02 bf ff b7 be 40029c68 <== NOT EXECUTED 40029d90: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40029d94: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED 40029d98: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED 40029d9c: 81 c7 e0 08 ret <== NOT EXECUTED 40029da0: 91 e8 c0 02 restore %g3, %g2, %o0 <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 40029da4: 7f ff ff 54 call 40029af4 <== NOT EXECUTED 40029da8: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40029dac: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 40029db0: 02 bf ff ae be 40029c68 <== NOT EXECUTED 40029db4: 01 00 00 00 nop <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40029db8: 10 bf ff cf b 40029cf4 <== NOT EXECUTED 40029dbc: c8 24 00 00 st %g4, [ %l0 ] <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 40029dc0: 7f ff ff 4d call 40029af4 <== NOT EXECUTED 40029dc4: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40029dc8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40029dcc: 02 bf ff a7 be 40029c68 <== NOT EXECUTED 40029dd0: 01 00 00 00 nop <== NOT EXECUTED return 0; info->triply_indirect = p; 40029dd4: 10 bf ff c3 b 40029ce0 <== NOT EXECUTED 40029dd8: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED 4002a768 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4002a768: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4002a76c: a6 96 20 00 orcc %i0, 0, %l3 4002a770: 02 80 00 8c be 4002a9a0 4002a774: 11 10 01 25 sethi %hi(0x40049400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4002a778: c4 04 e0 48 ld [ %l3 + 0x48 ], %g2 4002a77c: 82 00 bf fb add %g2, -5, %g1 4002a780: 80 a0 60 01 cmp %g1, 1 4002a784: 18 80 00 95 bgu 4002a9d8 4002a788: 80 a6 a0 00 cmp %i2, 0 /* * Error checks on arguments */ assert( dest ); 4002a78c: 02 80 00 8c be 4002a9bc 4002a790: 80 a6 e0 00 cmp %i3, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4002a794: 02 80 00 7d be 4002a988 4002a798: 80 a0 a0 06 cmp %g2, 6 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 4002a79c: 02 80 00 57 be 4002a8f8 4002a7a0: 82 06 c0 19 add %i3, %i1, %g1 * 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 ) 4002a7a4: c4 04 e0 4c ld [ %l3 + 0x4c ], %g2 4002a7a8: 80 a0 40 02 cmp %g1, %g2 4002a7ac: 08 80 00 3d bleu 4002a8a0 4002a7b0: a4 20 80 19 sub %g2, %i1, %l2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a7b4: 2b 10 01 38 sethi %hi(0x4004e000), %l5 4002a7b8: f6 05 60 74 ld [ %l5 + 0x74 ], %i3 ! 4004e074 4002a7bc: 90 10 00 19 mov %i1, %o0 4002a7c0: 40 00 66 14 call 40044010 <.rem> 4002a7c4: 92 10 00 1b mov %i3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a7c8: 92 10 00 1b mov %i3, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a7cc: b0 10 00 08 mov %o0, %i0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a7d0: 40 00 65 64 call 40043d60 <.div> 4002a7d4: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 4002a7d8: 80 a6 20 00 cmp %i0, 0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a7dc: b2 10 00 08 mov %o0, %i1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a7e0: a8 15 60 74 or %l5, 0x74, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 4002a7e4: a2 10 00 1a mov %i2, %l1 4002a7e8: 12 80 00 30 bne 4002a8a8 4002a7ec: a0 10 20 00 clr %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a7f0: f6 05 60 74 ld [ %l5 + 0x74 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002a7f4: 80 a4 80 1b cmp %l2, %i3 4002a7f8: 0a 80 00 15 bcs 4002a84c 4002a7fc: 80 a4 a0 00 cmp %l2, 0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4002a800: 90 10 00 13 mov %l3, %o0 4002a804: 92 10 00 19 mov %i1, %o1 4002a808: 7f ff fc c8 call 40029b28 4002a80c: 94 10 20 00 clr %o2 assert( block_ptr ); 4002a810: 80 a2 20 00 cmp %o0, 0 4002a814: 22 80 00 56 be,a 4002a96c 4002a818: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4002a81c: d2 02 00 00 ld [ %o0 ], %o1 4002a820: 94 10 00 1b mov %i3, %o2 4002a824: 40 00 2d ca call 40035f4c 4002a828: 90 10 00 11 mov %l1, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002a82c: c2 05 00 00 ld [ %l4 ], %g1 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; my_length -= to_copy; 4002a830: a4 24 80 1b sub %l2, %i3, %l2 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; 4002a834: a2 04 40 1b add %l1, %i3, %l1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002a838: 80 a0 40 12 cmp %g1, %l2 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 4002a83c: b2 06 60 01 inc %i1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002a840: 08 bf ff f0 bleu 4002a800 4002a844: a0 04 00 1b add %l0, %i3, %l0 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4002a848: 80 a4 a0 00 cmp %l2, 0 4002a84c: 02 80 00 0d be 4002a880 4002a850: b0 10 00 10 mov %l0, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4002a854: 92 10 00 19 mov %i1, %o1 4002a858: 90 10 00 13 mov %l3, %o0 4002a85c: 7f ff fc b3 call 40029b28 4002a860: 94 10 20 00 clr %o2 assert( block_ptr ); 4002a864: 80 a2 20 00 cmp %o0, 0 4002a868: 02 80 00 6b be 4002aa14 4002a86c: b0 04 80 10 add %l2, %l0, %i0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4002a870: d2 02 00 00 ld [ %o0 ], %o1 4002a874: 90 10 00 11 mov %l1, %o0 4002a878: 40 00 2d b5 call 40035f4c 4002a87c: 94 10 00 12 mov %l2, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 4002a880: 90 07 bf f0 add %fp, -16, %o0 4002a884: 7f ff 70 45 call 40006998 4002a888: 92 10 20 00 clr %o1 4002a88c: c2 07 bf f0 ld [ %fp + -16 ], %g1 return copied; 4002a890: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4002a894: c2 24 e0 3c st %g1, [ %l3 + 0x3c ] return copied; } 4002a898: 81 c7 e0 08 ret 4002a89c: 91 e8 00 0a restore %g0, %o2, %o0 * 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 ) 4002a8a0: 10 bf ff c5 b 4002a7b4 <== NOT EXECUTED 4002a8a4: a4 10 00 1b mov %i3, %l2 <== 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 ); 4002a8a8: 90 10 00 13 mov %l3, %o0 4002a8ac: 92 10 00 19 mov %i1, %o1 4002a8b0: 7f ff fc 9e call 40029b28 4002a8b4: 94 10 20 00 clr %o2 assert( block_ptr ); 4002a8b8: 80 a2 20 00 cmp %o0, 0 4002a8bc: 02 80 00 4e be 4002a9f4 4002a8c0: 92 26 c0 18 sub %i3, %i0, %o1 */ 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; 4002a8c4: 80 a4 80 09 cmp %l2, %o1 4002a8c8: 18 80 00 1e bgu 4002a940 4002a8cc: 94 10 00 12 mov %l2, %o2 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 ); 4002a8d0: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 4002a8d4: a2 06 80 0a add %i2, %o2, %l1 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 ); 4002a8d8: 92 02 40 18 add %o1, %i0, %o1 dest += to_copy; block++; 4002a8dc: b2 06 60 01 inc %i1 my_length -= to_copy; 4002a8e0: a4 24 80 0a sub %l2, %o2, %l2 4002a8e4: a0 10 00 0a mov %o2, %l0 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 ); 4002a8e8: 40 00 2d 99 call 40035f4c 4002a8ec: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a8f0: 10 bf ff c1 b 4002a7f4 4002a8f4: f6 05 60 74 ld [ %l5 + 0x74 ], %i3 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)) 4002a8f8: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED 4002a8fc: b0 20 40 19 sub %g1, %i1, %i0 <== NOT EXECUTED 4002a900: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED 4002a904: 18 80 00 08 bgu 4002a924 <== NOT EXECUTED 4002a908: d2 04 e0 50 ld [ %l3 + 0x50 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 4002a90c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4002a910: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 4002a914: 40 00 2d 8e call 40035f4c <== NOT EXECUTED 4002a918: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4002a91c: 10 bf ff da b 4002a884 <== NOT EXECUTED 4002a920: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4002a924: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 4002a928: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4002a92c: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 4002a930: 40 00 2d 87 call 40035f4c <== NOT EXECUTED 4002a934: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4002a938: 10 bf ff d3 b 4002a884 <== NOT EXECUTED 4002a93c: 90 07 bf f0 add %fp, -16, %o0 <== 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; 4002a940: 94 10 00 09 mov %o1, %o2 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 ); 4002a944: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 4002a948: a2 06 80 0a add %i2, %o2, %l1 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 ); 4002a94c: 92 02 40 18 add %o1, %i0, %o1 dest += to_copy; block++; 4002a950: b2 06 60 01 inc %i1 my_length -= to_copy; 4002a954: a4 24 80 0a sub %l2, %o2, %l2 4002a958: a0 10 00 0a mov %o2, %l0 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 ); 4002a95c: 40 00 2d 7c call 40035f4c 4002a960: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a964: 10 bf ff a4 b 4002a7f4 4002a968: f6 05 60 74 ld [ %l5 + 0x74 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4002a96c: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a970: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a974: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a978: 94 12 a3 f0 or %o2, 0x3f0, %o2 <== NOT EXECUTED 4002a97c: 96 12 e3 50 or %o3, 0x350, %o3 <== NOT EXECUTED 4002a980: 7f ff 6e af call 4000643c <__assert_func> <== NOT EXECUTED 4002a984: 92 10 22 a5 mov 0x2a5, %o1 <== 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 ); 4002a988: 40 00 23 84 call 40033798 <__errno> <== NOT EXECUTED 4002a98c: 01 00 00 00 nop <== NOT EXECUTED 4002a990: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4002a994: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4002a998: 10 bf ff c0 b 4002a898 <== NOT EXECUTED 4002a99c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4002a9a0: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a9a4: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a9a8: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a9ac: 94 12 a3 f0 or %o2, 0x3f0, %o2 <== NOT EXECUTED 4002a9b0: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 4002a9b4: 7f ff 6e a2 call 4000643c <__assert_func> <== NOT EXECUTED 4002a9b8: 92 10 22 4a mov 0x24a, %o1 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4002a9bc: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a9c0: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a9c4: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a9c8: 94 12 a3 f0 or %o2, 0x3f0, %o2 <== NOT EXECUTED 4002a9cc: 96 12 e3 b0 or %o3, 0x3b0, %o3 <== NOT EXECUTED 4002a9d0: 7f ff 6e 9b call 4000643c <__assert_func> <== NOT EXECUTED 4002a9d4: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4002a9d8: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a9dc: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a9e0: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a9e4: 94 12 a3 f0 or %o2, 0x3f0, %o2 <== NOT EXECUTED 4002a9e8: 96 12 e3 60 or %o3, 0x360, %o3 <== NOT EXECUTED 4002a9ec: 7f ff 6e 94 call 4000643c <__assert_func> <== NOT EXECUTED 4002a9f0: 92 10 22 4f mov 0x24f, %o1 <== 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 ); 4002a9f4: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED 4002a9f8: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a9fc: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002aa00: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002aa04: 94 12 a3 f0 or %o2, 0x3f0, %o2 <== NOT EXECUTED 4002aa08: 96 12 e3 50 or %o3, 0x350, %o3 <== NOT EXECUTED 4002aa0c: 7f ff 6e 8c call 4000643c <__assert_func> <== NOT EXECUTED 4002aa10: 92 10 22 94 mov 0x294, %o1 <== 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 ); 4002aa14: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED 4002aa18: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002aa1c: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002aa20: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002aa24: 94 12 a3 f0 or %o2, 0x3f0, %o2 <== NOT EXECUTED 4002aa28: 96 12 e3 50 or %o3, 0x350, %o3 <== NOT EXECUTED 4002aa2c: 7f ff 6e 84 call 4000643c <__assert_func> <== NOT EXECUTED 4002aa30: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED 4002aa34: 01 00 00 00 nop 40029e90 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 40029e90: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40029e94: 80 a6 20 00 cmp %i0, 0 40029e98: 02 80 00 5f be 4002a014 40029e9c: 11 10 01 25 sethi %hi(0x40049400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40029ea0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40029ea4: 80 a0 60 05 cmp %g1, 5 40029ea8: 12 80 00 62 bne 4002a030 40029eac: 23 10 01 38 sethi %hi(0x4004e000), %l1 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40029eb0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 /* * 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; 40029eb4: c4 04 60 74 ld [ %l1 + 0x74 ], %g2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40029eb8: 80 a0 60 00 cmp %g1, 0 /* * 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; 40029ebc: a5 30 a0 02 srl %g2, 2, %l2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40029ec0: 02 80 00 05 be 40029ed4 40029ec4: aa 14 60 74 or %l1, 0x74, %l5 memfile_free_blocks_in_table( &info->indirect, to_free ); 40029ec8: 90 06 20 50 add %i0, 0x50, %o0 40029ecc: 7f ff ff d0 call 40029e0c 40029ed0: 92 10 00 12 mov %l2, %o1 } if ( info->doubly_indirect ) { 40029ed4: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 40029ed8: 80 a2 20 00 cmp %o0, 0 40029edc: 02 80 00 19 be 40029f40 40029ee0: c2 04 60 74 ld [ %l1 + 0x74 ], %g1 for ( i=0 ; i <== NOT EXECUTED 40029ef0: 82 10 20 00 clr %g1 <== NOT EXECUTED 40029ef4: 10 80 00 03 b 40029f00 <== NOT EXECUTED 40029ef8: a0 10 20 00 clr %l0 <== NOT EXECUTED 40029efc: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 40029f00: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED 40029f04: c2 02 00 02 ld [ %o0 + %g2 ], %g1 <== NOT EXECUTED 40029f08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40029f0c: 02 80 00 04 be 40029f1c <== NOT EXECUTED 40029f10: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40029f14: 7f ff ff be call 40029e0c <== NOT EXECUTED 40029f18: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40029f30: 82 10 00 10 mov %l0, %g1 <== 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 ); 40029f34: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 40029f38: 7f ff ff b5 call 40029e0c <== NOT EXECUTED 40029f3c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 40029f40: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 40029f44: 80 a2 20 00 cmp %o0, 0 40029f48: 02 80 00 31 be 4002a00c 40029f4c: c2 04 60 74 ld [ %l1 + 0x74 ], %g1 for ( i=0 ; i <== NOT EXECUTED 40029f5c: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 40029f60: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40029f64: a8 10 20 00 clr %l4 <== NOT EXECUTED 40029f68: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40029f6c: 02 80 00 25 be 4002a000 <== NOT EXECUTED 40029f70: a6 10 20 00 clr %l3 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 40029f84: 82 10 20 00 clr %g1 <== NOT EXECUTED 40029f88: a0 10 20 00 clr %l0 <== NOT EXECUTED if ( p[j] ) { 40029f8c: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED 40029f90: c2 04 40 02 ld [ %l1 + %g2 ], %g1 <== NOT EXECUTED 40029f94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40029f98: 02 80 00 04 be 40029fa8 <== NOT EXECUTED 40029f9c: 90 04 40 02 add %l1, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 40029fa0: 7f ff ff 9b call 40029e0c <== NOT EXECUTED 40029fa4: 92 10 00 12 mov %l2, %o1 <== 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 40029fbc: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED 40029fc0: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 40029fc4: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED 40029fc8: 7f ff ff 91 call 40029e0c <== NOT EXECUTED 40029fcc: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40029fe4: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 40029fe8: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40029fec: a7 2d 20 02 sll %l4, 2, %l3 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 40029ff0: e2 02 00 13 ld [ %o0 + %l3 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 40029ff4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40029ff8: 32 bf ff e0 bne,a 40029f78 <== NOT EXECUTED 40029ffc: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4002a000: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 4002a004: 7f ff ff 82 call 40029e0c <== NOT EXECUTED 4002a008: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4002a00c: 81 c7 e0 08 ret 4002a010: 91 e8 20 00 restore %g0, 0, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 4002a014: 15 10 01 26 sethi %hi(0x40049800), %o2 <== NOT EXECUTED 4002a018: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a01c: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a020: 94 12 a0 08 or %o2, 8, %o2 <== NOT EXECUTED 4002a024: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 4002a028: 7f ff 71 05 call 4000643c <__assert_func> <== NOT EXECUTED 4002a02c: 92 10 21 ec mov 0x1ec, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002a030: 15 10 01 26 sethi %hi(0x40049800), %o2 <== NOT EXECUTED 4002a034: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a038: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a03c: 94 12 a0 08 or %o2, 8, %o2 <== NOT EXECUTED 4002a040: 96 12 e3 10 or %o3, 0x310, %o3 <== NOT EXECUTED 4002a044: 7f ff 70 fe call 4000643c <__assert_func> <== NOT EXECUTED 4002a048: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED 4002a04c: 01 00 00 00 nop 40029ddc : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40029ddc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED block_p *block_entry_ptr; block_p ptr; block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40029de0: 94 10 20 00 clr %o2 <== NOT EXECUTED 40029de4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40029de8: 7f ff ff 50 call 40029b28 <== NOT EXECUTED 40029dec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 40029df0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 40029df4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED block_p *block_entry_ptr; block_p ptr; block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ptr = *block_entry_ptr; *block_entry_ptr = 0; 40029df8: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 40029dfc: 7f ff ff 35 call 40029ad0 <== NOT EXECUTED 40029e00: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 40029e04: 81 c7 e0 08 ret <== NOT EXECUTED 40029e08: 81 e8 00 00 restore <== NOT EXECUTED 4002a3fc : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4002a3fc: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4002a400: a2 96 20 00 orcc %i0, 0, %l1 4002a404: 02 80 00 83 be 4002a610 4002a408: 11 10 01 25 sethi %hi(0x40049400), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002a40c: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4002a410: 80 a0 60 05 cmp %g1, 5 4002a414: 12 80 00 78 bne 4002a5f4 4002a418: 80 a6 a0 00 cmp %i2, 0 /* * Error check arguments */ assert( source ); 4002a41c: 02 80 00 84 be 4002a62c 4002a420: 80 a6 e0 00 cmp %i3, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4002a424: 02 80 00 6e be 4002a5dc 4002a428: 92 06 c0 19 add %i3, %i1, %o1 * 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 ) { 4002a42c: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 4002a430: 80 a2 40 01 cmp %o1, %g1 4002a434: 18 80 00 4d bgu 4002a568 4002a438: 27 10 01 38 sethi %hi(0x4004e000), %l3 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a43c: e0 04 e0 74 ld [ %l3 + 0x74 ], %l0 ! 4004e074 4002a440: 90 10 00 19 mov %i1, %o0 4002a444: 40 00 66 f3 call 40044010 <.rem> 4002a448: 92 10 00 10 mov %l0, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a44c: 92 10 00 10 mov %l0, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a450: b0 10 00 08 mov %o0, %i0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a454: 40 00 66 43 call 40043d60 <.div> 4002a458: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 4002a45c: 80 a6 20 00 cmp %i0, 0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a460: b2 10 00 08 mov %o0, %i1 if ( start_offset ) { 4002a464: 12 80 00 2e bne 4002a51c 4002a468: a4 14 e0 74 or %l3, 0x74, %l2 4002a46c: a0 10 00 1a mov %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a470: f4 04 e0 74 ld [ %l3 + 0x74 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002a474: 80 a6 c0 1a cmp %i3, %i2 4002a478: 0a 80 00 14 bcs 4002a4c8 4002a47c: 80 a6 e0 00 cmp %i3, 0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4002a480: 90 10 00 11 mov %l1, %o0 4002a484: 92 10 00 19 mov %i1, %o1 4002a488: 7f ff fd a8 call 40029b28 4002a48c: 94 10 20 00 clr %o2 assert( block_ptr ); 4002a490: 80 a2 20 00 cmp %o0, 0 4002a494: 02 80 00 4a be 4002a5bc 4002a498: 92 10 00 10 mov %l0, %o1 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 ); 4002a49c: d0 02 00 00 ld [ %o0 ], %o0 4002a4a0: 40 00 2e ab call 40035f4c 4002a4a4: 94 10 00 1a mov %i2, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002a4a8: c2 04 80 00 ld [ %l2 ], %g1 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; my_length -= to_copy; 4002a4ac: b6 26 c0 1a sub %i3, %i2, %i3 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 ); src += to_copy; 4002a4b0: a0 04 00 1a add %l0, %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002a4b4: 80 a0 40 1b cmp %g1, %i3 #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); src += to_copy; block++; 4002a4b8: b2 06 60 01 inc %i1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4002a4bc: 08 bf ff f1 bleu 4002a480 4002a4c0: b0 06 00 1a add %i0, %i2, %i0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4002a4c4: 80 a6 e0 00 cmp %i3, 0 4002a4c8: 02 80 00 0e be 4002a500 4002a4cc: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4002a4d0: 92 10 00 19 mov %i1, %o1 4002a4d4: 90 10 00 11 mov %l1, %o0 4002a4d8: 7f ff fd 94 call 40029b28 4002a4dc: 94 10 20 00 clr %o2 assert( block_ptr ); 4002a4e0: 80 a2 20 00 cmp %o0, 0 4002a4e4: 02 80 00 61 be 4002a668 4002a4e8: b0 06 00 1b add %i0, %i3, %i0 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 ); 4002a4ec: d0 02 00 00 ld [ %o0 ], %o0 4002a4f0: 92 10 00 10 mov %l0, %o1 4002a4f4: 40 00 2e 96 call 40035f4c 4002a4f8: 94 10 00 1b mov %i3, %o2 my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 4002a4fc: 90 07 bf f0 add %fp, -16, %o0 4002a500: 7f ff 71 26 call 40006998 4002a504: 92 10 20 00 clr %o1 4002a508: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002a50c: c2 24 60 3c st %g1, [ %l1 + 0x3c ] 4002a510: c2 24 60 40 st %g1, [ %l1 + 0x40 ] return copied; } 4002a514: 81 c7 e0 08 ret 4002a518: 81 e8 00 00 restore 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 ); 4002a51c: 90 10 00 11 mov %l1, %o0 4002a520: 92 10 00 19 mov %i1, %o1 4002a524: 7f ff fd 81 call 40029b28 4002a528: 94 10 20 00 clr %o2 assert( block_ptr ); 4002a52c: 80 a2 20 00 cmp %o0, 0 4002a530: 02 80 00 46 be 4002a648 4002a534: 94 24 00 18 sub %l0, %i0, %o2 */ 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; 4002a538: 80 a2 80 1b cmp %o2, %i3 4002a53c: 18 80 00 16 bgu 4002a594 4002a540: d0 02 00 00 ld [ %o0 ], %o0 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 ); src += to_copy; 4002a544: a0 06 80 0a add %i2, %o2, %l0 <== NOT EXECUTED 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 ); 4002a548: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED src += to_copy; block++; 4002a54c: b2 06 60 01 inc %i1 <== NOT EXECUTED my_length -= to_copy; 4002a550: b6 26 c0 0a sub %i3, %o2, %i3 <== NOT EXECUTED copied += to_copy; 4002a554: b0 10 00 0a mov %o2, %i0 <== NOT EXECUTED 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 ); 4002a558: 40 00 2e 7d call 40035f4c <== NOT EXECUTED 4002a55c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a560: 10 bf ff c5 b 4002a474 <== NOT EXECUTED 4002a564: f4 04 e0 74 ld [ %l3 + 0x74 ], %i2 <== NOT EXECUTED * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 4002a568: 7f ff ff 1d call 4002a1dc 4002a56c: 90 10 00 11 mov %l1, %o0 if ( status ) 4002a570: 80 a2 20 00 cmp %o0, 0 4002a574: 02 bf ff b2 be 4002a43c 4002a578: 27 10 01 38 sethi %hi(0x4004e000), %l3 rtems_set_errno_and_return_minus_one( ENOSPC ); 4002a57c: 40 00 24 87 call 40033798 <__errno> <== NOT EXECUTED 4002a580: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a584: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4002a588: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a58c: 81 c7 e0 08 ret <== NOT EXECUTED 4002a590: 81 e8 00 00 restore <== 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; 4002a594: 94 10 00 1b mov %i3, %o2 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 ); 4002a598: 90 02 00 18 add %o0, %i0, %o0 src += to_copy; 4002a59c: a0 06 80 0a add %i2, %o2, %l0 block++; 4002a5a0: b2 06 60 01 inc %i1 my_length -= to_copy; 4002a5a4: b6 26 c0 0a sub %i3, %o2, %i3 copied += to_copy; 4002a5a8: b0 10 00 0a mov %o2, %i0 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 ); 4002a5ac: 40 00 2e 68 call 40035f4c 4002a5b0: 92 10 00 1a mov %i2, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4002a5b4: 10 bf ff b0 b 4002a474 4002a5b8: f4 04 e0 74 ld [ %l3 + 0x74 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4002a5bc: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED 4002a5c0: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a5c4: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a5c8: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a5cc: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4002a5d0: 96 12 e3 50 or %o3, 0x350, %o3 <== NOT EXECUTED 4002a5d4: 7f ff 6f 9a call 4000643c <__assert_func> <== NOT EXECUTED 4002a5d8: 92 10 23 2e mov 0x32e, %o1 <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 4002a5dc: 40 00 24 6f call 40033798 <__errno> <== NOT EXECUTED 4002a5e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a5e4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4002a5e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a5ec: 81 c7 e0 08 ret <== NOT EXECUTED 4002a5f0: 81 e8 00 00 restore <== NOT EXECUTED assert( the_jnode ); if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4002a5f4: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a5f8: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a5fc: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a600: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4002a604: 96 12 e3 10 or %o3, 0x310, %o3 <== NOT EXECUTED 4002a608: 7f ff 6f 8d call 4000643c <__assert_func> <== NOT EXECUTED 4002a60c: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4002a610: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a614: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a618: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a61c: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4002a620: 96 12 e3 00 or %o3, 0x300, %o3 <== NOT EXECUTED 4002a624: 7f ff 6f 86 call 4000643c <__assert_func> <== NOT EXECUTED 4002a628: 92 10 22 e1 mov 0x2e1, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4002a62c: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a630: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a634: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a638: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4002a63c: 96 12 e3 48 or %o3, 0x348, %o3 <== NOT EXECUTED 4002a640: 7f ff 6f 7f call 4000643c <__assert_func> <== NOT EXECUTED 4002a644: 92 10 22 ed mov 0x2ed, %o1 <== 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 ); 4002a648: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED 4002a64c: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a650: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a654: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a658: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4002a65c: 96 12 e3 50 or %o3, 0x350, %o3 <== NOT EXECUTED 4002a660: 7f ff 6f 77 call 4000643c <__assert_func> <== NOT EXECUTED 4002a664: 92 10 23 1a mov 0x31a, %o1 <== 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 ); 4002a668: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED 4002a66c: 15 10 01 25 sethi %hi(0x40049400), %o2 <== NOT EXECUTED 4002a670: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 4002a674: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 4002a678: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED 4002a67c: 96 12 e3 50 or %o3, 0x350, %o3 <== NOT EXECUTED 4002a680: 7f ff 6f 6f call 4000643c <__assert_func> <== NOT EXECUTED 4002a684: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 4002a688: 01 00 00 00 nop 4000b3cc : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000b3cc: 9d e3 bf 60 save %sp, -160, %sp IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, new_name, &result ); 4000b3d0: 90 10 00 18 mov %i0, %o0 4000b3d4: 94 07 bf f4 add %fp, -12, %o2 4000b3d8: b0 07 bf c0 add %fp, -64, %i0 4000b3dc: 7f ff ff 83 call 4000b1e8 4000b3e0: 92 10 00 18 mov %i0, %o1 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000b3e4: b3 2e 60 10 sll %i1, 0x10, %i1 4000b3e8: 03 00 00 3c sethi %hi(0xf000), %g1 4000b3ec: 97 36 60 10 srl %i1, 0x10, %o3 4000b3f0: 05 00 00 10 sethi %hi(0x4000), %g2 4000b3f4: 86 0a c0 01 and %o3, %g1, %g3 4000b3f8: 80 a0 c0 02 cmp %g3, %g2 4000b3fc: 02 80 00 1f be 4000b478 4000b400: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000b404: 03 00 00 20 sethi %hi(0x8000), %g1 4000b408: 80 a0 c0 01 cmp %g3, %g1 4000b40c: 02 80 00 12 be 4000b454 4000b410: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000b414: 03 00 00 18 sethi %hi(0x6000), %g1 4000b418: 80 a0 c0 01 cmp %g3, %g1 4000b41c: 02 80 00 0b be 4000b448 4000b420: 03 00 00 08 sethi %hi(0x2000), %g1 4000b424: 80 a0 c0 01 cmp %g3, %g1 4000b428: 22 80 00 09 be,a 4000b44c 4000b42c: f4 27 bf e4 st %i2, [ %fp + -28 ] type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000b430: 40 00 0d 47 call 4000e94c <__errno> <== NOT EXECUTED 4000b434: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b438: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000b43c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b440: 81 c7 e0 08 ret <== NOT EXECUTED 4000b444: 81 e8 00 00 restore <== NOT EXECUTED type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4000b448: f4 27 bf e4 st %i2, [ %fp + -28 ] <== NOT EXECUTED 4000b44c: f6 27 bf e8 st %i3, [ %fp + -24 ] 4000b450: 92 10 20 02 mov 2, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 4000b454: 94 10 00 18 mov %i0, %o2 4000b458: 98 07 bf e4 add %fp, -28, %o4 4000b45c: 40 00 09 f5 call 4000dc30 4000b460: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000b464: 80 a2 20 00 cmp %o0, 0 4000b468: 02 80 00 06 be 4000b480 4000b46c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4000b470: 81 c7 e0 08 ret 4000b474: 81 e8 00 00 restore 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 ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000b478: 10 bf ff f7 b 4000b454 4000b47c: 92 10 20 01 mov 1, %o1 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000b480: 40 00 0d 33 call 4000e94c <__errno> <== NOT EXECUTED 4000b484: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b488: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000b48c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000b490: 81 c7 e0 08 ret <== NOT EXECUTED 4000b494: 81 e8 00 00 restore <== NOT EXECUTED 4000605c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 4000605c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40006060: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40006064: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40006068: 80 a0 60 01 cmp %g1, 1 4000606c: 12 80 00 05 bne 40006080 40006070: 01 00 00 00 nop /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 40006074: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] return 0; } 40006078: 81 c7 e0 08 ret 4000607c: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40006080: 40 00 b5 c6 call 40033798 <__errno> <== NOT EXECUTED 40006084: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006088: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 4000608c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006090: 81 c7 e0 08 ret <== NOT EXECUTED 40006094: 81 e8 00 00 restore <== NOT EXECUTED 40004b10 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 40004b10: 9d e3 bf 98 save %sp, -104, %sp assert( the_jnode ); 40004b14: 80 a6 20 00 cmp %i0, 0 40004b18: 02 80 00 52 be 40004c60 40004b1c: 21 10 00 88 sethi %hi(0x40022000), %l0 fprintf(stdout, "%s", the_jnode->name ); 40004b20: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 ! 40022150 <_impure_ptr> 40004b24: 90 06 20 0c add %i0, 0xc, %o0 40004b28: 40 00 3a ba call 40013610 40004b2c: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 40004b30: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 40004b34: 80 a2 a0 06 cmp %o2, 6 40004b38: 08 80 00 0f bleu 40004b74 40004b3c: 83 2a a0 02 sll %o2, 2, %g1 fprintf(stdout, " links not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40004b40: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 <== NOT EXECUTED 40004b44: 13 10 00 7f sethi %hi(0x4001fc00), %o1 <== NOT EXECUTED 40004b48: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004b4c: 40 00 3a 5f call 400134c8 <== NOT EXECUTED 40004b50: 92 12 63 d0 or %o1, 0x3d0, %o1 <== NOT EXECUTED assert(0); 40004b54: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); assert(0); 40004b58: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40004b5c: 15 10 00 80 sethi %hi(0x40020000), %o2 <== NOT EXECUTED 40004b60: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40004b64: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 40004b68: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 40004b6c: 40 00 02 3f call 40005468 <__assert_func> <== NOT EXECUTED 40004b70: 96 12 e1 20 or %o3, 0x120, %o3 <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 40004b74: 05 10 00 12 sethi %hi(0x40004800), %g2 40004b78: 84 10 a2 b8 or %g2, 0x2b8, %g2 ! 40004ab8 40004b7c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40004b80: 81 c0 c0 00 jmp %g3 40004b84: 01 00 00 00 nop 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)", 40004b88: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 <== NOT EXECUTED 40004b8c: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED 40004b90: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED 40004b94: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004b98: 13 10 00 7f sethi %hi(0x4001fc00), %o1 <== NOT EXECUTED 40004b9c: 40 00 3a 4b call 400134c8 <== NOT EXECUTED 40004ba0: 92 12 63 98 or %o1, 0x398, %o1 ! 4001ff98 <__func__.4894+0x270> <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004ba4: 31 10 00 7f sethi %hi(0x4001fc00), %i0 <== NOT EXECUTED 40004ba8: 40 00 41 68 call 40015148 <== NOT EXECUTED 40004bac: 91 ee 22 f0 restore %i0, 0x2f0, %o0 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40004bb0: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 40004bb4: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 40004bb8: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004bbc: 13 10 00 7f sethi %hi(0x4001fc00), %o1 40004bc0: 40 00 3a 42 call 400134c8 40004bc4: 92 12 63 a8 or %o1, 0x3a8, %o1 ! 4001ffa8 <__func__.4894+0x280> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004bc8: 31 10 00 7f sethi %hi(0x4001fc00), %i0 40004bcc: 40 00 41 5f call 40015148 40004bd0: 91 ee 22 f0 restore %i0, 0x2f0, %o0 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40004bd4: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 <== NOT EXECUTED 40004bd8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004bdc: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004be0: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40004be4: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40004be8: 40 00 3d 5a call 40014150 <== NOT EXECUTED 40004bec: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 4001ffb8 <__func__.4894+0x290> <== NOT EXECUTED assert(0); 40004bf0: 10 bf ff da b 40004b58 <== NOT EXECUTED 40004bf4: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 40004bf8: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 <== NOT EXECUTED 40004bfc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004c00: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004c04: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40004c08: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40004c0c: 40 00 3d 51 call 40014150 <== NOT EXECUTED 40004c10: 90 12 23 b8 or %o0, 0x3b8, %o0 ! 4001ffb8 <__func__.4894+0x290> <== NOT EXECUTED assert(0); 40004c14: 10 bf ff d1 b 40004b58 <== NOT EXECUTED 40004c18: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40004c1c: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 40004c20: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 40004c24: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 40004c28: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004c2c: 13 10 00 7f sethi %hi(0x4001fc00), %o1 40004c30: 40 00 3a 26 call 400134c8 40004c34: 92 12 63 80 or %o1, 0x380, %o1 ! 4001ff80 <__func__.4894+0x258> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004c38: 31 10 00 7f sethi %hi(0x4001fc00), %i0 40004c3c: 40 00 41 43 call 40015148 40004c40: 91 ee 22 f0 restore %i0, 0x2f0, %o0 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 40004c44: c2 04 21 50 ld [ %l0 + 0x150 ], %g1 40004c48: 90 10 20 2f mov 0x2f, %o0 40004c4c: d2 00 60 08 ld [ %g1 + 8 ], %o1 40004c50: 40 00 3a 38 call 40013530 40004c54: 31 10 00 7f sethi %hi(0x4001fc00), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004c58: 40 00 41 3c call 40015148 40004c5c: 91 ee 22 f0 restore %i0, 0x2f0, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 40004c60: 11 10 00 7f sethi %hi(0x4001fc00), %o0 <== NOT EXECUTED 40004c64: 15 10 00 80 sethi %hi(0x40020000), %o2 <== NOT EXECUTED 40004c68: 17 10 00 7f sethi %hi(0x4001fc00), %o3 <== NOT EXECUTED 40004c6c: 90 12 23 20 or %o0, 0x320, %o0 <== NOT EXECUTED 40004c70: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 40004c74: 96 12 e3 70 or %o3, 0x370, %o3 <== NOT EXECUTED 40004c78: 40 00 01 fc call 40005468 <__assert_func> <== NOT EXECUTED 40004c7c: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED 40004c80: 01 00 00 00 nop 400060a4 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 400060a4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 400060a8: c8 06 00 00 ld [ %i0 ], %g4 if ( node->type != IMFS_SYM_LINK ) 400060ac: c2 01 20 48 ld [ %g4 + 0x48 ], %g1 400060b0: 80 a0 60 04 cmp %g1, 4 400060b4: 12 80 00 19 bne 40006118 400060b8: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 400060bc: 02 80 00 15 be 40006110 400060c0: 86 10 20 00 clr %g3 400060c4: c2 01 20 4c ld [ %g4 + 0x4c ], %g1 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 400060c8: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 400060cc: c4 48 40 00 ldsb [ %g1 ], %g2 400060d0: 80 a0 a0 00 cmp %g2, 0 400060d4: 12 80 00 08 bne 400060f4 400060d8: c2 08 40 00 ldub [ %g1 ], %g1 400060dc: 30 80 00 13 b,a 40006128 <== NOT EXECUTED 400060e0: c2 01 20 4c ld [ %g4 + 0x4c ], %g1 400060e4: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 400060e8: 80 a0 a0 00 cmp %g2, 0 400060ec: 02 80 00 07 be 40006108 400060f0: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 buf[i] = node->info.sym_link.name[i]; 400060f4: c2 2e 40 03 stb %g1, [ %i1 + %g3 ] 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++ ) 400060f8: b0 06 20 01 inc %i0 400060fc: 80 a6 80 18 cmp %i2, %i0 40006100: 18 bf ff f8 bgu 400060e0 40006104: 86 10 00 18 mov %i0, %g3 buf[i] = node->info.sym_link.name[i]; return i; } 40006108: 81 c7 e0 08 ret 4000610c: 81 e8 00 00 restore 40006110: 81 c7 e0 08 ret <== NOT EXECUTED 40006114: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 40006118: 40 00 b5 a0 call 40033798 <__errno> <== NOT EXECUTED 4000611c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006120: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40006124: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006128: 81 c7 e0 08 ret <== NOT EXECUTED 4000612c: 81 e8 00 00 restore <== NOT EXECUTED 4000b4a4 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000b4a4: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000b4a8: e0 06 00 00 ld [ %i0 ], %l0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4000b4ac: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000b4b0: 80 a0 60 00 cmp %g1, 0 4000b4b4: 22 80 00 06 be,a 4000b4cc 4000b4b8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4000b4bc: 40 00 06 6c call 4000ce6c <_Chain_Extract> 4000b4c0: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4000b4c4: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000b4c8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000b4cc: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000b4d0: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000b4d4: 90 07 bf f0 add %fp, -16, %o0 4000b4d8: 40 00 01 5b call 4000ba44 4000b4dc: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000b4e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * 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) ) { 4000b4e4: 90 10 00 10 mov %l0, %o0 4000b4e8: 40 00 01 91 call 4000bb2c 4000b4ec: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000b4f0: 80 a2 20 00 cmp %o0, 0 4000b4f4: 12 80 00 12 bne 4000b53c 4000b4f8: 01 00 00 00 nop 4000b4fc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000b500: 80 a0 60 00 cmp %g1, 0 4000b504: 12 80 00 0e bne 4000b53c 4000b508: 03 10 00 68 sethi %hi(0x4001a000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000b50c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 ! 4001a01c 4000b510: c4 06 00 00 ld [ %i0 ], %g2 4000b514: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4000b518: 80 a0 40 02 cmp %g1, %g2 4000b51c: 22 80 00 02 be,a 4000b524 4000b520: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000b524: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000b528: 80 a0 60 04 cmp %g1, 4 4000b52c: 22 80 00 06 be,a 4000b544 4000b530: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 if ( the_jnode->info.sym_link.name ) free( (void*) the_jnode->info.sym_link.name ); } free( the_jnode ); 4000b534: 40 00 00 ca call 4000b85c 4000b538: 90 10 00 10 mov %l0, %o0 } return 0; } 4000b53c: 81 c7 e0 08 ret 4000b540: 91 e8 20 00 restore %g0, 0, %o0 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4000b544: 80 a2 20 00 cmp %o0, 0 4000b548: 02 bf ff fb be 4000b534 4000b54c: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 4000b550: 40 00 00 c3 call 4000b85c 4000b554: 01 00 00 00 nop 4000b558: 30 bf ff f7 b,a 4000b534 4000b55c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000b55c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000b560: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 4000b564: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000b568: 80 a0 60 04 cmp %g1, 4 4000b56c: 22 80 00 11 be,a 4000b5b0 4000b570: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000b574: 14 80 00 0b bg 4000b5a0 4000b578: 80 a0 60 06 cmp %g1, 6 4000b57c: 80 a0 60 02 cmp %g1, 2 4000b580: 22 80 00 1e be,a 4000b5f8 4000b584: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 case IMFS_SYM_LINK: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000b588: 40 00 0c f1 call 4000e94c <__errno> <== NOT EXECUTED 4000b58c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000b590: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000b594: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b598: 81 c7 e0 08 ret <== NOT EXECUTED 4000b59c: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000b5a0: 14 bf ff fa bg 4000b588 4000b5a4: 01 00 00 00 nop buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000b5a8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 4000b5ac: c2 26 60 20 st %g1, [ %i1 + 0x20 ] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000b5b0: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000b5b4: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000b5b8: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000b5bc: c4 26 60 08 st %g2, [ %i1 + 8 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4000b5c0: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4000b5c4: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4000b5c8: c2 36 60 0e sth %g1, [ %i1 + 0xe ] buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; 4000b5cc: c4 26 60 24 st %g2, [ %i1 + 0x24 ] } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4000b5d0: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4000b5d4: c4 06 20 40 ld [ %i0 + 0x40 ], %g2 } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 4000b5d8: c2 36 60 10 sth %g1, [ %i1 + 0x10 ] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4000b5dc: c4 26 60 2c st %g2, [ %i1 + 0x2c ] buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4000b5e0: c4 16 20 3a lduh [ %i0 + 0x3a ], %g2 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4000b5e4: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 4000b5e8: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4000b5ec: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 4000b5f0: 81 c7 e0 08 ret 4000b5f4: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 4000b5f8: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4000b5fc: c2 26 60 04 st %g1, [ %i1 + 4 ] 4000b600: 10 bf ff ec b 4000b5b0 4000b604: c4 26 40 00 st %g2, [ %i1 ] 40006130 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40006130: 9d e3 bf 60 save %sp, -160, %sp /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 40006134: 94 07 bf f4 add %fp, -12, %o2 40006138: a0 07 bf c0 add %fp, -64, %l0 4000613c: 90 10 00 1a mov %i2, %o0 40006140: 7f ff fe e5 call 40005cd4 40006144: 92 10 00 10 mov %l0, %o1 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 40006148: 40 00 ca 6a call 40038af0 4000614c: 90 10 00 19 mov %i1, %o0 40006150: d0 27 bf e4 st %o0, [ %fp + -28 ] if (info.sym_link.name == NULL) { 40006154: 80 a2 20 00 cmp %o0, 0 40006158: 02 80 00 14 be 400061a8 4000615c: 90 10 00 18 mov %i0, %o0 /* * Create a new link node. */ new_node = IMFS_create_node( 40006160: 94 10 00 10 mov %l0, %o2 40006164: 92 10 20 04 mov 4, %o1 40006168: 17 00 00 28 sethi %hi(0xa000), %o3 4000616c: 98 07 bf e4 add %fp, -28, %o4 40006170: 96 12 e1 ff or %o3, 0x1ff, %o3 40006174: 40 00 6b da call 400210dc 40006178: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 4000617c: 80 a2 20 00 cmp %o0, 0 40006180: 12 80 00 08 bne 400061a0 40006184: d0 07 bf e4 ld [ %fp + -28 ], %o0 free( info.sym_link.name); 40006188: 40 00 01 d9 call 400068ec <== NOT EXECUTED 4000618c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 40006190: 40 00 b5 82 call 40033798 <__errno> <== NOT EXECUTED 40006194: 01 00 00 00 nop <== NOT EXECUTED 40006198: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000619c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 400061a0: 81 c7 e0 08 ret 400061a4: 81 e8 00 00 restore * Duplicate link name */ info.sym_link.name = strdup( link_name); if (info.sym_link.name == NULL) { rtems_set_errno_and_return_minus_one( ENOMEM); 400061a8: 40 00 b5 7c call 40033798 <__errno> <== NOT EXECUTED 400061ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400061b0: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 400061b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400061b8: 81 c7 e0 08 ret <== NOT EXECUTED 400061bc: 81 e8 00 00 restore <== NOT EXECUTED 400061c0 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 400061c0: 9d e3 bf 80 save %sp, -128, %sp IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 400061c4: e0 06 00 00 ld [ %i0 ], %l0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 400061c8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400061cc: 80 a0 60 03 cmp %g1, 3 400061d0: 32 80 00 1b bne,a 4000623c 400061d4: c4 06 20 04 ld [ %i0 + 4 ], %g2 if ( !node->info.hard_link.link_node ) 400061d8: c8 04 20 4c ld [ %l0 + 0x4c ], %g4 400061dc: 80 a1 20 00 cmp %g4, 0 400061e0: 02 80 00 1c be 40006250 400061e4: a2 07 bf e0 add %fp, -32, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 400061e8: c2 06 20 04 ld [ %i0 + 4 ], %g1 400061ec: c4 06 20 08 ld [ %i0 + 8 ], %g2 400061f0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 400061f4: c2 27 bf e4 st %g1, [ %fp + -28 ] 400061f8: c4 3f bf e8 std %g2, [ %fp + -24 ] the_link.node_access = node->info.hard_link.link_node; 400061fc: c8 27 bf e0 st %g4, [ %fp + -32 ] IMFS_Set_handlers( &the_link ); 40006200: 40 00 6c 11 call 40021244 40006204: 90 10 00 11 mov %l1, %o0 /* * 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) 40006208: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 4000620c: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 40006210: 80 a0 60 01 cmp %g1, 1 40006214: 02 80 00 15 be 40006268 40006218: 82 00 7f ff add %g1, -1, %g1 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 4000621c: 90 07 bf f0 add %fp, -16, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40006220: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40006224: 40 00 01 dd call 40006998 40006228: 92 10 20 00 clr %o1 4000622c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40006230: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006234: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 40006238: c4 06 20 04 ld [ %i0 + 4 ], %g2 4000623c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40006240: 9f c0 40 00 call %g1 40006244: 90 10 00 18 mov %i0, %o0 return result; } 40006248: 81 c7 e0 08 ret 4000624c: 91 e8 00 08 restore %g0, %o0, %o0 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 40006250: 40 00 b5 52 call 40033798 <__errno> <== NOT EXECUTED 40006254: 01 00 00 00 nop <== NOT EXECUTED 40006258: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000625c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006260: 10 bf ff fa b 40006248 <== NOT EXECUTED 40006264: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED * 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)( &the_link ); 40006268: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000626c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40006270: 9f c0 80 00 call %g2 40006274: 90 10 00 11 mov %l1, %o0 if ( result != 0 ) 40006278: 80 a2 20 00 cmp %o0, 0 4000627c: 02 bf ff ef be 40006238 40006280: 90 10 3f ff mov -1, %o0 40006284: 30 bf ff f1 b,a 40006248 40006288 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40006288: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 4000628c: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40006290: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40006294: 80 a0 60 01 cmp %g1, 1 40006298: 12 80 00 09 bne 400062bc 4000629c: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 400062a0: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 400062a4: 80 a0 60 00 cmp %g1, 0 400062a8: 02 80 00 0b be 400062d4 400062ac: 01 00 00 00 nop /* * 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; 400062b0: c0 20 a0 58 clr [ %g2 + 0x58 ] return 0; } 400062b4: 81 c7 e0 08 ret 400062b8: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 400062bc: 40 00 b5 37 call 40033798 <__errno> <== NOT EXECUTED 400062c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400062c4: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 400062c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400062cc: 81 c7 e0 08 ret <== NOT EXECUTED 400062d0: 81 e8 00 00 restore <== 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 */ 400062d4: 40 00 b5 31 call 40033798 <__errno> <== NOT EXECUTED 400062d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400062dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400062e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400062e4: 81 c7 e0 08 ret <== NOT EXECUTED 400062e8: 81 e8 00 00 restore <== NOT EXECUTED 400033e0 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 400033e0: 9d e3 bf 98 save %sp, -104, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 400033e4: 03 10 00 69 sethi %hi(0x4001a400), %g1 400033e8: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 4001a564 400033ec: 80 a0 60 00 cmp %g1, 0 400033f0: 02 80 00 05 be 40003404 400033f4: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 400033f8: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 400033fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003400: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 40003404: 40 00 22 7a call 4000bdec 40003408: a0 10 00 18 mov %i0, %l0 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 4000340c: 03 10 00 69 sethi %hi(0x4001a400), %g1 40003410: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 4001a568 40003414: 80 a0 60 00 cmp %g1, 0 40003418: 02 80 00 06 be 40003430 4000341c: 90 10 00 18 mov %i0, %o0 starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 40003420: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40003424: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003428: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4000342c: a0 10 00 08 mov %o0, %l0 <== 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 ( rtems_configuration_get_do_zero_of_workspace() ) 40003430: 03 10 00 6a sethi %hi(0x4001a800), %g1 40003434: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001aad8 <_Configuration_Table> 40003438: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 4000343c: 80 a0 e0 00 cmp %g3, 0 40003440: 12 80 00 10 bne 40003480 40003444: 90 10 00 10 mov %l0, %o0 void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 40003448: 92 10 00 10 mov %l0, %o1 4000344c: 11 10 00 6a sethi %hi(0x4001a800), %o0 40003450: 94 10 00 19 mov %i1, %o2 40003454: 90 12 20 78 or %o0, 0x78, %o0 40003458: 40 00 11 84 call 40007a68 <_Heap_Initialize> 4000345c: 96 10 20 08 mov 8, %o3 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 40003460: 80 a2 20 00 cmp %o0, 0 40003464: 02 80 00 0c be 40003494 40003468: 05 10 00 6a sethi %hi(0x4001a800), %g2 rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 4000346c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 ! 4001a8d0 40003470: 82 06 40 01 add %i1, %g1, %g1 40003474: c2 20 a0 d0 st %g1, [ %g2 + 0xd0 ] } 40003478: 81 c7 e0 08 ret 4000347c: 81 e8 00 00 restore * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( rtems_configuration_get_do_zero_of_workspace() ) memset( starting_address, 0, length ); 40003480: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003484: 40 00 2f 5d call 4000f1f8 <== NOT EXECUTED 40003488: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 4000348c: 10 bf ff f0 b 4000344c <== NOT EXECUTED 40003490: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) rtems_fatal_error_occurred( status ); 40003494: 40 00 0e f4 call 40007064 <== NOT EXECUTED 40003498: 01 00 00 00 nop 4000349c: 01 00 00 00 nop 40005018 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 40005018: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED void *high_water_mark; void *current; Stack_Control *stack; char name[5]; if ( !the_thread ) 4000501c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40005020: 02 80 00 39 be 40005104 <== NOT EXECUTED 40005024: 2b 10 01 38 sethi %hi(0x4004e000), %l5 <== NOT EXECUTED return; if ( !print_handler ) 40005028: e8 05 60 70 ld [ %l5 + 0x70 ], %l4 ! 4004e070 <== NOT EXECUTED 4000502c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40005030: 02 80 00 35 be 40005104 <== NOT EXECUTED 40005034: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 40005038: 02 80 00 3b be 40005124 <== NOT EXECUTED 4000503c: a4 06 20 c4 add %i0, 0xc4, %l2 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 40005040: ec 06 21 48 ld [ %i0 + 0x148 ], %l6 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 40005044: e0 04 a0 04 ld [ %l2 + 4 ], %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40005048: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 4000504c: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40005050: a6 00 7f f0 add %g1, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40005054: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005058: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4000505c: 7f ff ff d6 call 40004fb4 <== NOT EXECUTED 40005060: a0 04 00 13 add %l0, %l3, %l0 <== NOT EXECUTED if ( high_water_mark ) 40005064: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005068: 02 80 00 40 be 40005168 <== NOT EXECUTED 4000506c: ae 24 00 08 sub %l0, %o0, %l7 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 40005070: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40005074: 02 80 00 35 be 40005148 <== NOT EXECUTED 40005078: 03 10 01 38 sethi %hi(0x4004e000), %g1 <== NOT EXECUTED (*print_handler)( 4000507c: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED 40005080: e2 00 60 6c ld [ %g1 + 0x6c ], %l1 <== NOT EXECUTED 40005084: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED 40005088: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 4000508c: b0 10 60 6c or %g1, 0x6c, %i0 <== NOT EXECUTED 40005090: 40 00 16 52 call 4000a9d8 <== NOT EXECUTED 40005094: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005098: 13 10 01 1a sethi %hi(0x40046800), %o1 <== NOT EXECUTED 4000509c: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 400050a0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 400050a4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400050a8: 9f c5 00 00 call %l4 <== NOT EXECUTED 400050ac: 92 12 60 b8 or %o1, 0xb8, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 400050b0: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 400050b4: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 400050b8: c4 05 60 70 ld [ %l5 + 0x70 ], %g2 <== NOT EXECUTED 400050bc: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 400050c0: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 400050c4: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 400050c8: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 400050cc: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 400050d0: 13 10 01 1a sethi %hi(0x40046800), %o1 <== NOT EXECUTED 400050d4: 9f c0 80 00 call %g2 <== NOT EXECUTED 400050d8: 92 12 60 d8 or %o1, 0xd8, %o1 ! 400468d8 <__func__.4894+0x218> <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 400050dc: 03 10 01 38 sethi %hi(0x4004e000), %g1 <== NOT EXECUTED 400050e0: c4 00 60 68 ld [ %g1 + 0x68 ], %g2 ! 4004e068 <== NOT EXECUTED 400050e4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400050e8: 02 80 00 09 be 4000510c <== NOT EXECUTED 400050ec: c2 05 60 70 ld [ %l5 + 0x70 ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 400050f0: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 400050f4: 13 10 01 1a sethi %hi(0x40046800), %o1 <== NOT EXECUTED 400050f8: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED 400050fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005100: 92 12 61 08 or %o1, 0x108, %o1 <== NOT EXECUTED 40005104: 81 c7 e0 08 ret <== NOT EXECUTED 40005108: 81 e8 00 00 restore <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 4000510c: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 40005110: 13 10 01 1a sethi %hi(0x40046800), %o1 <== NOT EXECUTED 40005114: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005118: 92 12 60 f8 or %o1, 0xf8, %o1 ! 400468f8 <__func__.4894+0x238> <== NOT EXECUTED 4000511c: 81 c7 e0 08 ret <== NOT EXECUTED 40005120: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 40005124: 03 10 01 84 sethi %hi(0x40061000), %g1 <== NOT EXECUTED 40005128: 82 10 61 fc or %g1, 0x1fc, %g1 ! 400611fc <== NOT EXECUTED 4000512c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40005130: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005134: 02 bf ff f4 be 40005104 <== NOT EXECUTED 40005138: a4 10 00 01 mov %g1, %l2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 4000513c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005140: 10 bf ff c1 b 40005044 <== NOT EXECUTED 40005144: ac 10 20 00 clr %l6 <== 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 ); 40005148: d0 00 60 6c ld [ %g1 + 0x6c ], %o0 <== NOT EXECUTED 4000514c: 13 10 01 1a sethi %hi(0x40046800), %o1 <== NOT EXECUTED 40005150: b0 10 60 6c or %g1, 0x6c, %i0 <== NOT EXECUTED 40005154: 92 12 60 c8 or %o1, 0xc8, %o1 <== NOT EXECUTED 40005158: 9f c5 00 00 call %l4 <== NOT EXECUTED 4000515c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED } (*print_handler)( 40005160: 10 bf ff d5 b 400050b4 <== NOT EXECUTED 40005164: d6 04 80 00 ld [ %l2 ], %o3 <== 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 ) 40005168: 10 bf ff c2 b 40005070 <== NOT EXECUTED 4000516c: ae 10 20 00 clr %l7 <== NOT EXECUTED 40004fb4 : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 40004fb4: 82 10 00 08 mov %o0, %g1 <== 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++) 40004fb8: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40004fbc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40004fc0: 86 02 00 09 add %o0, %o1, %g3 <== NOT EXECUTED 40004fc4: 80 a2 00 03 cmp %o0, %g3 <== NOT EXECUTED 40004fc8: 3a 80 00 12 bcc,a 40005010 <== NOT EXECUTED 40004fcc: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) 40004fd0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40004fd4: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== NOT EXECUTED 40004fd8: 82 10 61 a5 or %g1, 0x1a5, %g1 ! a5a5a5a5 <== NOT EXECUTED 40004fdc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004fe0: 22 80 00 07 be,a 40004ffc <== NOT EXECUTED 40004fe4: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40004fe8: 30 80 00 0a b,a 40005010 <== NOT EXECUTED 40004fec: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40004ff0: 12 80 00 08 bne 40005010 <== NOT EXECUTED 40004ff4: 01 00 00 00 nop <== 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++) 40004ff8: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40004ffc: 80 a0 c0 08 cmp %g3, %o0 <== NOT EXECUTED 40005000: 38 bf ff fb bgu,a 40004fec <== NOT EXECUTED 40005004: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 40005008: 81 c3 e0 08 retl <== NOT EXECUTED 4000500c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40005010: 81 c3 e0 08 retl <== NOT EXECUTED 40005014: 01 00 00 00 nop 400051e4 : */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 400051e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 400051e8: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 400051ec: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400051f0: 11 10 01 1a sethi %hi(0x40046800), %o0 <== NOT EXECUTED 400051f4: 40 00 0b a4 call 40008084 <== NOT EXECUTED 400051f8: 90 12 21 78 or %o0, 0x178, %o0 ! 40046978 <__func__.4894+0x2b8> <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 400051fc: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 40005200: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 40005204: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED 40005208: 11 10 01 1a sethi %hi(0x40046800), %o0 <== NOT EXECUTED 4000520c: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 40005210: 90 12 21 b8 or %o0, 0x1b8, %o0 <== NOT EXECUTED 40005214: 40 00 0b 9c call 40008084 <== NOT EXECUTED 40005218: 94 02 40 0a add %o1, %o2, %o2 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 4000521c: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 40005220: 22 80 00 04 be,a 40005230 <== NOT EXECUTED 40005224: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED " Damaged pattern begins at 0x%08lx and is %d bytes long\n", (unsigned long) Stack_check_Get_pattern_area(stack), PATTERN_SIZE_BYTES); } rtems_fatal_error_occurred( 0x81 ); 40005228: 40 00 18 42 call 4000b330 <== NOT EXECUTED 4000522c: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { printk( 40005230: 11 10 01 1a sethi %hi(0x40046800), %o0 <== NOT EXECUTED 40005234: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40005238: 90 12 21 e8 or %o0, 0x1e8, %o0 <== NOT EXECUTED 4000523c: 40 00 0b 92 call 40008084 <== NOT EXECUTED 40005240: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40005244: 30 bf ff f9 b,a 40005228 <== NOT EXECUTED 40007300 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40007300: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007304: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40007308: e0 00 60 84 ld [ %g1 + 0x84 ], %l0 ! 4001ac84 <_API_extensions_List> 4000730c: 82 10 60 84 or %g1, 0x84, %g1 40007310: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007314: 80 a4 00 11 cmp %l0, %l1 40007318: 02 80 00 0c be 40007348 <_API_extensions_Run_postdriver+0x48> 4000731c: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40007320: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007324: 80 a0 60 00 cmp %g1, 0 40007328: 22 80 00 05 be,a 4000733c <_API_extensions_Run_postdriver+0x3c> 4000732c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40007330: 9f c0 40 00 call %g1 40007334: 01 00 00 00 nop 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 ) { 40007338: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 4000733c: 80 a4 00 11 cmp %l0, %l1 40007340: 32 bf ff f9 bne,a 40007324 <_API_extensions_Run_postdriver+0x24> 40007344: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007348: 81 c7 e0 08 ret 4000734c: 81 e8 00 00 restore 40007350 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40007350: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007354: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40007358: e0 00 60 84 ld [ %g1 + 0x84 ], %l0 ! 4001ac84 <_API_extensions_List> 4000735c: 82 10 60 84 or %g1, 0x84, %g1 40007360: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007364: 80 a4 00 11 cmp %l0, %l1 40007368: 02 80 00 0d be 4000739c <_API_extensions_Run_postswitch+0x4c> 4000736c: 03 10 00 6a sethi %hi(0x4001a800), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 40007370: a4 10 63 00 or %g1, 0x300, %l2 ! 4001ab00 <_Thread_Executing> !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 40007374: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007378: 80 a0 60 00 cmp %g1, 0 4000737c: 22 80 00 05 be,a 40007390 <_API_extensions_Run_postswitch+0x40> 40007380: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40007384: 9f c0 40 00 call %g1 40007388: d0 04 80 00 ld [ %l2 ], %o0 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 ) { 4000738c: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007390: 80 a4 00 11 cmp %l0, %l1 40007394: 32 bf ff f9 bne,a 40007378 <_API_extensions_Run_postswitch+0x28> 40007398: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000739c: 81 c7 e0 08 ret 400073a0: 81 e8 00 00 restore 400072b0 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 400072b0: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 400072b4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400072b8: e0 00 60 84 ld [ %g1 + 0x84 ], %l0 ! 4001ac84 <_API_extensions_List> 400072bc: 82 10 60 84 or %g1, 0x84, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400072c0: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400072c4: 80 a4 00 11 cmp %l0, %l1 400072c8: 02 80 00 0c be 400072f8 <_API_extensions_Run_predriver+0x48> 400072cc: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 400072d0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400072d4: 80 a0 60 00 cmp %g1, 0 400072d8: 22 80 00 05 be,a 400072ec <_API_extensions_Run_predriver+0x3c> 400072dc: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 400072e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400072e4: 01 00 00 00 nop <== NOT EXECUTED 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 ) { 400072e8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 400072ec: 80 a4 00 11 cmp %l0, %l1 400072f0: 32 bf ff f9 bne,a 400072d4 <_API_extensions_Run_predriver+0x24> 400072f4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400072f8: 81 c7 e0 08 ret 400072fc: 81 e8 00 00 restore 40009750 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 40009750: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 40009754: 03 10 00 75 sethi %hi(0x4001d400), %g1 * 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 ); 40009758: 7f ff e5 d2 call 40002ea0 4000975c: e0 00 61 e0 ld [ %g1 + 0x1e0 ], %l0 ! 4001d5e0 <_Thread_Executing> 40009760: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 40009764: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 40009768: 80 a0 60 00 cmp %g1, 0 4000976c: 02 80 00 2d be 40009820 <_CORE_RWLock_Release+0xd0> 40009770: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 40009774: 22 80 00 23 be,a 40009800 <_CORE_RWLock_Release+0xb0> 40009778: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4000977c: c0 24 20 34 clr [ %l0 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 40009780: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 40009784: 7f ff e5 cb call 40002eb0 40009788: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 4000978c: 40 00 06 07 call 4000afa8 <_Thread_queue_Dequeue> 40009790: 90 10 00 18 mov %i0, %o0 if ( next ) { 40009794: 80 a2 20 00 cmp %o0, 0 40009798: 02 80 00 18 be 400097f8 <_CORE_RWLock_Release+0xa8> 4000979c: 01 00 00 00 nop if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 400097a0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 400097a4: 80 a0 60 01 cmp %g1, 1 400097a8: 02 80 00 24 be 40009838 <_CORE_RWLock_Release+0xe8> 400097ac: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 400097b0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400097b4: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 400097b8: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 400097bc: 10 80 00 0a b 400097e4 <_CORE_RWLock_Release+0x94> 400097c0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 400097c4: 80 a0 60 01 cmp %g1, 1 400097c8: 02 80 00 0c be 400097f8 <_CORE_RWLock_Release+0xa8> 400097cc: 92 10 00 08 mov %o0, %o1 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 400097d0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 400097d4: 90 10 00 18 mov %i0, %o0 while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 400097d8: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 400097dc: 40 00 07 19 call 4000b440 <_Thread_queue_Extract> 400097e0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 400097e4: 40 00 07 68 call 4000b584 <_Thread_queue_First> 400097e8: 90 10 00 18 mov %i0, %o0 if ( !next || 400097ec: 80 a2 20 00 cmp %o0, 0 400097f0: 32 bf ff f5 bne,a 400097c4 <_CORE_RWLock_Release+0x74> 400097f4: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 400097f8: 81 c7 e0 08 ret 400097fc: 91 e8 20 00 restore %g0, 0, %o0 _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; 40009800: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 40009804: 80 a0 60 00 cmp %g1, 0 40009808: 02 bf ff dd be 4000977c <_CORE_RWLock_Release+0x2c> 4000980c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 40009810: 7f ff e5 a8 call 40002eb0 40009814: b0 10 20 00 clr %i0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40009818: 81 c7 e0 08 ret 4000981c: 81 e8 00 00 restore * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 40009820: 7f ff e5 a4 call 40002eb0 <== NOT EXECUTED 40009824: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 40009828: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 4000982c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40009830: 81 c7 e0 08 ret <== NOT EXECUTED 40009834: 81 e8 00 00 restore <== NOT EXECUTED 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; 40009838: 82 10 20 02 mov 2, %g1 4000983c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 40009840: 81 c7 e0 08 ret 40009844: 91 e8 20 00 restore %g0, 0, %o0 4001389c <_CORE_message_queue_Broadcast>: size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 4001389c: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 400138a0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 400138a4: a4 10 00 18 mov %i0, %l2 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 400138a8: 80 a0 40 1a cmp %g1, %i2 400138ac: 0a 80 00 17 bcs 40013908 <_CORE_message_queue_Broadcast+0x6c> 400138b0: b0 10 20 01 mov 1, %i0 * 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 ) { 400138b4: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 400138b8: 80 a0 60 00 cmp %g1, 0 400138bc: 02 80 00 0a be 400138e4 <_CORE_message_queue_Broadcast+0x48> 400138c0: a2 10 20 00 clr %l1 *count = 0; 400138c4: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 400138c8: 81 c7 e0 08 ret <== NOT EXECUTED 400138cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 400138d0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 400138d4: 40 00 23 3a call 4001c5bc 400138d8: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 400138dc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 400138e0: f4 20 40 00 st %i2, [ %g1 ] * 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))) { 400138e4: 40 00 0a 05 call 400160f8 <_Thread_queue_Dequeue> 400138e8: 90 10 00 12 mov %l2, %o0 400138ec: 92 10 00 19 mov %i1, %o1 400138f0: a0 10 00 08 mov %o0, %l0 400138f4: 80 a2 20 00 cmp %o0, 0 400138f8: 12 bf ff f6 bne 400138d0 <_CORE_message_queue_Broadcast+0x34> 400138fc: 94 10 00 1a mov %i2, %o2 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 40013900: e2 27 40 00 st %l1, [ %i5 ] 40013904: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40013908: 81 c7 e0 08 ret 4001390c: 81 e8 00 00 restore 40015950 <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 40015950: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40015954: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 40015958: a2 10 00 18 mov %i0, %l1 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 4001595c: 80 a0 40 1a cmp %g1, %i2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 40015960: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40015964: 0a 80 00 22 bcs 400159ec <_CORE_message_queue_Submit+0x9c> 40015968: b0 10 20 01 mov 1, %i0 /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 4001596c: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40015970: 80 a0 a0 00 cmp %g2, 0 40015974: 02 80 00 22 be 400159fc <_CORE_message_queue_Submit+0xac> 40015978: 01 00 00 00 nop /* * 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 < 4001597c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40015980: 80 a0 40 02 cmp %g1, %g2 40015984: 18 80 00 2b bgu 40015a30 <_CORE_message_queue_Submit+0xe0> 40015988: 80 a4 a0 00 cmp %l2, 0 * 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 ) { 4001598c: 02 80 00 18 be 400159ec <_CORE_message_queue_Submit+0x9c> 40015990: b0 10 20 02 mov 2, %i0 /* * 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() ) { 40015994: 03 10 00 ae sethi %hi(0x4002b800), %g1 40015998: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4002bb9c <_ISR_Nest_level> 4001599c: 80 a0 a0 00 cmp %g2, 0 400159a0: 32 80 00 13 bne,a 400159ec <_CORE_message_queue_Submit+0x9c> 400159a4: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 400159a8: 03 10 00 ae sethi %hi(0x4002b800), %g1 _ISR_Disable( level ); 400159ac: 7f ff b3 2b call 40002658 400159b0: e0 00 63 c0 ld [ %g1 + 0x3c0 ], %l0 ! 4002bbc0 <_Thread_Executing> 400159b4: 82 10 20 01 mov 1, %g1 400159b8: c2 24 60 30 st %g1, [ %l1 + 0x30 ] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 400159bc: fa 24 20 24 st %i5, [ %l0 + 0x24 ] Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 400159c0: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 400159c4: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 400159c8: f4 24 20 30 st %i2, [ %l0 + 0x30 ] { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 400159cc: e2 24 20 44 st %l1, [ %l0 + 0x44 ] executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 400159d0: 7f ff b3 26 call 40002668 400159d4: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 400159d8: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 400159dc: 90 10 00 11 mov %l1, %o0 400159e0: 15 10 00 3f sethi %hi(0x4000fc00), %o2 400159e4: 7f ff e7 9e call 4000f85c <_Thread_queue_Enqueue_with_handler> 400159e8: 94 12 a0 b4 or %o2, 0xb4, %o2 ! 4000fcb4 <_Thread_queue_Timeout> 400159ec: 81 c7 e0 08 ret 400159f0: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 400159f4: 81 c7 e0 08 ret <== NOT EXECUTED 400159f8: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 400159fc: 7f ff e7 34 call 4000f6cc <_Thread_queue_Dequeue> 40015a00: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40015a04: a0 92 20 00 orcc %o0, 0, %l0 40015a08: 02 80 00 1b be 40015a74 <_CORE_message_queue_Submit+0x124> 40015a0c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40015a10: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40015a14: 40 00 15 3b call 4001af00 40015a18: 94 10 00 1a mov %i2, %o2 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40015a1c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 40015a20: fa 24 20 24 st %i5, [ %l0 + 0x24 ] _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 40015a24: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40015a28: 81 c7 e0 08 ret 40015a2c: 91 e8 20 00 restore %g0, 0, %o0 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 *) 40015a30: 7f ff e0 1e call 4000daa8 <_Chain_Get> 40015a34: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40015a38: a0 92 20 00 orcc %o0, 0, %l0 40015a3c: 02 bf ff ee be 400159f4 <_CORE_message_queue_Submit+0xa4> 40015a40: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40015a44: 94 10 00 1a mov %i2, %o2 40015a48: 40 00 15 2e call 4001af00 40015a4c: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40015a50: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40015a54: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40015a58: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40015a5c: 92 10 00 10 mov %l0, %o1 40015a60: 94 10 00 1d mov %i5, %o2 40015a64: 40 00 0d 1c call 40018ed4 <_CORE_message_queue_Insert_message> 40015a68: b0 10 20 00 clr %i0 40015a6c: 81 c7 e0 08 ret 40015a70: 81 e8 00 00 restore * 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 ) { 40015a74: 10 bf ff c2 b 4001597c <_CORE_message_queue_Submit+0x2c> 40015a78: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4000cf40 <_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 ) { 4000cf40: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000cf44: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000cf48: c6 00 63 00 ld [ %g1 + 0x300 ], %g3 ! 4001ab00 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000cf4c: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000cf50: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000cf54: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000cf58: 80 a0 60 00 cmp %g1, 0 4000cf5c: 22 80 00 12 be,a 4000cfa4 <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000cf60: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 4000cf64: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000cf68: c2 00 e0 08 ld [ %g3 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000cf6c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000cf70: c2 26 20 60 st %g1, [ %i0 + 0x60 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4000cf74: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000cf78: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000cf7c: 80 a0 a0 02 cmp %g2, 2 4000cf80: 02 80 00 0e be 4000cfb8 <_CORE_mutex_Seize_interrupt_trylock+0x78> 4000cf84: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000cf88: 80 a0 a0 03 cmp %g2, 3 4000cf8c: 22 80 00 0d be,a 4000cfc0 <_CORE_mutex_Seize_interrupt_trylock+0x80> 4000cf90: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 4000cf94: 7f ff d3 a9 call 40001e38 4000cf98: b0 10 20 00 clr %i0 4000cf9c: 81 c7 e0 08 ret 4000cfa0: 81 e8 00 00 restore /* * 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 ) ) { 4000cfa4: 80 a0 c0 01 cmp %g3, %g1 4000cfa8: 22 80 00 2a be,a 4000d050 <_CORE_mutex_Seize_interrupt_trylock+0x110> 4000cfac: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000cfb0: 81 c7 e0 08 ret 4000cfb4: 91 e8 20 01 restore %g0, 1, %o0 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000cfb8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000cfbc: 80 a0 a0 03 cmp %g2, 3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000cfc0: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000cfc4: 12 bf ff f4 bne 4000cf94 <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000cfc8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000cfcc: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 4000cfd0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 if ( current == ceiling ) { 4000cfd4: 80 a0 80 01 cmp %g2, %g1 4000cfd8: 02 80 00 2f be 4000d094 <_CORE_mutex_Seize_interrupt_trylock+0x154> 4000cfdc: 01 00 00 00 nop _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000cfe0: 1a 80 00 11 bcc 4000d024 <_CORE_mutex_Seize_interrupt_trylock+0xe4> 4000cfe4: 82 10 20 06 mov 6, %g1 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000cfe8: 05 10 00 6a sethi %hi(0x4001a800), %g2 4000cfec: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> 4000cff0: 82 00 60 01 inc %g1 4000cff4: c2 20 a2 40 st %g1, [ %g2 + 0x240 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000cff8: 7f ff d3 90 call 40001e38 4000cffc: 01 00 00 00 nop _Thread_Change_priority( 4000d000: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000d004: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000d008: 94 10 20 00 clr %o2 4000d00c: 7f ff ed a9 call 400086b0 <_Thread_Change_priority> 4000d010: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000d014: 7f ff ef 21 call 40008c98 <_Thread_Enable_dispatch> 4000d018: 01 00 00 00 nop 4000d01c: 81 c7 e0 08 ret 4000d020: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000d024: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 4000d028: c0 26 20 54 clr [ %i0 + 0x54 ] _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000d02c: 84 10 20 01 mov 1, %g2 4000d030: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000d034: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000d038: 82 00 7f ff add %g1, -1, %g1 4000d03c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] _ISR_Enable( level ); 4000d040: 7f ff d3 7e call 40001e38 4000d044: b0 10 20 00 clr %i0 4000d048: 81 c7 e0 08 ret 4000d04c: 81 e8 00 00 restore * 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 ) { 4000d050: 80 a0 60 00 cmp %g1, 0 4000d054: 22 80 00 0a be,a 4000d07c <_CORE_mutex_Seize_interrupt_trylock+0x13c> 4000d058: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000d05c: 80 a0 60 01 cmp %g1, 1 4000d060: 12 bf ff d4 bne 4000cfb0 <_CORE_mutex_Seize_interrupt_trylock+0x70> 4000d064: 82 10 20 02 mov 2, %g1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000d068: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 4000d06c: 7f ff d3 73 call 40001e38 4000d070: b0 10 20 00 clr %i0 4000d074: 81 c7 e0 08 ret 4000d078: 81 e8 00 00 restore * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000d07c: 82 00 60 01 inc %g1 4000d080: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000d084: 7f ff d3 6d call 40001e38 4000d088: b0 10 20 00 clr %i0 4000d08c: 81 c7 e0 08 ret 4000d090: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000d094: 7f ff d3 69 call 40001e38 <== NOT EXECUTED 4000d098: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000d09c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d0a0: 81 e8 00 00 restore <== NOT EXECUTED 40007720 <_CORE_mutex_Surrender>: CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 40007720: 9d e3 bf 98 save %sp, -104, %sp * 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 ) { 40007724: c2 0e 20 44 ldub [ %i0 + 0x44 ], %g1 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 40007728: a0 10 00 18 mov %i0, %l0 * 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 ) { 4000772c: 80 a0 60 00 cmp %g1, 0 40007730: 02 80 00 07 be 4000774c <_CORE_mutex_Surrender+0x2c> 40007734: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 40007738: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000773c: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001ab00 <_Thread_Executing> 40007740: 80 a2 00 02 cmp %o0, %g2 40007744: 12 80 00 2e bne 400077fc <_CORE_mutex_Surrender+0xdc> 40007748: b0 10 20 03 mov 3, %i0 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 4000774c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40007750: 80 a0 60 00 cmp %g1, 0 40007754: 02 80 00 22 be 400077dc <_CORE_mutex_Surrender+0xbc> 40007758: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 4000775c: 80 a0 60 00 cmp %g1, 0 40007760: 12 80 00 21 bne 400077e4 <_CORE_mutex_Surrender+0xc4> 40007764: c2 24 20 54 st %g1, [ %l0 + 0x54 ] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40007768: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000776c: 80 a0 a0 02 cmp %g2, 2 40007770: 02 80 00 31 be 40007834 <_CORE_mutex_Surrender+0x114> 40007774: 80 a0 a0 03 cmp %g2, 3 40007778: 22 80 00 30 be,a 40007838 <_CORE_mutex_Surrender+0x118> 4000777c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 40007780: c0 24 20 5c clr [ %l0 + 0x5c ] /* * 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 ) || 40007784: 80 a0 a0 02 cmp %g2, 2 40007788: 02 80 00 1f be 40007804 <_CORE_mutex_Surrender+0xe4> 4000778c: c0 24 20 60 clr [ %l0 + 0x60 ] 40007790: 80 a0 a0 03 cmp %g2, 3 40007794: 22 80 00 1d be,a 40007808 <_CORE_mutex_Surrender+0xe8> 40007798: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 /* * 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 ) ) ) { 4000779c: 40 00 06 1a call 40009004 <_Thread_queue_Dequeue> 400077a0: 90 10 00 10 mov %l0, %o0 400077a4: 86 92 20 00 orcc %o0, 0, %g3 400077a8: 02 80 00 37 be 40007884 <_CORE_mutex_Surrender+0x164> 400077ac: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400077b0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 400077b4: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400077b8: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 400077bc: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 400077c0: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 400077c4: 80 a0 a0 02 cmp %g2, 2 400077c8: 02 80 00 2a be 40007870 <_CORE_mutex_Surrender+0x150> 400077cc: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 400077d0: 80 a0 a0 03 cmp %g2, 3 400077d4: 22 80 00 1c be,a 40007844 <_CORE_mutex_Surrender+0x124> 400077d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 400077dc: 81 c7 e0 08 ret 400077e0: 91 e8 20 00 restore %g0, 0, %o0 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400077e4: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 400077e8: 80 a0 60 00 cmp %g1, 0 400077ec: 02 bf ff fc be 400077dc <_CORE_mutex_Surrender+0xbc> 400077f0: 80 a0 60 01 cmp %g1, 1 400077f4: 12 bf ff dd bne 40007768 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 400077f8: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 400077fc: 81 c7 e0 08 ret 40007800: 81 e8 00 00 restore _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 && 40007804: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007808: 80 a0 60 00 cmp %g1, 0 4000780c: 12 bf ff e4 bne 4000779c <_CORE_mutex_Surrender+0x7c> 40007810: 01 00 00 00 nop 40007814: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40007818: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000781c: 80 a2 40 01 cmp %o1, %g1 40007820: 02 bf ff df be 4000779c <_CORE_mutex_Surrender+0x7c> 40007824: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40007828: 40 00 03 a2 call 400086b0 <_Thread_Change_priority> 4000782c: 94 10 20 01 mov 1, %o2 ! 1 40007830: 30 bf ff db b,a 4000779c <_CORE_mutex_Surrender+0x7c> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 40007834: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40007838: 82 00 7f ff add %g1, -1, %g1 4000783c: 10 bf ff d1 b 40007780 <_CORE_mutex_Surrender+0x60> 40007840: c2 22 20 1c st %g1, [ %o0 + 0x1c ] #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++; if (the_mutex->Attributes.priority_ceiling < 40007844: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 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++; 40007848: 82 00 60 01 inc %g1 4000784c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 40007850: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 40007854: 80 a2 40 02 cmp %o1, %g2 40007858: 1a bf ff e1 bcc 400077dc <_CORE_mutex_Surrender+0xbc> 4000785c: 94 10 20 00 clr %o2 the_thread->current_priority){ _Thread_Change_priority( 40007860: 40 00 03 94 call 400086b0 <_Thread_Change_priority> 40007864: b0 10 20 00 clr %i0 40007868: 81 c7 e0 08 ret 4000786c: 81 e8 00 00 restore 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++; 40007870: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40007874: 82 00 60 01 inc %g1 40007878: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 4000787c: 81 c7 e0 08 ret 40007880: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007884: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40007888: 81 c7 e0 08 ret 4000788c: 91 e8 20 00 restore %g0, 0, %o0 400082c0 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 400082c0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 400082c4: 7f ff e8 b0 call 40002584 400082c8: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 400082cc: c2 06 20 04 ld [ %i0 + 4 ], %g1 400082d0: 80 a0 60 00 cmp %g1, 0 400082d4: 02 80 00 0c be 40008304 <_CORE_spinlock_Release+0x44> 400082d8: 03 10 00 54 sethi %hi(0x40015000), %g1 } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 400082dc: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 40015050 <_Thread_Executing> 400082e0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 400082e4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 400082e8: 80 a0 c0 01 cmp %g3, %g1 400082ec: 02 80 00 0a be 40008314 <_CORE_spinlock_Release+0x54> 400082f0: 01 00 00 00 nop _ISR_Enable( level ); 400082f4: 7f ff e8 a8 call 40002594 <== NOT EXECUTED 400082f8: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 400082fc: 81 c7 e0 08 ret <== NOT EXECUTED 40008300: 81 e8 00 00 restore <== NOT EXECUTED /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { _ISR_Enable( level ); 40008304: 7f ff e8 a4 call 40002594 40008308: b0 10 20 06 mov 6, %i0 4000830c: 81 c7 e0 08 ret 40008310: 81 e8 00 00 restore } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40008314: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008318: 82 00 7f ff add %g1, -1, %g1 4000831c: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40008320: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40008324: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40008328: 7f ff e8 9b call 40002594 4000832c: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40008330: 81 c7 e0 08 ret 40008334: 81 e8 00 00 restore 40008338 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 40008338: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 4000833c: 05 10 00 54 sethi %hi(0x40015000), %g2 40008340: c2 00 a0 e4 ld [ %g2 + 0xe4 ], %g1 ! 400150e4 <_Watchdog_Ticks_since_boot> 40008344: a2 10 a0 e4 or %g2, 0xe4, %l1 _ISR_Disable( level ); 40008348: 7f ff e8 8f call 40002584 4000834c: a0 06 80 01 add %i2, %g1, %l0 40008350: 88 10 00 08 mov %o0, %g4 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40008354: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008358: 80 a0 60 01 cmp %g1, 1 4000835c: 02 80 00 34 be 4000842c <_CORE_spinlock_Wait+0xf4> 40008360: 03 10 00 54 sethi %hi(0x40015000), %g1 (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40008364: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008368: 82 00 60 01 inc %g1 4000836c: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008370: c4 06 20 04 ld [ %i0 + 4 ], %g2 40008374: 80 a0 a0 00 cmp %g2, 0 40008378: 02 80 00 1a be 400083e0 <_CORE_spinlock_Wait+0xa8> 4000837c: 80 8e 60 ff btst 0xff, %i1 40008380: 03 10 00 53 sethi %hi(0x40014c00), %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40008384: 02 80 00 22 be 4000840c <_CORE_spinlock_Wait+0xd4> 40008388: b2 10 63 90 or %g1, 0x390, %i1 ! 40014f90 <_Thread_Dispatch_disable_level> } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 4000838c: 80 a6 a0 00 cmp %i2, 0 40008390: 02 80 00 06 be 400083a8 <_CORE_spinlock_Wait+0x70> 40008394: 01 00 00 00 nop 40008398: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 4000839c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 400083a0: 08 80 00 2d bleu 40008454 <_CORE_spinlock_Wait+0x11c> <== NOT EXECUTED 400083a4: 01 00 00 00 nop <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 400083a8: 7f ff e8 7b call 40002594 400083ac: 90 10 00 04 mov %g4, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 400083b0: 40 00 04 d9 call 40009714 <_Thread_Enable_dispatch> 400083b4: 01 00 00 00 nop 400083b8: c2 06 40 00 ld [ %i1 ], %g1 400083bc: 82 00 60 01 inc %g1 400083c0: c2 26 40 00 st %g1, [ %i1 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 400083c4: 7f ff e8 70 call 40002584 400083c8: 01 00 00 00 nop 400083cc: 88 10 00 08 mov %o0, %g4 _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 400083d0: c2 06 20 04 ld [ %i0 + 4 ], %g1 400083d4: 80 a0 60 00 cmp %g1, 0 400083d8: 12 bf ff ee bne 40008390 <_CORE_spinlock_Wait+0x58> 400083dc: 80 a6 a0 00 cmp %i2, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 400083e0: 03 10 00 54 sethi %hi(0x40015000), %g1 400083e4: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 ! 40015050 <_Thread_Executing> return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 400083e8: 84 10 20 01 mov 1, %g2 400083ec: c4 26 20 04 st %g2, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 400083f0: c2 00 e0 08 ld [ %g3 + 8 ], %g1 400083f4: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 400083f8: b0 10 20 00 clr %i0 400083fc: 7f ff e8 66 call 40002594 40008400: 90 10 00 04 mov %g4, %o0 40008404: 81 c7 e0 08 ret 40008408: 81 e8 00 00 restore /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 4000840c: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40008410: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008414: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40008418: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 4000841c: 7f ff e8 5e call 40002594 <== NOT EXECUTED 40008420: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40008424: 81 c7 e0 08 ret <== NOT EXECUTED 40008428: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 4000842c: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 40008430: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40008434: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008438: 80 a0 c0 01 cmp %g3, %g1 4000843c: 12 bf ff ca bne 40008364 <_CORE_spinlock_Wait+0x2c> 40008440: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40008444: 7f ff e8 54 call 40002594 40008448: b0 10 20 01 mov 1, %i0 ! 1 4000844c: 81 c7 e0 08 ret 40008450: 81 e8 00 00 restore /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 40008454: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40008458: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000845c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40008460: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40008464: 7f ff e8 4c call 40002594 <== NOT EXECUTED 40008468: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 4000846c: 81 c7 e0 08 ret <== NOT EXECUTED 40008470: 81 e8 00 00 restore <== NOT EXECUTED 400265cc <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 400265cc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 400265d0: 7f ff 76 23 call 40003e5c <== NOT EXECUTED 400265d4: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 400265d8: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 400265dc: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 400265e0: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 400265e4: f2 20 60 04 st %i1, [ %g1 + 4 ] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 400265e8: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 400265ec: 7f ff 76 20 call 40003e6c <== NOT EXECUTED 400265f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400265f4: 01 00 00 00 nop 4000ce00 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000ce00: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000ce04: c4 00 63 04 ld [ %g1 + 0x304 ], %g2 ! 4001ab04 <_Debug_Level> <== NOT EXECUTED 4000ce08: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 4000ce0c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000ce10: 81 c3 e0 08 retl <== NOT EXECUTED 4000ce14: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40006460 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40006460: 9d e3 bf 98 save %sp, -104, %sp 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 ]; 40006464: f2 06 21 5c ld [ %i0 + 0x15c ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40006468: 7f ff ee 70 call 40001e28 4000646c: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40006470: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 40006474: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40006478: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 4000647c: 9a 88 c0 04 andcc %g3, %g4, %o5 40006480: 02 80 00 28 be 40006520 <_Event_Surrender+0xc0> 40006484: 03 10 00 6a sethi %hi(0x4001a800), %g1 /* * 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() && 40006488: c4 00 62 dc ld [ %g1 + 0x2dc ], %g2 ! 4001aadc <_ISR_Nest_level> 4000648c: 80 a0 a0 00 cmp %g2, 0 40006490: 22 80 00 08 be,a 400064b0 <_Event_Surrender+0x50> 40006494: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40006498: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000649c: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001ab00 <_Thread_Executing> 400064a0: 80 a6 00 02 cmp %i0, %g2 400064a4: 02 80 00 2a be 4000654c <_Event_Surrender+0xec> 400064a8: 19 10 00 6c sethi %hi(0x4001b000), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 400064ac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400064b0: 80 88 61 00 btst 0x100, %g1 400064b4: 02 80 00 19 be 40006518 <_Event_Surrender+0xb8> 400064b8: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 400064bc: 02 80 00 04 be 400064cc <_Event_Surrender+0x6c> 400064c0: 80 8c 60 02 btst 2, %l1 400064c4: 02 80 00 15 be 40006518 <_Event_Surrender+0xb8> 400064c8: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400064cc: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400064d0: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 400064d4: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 400064d8: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400064dc: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 400064e0: 7f ff ee 56 call 40001e38 400064e4: 90 10 00 10 mov %l0, %o0 400064e8: 7f ff ee 50 call 40001e28 400064ec: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 400064f0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 400064f4: 80 a0 60 02 cmp %g1, 2 400064f8: 02 80 00 0c be 40006528 <_Event_Surrender+0xc8> 400064fc: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40006500: 90 10 00 10 mov %l0, %o0 40006504: 7f ff ee 4d call 40001e38 40006508: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000650c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006510: 40 00 08 e5 call 400088a4 <_Thread_Clear_state> 40006514: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40006518: 7f ff ee 48 call 40001e38 <== NOT EXECUTED 4000651c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 40006520: 7f ff ee 46 call 40001e38 40006524: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40006528: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000652c: 7f ff ee 43 call 40001e38 40006530: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40006534: 40 00 0e d6 call 4000a08c <_Watchdog_Remove> 40006538: 90 06 20 48 add %i0, 0x48, %o0 4000653c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40006540: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006544: 40 00 08 d8 call 400088a4 <_Thread_Clear_state> 40006548: 81 e8 00 00 restore /* * 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() && 4000654c: c2 03 23 60 ld [ %o4 + 0x360 ], %g1 40006550: 80 a0 60 01 cmp %g1, 1 40006554: 02 80 00 07 be 40006570 <_Event_Surrender+0x110> 40006558: 80 a0 c0 0d cmp %g3, %o5 4000655c: c2 03 23 60 ld [ %o4 + 0x360 ], %g1 40006560: 80 a0 60 02 cmp %g1, 2 40006564: 32 bf ff d3 bne,a 400064b0 <_Event_Surrender+0x50> 40006568: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 4000656c: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 40006570: 02 80 00 04 be 40006580 <_Event_Surrender+0x120> 40006574: 80 8c 60 02 btst 2, %l1 40006578: 02 80 00 09 be 4000659c <_Event_Surrender+0x13c> <== NOT EXECUTED 4000657c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40006580: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40006584: c4 06 20 28 ld [ %i0 + 0x28 ], %g2 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40006588: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 4000658c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40006590: 82 10 20 03 mov 3, %g1 ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40006594: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40006598: c2 23 23 60 st %g1, [ %o4 + 0x360 ] } _ISR_Enable( level ); 4000659c: 7f ff ee 27 call 40001e38 400065a0: 91 e8 00 10 restore %g0, %l0, %o0 400065a4: 01 00 00 00 nop 400065a8 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 400065a8: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400065ac: 90 10 00 18 mov %i0, %o0 400065b0: 40 00 09 c8 call 40008cd0 <_Thread_Get> 400065b4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 400065b8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400065bc: 80 a0 60 00 cmp %g1, 0 400065c0: 12 80 00 19 bne 40006624 <_Event_Timeout+0x7c> 400065c4: b0 10 00 08 mov %o0, %i0 * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 400065c8: 7f ff ee 18 call 40001e28 400065cc: 01 00 00 00 nop 400065d0: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 400065d4: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400065d8: 80 a0 60 00 cmp %g1, 0 400065dc: 02 80 00 14 be 4000662c <_Event_Timeout+0x84> 400065e0: 03 10 00 6a sethi %hi(0x4001a800), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 400065e4: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001ab00 <_Thread_Executing> 400065e8: 80 a6 00 02 cmp %i0, %g2 400065ec: 02 80 00 18 be 4000664c <_Event_Timeout+0xa4> 400065f0: c0 26 20 24 clr [ %i0 + 0x24 ] (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 400065f4: 82 10 20 06 mov 6, %g1 400065f8: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400065fc: 7f ff ee 0f call 40001e38 40006600: 90 10 00 03 mov %g3, %o0 40006604: 90 10 00 18 mov %i0, %o0 40006608: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000660c: 40 00 08 a6 call 400088a4 <_Thread_Clear_state> 40006610: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006614: 05 10 00 6a sethi %hi(0x4001a800), %g2 40006618: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> 4000661c: 82 00 7f ff add %g1, -1, %g1 40006620: c2 20 a2 40 st %g1, [ %g2 + 0x240 ] 40006624: 81 c7 e0 08 ret 40006628: 81 e8 00 00 restore 4000662c: 05 10 00 6a sethi %hi(0x4001a800), %g2 <== NOT EXECUTED 40006630: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006634: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006638: c2 20 a2 40 st %g1, [ %g2 + 0x240 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4000663c: 7f ff ed ff call 40001e38 <== NOT EXECUTED 40006640: 01 00 00 00 nop <== NOT EXECUTED 40006644: 81 c7 e0 08 ret <== NOT EXECUTED 40006648: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 4000664c: 05 10 00 6c sethi %hi(0x4001b000), %g2 40006650: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 4001b360 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 40006654: 80 a0 60 01 cmp %g1, 1 40006658: 38 bf ff e8 bgu,a 400065f8 <_Event_Timeout+0x50> 4000665c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 40006660: 82 10 20 02 mov 2, %g1 40006664: c2 20 a3 60 st %g1, [ %g2 + 0x360 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 40006668: 10 bf ff e4 b 400065f8 <_Event_Timeout+0x50> 4000666c: 82 10 20 06 mov 6, %g1 4000a9a4 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 4000a9a4: 9d e3 bf 98 save %sp, -104, %sp uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 4000a9a8: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 4000a9ac: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 4000a9b0: 90 10 00 19 mov %i1, %o0 4000a9b4: 92 10 00 16 mov %l6, %o1 4000a9b8: 40 00 01 82 call 4000afc0 <_Heap_Calc_block_size> 4000a9bc: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 4000a9c0: ae 92 20 00 orcc %o0, 0, %l7 4000a9c4: 02 80 00 69 be 4000ab68 <_Heap_Allocate_aligned+0x1c4> 4000a9c8: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 4000a9cc: 80 a6 a0 00 cmp %i2, 0 4000a9d0: 22 80 00 02 be,a 4000a9d8 <_Heap_Allocate_aligned+0x34> 4000a9d4: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000a9d8: e2 05 60 08 ld [ %l5 + 8 ], %l1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 4000a9dc: 80 a5 40 11 cmp %l5, %l1 4000a9e0: 02 80 00 62 be 4000ab68 <_Heap_Allocate_aligned+0x1c4> 4000a9e4: a8 10 20 00 clr %l4 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000a9e8: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000a9ec: 92 10 00 1a mov %i2, %o1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000a9f0: a4 08 7f fe and %g1, -2, %l2 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 4000a9f4: a6 04 40 12 add %l1, %l2, %l3 uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 4000a9f8: 80 a5 c0 12 cmp %l7, %l2 return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; aligned_user_addr = block_end - end_to_user_offs; 4000a9fc: a0 24 c0 19 sub %l3, %i1, %l0 uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 4000aa00: 18 80 00 22 bgu 4000aa88 <_Heap_Allocate_aligned+0xe4> 4000aa04: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 4000aa08: 40 00 41 11 call 4001ae4c <.urem> 4000aa0c: 01 00 00 00 nop _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 4000aa10: 92 10 00 16 mov %l6, %o1 4000aa14: b0 24 00 08 sub %l0, %o0, %i0 4000aa18: 40 00 41 0d call 4001ae4c <.urem> 4000aa1c: 90 10 00 18 mov %i0, %o0 4000aa20: a0 04 60 08 add %l1, 8, %l0 4000aa24: 84 26 00 08 sub %i0, %o0, %g2 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 4000aa28: 80 a4 00 02 cmp %l0, %g2 4000aa2c: 38 80 00 18 bgu,a 4000aa8c <_Heap_Allocate_aligned+0xe8> 4000aa30: e2 04 60 08 ld [ %l1 + 8 ], %l1 /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 4000aa34: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 4000aa38: 82 20 80 10 sub %g2, %l0, %g1 4000aa3c: 80 a0 40 1d cmp %g1, %i5 4000aa40: 1a 80 00 1e bcc 4000aab8 <_Heap_Allocate_aligned+0x114> 4000aa44: 80 a6 20 00 cmp %i0, 0 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 4000aa48: 82 26 00 10 sub %i0, %l0, %g1 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 4000aa4c: 90 10 00 10 mov %l0, %o0 4000aa50: 92 10 00 1a mov %i2, %o1 4000aa54: 80 a5 80 01 cmp %l6, %g1 4000aa58: 18 80 00 17 bgu 4000aab4 <_Heap_Allocate_aligned+0x110> 4000aa5c: 84 10 00 10 mov %l0, %g2 4000aa60: 40 00 40 fb call 4001ae4c <.urem> <== NOT EXECUTED 4000aa64: 01 00 00 00 nop <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 4000aa68: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED *value = r ? v - r + a : v; 4000aa6c: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 4000aa70: 86 10 20 00 clr %g3 <== NOT EXECUTED 4000aa74: 12 80 00 35 bne 4000ab48 <_Heap_Allocate_aligned+0x1a4> <== NOT EXECUTED 4000aa78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000aa7c: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 4000aa80: 38 80 00 0d bgu,a 4000aab4 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 4000aa84: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 4000aa88: e2 04 60 08 ld [ %l1 + 8 ], %l1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 4000aa8c: 80 a5 40 11 cmp %l5, %l1 4000aa90: 12 bf ff d6 bne 4000a9e8 <_Heap_Allocate_aligned+0x44> 4000aa94: a8 05 20 01 inc %l4 4000aa98: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 4000aa9c: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 4000aaa0: 80 a0 40 14 cmp %g1, %l4 4000aaa4: 2a 80 00 02 bcs,a 4000aaac <_Heap_Allocate_aligned+0x108> 4000aaa8: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 4000aaac: 81 c7 e0 08 ret 4000aab0: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 4000aab4: 80 a6 20 00 cmp %i0, 0 4000aab8: 22 bf ff f5 be,a 4000aa8c <_Heap_Allocate_aligned+0xe8> 4000aabc: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 4000aac0: 82 04 e0 08 add %l3, 8, %g1 4000aac4: 88 20 40 02 sub %g1, %g2, %g4 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 4000aac8: 84 24 80 04 sub %l2, %g4, %g2 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 4000aacc: 80 a0 80 1d cmp %g2, %i5 4000aad0: 2a 80 00 29 bcs,a 4000ab74 <_Heap_Allocate_aligned+0x1d0> 4000aad4: c6 04 60 08 ld [ %l1 + 8 ], %g3 /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 4000aad8: 82 10 a0 01 or %g2, 1, %g1 4000aadc: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( void *base, uint32_t offset ) { return (void *)((char *)base + offset); 4000aae0: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 4000aae4: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 4000aae8: c8 24 60 04 st %g4, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000aaec: 84 04 40 04 add %l1, %g4, %g2 _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 4000aaf0: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000aaf4: 82 10 60 01 or %g1, 1, %g1 4000aaf8: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 4000aafc: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 4000ab00: c2 05 60 34 ld [ %l5 + 0x34 ], %g1 stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 4000ab04: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 4000ab08: 80 a0 c0 01 cmp %g3, %g1 4000ab0c: 1a 80 00 03 bcc 4000ab18 <_Heap_Allocate_aligned+0x174> 4000ab10: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 4000ab14: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 4000ab18: c2 05 60 40 ld [ %l5 + 0x40 ], %g1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 4000ab1c: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 4000ab20: c4 05 60 48 ld [ %l5 + 0x48 ], %g2 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 4000ab24: 82 00 60 01 inc %g1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 4000ab28: 86 00 e0 01 inc %g3 stats->allocs += 1; 4000ab2c: 84 00 a0 01 inc %g2 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 4000ab30: 86 00 c0 14 add %g3, %l4, %g3 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 4000ab34: c2 25 60 40 st %g1, [ %l5 + 0x40 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 4000ab38: c4 25 60 48 st %g2, [ %l5 + 0x48 ] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 4000ab3c: c6 25 60 4c st %g3, [ %l5 + 0x4c ] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 4000ab40: 10 bf ff d7 b 4000aa9c <_Heap_Allocate_aligned+0xf8> 4000ab44: 90 10 00 18 mov %i0, %o0 ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; *value = r ? v - r + a : v; 4000ab48: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 4000ab4c: 90 20 40 04 sub %g1, %g4, %o0 <== NOT EXECUTED 4000ab50: 86 22 00 10 sub %o0, %l0, %g3 <== NOT EXECUTED /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 4000ab54: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 4000ab58: 28 bf ff cd bleu,a 4000aa8c <_Heap_Allocate_aligned+0xe8> <== NOT EXECUTED 4000ab5c: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 4000ab60: 10 bf ff d5 b 4000aab4 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 4000ab64: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 4000ab68: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 4000ab6c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ab70: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000ab74: c4 04 60 0c ld [ %l1 + 0xc ], %g2 /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 4000ab78: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 4000ab7c: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 4000ab80: 82 00 7f ff add %g1, -1, %g1 { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4000ab84: c6 20 a0 08 st %g3, [ %g2 + 8 ] 4000ab88: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 4000ab8c: 10 bf ff d8 b 4000aaec <_Heap_Allocate_aligned+0x148> 4000ab90: 88 10 00 12 mov %l2, %g4 40031bc4 <_Heap_Get_information>: Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 40031bc4: d6 02 20 24 ld [ %o0 + 0x24 ], %o3 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 40031bc8: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 40031bcc: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 40031bd0: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 40031bd4: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 40031bd8: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 40031bdc: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 40031be0: 80 a0 40 0b cmp %g1, %o3 40031be4: 02 80 00 26 be 40031c7c <_Heap_Get_information+0xb8> 40031be8: c0 22 60 10 clr [ %o1 + 0x10 ] 40031bec: 10 80 00 0e b 40031c24 <_Heap_Get_information+0x60> 40031bf0: d8 00 60 04 ld [ %g1 + 4 ], %o4 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; 40031bf4: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 40031bf8: c6 02 60 10 ld [ %o1 + 0x10 ], %g3 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 40031bfc: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 40031c00: 84 00 80 04 add %g2, %g4, %g2 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 40031c04: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 40031c08: 80 a0 c0 04 cmp %g3, %g4 40031c0c: 1a 80 00 03 bcc 40031c18 <_Heap_Get_information+0x54> 40031c10: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 40031c14: c8 22 60 10 st %g4, [ %o1 + 0x10 ] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 40031c18: 80 a2 c0 0d cmp %o3, %o5 40031c1c: 02 80 00 18 be 40031c7c <_Heap_Get_information+0xb8> 40031c20: 82 10 00 0d mov %o5, %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40031c24: 88 0b 3f fe and %o4, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40031c28: 9a 00 40 04 add %g1, %g4, %o5 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40031c2c: d8 03 60 04 ld [ %o5 + 4 ], %o4 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 40031c30: 80 8b 20 01 btst 1, %o4 40031c34: 32 bf ff f0 bne,a 40031bf4 <_Heap_Get_information+0x30> 40031c38: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 40031c3c: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 40031c40: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 40031c44: c6 02 60 04 ld [ %o1 + 4 ], %g3 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 40031c48: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 40031c4c: 84 00 80 04 add %g2, %g4, %g2 the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 40031c50: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 40031c54: 80 a0 c0 04 cmp %g3, %g4 40031c58: 1a 80 00 03 bcc 40031c64 <_Heap_Get_information+0xa0> 40031c5c: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 40031c60: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 40031c64: c2 03 40 00 ld [ %o5 ], %g1 40031c68: 80 a0 40 04 cmp %g1, %g4 40031c6c: 02 bf ff ec be 40031c1c <_Heap_Get_information+0x58> 40031c70: 80 a2 c0 0d cmp %o3, %o5 40031c74: 81 c3 e0 08 retl <== NOT EXECUTED 40031c78: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED } /* 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_OVERHEAD; 40031c7c: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 40031c80: 90 10 20 00 clr %o0 40031c84: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 40031c88: 81 c3 e0 08 retl 40031c8c: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 40018254 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 40018254: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 40018258: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 4001825c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 40018260: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 40018264: c0 27 00 00 clr [ %i4 ] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 40018268: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 4001826c: 7f ff f6 34 call 40015b3c <.urem> 40018270: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 40018274: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 40018278: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 4001827c: 82 06 7f f8 add %i1, -8, %g1 40018280: a2 20 40 08 sub %g1, %o0, %l1 _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 40018284: 80 a4 40 04 cmp %l1, %g4 40018288: 84 60 3f ff subx %g0, -1, %g2 4001828c: 80 a0 c0 11 cmp %g3, %l1 40018290: 82 60 3f ff subx %g0, -1, %g1 40018294: 80 88 80 01 btst %g2, %g1 40018298: 02 80 00 2f be 40018354 <_Heap_Resize_block+0x100> 4001829c: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400182a0: da 04 60 04 ld [ %l1 + 4 ], %o5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 400182a4: b0 0b 7f fe and %o5, -2, %i0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400182a8: a4 04 40 18 add %l1, %i0, %l2 old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 400182ac: 80 a4 80 04 cmp %l2, %g4 400182b0: 84 60 3f ff subx %g0, -1, %g2 400182b4: 80 a0 c0 12 cmp %g3, %l2 400182b8: 82 60 3f ff subx %g0, -1, %g1 400182bc: 80 88 80 01 btst %g2, %g1 400182c0: 02 80 00 25 be 40018354 <_Heap_Resize_block+0x100> 400182c4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 400182c8: c2 04 a0 04 ld [ %l2 + 4 ], %g1 400182cc: 80 88 60 01 btst 1, %g1 400182d0: 02 80 00 21 be 40018354 <_Heap_Resize_block+0x100> 400182d4: ae 08 7f fe and %g1, -2, %l7 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 400182d8: 80 a0 c0 12 cmp %g3, %l2 400182dc: a8 10 20 01 mov 1, %l4 400182e0: 02 80 00 04 be 400182f0 <_Heap_Resize_block+0x9c> 400182e4: 82 04 80 17 add %l2, %l7, %g1 400182e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 400182ec: a8 08 60 01 and %g1, 1, %l4 _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 400182f0: 82 24 80 19 sub %l2, %i1, %g1 400182f4: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 400182f8: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 400182fc: 80 a0 40 1a cmp %g1, %i2 40018300: 1a 80 00 17 bcc 4001835c <_Heap_Resize_block+0x108> 40018304: b6 0b 60 01 and %o5, 1, %i3 /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 40018308: 80 8d 20 ff btst 0xff, %l4 4001830c: 12 80 00 10 bne 4001834c <_Heap_Resize_block+0xf8> 40018310: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40018314: 92 10 00 15 mov %l5, %o1 40018318: 7f ff f6 09 call 40015b3c <.urem> 4001831c: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40018320: 80 a2 20 00 cmp %o0, 0 40018324: 02 80 00 05 be 40018338 <_Heap_Resize_block+0xe4> 40018328: 80 a4 00 16 cmp %l0, %l6 4001832c: 82 04 00 15 add %l0, %l5, %g1 40018330: a0 20 40 08 sub %g1, %o0, %l0 40018334: 80 a4 00 16 cmp %l0, %l6 40018338: 0a 80 00 2e bcs 400183f0 <_Heap_Resize_block+0x19c> 4001833c: 90 10 00 10 mov %l0, %o0 else { uint32_t add_block_size = size - old_user_size; _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 40018340: 80 a5 c0 08 cmp %l7, %o0 40018344: 1a 80 00 32 bcc 4001840c <_Heap_Resize_block+0x1b8> 40018348: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 4001834c: 81 c7 e0 08 ret 40018350: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 40018354: 81 c7 e0 08 ret 40018358: 91 e8 20 02 restore %g0, 2, %o0 --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 4001835c: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40018360: 92 10 00 15 mov %l5, %o1 40018364: 7f ff f5 f6 call 40015b3c <.urem> 40018368: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 4001836c: a0 a4 00 08 subcc %l0, %o0, %l0 40018370: 22 80 00 1c be,a 400183e0 <_Heap_Resize_block+0x18c> 40018374: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 40018378: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 4001837c: 80 a5 80 02 cmp %l6, %g2 40018380: 18 80 00 1e bgu 400183f8 <_Heap_Resize_block+0x1a4> 40018384: 82 25 80 02 sub %l6, %g2, %g1 _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 40018388: 80 8d 20 ff btst 0xff, %l4 4001838c: 12 80 00 2a bne 40018434 <_Heap_Resize_block+0x1e0> 40018390: 80 a5 80 10 cmp %l6, %l0 Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 40018394: 82 10 80 1b or %g2, %i3, %g1 40018398: c2 24 60 04 st %g1, [ %l1 + 4 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4001839c: 86 04 40 02 add %l1, %g2, %g3 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 400183a0: d8 04 a0 0c ld [ %l2 + 0xc ], %o4 if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 400183a4: 88 04 00 17 add %l0, %l7, %g4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 400183a8: da 04 a0 08 ld [ %l2 + 8 ], %o5 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 400183ac: c8 24 80 17 st %g4, [ %l2 + %l7 ] _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 400183b0: 84 11 20 01 or %g4, 1, %g2 400183b4: c4 20 e0 04 st %g2, [ %g3 + 4 ] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 400183b8: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 400183bc: da 20 e0 08 st %o5, [ %g3 + 8 ] 400183c0: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 400183c4: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 400183c8: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 400183cc: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 400183d0: c6 23 60 0c st %g3, [ %o5 + 0xc ] 400183d4: c6 23 20 08 st %g3, [ %o4 + 8 ] 400183d8: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 400183dc: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 400183e0: 82 00 60 01 inc %g1 400183e4: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 400183e8: 81 c7 e0 08 ret 400183ec: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 400183f0: 10 bf ff d4 b 40018340 <_Heap_Resize_block+0xec> 400183f4: 90 10 00 16 mov %l6, %o0 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 400183f8: a0 a4 00 01 subcc %l0, %g1, %l0 400183fc: 12 bf ff e3 bne 40018388 <_Heap_Resize_block+0x134> 40018400: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 40018404: 10 bf ff f7 b 400183e0 <_Heap_Resize_block+0x18c> 40018408: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 4001840c: 92 10 00 12 mov %l2, %o1 40018410: 7f ff bd f7 call 40007bec <_Heap_Block_allocate> 40018414: 90 10 00 13 mov %l3, %o0 _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 40018418: 90 02 00 18 add %o0, %i0, %o0 4001841c: 90 12 00 1b or %o0, %i3, %o0 40018420: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 40018424: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 40018428: 82 00 7f ff add %g1, -1, %g1 4001842c: 10 bf ff ec b 400183dc <_Heap_Resize_block+0x188> 40018430: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 40018434: 38 bf ff eb bgu,a 400183e0 <_Heap_Resize_block+0x18c> <== NOT EXECUTED 40018438: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 4001843c: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40018440: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 40018444: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 40018448: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 4001844c: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 40018450: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40018454: c4 04 e0 50 ld [ %l3 + 0x50 ], %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 40018458: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4001845c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 40018460: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40018464: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 40018468: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 4001846c: 7f ff d3 69 call 4000d210 <_Heap_Free> <== NOT EXECUTED 40018470: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 40018474: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 40018478: 10 bf ff d9 b 400183dc <_Heap_Resize_block+0x188> <== NOT EXECUTED 4001847c: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 40010b14 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 40010b14: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 40010b18: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 40010b1c: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 40010b20: 06 80 00 8c bl 40010d50 <_Heap_Walk+0x23c> 40010b24: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 40010b28: c2 04 60 04 ld [ %l1 + 4 ], %g1 40010b2c: 80 88 60 01 btst 1, %g1 40010b30: 02 80 00 81 be 40010d34 <_Heap_Walk+0x220> 40010b34: a6 10 20 00 clr %l3 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { 40010b38: c4 04 40 00 ld [ %l1 ], %g2 40010b3c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40010b40: 80 a0 80 01 cmp %g2, %g1 40010b44: 02 80 00 08 be 40010b64 <_Heap_Walk+0x50> 40010b48: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 40010b4c: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010b50: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010b54: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40010b58: 7f ff d7 d6 call 40006ab0 <== NOT EXECUTED 40010b5c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 40010b60: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 40010b64: 22 80 00 63 be,a 40010cf0 <_Heap_Walk+0x1dc> 40010b68: a2 10 00 16 mov %l6, %l1 <== NOT EXECUTED printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 40010b6c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40010b70: c8 04 60 04 ld [ %l1 + 4 ], %g4 40010b74: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 40010b78: a4 09 3f fe and %g4, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40010b7c: a0 04 40 12 add %l1, %l2, %l0 40010b80: 80 a4 00 01 cmp %l0, %g1 40010b84: 84 60 3f ff subx %g0, -1, %g2 40010b88: 80 a0 c0 10 cmp %g3, %l0 40010b8c: 82 60 3f ff subx %g0, -1, %g1 40010b90: 80 88 80 01 btst %g2, %g1 40010b94: 02 80 00 77 be 40010d70 <_Heap_Walk+0x25c> 40010b98: 03 10 00 77 sethi %hi(0x4001dc00), %g1 Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); printk("PASS: %d !the_block not in the free list", source); 40010b9c: 05 10 00 7a sethi %hi(0x4001e800), %g2 { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 40010ba0: ba 10 60 08 or %g1, 8, %i5 printk("PASS: %d !the_block not in the free list", source); 40010ba4: ae 10 a1 d8 or %g2, 0x1d8, %l7 printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 40010ba8: 03 10 00 7a sethi %hi(0x4001e800), %g1 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 40010bac: 05 10 00 7a sethi %hi(0x4001e800), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40010bb0: a8 09 20 01 and %g4, 1, %l4 error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); printk("PASS: %d !two consecutive blocks are free", source); 40010bb4: b8 10 61 a8 or %g1, 0x1a8, %i4 if (!_Heap_Is_prev_used(next_block)) { if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 40010bb8: b6 10 a1 78 or %g2, 0x178, %i3 40010bbc: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 40010bc0: c2 04 20 04 ld [ %l0 + 4 ], %g1 40010bc4: 80 88 60 01 btst 1, %g1 40010bc8: 12 80 00 20 bne 40010c48 <_Heap_Walk+0x134> 40010bcc: 80 a4 e0 00 cmp %l3, 0 if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 40010bd0: c2 04 00 00 ld [ %l0 ], %g1 40010bd4: 80 a0 40 12 cmp %g1, %l2 40010bd8: 02 80 00 07 be 40010bf4 <_Heap_Walk+0xe0> 40010bdc: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 40010be0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 40010be4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010be8: 7f ff d7 b2 call 40006ab0 <== NOT EXECUTED 40010bec: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 40010bf0: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 40010bf4: 32 80 00 0a bne,a 40010c1c <_Heap_Walk+0x108> 40010bf8: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 40010bfc: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40010c00: 12 80 00 49 bne 40010d24 <_Heap_Walk+0x210> <== NOT EXECUTED 40010c04: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 40010c08: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 40010c0c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010c10: 7f ff d7 a8 call 40006ab0 <== NOT EXECUTED 40010c14: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 40010c18: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 40010c1c: 80 a0 40 11 cmp %g1, %l1 40010c20: 02 80 00 0a be 40010c48 <_Heap_Walk+0x134> 40010c24: 80 a4 e0 00 cmp %l3, 0 40010c28: 80 a6 00 01 cmp %i0, %g1 40010c2c: 02 80 00 58 be 40010d8c <_Heap_Walk+0x278> 40010c30: 80 a0 40 11 cmp %g1, %l1 block = block->next; 40010c34: c2 00 60 08 ld [ %g1 + 8 ], %g1 error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 40010c38: 80 a0 40 11 cmp %g1, %l1 40010c3c: 12 bf ff fc bne 40010c2c <_Heap_Walk+0x118> 40010c40: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 40010c44: 80 a4 e0 00 cmp %l3, 0 40010c48: 32 80 00 58 bne,a 40010da8 <_Heap_Walk+0x294> 40010c4c: 27 10 00 77 sethi %hi(0x4001dc00), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 40010c50: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40010c54: 80 a0 40 12 cmp %g1, %l2 40010c58: 18 80 00 40 bgu 40010d58 <_Heap_Walk+0x244> 40010c5c: 11 10 00 7a sethi %hi(0x4001e800), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 40010c60: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 40010c64: 40 00 28 7a call 4001ae4c <.urem> 40010c68: 90 10 00 12 mov %l2, %o0 40010c6c: 80 a2 20 00 cmp %o0, 0 40010c70: 12 80 00 15 bne 40010cc4 <_Heap_Walk+0x1b0> 40010c74: 80 a4 e0 00 cmp %l3, 0 printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 40010c78: 12 80 00 17 bne 40010cd4 <_Heap_Walk+0x1c0> 40010c7c: 80 a5 80 10 cmp %l6, %l0 if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { 40010c80: 02 80 00 1c be 40010cf0 <_Heap_Walk+0x1dc> 40010c84: a2 10 00 16 mov %l6, %l1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40010c88: c8 04 20 04 ld [ %l0 + 4 ], %g4 printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 40010c8c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40010c90: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 40010c94: a4 09 3f fe and %g4, -2, %l2 40010c98: a0 04 00 12 add %l0, %l2, %l0 40010c9c: 80 a4 00 01 cmp %l0, %g1 40010ca0: 84 60 3f ff subx %g0, -1, %g2 40010ca4: 80 a0 c0 10 cmp %g3, %l0 40010ca8: 82 60 3f ff subx %g0, -1, %g1 40010cac: 80 88 80 01 btst %g2, %g1 40010cb0: 02 80 00 2f be 40010d6c <_Heap_Walk+0x258> 40010cb4: a8 09 20 01 and %g4, 1, %l4 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40010cb8: a2 10 00 15 mov %l5, %l1 40010cbc: 10 bf ff c1 b 40010bc0 <_Heap_Walk+0xac> 40010cc0: aa 10 00 10 mov %l0, %l5 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); 40010cc4: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010cc8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010ccc: 7f ff d7 79 call 40006ab0 <== NOT EXECUTED 40010cd0: 90 12 22 30 or %o0, 0x230, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 40010cd4: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 40010cd8: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010cdc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010ce0: 90 12 22 58 or %o0, 0x258, %o0 <== NOT EXECUTED 40010ce4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40010ce8: 7f ff d7 72 call 40006ab0 <== NOT EXECUTED 40010cec: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 40010cf0: d6 06 20 10 ld [ %i0 + 0x10 ], %o3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40010cf4: c2 04 60 04 ld [ %l1 + 4 ], %g1 40010cf8: 94 08 7f fe and %g1, -2, %o2 40010cfc: 80 a2 c0 0a cmp %o3, %o2 40010d00: 02 80 00 07 be 40010d1c <_Heap_Walk+0x208> 40010d04: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 40010d08: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010d0c: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010d10: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40010d14: 7f ff d7 67 call 40006ab0 <== NOT EXECUTED 40010d18: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 40010d1c: 81 c7 e0 08 ret 40010d20: 81 e8 00 00 restore if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); 40010d24: 7f ff d7 63 call 40006ab0 <== NOT EXECUTED 40010d28: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 40010d2c: 10 bf ff b8 b 40010c0c <_Heap_Walk+0xf8> <== NOT EXECUTED 40010d30: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 40010d34: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010d38: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010d3c: 90 12 20 e0 or %o0, 0xe0, %o0 <== NOT EXECUTED 40010d40: 7f ff d7 5c call 40006ab0 <== NOT EXECUTED 40010d44: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 40010d48: 10 bf ff 7d b 40010b3c <_Heap_Walk+0x28> <== NOT EXECUTED 40010d4c: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 40010d50: 10 bf ff 76 b 40010b28 <_Heap_Walk+0x14> <== NOT EXECUTED 40010d54: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED } if (do_dump || error) printk("\n"); if (the_size < the_heap->min_block_size) { printk("PASS: %d !block size is too small\n", source); 40010d58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010d5c: 7f ff d7 55 call 40006ab0 <== NOT EXECUTED 40010d60: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 40010d64: 10 bf ff dd b 40010cd8 <_Heap_Walk+0x1c4> <== NOT EXECUTED 40010d68: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40010d6c: a2 10 00 15 mov %l5, %l1 <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 40010d70: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40010d74: 11 10 00 7a sethi %hi(0x4001e800), %o0 <== NOT EXECUTED 40010d78: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40010d7c: 7f ff d7 4d call 40006ab0 <== NOT EXECUTED 40010d80: 90 12 21 50 or %o0, 0x150, %o0 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 40010d84: 10 bf ff d5 b 40010cd8 <_Heap_Walk+0x1c4> <== NOT EXECUTED 40010d88: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { 40010d8c: 02 bf ff ae be 40010c44 <_Heap_Walk+0x130> <== NOT EXECUTED 40010d90: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 40010d94: 12 80 00 0a bne 40010dbc <_Heap_Walk+0x2a8> <== NOT EXECUTED 40010d98: 27 10 00 77 sethi %hi(0x4001dc00), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 40010d9c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40010da0: 7f ff d7 44 call 40006ab0 <== NOT EXECUTED 40010da4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 40010da8: 90 14 e0 08 or %l3, 8, %o0 <== NOT EXECUTED 40010dac: 7f ff d7 41 call 40006ab0 <== NOT EXECUTED 40010db0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 40010db4: 10 bf ff a8 b 40010c54 <_Heap_Walk+0x140> <== NOT EXECUTED 40010db8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 40010dbc: 7f ff d7 3d call 40006ab0 <== NOT EXECUTED 40010dc0: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 40010dc4: 10 bf ff f7 b 40010da0 <_Heap_Walk+0x28c> <== NOT EXECUTED 40010dc8: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40007d5c <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40007d5c: 9d e3 bf 98 save %sp, -104, %sp * 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 ) 40007d60: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 40007d64: a0 10 00 18 mov %i0, %l0 * 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 ) 40007d68: 80 a0 60 00 cmp %g1, 0 40007d6c: 02 80 00 1d be 40007de0 <_Objects_Allocate+0x84> 40007d70: b0 10 20 00 clr %i0 /* * 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 ); 40007d74: a2 04 20 20 add %l0, 0x20, %l1 40007d78: 40 00 14 47 call 4000ce94 <_Chain_Get> 40007d7c: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 40007d80: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 40007d84: 80 a0 60 00 cmp %g1, 0 40007d88: 02 80 00 16 be 40007de0 <_Objects_Allocate+0x84> 40007d8c: b0 10 00 08 mov %o0, %i0 /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 40007d90: 80 a2 20 00 cmp %o0, 0 40007d94: 02 80 00 15 be 40007de8 <_Objects_Allocate+0x8c> 40007d98: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40007d9c: c4 06 20 08 ld [ %i0 + 8 ], %g2 40007da0: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007da4: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 40007da8: 03 00 00 3f sethi %hi(0xfc00), %g1 40007dac: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007db0: 84 08 80 01 and %g2, %g1, %g2 40007db4: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007db8: 40 00 36 b5 call 4001588c <.udiv> 40007dbc: 90 20 80 08 sub %g2, %o0, %o0 40007dc0: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 40007dc4: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 40007dc8: c2 14 20 2c lduh [ %l0 + 0x2c ], %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007dcc: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 40007dd0: 82 00 7f ff add %g1, -1, %g1 block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007dd4: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 40007dd8: c2 34 20 2c sth %g1, [ %l0 + 0x2c ] block = _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 40007ddc: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 40007de0: 81 c7 e0 08 ret 40007de4: 81 e8 00 00 restore * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 40007de8: 40 00 00 14 call 40007e38 <_Objects_Extend_information> 40007dec: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 40007df0: 40 00 14 29 call 4000ce94 <_Chain_Get> 40007df4: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 40007df8: b0 92 20 00 orcc %o0, 0, %i0 40007dfc: 32 bf ff e9 bne,a 40007da0 <_Objects_Allocate+0x44> 40007e00: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 40007e04: 81 c7 e0 08 ret <== NOT EXECUTED 40007e08: 81 e8 00 00 restore <== NOT EXECUTED 40007e38 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40007e38: 9d e3 bf 88 save %sp, -120, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 40007e3c: c4 06 20 08 ld [ %i0 + 8 ], %g2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 40007e40: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 40007e44: 03 00 00 3f sethi %hi(0xfc00), %g1 40007e48: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007e4c: a8 08 80 01 and %g2, %g1, %l4 40007e50: 80 a5 40 14 cmp %l5, %l4 40007e54: 1a 80 00 79 bcc 40008038 <_Objects_Extend_information+0x200> 40007e58: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40007e5c: a6 10 00 14 mov %l4, %l3 40007e60: a4 10 20 00 clr %l2 40007e64: a2 10 20 00 clr %l1 40007e68: ac 10 20 01 mov 1, %l6 40007e6c: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40007e70: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40007e74: 80 a0 60 00 cmp %g1, 0 40007e78: 12 80 00 8d bne 400080ac <_Objects_Extend_information+0x274> 40007e7c: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40007e80: 90 02 00 14 add %o0, %l4, %o0 40007e84: 90 02 00 1d add %o0, %i5, %o0 40007e88: 40 00 08 f0 call 4000a248 <_Workspace_Allocate_or_fatal_error> 40007e8c: 91 2a 20 02 sll %o0, 2, %o0 40007e90: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007e94: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007e98: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007e9c: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40007ea0: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40007ea4: 18 80 00 94 bgu 400080f4 <_Objects_Extend_information+0x2bc> 40007ea8: a0 05 80 02 add %l6, %g2, %l0 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40007eac: 80 a5 20 00 cmp %l4, 0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40007eb0: 84 10 20 00 clr %g2 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40007eb4: 02 80 00 08 be 40007ed4 <_Objects_Extend_information+0x9c> 40007eb8: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 40007ebc: 83 28 a0 02 sll %g2, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40007ec0: 84 00 a0 01 inc %g2 40007ec4: 80 a0 80 14 cmp %g2, %l4 40007ec8: 0a bf ff fd bcs 40007ebc <_Objects_Extend_information+0x84> 40007ecc: c0 24 00 01 clr [ %l0 + %g1 ] 40007ed0: ab 2c a0 02 sll %l2, 2, %l5 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40007ed4: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007ed8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40007edc: 86 04 c0 01 add %l3, %g1, %g3 40007ee0: 80 a4 c0 03 cmp %l3, %g3 40007ee4: 1a 80 00 0a bcc 40007f0c <_Objects_Extend_information+0xd4> 40007ee8: c0 25 c0 15 clr [ %l7 + %l5 ] 40007eec: 83 2c e0 02 sll %l3, 2, %g1 40007ef0: 84 04 00 01 add %l0, %g1, %g2 40007ef4: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 40007ef8: c0 20 80 00 clr [ %g2 ] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 40007efc: 82 00 60 01 inc %g1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40007f00: 80 a0 40 03 cmp %g1, %g3 40007f04: 0a bf ff fd bcs 40007ef8 <_Objects_Extend_information+0xc0> 40007f08: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40007f0c: 7f ff e7 c7 call 40001e28 40007f10: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007f14: c2 06 00 00 ld [ %i0 ], %g1 40007f18: c8 16 20 04 lduh [ %i0 + 4 ], %g4 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 40007f1c: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007f20: 89 29 20 1b sll %g4, 0x1b, %g4 40007f24: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40007f28: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007f2c: 87 30 e0 10 srl %g3, 0x10, %g3 40007f30: 05 00 00 40 sethi %hi(0x10000), %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40007f34: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007f38: 83 28 60 18 sll %g1, 0x18, %g1 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 40007f3c: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40007f40: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40007f44: ee 26 20 34 st %l7, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40007f48: 82 10 40 04 or %g1, %g4, %g1 40007f4c: 82 10 40 03 or %g1, %g3, %g1 40007f50: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40007f54: 7f ff e7 b9 call 40001e38 40007f58: 01 00 00 00 nop if ( old_tables ) 40007f5c: 80 a4 20 00 cmp %l0, 0 40007f60: 22 80 00 05 be,a 40007f74 <_Objects_Extend_information+0x13c> 40007f64: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 40007f68: 40 00 08 aa call 4000a210 <_Workspace_Free> 40007f6c: 90 10 00 10 mov %l0, %o0 40007f70: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40007f74: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 40007f78: 80 a0 60 00 cmp %g1, 0 40007f7c: 02 80 00 55 be 400080d0 <_Objects_Extend_information+0x298> 40007f80: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 40007f84: 90 10 00 10 mov %l0, %o0 40007f88: 40 00 36 07 call 400157a4 <.umul> 40007f8c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40007f90: 40 00 08 a7 call 4000a22c <_Workspace_Allocate> 40007f94: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007f98: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40007f9c: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40007fa0: d2 00 40 14 ld [ %g1 + %l4 ], %o1 40007fa4: 80 a2 60 00 cmp %o1, 0 40007fa8: 02 80 00 64 be 40008138 <_Objects_Extend_information+0x300> 40007fac: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007fb0: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40007fb4: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007fb8: a0 10 00 13 mov %l3, %l0 40007fbc: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007fc0: a6 07 bf ec add %fp, -20, %l3 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007fc4: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40007fc8: 40 00 13 c6 call 4000cee0 <_Chain_Initialize> 40007fcc: 90 10 00 13 mov %l3, %o0 40007fd0: 30 80 00 0c b,a 40008000 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007fd4: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40007fd8: 83 28 60 18 sll %g1, 0x18, %g1 40007fdc: 85 28 a0 1b sll %g2, 0x1b, %g2 40007fe0: 82 10 40 12 or %g1, %l2, %g1 40007fe4: 82 10 40 02 or %g1, %g2, %g1 40007fe8: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007fec: 92 10 00 08 mov %o0, %o1 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40007ff0: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40007ff4: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40007ff8: 7f ff fd 2f call 400074b4 <_Chain_Append> 40007ffc: 90 10 00 11 mov %l1, %o0 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 40008000: 40 00 13 a5 call 4000ce94 <_Chain_Get> 40008004: 90 10 00 13 mov %l3, %o0 40008008: 80 a2 20 00 cmp %o0, 0 4000800c: 32 bf ff f2 bne,a 40007fd4 <_Objects_Extend_information+0x19c> 40008010: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008014: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40008018: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 4000801c: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008020: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 40008024: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008028: 82 00 40 04 add %g1, %g4, %g1 4000802c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40008030: 81 c7 e0 08 ret 40008034: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40008038: 90 10 00 15 mov %l5, %o0 4000803c: 40 00 36 14 call 4001588c <.udiv> 40008040: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40008044: a4 92 20 00 orcc %o0, 0, %l2 40008048: 02 80 00 3e be 40008140 <_Objects_Extend_information+0x308> 4000804c: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 40008050: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 40008054: c2 00 80 00 ld [ %g2 ], %g1 40008058: 80 a0 60 00 cmp %g1, 0 4000805c: 12 80 00 08 bne 4000807c <_Objects_Extend_information+0x244> 40008060: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40008064: 10 80 00 0c b 40008094 <_Objects_Extend_information+0x25c> <== NOT EXECUTED 40008068: 80 a4 c0 15 cmp %l3, %l5 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 4000806c: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40008070: 80 a0 60 00 cmp %g1, 0 40008074: 02 80 00 08 be 40008094 <_Objects_Extend_information+0x25c> 40008078: 80 a4 c0 15 cmp %l3, %l5 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 4000807c: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40008080: a6 04 c0 10 add %l3, %l0, %l3 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008084: 80 a4 80 11 cmp %l2, %l1 40008088: 18 bf ff f9 bgu 4000806c <_Objects_Extend_information+0x234> 4000808c: 83 2c 60 02 sll %l1, 2, %g1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40008090: 80 a4 c0 15 cmp %l3, %l5 40008094: 2a bf ff b9 bcs,a 40007f78 <_Objects_Extend_information+0x140> 40008098: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 4000809c: ac 04 a0 01 add %l2, 1, %l6 400080a0: 83 2d a0 01 sll %l6, 1, %g1 400080a4: 10 bf ff 73 b 40007e70 <_Objects_Extend_information+0x38> 400080a8: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 400080ac: 90 02 00 14 add %o0, %l4, %o0 400080b0: 90 02 00 1d add %o0, %i5, %o0 400080b4: 40 00 08 5e call 4000a22c <_Workspace_Allocate> 400080b8: 91 2a 20 02 sll %o0, 2, %o0 block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 400080bc: ae 92 20 00 orcc %o0, 0, %l7 400080c0: 32 bf ff 76 bne,a 40007e98 <_Objects_Extend_information+0x60> 400080c4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400080c8: 81 c7 e0 08 ret <== NOT EXECUTED 400080cc: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 400080d0: 90 10 00 10 mov %l0, %o0 400080d4: 40 00 35 b4 call 400157a4 <.umul> 400080d8: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 400080dc: 40 00 08 5b call 4000a248 <_Workspace_Allocate_or_fatal_error> 400080e0: a9 2c 60 02 sll %l1, 2, %l4 400080e4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 400080e8: d0 24 00 14 st %o0, [ %l0 + %l4 ] 400080ec: 10 bf ff b1 b 40007fb0 <_Objects_Extend_information+0x178> 400080f0: d2 00 40 14 ld [ %g1 + %l4 ], %o1 /* * 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, 400080f4: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 400080f8: ab 2c a0 02 sll %l2, 2, %l5 400080fc: 90 10 00 17 mov %l7, %o0 40008100: 40 00 1c 05 call 4000f114 40008104: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40008108: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 4000810c: 94 10 00 15 mov %l5, %o2 40008110: 40 00 1c 01 call 4000f114 40008114: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40008118: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 4000811c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 40008120: 94 05 00 0a add %l4, %o2, %o2 40008124: 90 10 00 10 mov %l0, %o0 40008128: 40 00 1b fb call 4000f114 4000812c: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 40008130: 10 bf ff 6a b 40007ed8 <_Objects_Extend_information+0xa0> 40008134: c0 25 80 15 clr [ %l6 + %l5 ] 40008138: 81 c7 e0 08 ret <== NOT EXECUTED 4000813c: 81 e8 00 00 restore <== NOT EXECUTED if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008140: 10 bf ff d4 b 40008090 <_Objects_Extend_information+0x258> <== NOT EXECUTED 40008144: a2 10 20 00 clr %l1 <== NOT EXECUTED 400081f8 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 400081f8: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 400081fc: 82 06 3f ff add %i0, -1, %g1 40008200: 80 a0 60 03 cmp %g1, 3 40008204: 38 80 00 1e bgu,a 4000827c <_Objects_Get_information+0x84> 40008208: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 4000820c: 80 a6 60 00 cmp %i1, 0 40008210: 12 80 00 04 bne 40008220 <_Objects_Get_information+0x28> 40008214: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 40008218: 81 c7 e0 08 ret 4000821c: 91 e8 20 00 restore %g0, 0, %o0 return NULL; if ( !the_class ) return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40008220: 40 00 14 78 call 4000d400 <_Objects_API_maximum_class> 40008224: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40008228: 80 a2 20 00 cmp %o0, 0 4000822c: 06 bf ff fb bl 40008218 <_Objects_Get_information+0x20> 40008230: 80 a2 00 19 cmp %o0, %i1 40008234: 2a 80 00 12 bcs,a 4000827c <_Objects_Get_information+0x84> 40008238: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 4000823c: 85 2e 20 02 sll %i0, 2, %g2 40008240: 03 10 00 6a sethi %hi(0x4001a800), %g1 40008244: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 4001a9a0 <_Objects_Information_table> 40008248: c4 00 40 02 ld [ %g1 + %g2 ], %g2 4000824c: 80 a0 a0 00 cmp %g2, 0 40008250: 02 80 00 0b be 4000827c <_Objects_Get_information+0x84> 40008254: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40008258: 83 2e 60 02 sll %i1, 2, %g1 4000825c: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40008260: 80 a6 20 00 cmp %i0, 0 40008264: 02 80 00 06 be 4000827c <_Objects_Get_information+0x84> 40008268: 01 00 00 00 nop * 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 ) 4000826c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40008270: 80 a0 60 00 cmp %g1, 0 40008274: 22 80 00 02 be,a 4000827c <_Objects_Get_information+0x84> 40008278: b0 10 20 00 clr %i0 return NULL; #endif return info; } 4000827c: 81 c7 e0 08 ret 40008280: 81 e8 00 00 restore 40019300 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 40019300: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 40019304: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40019308: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 4001930c: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 40019310: 22 80 00 02 be,a 40019318 <_Objects_Get_next+0x18> <== NOT EXECUTED 40019314: f2 06 20 08 ld [ %i0 + 8 ], %i1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 40019318: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001931c: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40019320: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40019324: 82 0e 40 10 and %i1, %l0, %g1 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 40019328: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001932c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 40019330: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40019334: 0a 80 00 0b bcs 40019360 <_Objects_Get_next+0x60> <== NOT EXECUTED 40019338: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 4001933c: 7f ff d5 74 call 4000e90c <_Objects_Get> <== NOT EXECUTED 40019340: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 40019344: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40019348: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001934c: 32 bf ff f6 bne,a 40019324 <_Objects_Get_next+0x24> <== NOT EXECUTED 40019350: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 40019354: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40019358: 81 c7 e0 08 ret <== NOT EXECUTED 4001935c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 40019360: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40019364: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40019368: 90 10 20 00 clr %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 4001936c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40019370: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 40019374: 81 c7 e0 08 ret <== NOT EXECUTED 40019378: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400095fc <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 400095fc: 9d e3 bf 90 save %sp, -112, %sp 40009600: 92 10 00 18 mov %i0, %o1 Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 40009604: 80 a6 60 00 cmp %i1, 0 40009608: 02 80 00 24 be 40009698 <_Objects_Id_to_name+0x9c> 4000960c: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 40009610: 80 a2 60 00 cmp %o1, 0 40009614: 02 80 00 26 be 400096ac <_Objects_Id_to_name+0xb0> 40009618: 03 10 00 7c sethi %hi(0x4001f000), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000961c: 83 32 60 18 srl %o1, 0x18, %g1 40009620: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40009624: 84 00 7f ff add %g1, -1, %g2 40009628: 80 a0 a0 03 cmp %g2, 3 4000962c: 38 80 00 1b bgu,a 40009698 <_Objects_Id_to_name+0x9c> 40009630: b0 10 20 03 mov 3, %i0 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 40009634: 85 28 60 02 sll %g1, 2, %g2 40009638: 03 10 00 7b sethi %hi(0x4001ec00), %g1 4000963c: 82 10 63 b0 or %g1, 0x3b0, %g1 ! 4001efb0 <_Objects_Information_table> 40009640: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40009644: 80 a0 a0 00 cmp %g2, 0 40009648: 02 80 00 16 be 400096a0 <_Objects_Id_to_name+0xa4> 4000964c: 83 32 60 1b srl %o1, 0x1b, %g1 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 40009650: 83 28 60 02 sll %g1, 2, %g1 40009654: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 40009658: 80 a2 20 00 cmp %o0, 0 4000965c: 02 80 00 0f be 40009698 <_Objects_Id_to_name+0x9c> 40009660: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 40009664: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 40009668: 80 a0 60 00 cmp %g1, 0 4000966c: 12 80 00 0e bne 400096a4 <_Objects_Id_to_name+0xa8> 40009670: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 40009674: 7f ff ff c5 call 40009588 <_Objects_Get> 40009678: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 4000967c: 80 a2 20 00 cmp %o0, 0 40009680: 22 80 00 06 be,a 40009698 <_Objects_Id_to_name+0x9c> 40009684: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 40009688: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 4000968c: b0 10 20 00 clr %i0 40009690: 40 00 02 5b call 40009ffc <_Thread_Enable_dispatch> 40009694: c2 26 40 00 st %g1, [ %i1 ] 40009698: 81 c7 e0 08 ret 4000969c: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 400096a0: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 400096a4: 81 c7 e0 08 ret <== NOT EXECUTED 400096a8: 81 e8 00 00 restore <== NOT EXECUTED Objects_Locations ignored_location; if ( !name ) return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 400096ac: c4 00 61 10 ld [ %g1 + 0x110 ], %g2 400096b0: d2 00 a0 08 ld [ %g2 + 8 ], %o1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400096b4: 83 32 60 18 srl %o1, 0x18, %g1 400096b8: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 400096bc: 84 00 7f ff add %g1, -1, %g2 400096c0: 80 a0 a0 03 cmp %g2, 3 400096c4: 38 bf ff f5 bgu,a 40009698 <_Objects_Id_to_name+0x9c> 400096c8: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 400096cc: 10 bf ff db b 40009638 <_Objects_Id_to_name+0x3c> 400096d0: 85 28 60 02 sll %g1, 2, %g2 40013a20 <_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 ) { 40013a20: 9d e3 bf 98 save %sp, -104, %sp 40013a24: a8 10 00 18 mov %i0, %l4 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 40013a28: 80 a6 a0 00 cmp %i2, 0 40013a2c: 02 80 00 1d be 40013aa0 <_Objects_Name_to_id_string+0x80> 40013a30: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 40013a34: 80 a6 60 00 cmp %i1, 0 40013a38: 22 80 00 1a be,a 40013aa0 <_Objects_Name_to_id_string+0x80> 40013a3c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 40013a40: e6 15 20 10 lduh [ %l4 + 0x10 ], %l3 40013a44: 80 a4 e0 00 cmp %l3, 0 40013a48: 22 80 00 16 be,a 40013aa0 <_Objects_Name_to_id_string+0x80> 40013a4c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40013a50: e4 05 20 1c ld [ %l4 + 0x1c ], %l2 40013a54: a0 10 20 01 mov 1, %l0 the_object = information->local_table[ index ]; 40013a58: 83 2c 20 02 sll %l0, 2, %g1 40013a5c: e2 04 80 01 ld [ %l2 + %g1 ], %l1 if ( !the_object ) 40013a60: 80 a4 60 00 cmp %l1, 0 40013a64: 02 80 00 0b be 40013a90 <_Objects_Name_to_id_string+0x70> 40013a68: a0 04 20 01 inc %l0 continue; if ( !the_object->name.name_p ) 40013a6c: d2 04 60 0c ld [ %l1 + 0xc ], %o1 40013a70: 80 a2 60 00 cmp %o1, 0 40013a74: 02 80 00 07 be 40013a90 <_Objects_Name_to_id_string+0x70> 40013a78: 90 10 00 19 mov %i1, %o0 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 40013a7c: 40 00 0c cf call 40016db8 40013a80: d4 15 20 3a lduh [ %l4 + 0x3a ], %o2 40013a84: 80 a2 20 00 cmp %o0, 0 40013a88: 22 80 00 08 be,a 40013aa8 <_Objects_Name_to_id_string+0x88> 40013a8c: c2 04 60 08 ld [ %l1 + 8 ], %g1 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40013a90: 80 a4 00 13 cmp %l0, %l3 40013a94: 08 bf ff f2 bleu 40013a5c <_Objects_Name_to_id_string+0x3c> 40013a98: 83 2c 20 02 sll %l0, 2, %g1 40013a9c: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 40013aa0: 81 c7 e0 08 ret 40013aa4: 81 e8 00 00 restore if ( !the_object->name.name_p ) continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { *id = the_object->id; 40013aa8: c2 26 80 00 st %g1, [ %i2 ] 40013aac: 81 c7 e0 08 ret 40013ab0: 91 e8 20 00 restore %g0, 0, %o0 4000847c <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 4000847c: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 40008480: 80 a2 e0 00 cmp %o3, 0 40008484: 02 80 00 20 be 40008504 <_Objects_Name_to_id_u32+0x88> 40008488: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 4000848c: 80 a2 60 00 cmp %o1, 0 40008490: 22 80 00 1d be,a 40008504 <_Objects_Name_to_id_u32+0x88> 40008494: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40008498: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 4000849c: 85 28 60 10 sll %g1, 0x10, %g2 400084a0: 80 a0 a0 00 cmp %g2, 0 400084a4: 22 80 00 18 be,a 40008504 <_Objects_Name_to_id_u32+0x88> 400084a8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 400084ac: 80 a2 a0 00 cmp %o2, 0 400084b0: 12 80 00 17 bne 4000850c <_Objects_Name_to_id_u32+0x90> 400084b4: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 400084b8: 89 30 a0 10 srl %g2, 0x10, %g4 400084bc: 80 a1 20 00 cmp %g4, 0 400084c0: 02 80 00 11 be 40008504 <_Objects_Name_to_id_u32+0x88> 400084c4: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 400084c8: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 400084cc: 86 10 20 01 mov 1, %g3 if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 400084d0: 83 28 e0 02 sll %g3, 2, %g1 400084d4: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 400084d8: 80 a0 a0 00 cmp %g2, 0 400084dc: 02 80 00 06 be 400084f4 <_Objects_Name_to_id_u32+0x78> 400084e0: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 400084e4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 400084e8: 80 a0 40 09 cmp %g1, %o1 400084ec: 22 80 00 0f be,a 40008528 <_Objects_Name_to_id_u32+0xac> 400084f0: c2 00 a0 08 ld [ %g2 + 8 ], %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 400084f4: 80 a0 c0 04 cmp %g3, %g4 400084f8: 08 bf ff f7 bleu 400084d4 <_Objects_Name_to_id_u32+0x58> 400084fc: 83 28 e0 02 sll %g3, 2, %g1 40008500: 90 10 20 01 mov 1, %o0 name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif } 40008504: 81 c3 e0 08 retl 40008508: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 4000850c: 82 10 63 ff or %g1, 0x3ff, %g1 40008510: 80 a2 80 01 cmp %o2, %g1 40008514: 02 bf ff e9 be 400084b8 <_Objects_Name_to_id_u32+0x3c> 40008518: 80 a2 a0 01 cmp %o2, 1 4000851c: 02 bf ff e7 be 400084b8 <_Objects_Name_to_id_u32+0x3c> 40008520: 90 10 20 01 mov 1, %o0 40008524: 30 bf ff f8 b,a 40008504 <_Objects_Name_to_id_u32+0x88> the_object = information->local_table[ index ]; if ( !the_object ) continue; if ( name == the_object->name.name_u32 ) { *id = the_object->id; 40008528: 90 10 20 00 clr %o0 4000852c: 81 c3 e0 08 retl 40008530: c2 22 c0 00 st %g1, [ %o3 ] 4000853c <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 4000853c: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 40008540: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Search the list to find block or chunnk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; 40008544: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40008548: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 4000854c: 03 00 00 3f sethi %hi(0xfc00), %g1 40008550: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008554: 92 10 00 10 mov %l0, %o1 40008558: a4 08 80 01 and %g2, %g1, %l2 4000855c: 40 00 34 cc call 4001588c <.udiv> 40008560: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 40008564: 80 a2 20 00 cmp %o0, 0 40008568: 02 80 00 12 be 400085b0 <_Objects_Shrink_information+0x74> 4000856c: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40008570: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 40008574: c2 00 c0 00 ld [ %g3 ], %g1 40008578: 80 a4 00 01 cmp %l0, %g1 4000857c: 12 80 00 09 bne 400085a0 <_Objects_Shrink_information+0x64> 40008580: a2 10 20 04 mov 4, %l1 40008584: 10 80 00 0d b 400085b8 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 40008588: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4000858c: a4 04 80 10 add %l2, %l0, %l2 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 ] == information->allocation_size ) { 40008590: 80 a4 00 01 cmp %l0, %g1 40008594: 02 80 00 09 be 400085b8 <_Objects_Shrink_information+0x7c> 40008598: 82 04 60 04 add %l1, 4, %g1 4000859c: a2 10 00 01 mov %g1, %l1 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 400085a0: 84 00 a0 01 inc %g2 400085a4: 80 a2 00 02 cmp %o0, %g2 400085a8: 38 bf ff f9 bgu,a 4000858c <_Objects_Shrink_information+0x50> 400085ac: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 400085b0: 81 c7 e0 08 ret 400085b4: 81 e8 00 00 restore 400085b8: 03 00 00 3f sethi %hi(0xfc00), %g1 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 400085bc: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 400085c0: 10 80 00 0f b 400085fc <_Objects_Shrink_information+0xc0> 400085c4: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 400085c8: 82 04 80 01 add %l2, %g1, %g1 400085cc: 80 a0 40 03 cmp %g1, %g3 400085d0: 08 80 00 10 bleu 40008610 <_Objects_Shrink_information+0xd4> 400085d4: 90 10 00 02 mov %g2, %o0 if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 400085d8: 40 00 12 25 call 4000ce6c <_Chain_Extract> 400085dc: e0 00 80 00 ld [ %g2 ], %l0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 400085e0: 80 a4 20 00 cmp %l0, 0 400085e4: 22 80 00 10 be,a 40008624 <_Objects_Shrink_information+0xe8> 400085e8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 400085ec: c2 04 00 00 ld [ %l0 ], %g1 400085f0: 80 a0 60 00 cmp %g1, 0 400085f4: 02 80 00 0b be 40008620 <_Objects_Shrink_information+0xe4> 400085f8: 84 10 00 10 mov %l0, %g2 400085fc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008600: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40008604: 80 a0 c0 12 cmp %g3, %l2 40008608: 3a bf ff f0 bcc,a 400085c8 <_Objects_Shrink_information+0x8c> 4000860c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40008610: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40008614: 80 a4 20 00 cmp %l0, 0 40008618: 32 bf ff f6 bne,a 400085f0 <_Objects_Shrink_information+0xb4> 4000861c: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40008620: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40008624: 40 00 06 fb call 4000a210 <_Workspace_Free> 40008628: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 4000862c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40008630: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40008634: c0 20 80 11 clr [ %g2 + %l1 ] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40008638: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 4000863c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40008640: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40008644: 82 20 40 02 sub %g1, %g2, %g1 40008648: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 4000864c: 81 c7 e0 08 ret 40008650: 81 e8 00 00 restore 40007188 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40007188: 9d e3 bf 98 save %sp, -104, %sp /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; 4000718c: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 40007190: 80 a6 20 00 cmp %i0, 0 40007194: 02 80 00 1f be 40007210 <_POSIX_API_Initialize+0x88> 40007198: 03 10 00 63 sethi %hi(0x40018c00), %g1 api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 4000719c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 400071a0: 05 10 00 6a sethi %hi(0x4001a800), %g2 400071a4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 400071a8: 82 10 63 14 or %g1, 0x314, %g1 ! 4001af14 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 400071ac: 40 00 14 82 call 4000c3b4 <_POSIX_signals_Manager_Initialization> 400071b0: c2 20 a1 ac st %g1, [ %g2 + 0x1ac ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 400071b4: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 400071b8: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 400071bc: 40 00 15 0a call 4000c5e4 <_POSIX_Threads_Manager_initialization> 400071c0: d0 06 00 00 ld [ %i0 ], %o0 api_configuration->maximum_threads, api_configuration->number_of_initialization_threads, api_configuration->User_initialization_threads_table ); _POSIX_Condition_variables_Manager_initialization( 400071c4: 40 00 14 25 call 4000c258 <_POSIX_Condition_variables_Manager_initialization> 400071c8: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 400071cc: 40 00 14 30 call 4000c28c <_POSIX_Key_Manager_initialization> 400071d0: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 400071d4: 40 00 14 51 call 4000c318 <_POSIX_Mutex_Manager_initialization> 400071d8: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 400071dc: 40 00 14 39 call 4000c2c0 <_POSIX_Message_queue_Manager_initialization> 400071e0: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 400071e4: 40 00 15 c7 call 4000c900 <_POSIX_Semaphore_Manager_initialization> 400071e8: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 400071ec: 40 00 15 b8 call 4000c8cc <_POSIX_Timer_Manager_initialization> 400071f0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 400071f4: 40 00 14 56 call 4000c34c <_POSIX_Barrier_Manager_initialization> 400071f8: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 400071fc: 40 00 14 61 call 4000c380 <_POSIX_RWLock_Manager_initialization> 40007200: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40007204: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40007208: 40 00 14 e0 call 4000c588 <_POSIX_Spinlock_Manager_initialization> 4000720c: 81 e8 00 00 restore /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) 40007210: 10 bf ff e3 b 4000719c <_POSIX_API_Initialize+0x14> <== NOT EXECUTED 40007214: b0 10 62 08 or %g1, 0x208, %i0 <== NOT EXECUTED 400072fc <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 400072fc: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40007300: 80 a6 20 00 cmp %i0, 0 40007304: 02 80 00 12 be 4000734c <_POSIX_Condition_variables_Get+0x50> 40007308: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 4000730c: f2 06 00 00 ld [ %i0 ], %i1 40007310: 80 a6 7f ff cmp %i1, -1 40007314: 02 80 00 05 be 40007328 <_POSIX_Condition_variables_Get+0x2c> 40007318: 90 10 00 18 mov %i0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 4000731c: 31 10 00 62 sethi %hi(0x40018800), %i0 40007320: 40 00 0c 52 call 4000a468 <_Objects_Get> 40007324: 91 ee 20 24 restore %i0, 0x24, %o0 if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40007328: 40 00 00 0d call 4000735c <== NOT EXECUTED 4000732c: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40007330: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007334: 12 80 00 07 bne 40007350 <_POSIX_Condition_variables_Get+0x54> <== NOT EXECUTED 40007338: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000733c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40007340: 31 10 00 62 sethi %hi(0x40018800), %i0 <== NOT EXECUTED 40007344: 40 00 0c 49 call 4000a468 <_Objects_Get> <== NOT EXECUTED 40007348: 91 ee 20 24 restore %i0, 0x24, %o0 <== NOT EXECUTED * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); if ( status ) { *location = OBJECTS_ERROR; 4000734c: 82 10 20 01 mov 1, %g1 40007350: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 40007354: 81 c7 e0 08 ret 40007358: 91 e8 20 00 restore %g0, 0, %o0 40007514 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 40007514: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 40007518: a0 07 bf f4 add %fp, -12, %l0 4000751c: 90 10 00 19 mov %i1, %o0 40007520: 40 00 00 7f call 4000771c <_POSIX_Mutex_Get> 40007524: 92 10 00 10 mov %l0, %o1 40007528: 80 a2 20 00 cmp %o0, 0 4000752c: 22 80 00 18 be,a 4000758c <_POSIX_Condition_variables_Wait_support+0x78> 40007530: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40007534: 03 10 00 60 sethi %hi(0x40018000), %g1 40007538: c4 00 63 90 ld [ %g1 + 0x390 ], %g2 ! 40018390 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 4000753c: 92 10 00 10 mov %l0, %o1 40007540: 84 00 bf ff add %g2, -1, %g2 40007544: 90 10 00 18 mov %i0, %o0 40007548: c4 20 63 90 st %g2, [ %g1 + 0x390 ] 4000754c: 7f ff ff 6c call 400072fc <_POSIX_Condition_variables_Get> 40007550: 01 00 00 00 nop switch ( location ) { 40007554: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007558: 80 a0 60 00 cmp %g1, 0 4000755c: 12 80 00 1a bne 400075c4 <_POSIX_Condition_variables_Wait_support+0xb0> 40007560: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 40007564: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40007568: 80 a0 a0 00 cmp %g2, 0 4000756c: 02 80 00 0a be 40007594 <_POSIX_Condition_variables_Wait_support+0x80> 40007570: 01 00 00 00 nop 40007574: c2 06 40 00 ld [ %i1 ], %g1 40007578: 80 a0 80 01 cmp %g2, %g1 4000757c: 02 80 00 06 be 40007594 <_POSIX_Condition_variables_Wait_support+0x80> 40007580: 01 00 00 00 nop _Thread_Enable_dispatch(); 40007584: 40 00 0d f2 call 4000ad4c <_Thread_Enable_dispatch> <== NOT EXECUTED 40007588: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 4000758c: 81 c7 e0 08 ret 40007590: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 40007594: 40 00 00 ff call 40007990 40007598: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 4000759c: 80 8e e0 ff btst 0xff, %i3 400075a0: 22 80 00 0b be,a 400075cc <_POSIX_Condition_variables_Wait_support+0xb8> 400075a4: c2 06 40 00 ld [ %i1 ], %g1 status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 400075a8: 40 00 0d e9 call 4000ad4c <_Thread_Enable_dispatch> 400075ac: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 400075b0: 40 00 00 d7 call 4000790c 400075b4: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 400075b8: 80 a2 20 00 cmp %o0, 0 400075bc: 02 80 00 1c be 4000762c <_POSIX_Condition_variables_Wait_support+0x118> 400075c0: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 400075c4: 81 c7 e0 08 ret 400075c8: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 400075cc: 21 10 00 61 sethi %hi(0x40018400), %l0 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 400075d0: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 400075d4: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 400075d8: c8 06 00 00 ld [ %i0 ], %g4 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 400075dc: 86 04 60 18 add %l1, 0x18, %g3 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; 400075e0: 82 10 20 01 mov 1, %g1 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 400075e4: 92 10 00 1a mov %i2, %o1 400075e8: 90 10 00 03 mov %g3, %o0 400075ec: 15 10 00 2d sethi %hi(0x4000b400), %o2 400075f0: 94 12 a3 20 or %o2, 0x320, %o2 ! 4000b720 <_Thread_queue_Timeout> 400075f4: c2 24 60 48 st %g1, [ %l1 + 0x48 ] the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 400075f8: c8 20 a0 20 st %g4, [ %g2 + 0x20 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 400075fc: c0 20 a0 34 clr [ %g2 + 0x34 ] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 40007600: 40 00 0f 12 call 4000b248 <_Thread_queue_Enqueue_with_handler> 40007604: c6 20 a0 44 st %g3, [ %g2 + 0x44 ] _Thread_Enable_dispatch(); 40007608: 40 00 0d d1 call 4000ad4c <_Thread_Enable_dispatch> 4000760c: 01 00 00 00 nop /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 40007610: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 40007614: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 40007618: 80 a6 20 00 cmp %i0, 0 4000761c: 02 bf ff e5 be 400075b0 <_POSIX_Condition_variables_Wait_support+0x9c> 40007620: 80 a6 20 74 cmp %i0, 0x74 40007624: 02 bf ff e3 be 400075b0 <_POSIX_Condition_variables_Wait_support+0x9c> 40007628: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 4000762c: 81 c7 e0 08 ret 40007630: 81 e8 00 00 restore 4000dfa8 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000dfa8: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000dfac: 03 10 00 6b sethi %hi(0x4001ac00), %g1 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4000dfb0: c6 06 20 08 ld [ %i0 + 8 ], %g3 4000dfb4: a4 10 62 94 or %g1, 0x294, %l2 4000dfb8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 4000dfbc: 85 30 e0 18 srl %g3, 0x18, %g2 4000dfc0: 89 28 60 10 sll %g1, 0x10, %g4 4000dfc4: 84 08 a0 07 and %g2, 7, %g2 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { value = the_key->Values[ thread_api ][ thread_index ]; 4000dfc8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000dfcc: 84 00 a0 06 add %g2, 6, %g2 4000dfd0: 82 10 63 ff or %g1, 0x3ff, %g1 4000dfd4: ab 28 a0 02 sll %g2, 2, %l5 4000dfd8: 86 08 c0 01 and %g3, %g1, %g3 4000dfdc: a8 10 20 00 clr %l4 4000dfe0: a7 28 e0 02 sll %g3, 2, %l3 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000dfe4: 80 a1 20 00 cmp %g4, 0 4000dfe8: 02 80 00 29 be 4000e08c <_POSIX_Keys_Run_destructors+0xe4> 4000dfec: a0 10 20 01 mov 1, %l0 4000dff0: a2 10 20 01 mov 1, %l1 the_key = (POSIX_Keys_Control *) 4000dff4: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 4000dff8: 83 2c 20 02 sll %l0, 2, %g1 4000dffc: f0 00 80 01 ld [ %g2 + %g1 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000e000: 80 a6 20 00 cmp %i0, 0 4000e004: 02 80 00 16 be 4000e05c <_POSIX_Keys_Run_destructors+0xb4> 4000e008: a0 04 20 01 inc %l0 4000e00c: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 4000e010: 80 a0 60 00 cmp %g1, 0 4000e014: 22 80 00 13 be,a 4000e060 <_POSIX_Keys_Run_destructors+0xb8> 4000e018: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED 4000e01c: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000e020: 80 a0 e0 00 cmp %g3, 0 4000e024: 22 80 00 0f be,a 4000e060 <_POSIX_Keys_Run_destructors+0xb8> 4000e028: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000e02c: c2 06 00 15 ld [ %i0 + %l5 ], %g1 4000e030: c4 00 40 13 ld [ %g1 + %l3 ], %g2 if ( value ) { 4000e034: 90 90 a0 00 orcc %g2, 0, %o0 4000e038: 22 80 00 0a be,a 4000e060 <_POSIX_Keys_Run_destructors+0xb8> 4000e03c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000e040: 9f c0 c0 00 call %g3 4000e044: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000e048: c2 06 00 15 ld [ %i0 + %l5 ], %g1 4000e04c: c4 00 40 13 ld [ %g1 + %l3 ], %g2 4000e050: 80 a0 00 02 cmp %g0, %g2 4000e054: 82 40 3f ff addx %g0, -1, %g1 4000e058: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000e05c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 4000e060: 89 28 60 10 sll %g1, 0x10, %g4 4000e064: 83 31 20 10 srl %g4, 0x10, %g1 4000e068: 80 a0 40 10 cmp %g1, %l0 4000e06c: 3a bf ff e3 bcc,a 4000dff8 <_POSIX_Keys_Run_destructors+0x50> 4000e070: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000e074: 80 8c 60 ff btst 0xff, %l1 4000e078: 12 80 00 05 bne 4000e08c <_POSIX_Keys_Run_destructors+0xe4> 4000e07c: a8 05 20 01 inc %l4 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 4000e080: 80 a5 20 04 cmp %l4, 4 4000e084: 12 bf ff d9 bne 4000dfe8 <_POSIX_Keys_Run_destructors+0x40> 4000e088: 80 a1 20 00 cmp %g4, 0 4000e08c: 81 c7 e0 08 ret 4000e090: 81 e8 00 00 restore 40012530 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40012530: 9d e3 bf 98 save %sp, -104, %sp CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 40012534: 92 10 20 ff mov 0xff, %o1 40012538: 90 10 00 18 mov %i0, %o0 4001253c: 40 00 12 af call 40016ff8 40012540: a8 10 00 18 mov %i0, %l4 if ( n > NAME_MAX ) 40012544: b0 10 20 5b mov 0x5b, %i0 40012548: 80 a2 20 ff cmp %o0, 0xff 4001254c: 18 80 00 37 bgu 40012628 <_POSIX_Message_queue_Create_support+0xf8> 40012550: a4 10 00 08 mov %o0, %l2 40012554: 05 10 00 94 sethi %hi(0x40025000), %g2 40012558: c2 00 a2 30 ld [ %g2 + 0x230 ], %g1 ! 40025230 <_Thread_Dispatch_disable_level> 4001255c: 82 00 60 01 inc %g1 40012560: c2 20 a2 30 st %g1, [ %g2 + 0x230 ] * 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 ) { 40012564: 80 a6 a0 00 cmp %i2, 0 40012568: 22 80 00 32 be,a 40012630 <_POSIX_Message_queue_Create_support+0x100> 4001256c: b4 10 20 10 mov 0x10, %i2 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 40012570: e2 06 a0 04 ld [ %i2 + 4 ], %l1 40012574: 80 a4 60 00 cmp %l1, 0 40012578: 04 80 00 3d ble 4001266c <_POSIX_Message_queue_Create_support+0x13c> 4001257c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 40012580: f4 06 a0 08 ld [ %i2 + 8 ], %i2 40012584: 80 a6 a0 00 cmp %i2, 0 40012588: 04 80 00 39 ble 4001266c <_POSIX_Message_queue_Create_support+0x13c> 4001258c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 40012590: 27 10 00 95 sethi %hi(0x40025400), %l3 40012594: 7f ff ee 03 call 4000dda0 <_Objects_Allocate> 40012598: 90 14 e1 c0 or %l3, 0x1c0, %o0 ! 400255c0 <_POSIX_Message_queue_Information> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 4001259c: a0 92 20 00 orcc %o0, 0, %l0 400125a0: 02 80 00 3b be 4001268c <_POSIX_Message_queue_Create_support+0x15c> 400125a4: 84 10 20 01 mov 1, %g2 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 400125a8: 82 10 20 01 mov 1, %g1 if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 400125ac: f2 24 20 10 st %i1, [ %l0 + 0x10 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 400125b0: 90 10 00 12 mov %l2, %o0 } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 400125b4: c4 2c 20 15 stb %g2, [ %l0 + 0x15 ] rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; 400125b8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 400125bc: 7f ff f7 7b call 400103a8 <_Workspace_Allocate> 400125c0: c2 2c 20 14 stb %g1, [ %l0 + 0x14 ] if (!name) { 400125c4: b2 92 20 00 orcc %o0, 0, %i1 400125c8: 22 80 00 39 be,a 400126ac <_POSIX_Message_queue_Create_support+0x17c> 400125cc: 90 14 e1 c0 or %l3, 0x1c0, %o0 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 400125d0: 40 00 10 1f call 4001664c 400125d4: 92 10 00 14 mov %l4, %o1 */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 400125d8: 94 10 00 11 mov %l1, %o2 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 400125dc: c0 24 20 5c clr [ %l0 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 400125e0: 96 10 00 1a mov %i2, %o3 400125e4: 90 04 20 1c add %l0, 0x1c, %o0 400125e8: 40 00 03 80 call 400133e8 <_CORE_message_queue_Initialize> 400125ec: 92 04 20 5c add %l0, 0x5c, %o1 400125f0: 80 8a 20 ff btst 0xff, %o0 400125f4: 02 80 00 11 be 40012638 <_POSIX_Message_queue_Create_support+0x108> 400125f8: 82 14 e1 c0 or %l3, 0x1c0, %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400125fc: c4 04 20 08 ld [ %l0 + 8 ], %g2 40012600: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 40012604: 03 00 00 3f sethi %hi(0xfc00), %g1 40012608: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4001260c: 84 08 80 01 and %g2, %g1, %g2 40012610: 85 28 a0 02 sll %g2, 2, %g2 40012614: e0 20 c0 02 st %l0, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 40012618: f2 24 20 0c st %i1, [ %l0 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 4001261c: e0 26 c0 00 st %l0, [ %i3 ] _Thread_Enable_dispatch(); 40012620: 7f ff f1 ad call 4000ecd4 <_Thread_Enable_dispatch> 40012624: b0 10 20 00 clr %i0 return 0; } 40012628: 81 c7 e0 08 ret 4001262c: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40012630: 10 bf ff d8 b 40012590 <_POSIX_Message_queue_Create_support+0x60> 40012634: a2 10 20 0a mov 0xa, %l1 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 40012638: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001263c: 7f ff ee d4 call 4000e18c <_Objects_Free> <== NOT EXECUTED 40012640: 90 14 e1 c0 or %l3, 0x1c0, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 40012644: 7f ff f7 52 call 4001038c <_Workspace_Free> <== NOT EXECUTED 40012648: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 4001264c: 7f ff f1 a2 call 4000ecd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012650: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 40012654: 40 00 0a ca call 4001517c <__errno> <== NOT EXECUTED 40012658: 01 00 00 00 nop <== NOT EXECUTED 4001265c: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40012660: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40012664: 81 c7 e0 08 ret <== NOT EXECUTED 40012668: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); 4001266c: 7f ff f1 9a call 4000ecd4 <_Thread_Enable_dispatch> 40012670: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 40012674: 40 00 0a c2 call 4001517c <__errno> 40012678: 01 00 00 00 nop 4001267c: 82 10 20 16 mov 0x16, %g1 ! 16 40012680: c2 22 00 00 st %g1, [ %o0 ] 40012684: 81 c7 e0 08 ret 40012688: 81 e8 00 00 restore attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 4001268c: 7f ff f1 92 call 4000ecd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40012690: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 40012694: 40 00 0a ba call 4001517c <__errno> <== NOT EXECUTED 40012698: 01 00 00 00 nop <== NOT EXECUTED 4001269c: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED 400126a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400126a4: 81 c7 e0 08 ret <== NOT EXECUTED 400126a8: 81 e8 00 00 restore <== NOT EXECUTED 400126ac: 7f ff ee b8 call 4000e18c <_Objects_Free> <== NOT EXECUTED 400126b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 400126b4: 7f ff f1 88 call 4000ecd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 400126b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 400126bc: 40 00 0a b0 call 4001517c <__errno> <== NOT EXECUTED 400126c0: 01 00 00 00 nop <== NOT EXECUTED 400126c4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400126c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400126cc: 81 c7 e0 08 ret <== NOT EXECUTED 400126d0: 81 e8 00 00 restore <== NOT EXECUTED 4000a840 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 4000a840: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 4000a844: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 4000a848: 80 a0 60 00 cmp %g1, 0 4000a84c: 12 80 00 16 bne 4000a8a4 <_POSIX_Message_queue_Delete+0x64> 4000a850: b2 10 00 18 mov %i0, %i1 4000a854: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000a858: 80 a0 60 00 cmp %g1, 0 4000a85c: 12 80 00 12 bne 4000a8a4 <_POSIX_Message_queue_Delete+0x64> 4000a860: 01 00 00 00 nop /* the name memory may have been freed by unlink. */ Objects_Control *the_object = &the_mq->Object; if ( the_object->name.name_p ) 4000a864: d0 06 20 0c ld [ %i0 + 0xc ], %o0 4000a868: 80 a2 20 00 cmp %o0, 0 4000a86c: 02 80 00 04 be 4000a87c <_POSIX_Message_queue_Delete+0x3c> 4000a870: 31 10 00 95 sethi %hi(0x40025400), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 4000a874: 40 00 16 c6 call 4001038c <_Workspace_Free> <== NOT EXECUTED 4000a878: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 4000a87c: 92 10 00 19 mov %i1, %o1 4000a880: 40 00 0d 74 call 4000de50 <_Objects_Close> 4000a884: 90 16 21 c0 or %i0, 0x1c0, %o0 _CORE_message_queue_Close( 4000a888: 90 06 60 1c add %i1, 0x1c, %o0 4000a88c: 92 10 20 00 clr %o1 4000a890: 94 10 20 05 mov 5, %o2 4000a894: 40 00 0a 5c call 4000d204 <_CORE_message_queue_Close> 4000a898: b0 16 21 c0 or %i0, 0x1c0, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 4000a89c: 40 00 0e 3c call 4000e18c <_Objects_Free> 4000a8a0: 81 e8 00 00 restore 4000a8a4: 81 c7 e0 08 ret 4000a8a8: 81 e8 00 00 restore 4000ad9c <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 4000ad9c: 9d e3 bf 88 save %sp, -120, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4000ada0: 80 a6 e0 20 cmp %i3, 0x20 4000ada4: 18 80 00 47 bgu 4000aec0 <_POSIX_Message_queue_Send_support+0x124> 4000ada8: 11 10 00 95 sethi %hi(0x40025400), %o0 4000adac: 92 10 00 18 mov %i0, %o1 4000adb0: 90 12 23 3c or %o0, 0x33c, %o0 4000adb4: 40 00 0d 63 call 4000e340 <_Objects_Get> 4000adb8: 94 07 bf f4 add %fp, -12, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000adbc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000adc0: 80 a0 60 00 cmp %g1, 0 4000adc4: 12 80 00 31 bne 4000ae88 <_POSIX_Message_queue_Send_support+0xec> 4000adc8: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4000adcc: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 4000add0: 80 88 a0 03 btst 3, %g2 4000add4: 02 80 00 41 be 4000aed8 <_POSIX_Message_queue_Send_support+0x13c> 4000add8: 80 8f 20 ff btst 0xff, %i4 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000addc: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000ade0: 12 80 00 15 bne 4000ae34 <_POSIX_Message_queue_Send_support+0x98> 4000ade4: 82 10 20 00 clr %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4000ade8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] <== NOT EXECUTED 4000adec: fa 23 a0 60 st %i5, [ %sp + 0x60 ] <== NOT EXECUTED 4000adf0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000adf4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 4000adf8: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 4000adfc: 9a 20 00 1b neg %i3, %o5 <== NOT EXECUTED 4000ae00: 98 10 20 00 clr %o4 <== NOT EXECUTED 4000ae04: 40 00 09 65 call 4000d398 <_CORE_message_queue_Submit> <== NOT EXECUTED 4000ae08: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4000ae0c: 40 00 0f b2 call 4000ecd4 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000ae10: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED * 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 ) 4000ae14: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED 4000ae18: 02 80 00 19 be 4000ae7c <_POSIX_Message_queue_Send_support+0xe0> <== NOT EXECUTED 4000ae1c: 03 10 00 94 sethi %hi(0x40025000), %g1 <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4000ae20: 80 a7 60 00 cmp %i5, 0 4000ae24: 12 80 00 1f bne 4000aea0 <_POSIX_Message_queue_Send_support+0x104> 4000ae28: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4000ae2c: 81 c7 e0 08 ret 4000ae30: 81 e8 00 00 restore the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000ae34: 83 30 a0 0e srl %g2, 0xe, %g1 4000ae38: 82 18 60 01 xor %g1, 1, %g1 4000ae3c: 82 08 60 01 and %g1, 1, %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4000ae40: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 4000ae44: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000ae48: 92 10 00 19 mov %i1, %o1 4000ae4c: 94 10 00 1a mov %i2, %o2 4000ae50: 96 10 00 18 mov %i0, %o3 4000ae54: 9a 20 00 1b neg %i3, %o5 4000ae58: 98 10 20 00 clr %o4 4000ae5c: 40 00 09 4f call 4000d398 <_CORE_message_queue_Submit> 4000ae60: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4000ae64: 40 00 0f 9c call 4000ecd4 <_Thread_Enable_dispatch> 4000ae68: ba 10 00 08 mov %o0, %i5 * 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 ) 4000ae6c: 80 a7 60 07 cmp %i5, 7 4000ae70: 12 bf ff ed bne 4000ae24 <_POSIX_Message_queue_Send_support+0x88> 4000ae74: 80 a7 60 00 cmp %i5, 0 msg_status = _Thread_Executing->Wait.return_code; 4000ae78: 03 10 00 94 sethi %hi(0x40025000), %g1 4000ae7c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 400252f0 <_Thread_Executing> 4000ae80: 10 bf ff e8 b 4000ae20 <_POSIX_Message_queue_Send_support+0x84> 4000ae84: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4000ae88: 40 00 28 bd call 4001517c <__errno> 4000ae8c: b0 10 3f ff mov -1, %i0 4000ae90: 82 10 20 09 mov 9, %g1 4000ae94: c2 22 00 00 st %g1, [ %o0 ] } 4000ae98: 81 c7 e0 08 ret 4000ae9c: 81 e8 00 00 restore msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 4000aea0: 40 00 28 b7 call 4001517c <__errno> 4000aea4: b0 10 3f ff mov -1, %i0 4000aea8: a0 10 00 08 mov %o0, %l0 4000aeac: 40 00 00 5b call 4000b018 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000aeb0: 90 10 00 1d mov %i5, %o0 4000aeb4: d0 24 00 00 st %o0, [ %l0 ] 4000aeb8: 81 c7 e0 08 ret 4000aebc: 81 e8 00 00 restore * 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 ); 4000aec0: 40 00 28 af call 4001517c <__errno> 4000aec4: b0 10 3f ff mov -1, %i0 4000aec8: 82 10 20 16 mov 0x16, %g1 4000aecc: c2 22 00 00 st %g1, [ %o0 ] 4000aed0: 81 c7 e0 08 ret 4000aed4: 81 e8 00 00 restore 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(); 4000aed8: 40 00 0f 7f call 4000ecd4 <_Thread_Enable_dispatch> 4000aedc: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 4000aee0: 40 00 28 a7 call 4001517c <__errno> 4000aee4: 01 00 00 00 nop 4000aee8: 82 10 20 09 mov 9, %g1 ! 9 4000aeec: c2 22 00 00 st %g1, [ %o0 ] 4000aef0: 81 c7 e0 08 ret 4000aef4: 81 e8 00 00 restore 40008418 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 40008418: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 4000841c: 80 a6 20 00 cmp %i0, 0 40008420: 02 80 00 12 be 40008468 <_POSIX_Mutex_Get+0x50> 40008424: b4 10 00 19 mov %i1, %i2 40008428: f2 06 00 00 ld [ %i0 ], %i1 4000842c: 80 a6 7f ff cmp %i1, -1 40008430: 02 80 00 05 be 40008444 <_POSIX_Mutex_Get+0x2c> 40008434: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 40008438: 31 10 00 69 sethi %hi(0x4001a400), %i0 4000843c: 40 00 0c 3c call 4000b52c <_Objects_Get> 40008440: 91 ee 23 b0 restore %i0, 0x3b0, %o0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008444: 40 00 00 20 call 400084c4 <== NOT EXECUTED 40008448: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000844c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008450: 12 80 00 07 bne 4000846c <_POSIX_Mutex_Get+0x54> <== NOT EXECUTED 40008454: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40008458: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 4000845c: 31 10 00 69 sethi %hi(0x4001a400), %i0 <== NOT EXECUTED 40008460: 40 00 0c 33 call 4000b52c <_Objects_Get> <== NOT EXECUTED 40008464: 91 ee 23 b0 restore %i0, 0x3b0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008468: 82 10 20 01 mov 1, %g1 4000846c: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 40008470: 81 c7 e0 08 ret 40008474: 91 e8 20 00 restore %g0, 0, %o0 400083b0 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 400083b0: 9d e3 bf 98 save %sp, -104, %sp 400083b4: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400083b8: 80 a6 20 00 cmp %i0, 0 400083bc: 02 80 00 13 be 40008408 <_POSIX_Mutex_Get_interrupt_disable+0x58> 400083c0: b6 10 00 1a mov %i2, %i3 400083c4: f2 06 00 00 ld [ %i0 ], %i1 400083c8: 80 a6 7f ff cmp %i1, -1 400083cc: 02 80 00 05 be 400083e0 <_POSIX_Mutex_Get_interrupt_disable+0x30> 400083d0: b4 10 00 10 mov %l0, %i2 return (POSIX_Mutex_Control *) 400083d4: 31 10 00 69 sethi %hi(0x4001a400), %i0 400083d8: 40 00 0c 37 call 4000b4b4 <_Objects_Get_isr_disable> 400083dc: 91 ee 23 b0 restore %i0, 0x3b0, %o0 ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400083e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400083e4: 40 00 00 38 call 400084c4 <== NOT EXECUTED 400083e8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400083ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400083f0: 12 80 00 06 bne 40008408 <_POSIX_Mutex_Get_interrupt_disable+0x58> <== NOT EXECUTED 400083f4: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED 400083f8: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 400083fc: 31 10 00 69 sethi %hi(0x4001a400), %i0 <== NOT EXECUTED 40008400: 40 00 0c 2d call 4000b4b4 <_Objects_Get_isr_disable> <== NOT EXECUTED 40008404: 91 ee 23 b0 restore %i0, 0x3b0, %o0 <== NOT EXECUTED ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008408: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000840c: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 40008410: 81 c7 e0 08 ret <== NOT EXECUTED 40008414: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000ff64 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4000ff64: 9d e3 bf 98 save %sp, -104, %sp 4000ff68: 03 10 00 84 sethi %hi(0x40021000), %g1 4000ff6c: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 400211e0 <_Thread_Dispatch_disable_level> 4000ff70: 84 00 a0 01 inc %g2 4000ff74: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 4000ff78: 80 a6 60 00 cmp %i1, 0 4000ff7c: 12 80 00 2e bne 40010034 <_POSIX_Semaphore_Create_support+0xd0> 4000ff80: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 4000ff84: 02 80 00 07 be 4000ffa0 <_POSIX_Semaphore_Create_support+0x3c> 4000ff88: 21 10 00 85 sethi %hi(0x40021400), %l0 if( strlen(name) > PATH_MAX ) { 4000ff8c: 40 00 0f d6 call 40013ee4 4000ff90: 90 10 00 18 mov %i0, %o0 4000ff94: 80 a2 20 ff cmp %o0, 0xff 4000ff98: 18 80 00 2f bgu 40010054 <_POSIX_Semaphore_Create_support+0xf0> 4000ff9c: 21 10 00 85 sethi %hi(0x40021400), %l0 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4000ffa0: 7f ff ec 21 call 4000b024 <_Objects_Allocate> 4000ffa4: 90 14 20 f0 or %l0, 0xf0, %o0 ! 400214f0 <_POSIX_Semaphore_Information> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4000ffa8: b2 92 20 00 orcc %o0, 0, %i1 4000ffac: 02 80 00 32 be 40010074 <_POSIX_Semaphore_Create_support+0x110> 4000ffb0: 80 a6 20 00 cmp %i0, 0 rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; if ( name ) { 4000ffb4: 02 80 00 1c be 40010024 <_POSIX_Semaphore_Create_support+0xc0> 4000ffb8: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000ffbc: 84 10 20 01 mov 1, %g2 } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000ffc0: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 4000ffc4: c4 2e 60 15 stb %g2, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000ffc8: c4 26 60 18 st %g2, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000ffcc: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000ffd0: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000ffd4: 94 10 00 1a mov %i2, %o2 4000ffd8: 90 06 60 1c add %i1, 0x1c, %o0 4000ffdc: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000ffe0: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000ffe4: 7f ff ea e1 call 4000ab68 <_CORE_semaphore_Initialize> 4000ffe8: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000ffec: 82 14 20 f0 or %l0, 0xf0, %g1 4000fff0: c4 06 60 08 ld [ %i1 + 8 ], %g2 4000fff4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 4000fff8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000fffc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40010000: 84 08 80 01 and %g2, %g1, %g2 40010004: 85 28 a0 02 sll %g2, 2, %g2 40010008: f2 20 c0 02 st %i1, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 4001000c: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 40010010: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 40010014: 7f ff ef a5 call 4000bea8 <_Thread_Enable_dispatch> 40010018: b0 10 20 00 clr %i0 return 0; } 4001001c: 81 c7 e0 08 ret 40010020: 81 e8 00 00 restore if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 40010024: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 40010028: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 4001002c: 10 bf ff e9 b 4000ffd0 <_POSIX_Semaphore_Create_support+0x6c> 40010030: c0 2e 60 15 clrb [ %i1 + 0x15 ] _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); 40010034: 7f ff ef 9d call 4000bea8 <_Thread_Enable_dispatch> 40010038: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSYS ); 4001003c: 40 00 08 e0 call 400123bc <__errno> 40010040: 01 00 00 00 nop 40010044: 82 10 20 58 mov 0x58, %g1 ! 58 40010048: c2 22 00 00 st %g1, [ %o0 ] 4001004c: 81 c7 e0 08 ret 40010050: 81 e8 00 00 restore } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); 40010054: 7f ff ef 95 call 4000bea8 <_Thread_Enable_dispatch> <== NOT EXECUTED 40010058: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4001005c: 40 00 08 d8 call 400123bc <__errno> <== NOT EXECUTED 40010060: 01 00 00 00 nop <== NOT EXECUTED 40010064: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED 40010068: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001006c: 81 c7 e0 08 ret <== NOT EXECUTED 40010070: 81 e8 00 00 restore <== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 40010074: 7f ff ef 8d call 4000bea8 <_Thread_Enable_dispatch> 40010078: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSPC ); 4001007c: 40 00 08 d0 call 400123bc <__errno> 40010080: 01 00 00 00 nop 40010084: 82 10 20 1c mov 0x1c, %g1 ! 1c 40010088: c2 22 00 00 st %g1, [ %o0 ] 4001008c: 81 c7 e0 08 ret 40010090: 81 e8 00 00 restore 4000c848 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000c848: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000c84c: f0 06 61 60 ld [ %i1 + 0x160 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000c850: 40 00 04 37 call 4000d92c <_Timespec_To_ticks> 4000c854: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000c858: 80 a2 20 00 cmp %o0, 0 4000c85c: 22 80 00 02 be,a 4000c864 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000c860: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000c864: c2 06 20 98 ld [ %i0 + 0x98 ], %g1 the_thread->cpu_time_budget = ticks; new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000c868: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000c86c: 84 10 20 ff mov 0xff, %g2 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); if ( !ticks ) ticks = 1; the_thread->cpu_time_budget = ticks; 4000c870: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 4000c874: 92 20 80 01 sub %g2, %g1, %o1 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000c878: 80 a0 e0 00 cmp %g3, 0 4000c87c: 02 80 00 10 be 4000c8bc <_POSIX_Threads_Sporadic_budget_TSR+0x74> 4000c880: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000c884: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000c888: 80 a0 40 09 cmp %g1, %o1 4000c88c: 18 80 00 0d bgu 4000c8c0 <_POSIX_Threads_Sporadic_budget_TSR+0x78> 4000c890: 90 10 00 19 mov %i1, %o0 the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000c894: 40 00 04 26 call 4000d92c <_Timespec_To_ticks> 4000c898: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000c89c: 80 a2 20 00 cmp %o0, 0 4000c8a0: 22 80 00 02 be,a 4000c8a8 <_POSIX_Threads_Sporadic_budget_TSR+0x60> 4000c8a4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000c8a8: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000c8ac: b2 06 20 9c add %i0, 0x9c, %i1 4000c8b0: 31 10 00 6a sethi %hi(0x4001a800), %i0 4000c8b4: 7f ff f5 8b call 40009ee0 <_Watchdog_Insert> 4000c8b8: 91 ee 23 20 restore %i0, 0x320, %o0 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000c8bc: 90 10 00 19 mov %i1, %o0 4000c8c0: 7f ff ef 7c call 400086b0 <_Thread_Change_priority> 4000c8c4: 94 10 20 01 mov 1, %o2 4000c8c8: 30 bf ff f3 b,a 4000c894 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 4000c7f8 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000c7f8: c4 02 21 60 ld [ %o0 + 0x160 ], %g2 the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000c7fc: c8 02 20 1c ld [ %o0 + 0x1c ], %g4 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000c800: c6 00 a0 84 ld [ %g2 + 0x84 ], %g3 * 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 */ 4000c804: 82 10 3f ff mov -1, %g1 4000c808: 84 10 20 ff mov 0xff, %g2 4000c80c: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 4000c810: 92 20 80 03 sub %g2, %g3, %o1 new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000c814: 80 a1 20 00 cmp %g4, 0 4000c818: 02 80 00 06 be 4000c830 <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000c81c: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000c820: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000c824: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 4000c828: 08 80 00 06 bleu 4000c840 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000c82c: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000c830: 94 10 20 01 mov 1, %o2 ! 1 4000c834: 82 13 c0 00 mov %o7, %g1 4000c838: 7f ff ef 9e call 400086b0 <_Thread_Change_priority> 4000c83c: 9e 10 40 00 mov %g1, %o7 4000c840: 81 c3 e0 08 retl <== NOT EXECUTED 4000c844: 01 00 00 00 nop 4000df38 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4000df38: 9d e3 bf 98 save %sp, -104, %sp 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 ]; 4000df3c: e2 06 21 60 ld [ %i0 + 0x160 ], %l1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4000df40: 82 10 20 01 mov 1, %g1 while ( !_Chain_Is_empty( handler_stack ) ) { 4000df44: c4 04 60 d8 ld [ %l1 + 0xd8 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000df48: b0 04 60 dc add %l1, 0xdc, %i0 4000df4c: 80 a0 80 18 cmp %g2, %i0 4000df50: 02 80 00 14 be 4000dfa0 <_POSIX_Threads_cancel_run+0x68> 4000df54: c2 24 60 cc st %g1, [ %l1 + 0xcc ] _ISR_Disable( level ); 4000df58: 7f ff cf b4 call 40001e28 <== NOT EXECUTED 4000df5c: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 4000df60: e0 06 20 04 ld [ %i0 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000df64: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 4000df68: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000df6c: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000df70: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4000df74: 7f ff cf b1 call 40001e38 <== NOT EXECUTED 4000df78: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 4000df7c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000df80: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000df84: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 4000df88: 7f ff f0 a2 call 4000a210 <_Workspace_Free> <== NOT EXECUTED 4000df8c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 4000df90: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED 4000df94: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 4000df98: 12 bf ff f0 bne 4000df58 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED 4000df9c: 01 00 00 00 nop <== NOT EXECUTED 4000dfa0: 81 c7 e0 08 ret 4000dfa4: 81 e8 00 00 restore 4000ef60 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000ef60: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000ef64: 7f ff f4 fd call 4000c358 <_Watchdog_Remove> 4000ef68: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000ef6c: 7f ff cf 16 call 40002bc4 4000ef70: 01 00 00 00 nop 4000ef74: a0 10 00 08 mov %o0, %l0 /* * 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 ) { 4000ef78: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000ef7c: 80 a0 60 00 cmp %g1, 0 4000ef80: 12 80 00 0f bne 4000efbc <_POSIX_Timer_Insert_helper+0x5c> 4000ef84: 92 10 00 18 mov %i0, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000ef88: f6 26 20 1c st %i3, [ %i0 + 0x1c ] the_watchdog->id = id; 4000ef8c: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000ef90: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000ef94: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000ef98: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000ef9c: 11 10 00 7e sethi %hi(0x4001f800), %o0 4000efa0: 7f ff f4 83 call 4000c1ac <_Watchdog_Insert> 4000efa4: 90 12 21 00 or %o0, 0x100, %o0 ! 4001f900 <_Watchdog_Ticks_chain> * 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 ); 4000efa8: b0 10 20 01 mov 1, %i0 4000efac: 7f ff cf 0a call 40002bd4 4000efb0: 90 10 00 10 mov %l0, %o0 return true; } 4000efb4: 81 c7 e0 08 ret 4000efb8: 81 e8 00 00 restore /* * 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 ) { _ISR_Enable( level ); 4000efbc: 7f ff cf 06 call 40002bd4 <== NOT EXECUTED 4000efc0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000efc4: 81 c7 e0 08 ret <== NOT EXECUTED 4000efc8: 81 e8 00 00 restore <== NOT EXECUTED 4000827c <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 4000827c: 9d e3 bf 98 save %sp, -104, %sp bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 40008280: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40008284: c4 06 60 54 ld [ %i1 + 0x54 ], %g2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 40008288: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000828c: 80 a0 a0 00 cmp %g2, 0 40008290: 12 80 00 0e bne 400082c8 <_POSIX_Timer_TSR+0x4c> 40008294: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 40008298: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 4000829c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400082a0: 32 80 00 0b bne,a 400082cc <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED 400082a4: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 <== NOT EXECUTED /* 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; 400082a8: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 400082ac: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 400082b0: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 400082b4: 40 00 1a 4a call 4000ebdc 400082b8: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 400082bc: c0 26 60 68 clr [ %i1 + 0x68 ] 400082c0: 81 c7 e0 08 ret 400082c4: 81 e8 00 00 restore 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( 400082c8: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 400082cc: d4 06 60 08 ld [ %i1 + 8 ], %o2 400082d0: 90 06 60 10 add %i1, 0x10, %o0 400082d4: 17 10 00 20 sethi %hi(0x40008000), %o3 400082d8: 98 10 00 19 mov %i1, %o4 400082dc: 40 00 1b 21 call 4000ef60 <_POSIX_Timer_Insert_helper> 400082e0: 96 12 e2 7c or %o3, 0x27c, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 400082e4: 80 8a 20 ff btst 0xff, %o0 400082e8: 02 bf ff f6 be 400082c0 <_POSIX_Timer_TSR+0x44> 400082ec: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 400082f0: 40 00 06 22 call 40009b78 <_TOD_Get> 400082f4: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 400082f8: 82 10 20 03 mov 3, %g1 400082fc: 10 bf ff ed b 400082b0 <_POSIX_Timer_TSR+0x34> 40008300: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000e13c <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4000e13c: 9d e3 bf 98 save %sp, -104, %sp sigset_t signals_blocked; ISR_Level level; bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 4000e140: 82 10 20 01 mov 1, %g1 /* 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 ) 4000e144: 80 8f 20 ff btst 0xff, %i4 sigset_t signals_blocked; ISR_Level level; bool do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 4000e148: 84 06 7f ff add %i1, -1, %g2 /* 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 ) 4000e14c: b8 10 3f ff mov -1, %i4 4000e150: 02 80 00 04 be 4000e160 <_POSIX_signals_Clear_signals+0x24> 4000e154: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000e158: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000e15c: b8 38 00 01 xnor %g0, %g1, %i4 signals_blocked = SIGNAL_ALL_MASK; /* XXX this is not right for siginfo type signals yet */ /* XXX since they can't be cleared the same way */ _ISR_Disable( level ); 4000e160: 7f ff cf 32 call 40001e28 4000e164: 01 00 00 00 nop 4000e168: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000e16c: 80 8e e0 ff btst 0xff, %i3 4000e170: 22 80 00 33 be,a 4000e23c <_POSIX_signals_Clear_signals+0x100> 4000e174: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000e178: 05 10 00 6c sethi %hi(0x4001b000), %g2 4000e17c: c2 00 a1 dc ld [ %g2 + 0x1dc ], %g1 ! 4001b1dc <_POSIX_signals_Pending> 4000e180: 82 0c 00 01 and %l0, %g1, %g1 4000e184: 80 88 40 1c btst %g1, %i4 4000e188: 02 80 00 37 be 4000e264 <_POSIX_signals_Clear_signals+0x128> 4000e18c: 85 2e 60 02 sll %i1, 2, %g2 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000e190: 87 2e 60 04 sll %i1, 4, %g3 4000e194: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000e198: 86 20 c0 02 sub %g3, %g2, %g3 4000e19c: 82 10 60 10 or %g1, 0x10, %g1 4000e1a0: c4 00 40 03 ld [ %g1 + %g3 ], %g2 4000e1a4: 80 a0 a0 02 cmp %g2, 2 4000e1a8: 12 80 00 34 bne 4000e278 <_POSIX_signals_Clear_signals+0x13c> 4000e1ac: 03 10 00 6c sethi %hi(0x4001b000), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 4000e1b0: 88 10 61 e0 or %g1, 0x1e0, %g4 ! 4001b1e0 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000e1b4: c4 00 c0 04 ld [ %g3 + %g4 ], %g2 4000e1b8: 98 00 c0 04 add %g3, %g4, %o4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000e1bc: 9a 03 20 04 add %o4, 4, %o5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4000e1c0: 80 a0 80 0d cmp %g2, %o5 4000e1c4: 02 80 00 34 be 4000e294 <_POSIX_signals_Clear_signals+0x158> 4000e1c8: b8 10 20 00 clr %i4 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4000e1cc: c2 00 80 00 ld [ %g2 ], %g1 4000e1d0: b8 10 00 02 mov %g2, %i4 the_chain->first = new_first; 4000e1d4: c2 20 c0 04 st %g1, [ %g3 + %g4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000e1d8: 80 a3 40 01 cmp %o5, %g1 4000e1dc: 02 80 00 2e be 4000e294 <_POSIX_signals_Clear_signals+0x158> 4000e1e0: d8 20 60 04 st %o4, [ %g1 + 4 ] _POSIX_signals_Clear_process_signals( mask ); if ( psiginfo ) { 4000e1e4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4000e1e8: 02 80 00 1b be 4000e254 <_POSIX_signals_Clear_signals+0x118> 4000e1ec: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000e1f0: c2 07 20 08 ld [ %i4 + 8 ], %g1 the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; the_node->previous = old_last_node; 4000e1f4: b0 10 20 01 mov 1, %i0 4000e1f8: c2 26 80 00 st %g1, [ %i2 ] 4000e1fc: c4 07 20 0c ld [ %i4 + 0xc ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000e200: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000e204: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000e208: 82 10 61 94 or %g1, 0x194, %g1 4000e20c: c6 07 20 10 ld [ %i4 + 0x10 ], %g3 4000e210: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 4000e214: 82 00 7f fc add %g1, -4, %g1 4000e218: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000e21c: f8 20 60 08 st %i4, [ %g1 + 8 ] 4000e220: c6 26 a0 08 st %g3, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000e224: c4 27 20 04 st %g2, [ %i4 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000e228: f8 20 80 00 st %i4, [ %g2 ] if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4000e22c: 7f ff cf 03 call 40001e38 4000e230: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e234: 81 c7 e0 08 ret 4000e238: 81 e8 00 00 restore } else _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000e23c: 82 0c 00 02 and %l0, %g2, %g1 4000e240: 80 88 40 1c btst %g1, %i4 4000e244: 02 80 00 08 be 4000e264 <_POSIX_signals_Clear_signals+0x128> 4000e248: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 4000e24c: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000e250: b0 10 20 01 mov 1, %i0 do_callout = true; } } _ISR_Enable( level ); 4000e254: 7f ff ce f9 call 40001e38 4000e258: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e25c: 81 c7 e0 08 ret 4000e260: 81 e8 00 00 restore _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4000e264: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 4000e268: 7f ff ce f4 call 40001e38 4000e26c: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e270: 81 c7 e0 08 ret 4000e274: 81 e8 00 00 restore &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 4000e278: 90 10 00 10 mov %l0, %o0 4000e27c: 40 00 01 9c call 4000e8ec <_POSIX_signals_Clear_process_signals> 4000e280: b0 10 20 01 mov 1, %i0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 4000e284: 7f ff ce ed call 40001e38 4000e288: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000e28c: 81 c7 e0 08 ret 4000e290: 81 e8 00 00 restore 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 ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) _POSIX_signals_Clear_process_signals( mask ); 4000e294: 40 00 01 96 call 4000e8ec <_POSIX_signals_Clear_process_signals> 4000e298: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000e29c: 10 bf ff d3 b 4000e1e8 <_POSIX_signals_Clear_signals+0xac> 4000e2a0: 80 a7 20 00 cmp %i4, 0 400074a0 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 400074a0: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 400074a4: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 400074a8: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 400074ac: 82 02 3f ff add %o0, -1, %g1 400074b0: 83 28 80 01 sll %g2, %g1, %g1 400074b4: 80 88 40 03 btst %g1, %g3 400074b8: 12 80 00 11 bne 400074fc <_POSIX_signals_Get_highest+0x5c> 400074bc: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 400074c0: 90 02 20 01 inc %o0 400074c4: 80 a2 20 20 cmp %o0, 0x20 400074c8: 12 bf ff fa bne 400074b0 <_POSIX_signals_Get_highest+0x10> 400074cc: 82 02 3f ff add %o0, -1, %g1 400074d0: 90 10 20 01 mov 1, %o0 } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) 400074d4: 10 80 00 05 b 400074e8 <_POSIX_signals_Get_highest+0x48> 400074d8: 84 10 20 01 mov 1, %g2 return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 400074dc: 80 a2 20 1b cmp %o0, 0x1b 400074e0: 02 80 00 09 be 40007504 <_POSIX_signals_Get_highest+0x64> 400074e4: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) 400074e8: 82 02 3f ff add %o0, -1, %g1 400074ec: 83 28 80 01 sll %g2, %g1, %g1 400074f0: 80 88 40 03 btst %g1, %g3 400074f4: 22 bf ff fa be,a 400074dc <_POSIX_signals_Get_highest+0x3c> 400074f8: 90 02 20 01 inc %o0 return signo; } return 0; } 400074fc: 81 c3 e0 08 retl 40007500: 01 00 00 00 nop 40007504: 81 c3 e0 08 retl <== NOT EXECUTED 40007508: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 4000c474 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000c474: 9d e3 bf 98 save %sp, -104, %sp POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000c478: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 if ( !api ) 4000c47c: 80 a4 20 00 cmp %l0, 0 4000c480: 02 80 00 3c be 4000c570 <_POSIX_signals_Post_switch_extension+0xfc> 4000c484: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000c488: a2 10 61 dc or %g1, 0x1dc, %l1 ! 4001b1dc <_POSIX_signals_Pending> * 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) { restart: _ISR_Disable( level ); 4000c48c: 7f ff d6 67 call 40001e28 4000c490: 01 00 00 00 nop 4000c494: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000c498: c2 04 40 00 ld [ %l1 ], %g1 4000c49c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000c4a0: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000c4a4: 82 10 40 02 or %g1, %g2, %g1 4000c4a8: 80 a8 40 03 andncc %g1, %g3, %g0 4000c4ac: 02 80 00 2f be 4000c568 <_POSIX_signals_Post_switch_extension+0xf4> 4000c4b0: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 4000c4b4: 7f ff d6 61 call 40001e38 4000c4b8: b0 10 20 1b mov 0x1b, %i0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 4000c4bc: 92 10 00 18 mov %i0, %o1 4000c4c0: 94 10 20 00 clr %o2 4000c4c4: 40 00 06 f4 call 4000e094 <_POSIX_signals_Check_signal> 4000c4c8: 90 10 00 10 mov %l0, %o0 4000c4cc: 80 8a 20 ff btst 0xff, %o0 4000c4d0: 12 bf ff ef bne 4000c48c <_POSIX_signals_Post_switch_extension+0x18> 4000c4d4: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000c4d8: 90 10 00 10 mov %l0, %o0 4000c4dc: 94 10 20 01 mov 1, %o2 4000c4e0: 40 00 06 ed call 4000e094 <_POSIX_signals_Check_signal> 4000c4e4: b0 06 20 01 inc %i0 4000c4e8: 80 8a 20 ff btst 0xff, %o0 4000c4ec: 12 bf ff e8 bne 4000c48c <_POSIX_signals_Post_switch_extension+0x18> 4000c4f0: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000c4f4: 12 bf ff f3 bne 4000c4c0 <_POSIX_signals_Post_switch_extension+0x4c> 4000c4f8: 92 10 00 18 mov %i0, %o1 4000c4fc: b0 10 20 01 mov 1, %i0 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 4000c500: 92 10 00 18 mov %i0, %o1 4000c504: 94 10 20 00 clr %o2 4000c508: 40 00 06 e3 call 4000e094 <_POSIX_signals_Check_signal> 4000c50c: 90 10 00 10 mov %l0, %o0 4000c510: 80 8a 20 ff btst 0xff, %o0 4000c514: 12 bf ff de bne 4000c48c <_POSIX_signals_Post_switch_extension+0x18> 4000c518: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000c51c: 90 10 00 10 mov %l0, %o0 4000c520: 94 10 20 01 mov 1, %o2 4000c524: 40 00 06 dc call 4000e094 <_POSIX_signals_Check_signal> 4000c528: b0 06 20 01 inc %i0 4000c52c: 80 8a 20 ff btst 0xff, %o0 4000c530: 12 bf ff d7 bne 4000c48c <_POSIX_signals_Post_switch_extension+0x18> 4000c534: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000c538: 12 bf ff f3 bne 4000c504 <_POSIX_signals_Post_switch_extension+0x90> 4000c53c: 92 10 00 18 mov %i0, %o1 * 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) { restart: _ISR_Disable( level ); 4000c540: 7f ff d6 3a call 40001e28 <== NOT EXECUTED 4000c544: 01 00 00 00 nop <== NOT EXECUTED 4000c548: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( !(~api->signals_blocked & 4000c54c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 4000c550: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 <== NOT EXECUTED 4000c554: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 <== NOT EXECUTED 4000c558: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 4000c55c: 80 a8 40 03 andncc %g1, %g3, %g0 <== NOT EXECUTED 4000c560: 12 bf ff d5 bne 4000c4b4 <_POSIX_signals_Post_switch_extension+0x40> <== NOT EXECUTED 4000c564: 01 00 00 00 nop <== NOT EXECUTED (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000c568: 7f ff d6 34 call 40001e38 4000c56c: 81 e8 00 00 restore 4000c570: 81 c7 e0 08 ret <== NOT EXECUTED 4000c574: 81 e8 00 00 restore <== NOT EXECUTED 40006690 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 40006690: 9d e3 bf 98 save %sp, -104, %sp /* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM ); 40006694: 7f ff f3 ac call 40003544 40006698: 33 10 00 5c sethi %hi(0x40017000), %i1 4000669c: 7f ff ff 07 call 400062b8 400066a0: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 400066a4: 40 00 10 53 call 4000a7f0 <_Watchdog_Remove> 400066a8: 90 16 62 3c or %i1, 0x23c, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400066ac: 31 10 00 5d sethi %hi(0x40017400), %i0 400066b0: b2 16 62 3c or %i1, 0x23c, %i1 400066b4: 40 00 0f e4 call 4000a644 <_Watchdog_Insert> 400066b8: 91 ee 20 80 restore %i0, 0x80, %o0 400066bc: 01 00 00 00 nop <== NOT EXECUTED 400254c0 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 400254c0: 9d e3 bf 98 save %sp, -104, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400254c4: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 400254c8: 07 04 00 20 sethi %hi(0x10008000), %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 400254cc: 84 06 7f ff add %i1, -1, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400254d0: 82 09 00 03 and %g4, %g3, %g1 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 400254d4: 9a 10 20 01 mov 1, %o5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400254d8: 80 a0 40 03 cmp %g1, %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 400254dc: 85 2b 40 02 sll %o5, %g2, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 400254e0: 02 80 00 25 be 40025574 <_POSIX_signals_Unblock_thread+0xb4> 400254e4: c6 06 21 60 ld [ %i0 + 0x160 ], %g3 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 400254e8: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 400254ec: 80 a8 80 01 andncc %g2, %g1, %g0 400254f0: 02 80 00 1f be 4002556c <_POSIX_signals_Unblock_thread+0xac> 400254f4: 03 04 00 00 sethi %hi(0x10000000), %g1 * + Any other combination, do nothing. */ the_thread->do_post_task_switch_extension = true; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 400254f8: 80 89 00 01 btst %g4, %g1 400254fc: 02 80 00 11 be 40025540 <_POSIX_signals_Unblock_thread+0x80> 40025500: da 2e 20 75 stb %o5, [ %i0 + 0x75 ] the_thread->Wait.return_code = EINTR; 40025504: 82 10 20 04 mov 4, %g1 #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) ){ 40025508: 80 89 20 08 btst 8, %g4 4002550c: 02 80 00 18 be 4002556c <_POSIX_signals_Unblock_thread+0xac> 40025510: c2 26 20 34 st %g1, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 40025514: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40025518: 80 a0 60 02 cmp %g1, 2 4002551c: 02 80 00 36 be 400255f4 <_POSIX_signals_Unblock_thread+0x134> 40025520: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40025524: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40025528: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4002552c: b0 10 20 00 clr %i0 40025530: 7f ff a6 79 call 4000ef14 <_Thread_Clear_state> 40025534: 92 12 63 f8 or %o1, 0x3f8, %o1 40025538: 81 c7 e0 08 ret 4002553c: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 40025540: 80 a1 20 00 cmp %g4, 0 40025544: 12 80 00 0a bne 4002556c <_POSIX_signals_Unblock_thread+0xac> 40025548: 03 10 00 ae sethi %hi(0x4002b800), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 4002554c: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4002bb9c <_ISR_Nest_level> 40025550: 80 a0 a0 00 cmp %g2, 0 40025554: 02 80 00 06 be 4002556c <_POSIX_signals_Unblock_thread+0xac> 40025558: 03 10 00 ae sethi %hi(0x4002b800), %g1 4002555c: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4002bbc0 <_Thread_Executing> 40025560: 80 a6 00 02 cmp %i0, %g2 40025564: 02 80 00 1c be 400255d4 <_POSIX_signals_Unblock_thread+0x114> 40025568: 03 10 00 af sethi %hi(0x4002bc00), %g1 _ISR_Signals_to_thread_executing = TRUE; } } return false; } 4002556c: 81 c7 e0 08 ret 40025570: 91 e8 20 00 restore %g0, 0, %o0 * 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) ) { 40025574: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40025578: 80 88 80 01 btst %g2, %g1 4002557c: 22 80 00 12 be,a 400255c4 <_POSIX_signals_Unblock_thread+0x104> 40025580: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 the_thread->Wait.return_code = EINTR; 40025584: 82 10 20 04 mov 4, %g1 40025588: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 4002558c: 80 a6 a0 00 cmp %i2, 0 40025590: 02 80 00 14 be 400255e0 <_POSIX_signals_Unblock_thread+0x120> 40025594: c6 06 20 28 ld [ %i0 + 0x28 ], %g3 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 40025598: c2 06 80 00 ld [ %i2 ], %g1 4002559c: c2 20 c0 00 st %g1, [ %g3 ] 400255a0: c4 06 a0 04 ld [ %i2 + 4 ], %g2 400255a4: c4 20 e0 04 st %g2, [ %g3 + 4 ] 400255a8: c2 06 a0 08 ld [ %i2 + 8 ], %g1 400255ac: c2 20 e0 08 st %g1, [ %g3 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 400255b0: 90 10 00 18 mov %i0, %o0 400255b4: 7f ff a9 6c call 4000fb64 <_Thread_queue_Extract_with_proxy> 400255b8: b0 10 20 01 mov 1, %i0 400255bc: 81 c7 e0 08 ret 400255c0: 81 e8 00 00 restore * 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) ) { 400255c4: 80 a8 80 01 andncc %g2, %g1, %g0 400255c8: 12 bf ff f0 bne 40025588 <_POSIX_signals_Unblock_thread+0xc8> 400255cc: 82 10 20 04 mov 4, %g1 400255d0: 30 bf ff e7 b,a 4002556c <_POSIX_signals_Unblock_thread+0xac> (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; 400255d4: da 28 60 58 stb %o5, [ %g1 + 0x58 ] 400255d8: 81 c7 e0 08 ret 400255dc: 91 e8 20 00 restore %g0, 0, %o0 the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 400255e0: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 400255e4: f2 20 c0 00 st %i1, [ %g3 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 400255e8: c0 20 e0 08 clr [ %g3 + 8 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 400255ec: 10 bf ff f1 b 400255b0 <_POSIX_signals_Unblock_thread+0xf0> 400255f0: c2 20 e0 04 st %g1, [ %g3 + 4 ] _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 ); 400255f4: 7f ff ac 76 call 400107cc <_Watchdog_Remove> 400255f8: 90 06 20 48 add %i0, 0x48, %o0 400255fc: 10 bf ff cb b 40025528 <_POSIX_signals_Unblock_thread+0x68> 40025600: 90 10 00 18 mov %i0, %o0 40026dc4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 40026dc4: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 40026dc8: 80 a6 20 00 cmp %i0, 0 40026dcc: 02 80 00 10 be 40026e0c <_Protected_heap_Get_information+0x48> 40026dd0: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 40026dd4: 02 80 00 0e be 40026e0c <_Protected_heap_Get_information+0x48> 40026dd8: 23 10 01 85 sethi %hi(0x40061400), %l1 return false; _RTEMS_Lock_allocator(); 40026ddc: 7f ff 92 47 call 4000b6f8 <_API_Mutex_Lock> 40026de0: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 ! 400614a8 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 40026de4: 90 10 00 18 mov %i0, %o0 40026de8: 40 00 2b 77 call 40031bc4 <_Heap_Get_information> 40026dec: 92 10 00 19 mov %i1, %o1 40026df0: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 40026df4: 7f ff 92 57 call 4000b750 <_API_Mutex_Unlock> 40026df8: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 40026dfc: 80 a0 00 10 cmp %g0, %l0 40026e00: 82 60 3f ff subx %g0, -1, %g1 40026e04: 81 c7 e0 08 ret 40026e08: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 40026e0c: 81 c7 e0 08 ret <== NOT EXECUTED 40026e10: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007fb8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40007fb8: 9d e3 bf 90 save %sp, -112, %sp 40007fbc: 11 10 00 7e sethi %hi(0x4001f800), %o0 40007fc0: 92 10 00 18 mov %i0, %o1 40007fc4: 90 12 21 84 or %o0, 0x184, %o0 40007fc8: 40 00 08 19 call 4000a02c <_Objects_Get> 40007fcc: 94 07 bf f4 add %fp, -12, %o2 /* * 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 ) { 40007fd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007fd4: 80 a0 60 00 cmp %g1, 0 40007fd8: 12 80 00 11 bne 4000801c <_Rate_monotonic_Timeout+0x64> 40007fdc: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40007fe0: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40007fe4: 03 00 00 10 sethi %hi(0x4000), %g1 40007fe8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40007fec: 80 88 80 01 btst %g2, %g1 40007ff0: 32 80 00 0d bne,a 40008024 <_Rate_monotonic_Timeout+0x6c> 40007ff4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 _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 ) { 40007ff8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40007ffc: 80 a0 60 01 cmp %g1, 1 40008000: 02 80 00 12 be 40008048 <_Rate_monotonic_Timeout+0x90> 40008004: 82 10 20 04 mov 4, %g1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40008008: c2 26 20 38 st %g1, [ %i0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000800c: 05 10 00 7e sethi %hi(0x4001f800), %g2 40008010: c2 00 a3 00 ld [ %g2 + 0x300 ], %g1 ! 4001fb00 <_Thread_Dispatch_disable_level> 40008014: 82 00 7f ff add %g1, -1, %g1 40008018: c2 20 a3 00 st %g1, [ %g2 + 0x300 ] 4000801c: 81 c7 e0 08 ret 40008020: 81 e8 00 00 restore the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40008024: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008028: 80 a0 80 01 cmp %g2, %g1 4000802c: 32 bf ff f4 bne,a 40007ffc <_Rate_monotonic_Timeout+0x44> 40008030: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40008034: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40008038: 40 00 09 67 call 4000a5d4 <_Thread_Clear_state> 4000803c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 40008040: 10 80 00 05 b 40008054 <_Rate_monotonic_Timeout+0x9c> 40008044: 90 10 00 18 mov %i0, %o0 _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; 40008048: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 4000804c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _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; 40008050: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40008054: 7f ff fe 2e call 4000790c <_Rate_monotonic_Initiate_statistics> 40008058: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000805c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008060: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008064: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008068: 11 10 00 7e sethi %hi(0x4001f800), %o0 4000806c: 40 00 0f ce call 4000bfa4 <_Watchdog_Insert> 40008070: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 4001fbe0 <_Watchdog_Ticks_chain> 40008074: 30 bf ff e6 b,a 4000800c <_Rate_monotonic_Timeout+0x54> 40008a34 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 40008a34: 9d e3 bf 78 save %sp, -136, %sp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 40008a38: 35 10 00 6a sethi %hi(0x4001a800), %i2 40008a3c: 7f ff fc c8 call 40007d5c <_Objects_Allocate> 40008a40: 90 16 a3 a0 or %i2, 0x3a0, %o0 ! 4001aba0 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008a44: 37 10 00 6a sethi %hi(0x4001a800), %i3 40008a48: c2 06 e2 40 ld [ %i3 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> /* * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 40008a4c: 39 10 00 6a sethi %hi(0x4001a800), %i4 40008a50: 82 00 60 01 inc %g1 40008a54: d0 27 23 ec st %o0, [ %i4 + 0x3ec ] 40008a58: c2 26 e2 40 st %g1, [ %i3 + 0x240 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 40008a5c: 33 10 00 6a sethi %hi(0x4001a800), %i1 40008a60: c2 06 62 d8 ld [ %i1 + 0x2d8 ], %g1 ! 4001aad8 <_Configuration_Table> 40008a64: 05 10 00 66 sethi %hi(0x40019800), %g2 40008a68: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 40008a6c: d6 00 a3 a0 ld [ %g2 + 0x3a0 ], %o3 40008a70: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008a74: 82 10 62 50 or %g1, 0x250, %g1 ! 40018e50 <_Status_Object_name_errors_to_status+0x14> 40008a78: c2 27 bf f4 st %g1, [ %fp + -12 ] 40008a7c: 80 a2 c0 03 cmp %o3, %g3 40008a80: 1a 80 00 03 bcc 40008a8c <_Thread_Create_idle+0x58> 40008a84: d2 07 23 ec ld [ %i4 + 0x3ec ], %o1 40008a88: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 40008a8c: 03 10 00 66 sethi %hi(0x40019800), %g1 40008a90: da 08 63 a4 ldub [ %g1 + 0x3a4 ], %o5 ! 40019ba4 40008a94: 84 07 bf f4 add %fp, -12, %g2 40008a98: 82 10 20 01 mov 1, %g1 40008a9c: c0 23 a0 60 clr [ %sp + 0x60 ] 40008aa0: c0 23 a0 64 clr [ %sp + 0x64 ] 40008aa4: c0 23 a0 68 clr [ %sp + 0x68 ] 40008aa8: 90 16 a3 a0 or %i2, 0x3a0, %o0 40008aac: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008ab0: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 40008ab4: 94 10 20 00 clr %o2 40008ab8: 40 00 00 b2 call 40008d80 <_Thread_Initialize> 40008abc: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 40008ac0: c4 06 62 d8 ld [ %i1 + 0x2d8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40008ac4: c2 06 e2 40 ld [ %i3 + 0x240 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008ac8: c6 07 23 ec ld [ %i4 + 0x3ec ], %g3 40008acc: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40008ad0: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 40008ad4: c2 26 e2 40 st %g1, [ %i3 + 0x240 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008ad8: 05 10 00 6a sethi %hi(0x4001a800), %g2 40008adc: 03 10 00 6a sethi %hi(0x4001a800), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40008ae0: b0 10 00 03 mov %g3, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 40008ae4: c6 20 a3 00 st %g3, [ %g2 + 0x300 ] 40008ae8: c6 20 62 cc st %g3, [ %g1 + 0x2cc ] _Thread_Executing = _Thread_Idle; _Thread_Start( 40008aec: b2 10 20 00 clr %i1 40008af0: b6 10 20 00 clr %i3 40008af4: 40 00 03 ab call 400099a0 <_Thread_Start> 40008af8: 99 e8 20 00 restore %g0, 0, %o4 40008afc: 01 00 00 00 nop 40008cd0 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 40008cd0: 86 10 00 08 mov %o0, %g3 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 ) ) { 40008cd4: 80 a2 20 00 cmp %o0, 0 40008cd8: 02 80 00 1d be 40008d4c <_Thread_Get+0x7c> 40008cdc: 94 10 00 09 mov %o1, %o2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008ce0: 83 32 20 18 srl %o0, 0x18, %g1 40008ce4: 82 08 60 07 and %g1, 7, %g1 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40008ce8: 84 00 7f ff add %g1, -1, %g2 40008cec: 80 a0 a0 03 cmp %g2, 3 40008cf0: 38 80 00 14 bgu,a 40008d40 <_Thread_Get+0x70> 40008cf4: 82 10 20 01 mov 1, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008cf8: 89 32 20 1b srl %o0, 0x1b, %g4 40008cfc: 80 a1 20 01 cmp %g4, 1 40008d00: 12 80 00 0f bne 40008d3c <_Thread_Get+0x6c> 40008d04: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 40008d08: 03 10 00 6a sethi %hi(0x4001a800), %g1 40008d0c: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 4001a9a0 <_Objects_Information_table> 40008d10: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 40008d14: 80 a0 60 00 cmp %g1, 0 40008d18: 22 80 00 17 be,a 40008d74 <_Thread_Get+0xa4> 40008d1c: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 40008d20: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40008d24: 80 a2 20 00 cmp %o0, 0 40008d28: 02 80 00 11 be 40008d6c <_Thread_Get+0x9c> 40008d2c: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008d30: 82 13 c0 00 mov %o7, %g1 40008d34: 7f ff fd 72 call 400082fc <_Objects_Get> 40008d38: 9e 10 40 00 mov %g1, %o7 goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 40008d3c: 82 10 20 01 mov 1, %g1 40008d40: 90 10 20 00 clr %o0 40008d44: 81 c3 e0 08 retl 40008d48: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008d4c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40008d50: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001aa40 <_Thread_Dispatch_disable_level> 40008d54: 84 00 a0 01 inc %g2 40008d58: c4 20 62 40 st %g2, [ %g1 + 0x240 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40008d5c: 03 10 00 6a sethi %hi(0x4001a800), %g1 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; 40008d60: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40008d64: 81 c3 e0 08 retl 40008d68: d0 00 63 00 ld [ %g1 + 0x300 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 40008d6c: 81 c3 e0 08 retl <== NOT EXECUTED 40008d70: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 40008d74: 81 c3 e0 08 retl 40008d78: 90 10 20 00 clr %o0 4000e6d4 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000e6d4: 9d e3 bf 98 save %sp, -104, %sp #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4000e6d8: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000e6dc: e2 00 63 00 ld [ %g1 + 0x300 ], %l1 ! 4001ab00 <_Thread_Executing> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 4000e6e0: 3f 10 00 39 sethi %hi(0x4000e400), %i7 4000e6e4: be 17 e2 d4 or %i7, 0x2d4, %i7 ! 4000e6d4 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000e6e8: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000e6ec: 7f ff cd d3 call 40001e38 4000e6f0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000e6f4: 05 10 00 69 sethi %hi(0x4001a400), %g2 doneConstructors = 1; 4000e6f8: 82 10 20 01 mov 1, %g1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000e6fc: e0 08 a3 00 ldub [ %g2 + 0x300 ], %l0 * 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 ); 4000e700: 90 10 00 11 mov %l1, %o0 4000e704: 7f ff ed 65 call 40009c98 <_User_extensions_Thread_begin> 4000e708: c2 28 a3 00 stb %g1, [ %g2 + 0x300 ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000e70c: 7f ff e9 63 call 40008c98 <_Thread_Enable_dispatch> 4000e710: a1 2c 20 18 sll %l0, 0x18, %l0 /* * _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) */ 4000e714: 80 a4 20 00 cmp %l0, 0 4000e718: 02 80 00 1e be 4000e790 <_Thread_Handler+0xbc> 4000e71c: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000e720: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000e724: 80 a0 60 01 cmp %g1, 1 4000e728: 22 80 00 21 be,a 4000e7ac <_Thread_Handler+0xd8> 4000e72c: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000e730: 80 a0 60 01 cmp %g1, 1 4000e734: 1a 80 00 0c bcc 4000e764 <_Thread_Handler+0x90> 4000e738: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000e73c: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000e740: 9f c0 40 00 call %g1 4000e744: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 4000e748: d0 24 60 28 st %o0, [ %l1 + 0x28 ] * 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 ); 4000e74c: 7f ff ed 67 call 40009ce8 <_User_extensions_Thread_exitted> 4000e750: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000e754: 90 10 20 00 clr %o0 4000e758: 92 10 20 01 mov 1, %o1 4000e75c: 7f ff e5 50 call 40007c9c <_Internal_error_Occurred> 4000e760: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000e764: 22 80 00 16 be,a 4000e7bc <_Thread_Handler+0xe8> <== NOT EXECUTED 4000e768: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000e76c: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000e770: 12 bf ff f7 bne 4000e74c <_Thread_Handler+0x78> <== NOT EXECUTED 4000e774: 01 00 00 00 nop <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000e778: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000e77c: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000e780: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000e784: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000e788: 10 bf ff f1 b 4000e74c <_Thread_Handler+0x78> <== NOT EXECUTED 4000e78c: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED * 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 (); 4000e790: 40 00 2c ca call 40019ab8 <_init> 4000e794: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000e798: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000e79c: 80 a0 60 01 cmp %g1, 1 4000e7a0: 12 bf ff e5 bne 4000e734 <_Thread_Handler+0x60> 4000e7a4: 01 00 00 00 nop (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000e7a8: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000e7ac: 9f c0 40 00 call %g1 4000e7b0: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 4000e7b4: 10 bf ff e6 b 4000e74c <_Thread_Handler+0x78> 4000e7b8: d0 24 60 28 st %o0, [ %l1 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000e7bc: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000e7c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000e7c4: d2 04 60 a8 ld [ %l1 + 0xa8 ], %o1 <== NOT EXECUTED 4000e7c8: 10 bf ff e1 b 4000e74c <_Thread_Handler+0x78> <== NOT EXECUTED 4000e7cc: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED 40008d80 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40008d80: 9d e3 bf 98 save %sp, -104, %sp 40008d84: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008d88: 80 a6 a0 00 cmp %i2, 0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 40008d8c: e6 00 40 00 ld [ %g1 ], %l3 40008d90: e4 07 a0 60 ld [ %fp + 0x60 ], %l2 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 40008d94: 02 80 00 51 be 40008ed8 <_Thread_Initialize+0x158> 40008d98: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1 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; 40008d9c: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 40008da0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40008da4: 21 10 00 6a sethi %hi(0x4001a800), %l0 40008da8: c2 04 22 e0 ld [ %l0 + 0x2e0 ], %g1 ! 4001aae0 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40008dac: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 40008db0: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40008db4: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40008db8: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40008dbc: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 40008dc0: c0 26 60 6c clr [ %i1 + 0x6c ] 40008dc4: 80 a0 60 00 cmp %g1, 0 40008dc8: 12 80 00 32 bne 40008e90 <_Thread_Initialize+0x110> 40008dcc: c0 26 61 58 clr [ %i1 + 0x158 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 40008dd0: c0 26 61 68 clr [ %i1 + 0x168 ] 40008dd4: b6 10 20 00 clr %i3 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40008dd8: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 40008ddc: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40008de0: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 40008de4: 80 a4 a0 02 cmp %l2, 2 40008de8: 12 80 00 05 bne 40008dfc <_Thread_Initialize+0x7c> 40008dec: e4 26 60 b0 st %l2, [ %i1 + 0xb0 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40008df0: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 40008df4: c4 00 61 98 ld [ %g1 + 0x198 ], %g2 ! 4001a998 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 40008df8: c4 26 60 78 st %g2, [ %i1 + 0x78 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40008dfc: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40008e00: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 40008e04: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 40008e08: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40008e0c: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 40008e10: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 40008e14: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 40008e18: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 40008e1c: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 40008e20: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 40008e24: 40 00 02 02 call 4000962c <_Thread_Set_priority> 40008e28: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40008e2c: c4 06 60 08 ld [ %i1 + 8 ], %g2 40008e30: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 40008e34: 03 00 00 3f sethi %hi(0xfc00), %g1 40008e38: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008e3c: 84 08 80 01 and %g2, %g1, %g2 40008e40: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 40008e44: e6 26 60 0c st %l3, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 40008e48: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40008e4c: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40008e50: f2 20 c0 02 st %i1, [ %g3 + %g2 ] * 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 ); 40008e54: 90 10 00 19 mov %i1, %o0 40008e58: 40 00 03 cc call 40009d88 <_User_extensions_Thread_create> 40008e5c: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 40008e60: 80 8a 20 ff btst 0xff, %o0 40008e64: 12 80 00 09 bne 40008e88 <_Thread_Initialize+0x108> 40008e68: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40008e6c: 02 80 00 05 be 40008e80 <_Thread_Initialize+0x100> <== NOT EXECUTED 40008e70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 40008e74: 40 00 04 e7 call 4000a210 <_Workspace_Free> <== NOT EXECUTED 40008e78: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40008e7c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008e80: 40 00 02 a7 call 4000991c <_Thread_Stack_Free> <== NOT EXECUTED 40008e84: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40008e88: 81 c7 e0 08 ret 40008e8c: 81 e8 00 00 restore /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 40008e90: 90 00 60 01 add %g1, 1, %o0 40008e94: 40 00 04 e6 call 4000a22c <_Workspace_Allocate> 40008e98: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 40008e9c: b6 92 20 00 orcc %o0, 0, %i3 40008ea0: 02 80 00 19 be 40008f04 <_Thread_Initialize+0x184> 40008ea4: c2 04 22 e0 ld [ %l0 + 0x2e0 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008ea8: 88 80 60 01 addcc %g1, 1, %g4 40008eac: 02 bf ff cb be 40008dd8 <_Thread_Initialize+0x58> 40008eb0: f6 26 61 68 st %i3, [ %i1 + 0x168 ] 40008eb4: 84 10 20 00 clr %g2 40008eb8: 86 10 00 1b mov %i3, %g3 the_thread->extensions[i] = NULL; 40008ebc: 83 28 a0 02 sll %g2, 2, %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40008ec0: 84 00 a0 01 inc %g2 40008ec4: 80 a0 80 04 cmp %g2, %g4 40008ec8: 0a bf ff fd bcs 40008ebc <_Thread_Initialize+0x13c> 40008ecc: c0 20 c0 01 clr [ %g3 + %g1 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 40008ed0: 10 bf ff c3 b 40008ddc <_Thread_Initialize+0x5c> 40008ed4: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 40008ed8: 90 10 00 19 mov %i1, %o0 40008edc: 40 00 02 74 call 400098ac <_Thread_Stack_Allocate> 40008ee0: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 40008ee4: 80 a2 20 00 cmp %o0, 0 40008ee8: 02 80 00 09 be 40008f0c <_Thread_Initialize+0x18c> 40008eec: 80 a6 c0 08 cmp %i3, %o0 40008ef0: 18 80 00 07 bgu 40008f0c <_Thread_Initialize+0x18c> 40008ef4: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 40008ef8: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40008efc: 10 bf ff aa b 40008da4 <_Thread_Initialize+0x24> 40008f00: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40008f04: 40 00 02 86 call 4000991c <_Thread_Stack_Free> <== NOT EXECUTED 40008f08: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40008f0c: 81 c7 e0 08 ret 40008f10: 91 e8 20 00 restore %g0, 0, %o0 4000e5b0 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000e5b0: 9d e3 bf 98 save %sp, -104, %sp the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 4000e5b4: c4 1e 20 b0 ldd [ %i0 + 0xb0 ], %g2 Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000e5b8: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000e5bc: c4 26 20 7c st %g2, [ %i0 + 0x7c ] Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000e5c0: c2 2e 20 76 stb %g1, [ %i0 + 0x76 ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 4000e5c4: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000e5c8: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000e5cc: f4 26 20 a8 st %i2, [ %i0 + 0xa8 ] Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4000e5d0: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000e5d4: c0 26 20 70 clr [ %i0 + 0x70 ] the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4000e5d8: 7f ff ee 9b call 4000a044 <_Thread_queue_Extract_with_proxy> 4000e5dc: 90 10 00 18 mov %i0, %o0 4000e5e0: 80 8a 20 ff btst 0xff, %o0 4000e5e4: 32 80 00 07 bne,a 4000e600 <_Thread_Reset+0x50> 4000e5e8: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000e5ec: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000e5f0: 80 a0 60 02 cmp %g1, 2 4000e5f4: 02 80 00 0c be 4000e624 <_Thread_Reset+0x74> 4000e5f8: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000e5fc: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 4000e600: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000e604: 80 a0 40 19 cmp %g1, %i1 4000e608: 02 80 00 05 be 4000e61c <_Thread_Reset+0x6c> 4000e60c: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000e610: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000e614: 7f ff ef 0b call 4000a240 <_Thread_Set_priority> 4000e618: 81 e8 00 00 restore 4000e61c: 81 c7 e0 08 ret 4000e620: 81 e8 00 00 restore 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 ); 4000e624: 7f ff f1 b4 call 4000acf4 <_Watchdog_Remove> <== NOT EXECUTED 4000e628: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000e62c: 10 bf ff f5 b 4000e600 <_Thread_Reset+0x50> <== NOT EXECUTED 4000e630: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000d884 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000d884: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000d888: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000d88c: e0 00 63 00 ld [ %g1 + 0x300 ], %l0 ! 4001ab00 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000d890: 7f ff d1 66 call 40001e28 4000d894: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000d898: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000d89c: c4 04 40 00 ld [ %l1 ], %g2 4000d8a0: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000d8a4: 80 a0 80 01 cmp %g2, %g1 4000d8a8: 02 80 00 18 be 4000d908 <_Thread_Reset_timeslice+0x84> 4000d8ac: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000d8b0: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000d8b4: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 4000d8b8: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000d8bc: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000d8c0: c4 20 e0 04 st %g2, [ %g3 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000d8c4: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000d8c8: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000d8cc: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000d8d0: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000d8d4: 7f ff d1 59 call 40001e38 4000d8d8: 01 00 00 00 nop 4000d8dc: 7f ff d1 53 call 40001e28 4000d8e0: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000d8e4: 07 10 00 6a sethi %hi(0x4001a800), %g3 4000d8e8: c2 00 e2 cc ld [ %g3 + 0x2cc ], %g1 ! 4001aacc <_Thread_Heir> 4000d8ec: 80 a4 00 01 cmp %l0, %g1 4000d8f0: 02 80 00 08 be 4000d910 <_Thread_Reset_timeslice+0x8c> 4000d8f4: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 4000d8f8: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000d8fc: c4 28 63 10 stb %g2, [ %g1 + 0x310 ] ! 4001ab10 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 4000d900: 7f ff d1 4e call 40001e38 <== NOT EXECUTED 4000d904: 81 e8 00 00 restore <== NOT EXECUTED executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level ); 4000d908: 7f ff d1 4c call 40001e38 4000d90c: 81 e8 00 00 restore _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; 4000d910: c2 04 40 00 ld [ %l1 ], %g1 4000d914: c2 20 e2 cc st %g1, [ %g3 + 0x2cc ] _Context_Switch_necessary = TRUE; 4000d918: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000d91c: c4 28 63 10 stb %g2, [ %g1 + 0x310 ] ! 4001ab10 <_Context_Switch_necessary> _ISR_Enable( level ); 4000d920: 7f ff d1 46 call 40001e38 4000d924: 81 e8 00 00 restore 4000d928: 01 00 00 00 nop 4000af74 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 4000af74: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000af78: 7f ff de c9 call 40002a9c 4000af7c: 01 00 00 00 nop 4000af80: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000af84: 80 8e 60 ff btst 0xff, %i1 4000af88: 22 80 00 0d be,a 4000afbc <_Thread_Resume+0x48> 4000af8c: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 4000af90: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 4000af94: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 4000af98: 80 88 60 02 btst 2, %g1 4000af9c: 02 80 00 06 be 4000afb4 <_Thread_Resume+0x40> 4000afa0: 01 00 00 00 nop RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4000afa4: 82 08 7f fd and %g1, -3, %g1 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4000afa8: 80 a0 60 00 cmp %g1, 0 4000afac: 02 80 00 0a be 4000afd4 <_Thread_Resume+0x60> 4000afb0: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 4000afb4: 7f ff de be call 40002aac 4000afb8: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 4000afbc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000afc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000afc4: 02 bf ff f4 be 4000af94 <_Thread_Resume+0x20> <== NOT EXECUTED 4000afc8: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 4000afcc: 7f ff de b8 call 40002aac <== NOT EXECUTED 4000afd0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000afd4: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 4000afd8: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 4000afdc: c2 11 00 00 lduh [ %g4 ], %g1 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4000afe0: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 4000afe4: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000afe8: 1b 10 00 9d sethi %hi(0x40027400), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000afec: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000aff0: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000aff4: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 4000aff8: c2 26 00 00 st %g1, [ %i0 ] 4000affc: c4 13 61 34 lduh [ %o5 + 0x134 ], %g2 old_last_node = the_chain->last; 4000b000: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 4000b004: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000b008: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000b00c: c8 26 20 04 st %g4, [ %i0 + 4 ] 4000b010: c4 33 61 34 sth %g2, [ %o5 + 0x134 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000b014: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 4000b018: 7f ff de a5 call 40002aac 4000b01c: 90 10 00 10 mov %l0, %o0 4000b020: 7f ff de 9f call 40002a9c 4000b024: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000b028: 09 10 00 9d sethi %hi(0x40027400), %g4 4000b02c: c4 01 21 0c ld [ %g4 + 0x10c ], %g2 ! 4002750c <_Thread_Heir> 4000b030: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000b034: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 4000b038: 80 a0 c0 01 cmp %g3, %g1 4000b03c: 1a bf ff de bcc 4000afb4 <_Thread_Resume+0x40> 4000b040: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000b044: 03 10 00 9d sethi %hi(0x40027400), %g1 4000b048: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 40027540 <_Thread_Executing> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 4000b04c: f0 21 21 0c st %i0, [ %g4 + 0x10c ] if ( _Thread_Executing->is_preemptible || 4000b050: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 4000b054: 80 a0 60 00 cmp %g1, 0 4000b058: 02 80 00 06 be 4000b070 <_Thread_Resume+0xfc> 4000b05c: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000b060: 84 10 20 01 mov 1, %g2 4000b064: 03 10 00 9d sethi %hi(0x40027400), %g1 4000b068: c4 28 61 50 stb %g2, [ %g1 + 0x150 ] ! 40027550 <_Context_Switch_necessary> 4000b06c: 30 bf ff d2 b,a 4000afb4 <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000b070: 12 bf ff d1 bne 4000afb4 <_Thread_Resume+0x40> 4000b074: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000b078: 10 bf ff fc b 4000b068 <_Thread_Resume+0xf4> <== NOT EXECUTED 4000b07c: 03 10 00 9d sethi %hi(0x40027400), %g1 <== NOT EXECUTED 400098ac <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 400098ac: 9d e3 bf 98 save %sp, -104, %sp 400098b0: 03 10 00 66 sethi %hi(0x40019800), %g1 400098b4: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 40019ba0 400098b8: 80 a6 40 01 cmp %i1, %g1 400098bc: 2a 80 00 02 bcs,a 400098c4 <_Thread_Stack_Allocate+0x18> 400098c0: b2 10 00 01 mov %g1, %i1 * 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_Table->stack_allocate_hook ) { 400098c4: 03 10 00 6a sethi %hi(0x4001a800), %g1 400098c8: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001aad8 <_Configuration_Table> 400098cc: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 400098d0: 80 a0 60 00 cmp %g1, 0 400098d4: 22 80 00 0a be,a 400098fc <_Thread_Stack_Allocate+0x50> 400098d8: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 400098dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400098e0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 400098e4: d0 26 20 cc st %o0, [ %i0 + 0xcc ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 400098e8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 400098ec: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 400098f0: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 400098f4: 81 c7 e0 08 ret <== NOT EXECUTED 400098f8: 81 e8 00 00 restore <== NOT EXECUTED * 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 ); 400098fc: 40 00 02 4c call 4000a22c <_Workspace_Allocate> 40009900: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 40009904: d0 26 20 cc st %o0, [ %i0 + 0xcc ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 40009908: 80 a0 00 08 cmp %g0, %o0 4000990c: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 40009910: b0 0e 40 18 and %i1, %i0, %i0 40009914: 81 c7 e0 08 ret 40009918: 81 e8 00 00 restore 4000991c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 4000991c: 9d e3 bf 98 save %sp, -104, %sp /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 40009920: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 40009924: 80 a0 60 00 cmp %g1, 0 40009928: 02 80 00 09 be 4000994c <_Thread_Stack_Free+0x30> 4000992c: 03 10 00 6a sethi %hi(0x4001a800), %g1 * 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_Table->stack_free_hook ) 40009930: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001aad8 <_Configuration_Table> 40009934: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 40009938: 80 a0 60 00 cmp %g1, 0 4000993c: 22 80 00 06 be,a 40009954 <_Thread_Stack_Free+0x38> 40009940: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 40009944: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009948: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 4000994c: 81 c7 e0 08 ret <== NOT EXECUTED 40009950: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 40009954: 40 00 02 2f call 4000a210 <_Workspace_Free> 40009958: 81 e8 00 00 restore 4000995c: 01 00 00 00 nop 4000922c <_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 ) { 4000922c: 9d e3 bf 98 save %sp, -104, %sp Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 40009230: e4 06 60 14 ld [ %i1 + 0x14 ], %l2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40009234: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40009238: 84 06 60 38 add %i1, 0x38, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000923c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 40009240: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 40009244: c4 26 60 40 st %g2, [ %i1 + 0x40 ] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 40009248: ac 10 00 18 mov %i0, %l6 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 4000924c: 80 8c a0 20 btst 0x20, %l2 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 40009250: 83 34 a0 06 srl %l2, 6, %g1 40009254: 12 80 00 30 bne 40009314 <_Thread_queue_Enqueue_priority+0xe8> 40009258: ea 06 20 38 ld [ %i0 + 0x38 ], %l5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000925c: 85 28 60 04 sll %g1, 4, %g2 40009260: 83 28 60 02 sll %g1, 2, %g1 40009264: 82 20 80 01 sub %g2, %g1, %g1 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 40009268: b0 10 00 01 mov %g1, %i0 4000926c: 82 05 80 01 add %l6, %g1, %g1 40009270: a6 00 60 04 add %g1, 4, %l3 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40009274: 7f ff e2 ed call 40001e28 40009278: 01 00 00 00 nop 4000927c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 40009280: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 40009284: 80 a4 00 13 cmp %l0, %l3 40009288: 32 80 00 18 bne,a 400092e8 <_Thread_queue_Enqueue_priority+0xbc> 4000928c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 40009290: 10 80 00 81 b 40009494 <_Thread_queue_Enqueue_priority+0x268> 40009294: a2 10 3f ff mov -1, %l1 if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40009298: 80 a4 00 13 cmp %l0, %l3 4000929c: 02 80 00 17 be 400092f8 <_Thread_queue_Enqueue_priority+0xcc> 400092a0: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 400092a4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 400092a8: 80 a4 80 11 cmp %l2, %l1 400092ac: 28 80 00 14 bleu,a 400092fc <_Thread_queue_Enqueue_priority+0xd0> 400092b0: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 400092b4: 7f ff e2 e1 call 40001e38 400092b8: 90 10 00 14 mov %l4, %o0 400092bc: 7f ff e2 db call 40001e28 400092c0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 400092c4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400092c8: 80 8d 40 01 btst %l5, %g1 400092cc: 02 80 00 6b be 40009478 <_Thread_queue_Enqueue_priority+0x24c> 400092d0: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 400092d4: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 400092d8: 80 a4 00 13 cmp %l0, %l3 400092dc: 02 80 00 07 be 400092f8 <_Thread_queue_Enqueue_priority+0xcc> 400092e0: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 400092e4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 400092e8: 80 a4 80 11 cmp %l2, %l1 400092ec: 38 bf ff eb bgu,a 40009298 <_Thread_queue_Enqueue_priority+0x6c> 400092f0: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 400092f4: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 400092f8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 400092fc: 80 a6 20 01 cmp %i0, 1 40009300: 02 80 00 47 be 4000941c <_Thread_queue_Enqueue_priority+0x1f0> 40009304: 80 a4 80 11 cmp %l2, %l1 * 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; 40009308: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 4000930c: 81 c7 e0 08 ret <== NOT EXECUTED 40009310: 81 e8 00 00 restore <== NOT EXECUTED the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 40009314: 85 28 60 04 sll %g1, 4, %g2 40009318: 83 28 60 02 sll %g1, 2, %g1 4000931c: 82 20 80 01 sub %g2, %g1, %g1 40009320: 05 10 00 66 sethi %hi(0x40019800), %g2 40009324: a6 06 00 01 add %i0, %g1, %l3 40009328: ae 10 a3 a4 or %g2, 0x3a4, %l7 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 4000932c: b0 10 00 13 mov %l3, %i0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40009330: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 40009334: 7f ff e2 bd call 40001e28 40009338: a2 00 60 01 add %g1, 1, %l1 4000933c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 40009340: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40009344: 80 a4 c0 10 cmp %l3, %l0 40009348: 22 80 00 25 be,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 4000934c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 40009350: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40009354: 80 a4 80 11 cmp %l2, %l1 40009358: 3a 80 00 21 bcc,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 4000935c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40009360: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40009364: 80 a4 c0 10 cmp %l3, %l0 40009368: 32 80 00 19 bne,a 400093cc <_Thread_queue_Enqueue_priority+0x1a0> 4000936c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40009370: 10 80 00 1b b 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 40009374: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 40009378: 7f ff e2 b0 call 40001e38 4000937c: 90 10 00 14 mov %l4, %o0 40009380: 7f ff e2 aa call 40001e28 40009384: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40009388: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000938c: 80 8d 40 01 btst %l5, %g1 40009390: 02 80 00 3d be 40009484 <_Thread_queue_Enqueue_priority+0x258> 40009394: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 40009398: e0 04 20 04 ld [ %l0 + 4 ], %l0 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 ) ) { 4000939c: 80 a4 00 13 cmp %l0, %l3 400093a0: 22 80 00 0f be,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 400093a4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 400093a8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 400093ac: 80 a4 80 11 cmp %l2, %l1 400093b0: 3a 80 00 0b bcc,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> 400093b4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 400093b8: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 400093bc: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 400093c0: 22 80 00 07 be,a 400093dc <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 400093c4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 400093c8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 400093cc: 80 a4 80 11 cmp %l2, %l1 400093d0: 0a bf ff ea bcs 40009378 <_Thread_queue_Enqueue_priority+0x14c> 400093d4: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 400093d8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 400093dc: 80 a6 20 01 cmp %i0, 1 400093e0: 12 bf ff ca bne 40009308 <_Thread_queue_Enqueue_priority+0xdc> 400093e4: 90 10 00 14 mov %l4, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 400093e8: 80 a4 80 11 cmp %l2, %l1 400093ec: 02 80 00 18 be 4000944c <_Thread_queue_Enqueue_priority+0x220> 400093f0: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 400093f4: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 400093f8: e0 26 60 04 st %l0, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 400093fc: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40009400: ec 26 60 44 st %l6, [ %i1 + 0x44 ] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 40009404: f2 20 60 04 st %i1, [ %g1 + 4 ] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 40009408: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000940c: 7f ff e2 8b call 40001e38 40009410: 01 00 00 00 nop 40009414: 81 c7 e0 08 ret 40009418: 81 e8 00 00 restore THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 4000941c: 02 80 00 0c be 4000944c <_Thread_queue_Enqueue_priority+0x220> 40009420: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40009424: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009428: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 4000942c: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 40009430: ec 26 60 44 st %l6, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40009434: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40009438: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000943c: 7f ff e2 7f call 40001e38 40009440: 90 10 00 14 mov %l4, %o0 40009444: 81 c7 e0 08 ret 40009448: 81 e8 00 00 restore 4000944c: 82 04 20 3c add %l0, 0x3c, %g1 _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; 40009450: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40009454: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40009458: c4 26 60 04 st %g2, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4000945c: ec 26 60 44 st %l6, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 40009460: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40009464: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40009468: 7f ff e2 74 call 40001e38 4000946c: b0 10 20 01 mov 1, %i0 40009470: 81 c7 e0 08 ret 40009474: 81 e8 00 00 restore if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 40009478: 7f ff e2 70 call 40001e38 <== NOT EXECUTED 4000947c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 40009480: 30 bf ff 7d b,a 40009274 <_Thread_queue_Enqueue_priority+0x48> <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 40009484: 7f ff e2 6d call 40001e38 <== NOT EXECUTED 40009488: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4000948c: 10 bf ff aa b 40009334 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 40009490: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40009494: 10 bf ff 9a b 400092fc <_Thread_queue_Enqueue_priority+0xd0> 40009498: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 4000e7d0 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000e7d0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000e7d4: 7f ff cd 95 call 40001e28 4000e7d8: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000e7dc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000e7e0: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000e7e4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000e7e8: 80 88 80 01 btst %g2, %g1 4000e7ec: 02 80 00 19 be 4000e850 <_Thread_queue_Extract_fifo+0x80> 4000e7f0: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000e7f4: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000e7f8: c4 06 60 04 ld [ %i1 + 4 ], %g2 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000e7fc: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000e800: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000e804: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000e808: 80 a0 e0 02 cmp %g3, 2 4000e80c: 02 80 00 07 be 4000e828 <_Thread_queue_Extract_fifo+0x58> 4000e810: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000e814: 7f ff cd 89 call 40001e38 4000e818: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000e81c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000e820: 7f ff e8 21 call 400088a4 <_Thread_Clear_state> 4000e824: 81 e8 00 00 restore 4000e828: 82 10 20 03 mov 3, %g1 4000e82c: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000e830: 7f ff cd 82 call 40001e38 4000e834: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000e838: 7f ff ee 15 call 4000a08c <_Watchdog_Remove> 4000e83c: 90 06 60 48 add %i1, 0x48, %o0 4000e840: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000e844: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000e848: 7f ff e8 17 call 400088a4 <_Thread_Clear_state> 4000e84c: 81 e8 00 00 restore ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000e850: 7f ff cd 7a call 40001e38 <== NOT EXECUTED 4000e854: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000e858: 01 00 00 00 nop 4000d60c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000d60c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4000d610: 7f ff d2 06 call 40001e28 4000d614: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000d618: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000d61c: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000d620: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000d624: 80 88 80 01 btst %g2, %g1 4000d628: 02 80 00 23 be 4000d6b4 <_Thread_queue_Extract_priority_helper+0xa8> 4000d62c: 82 06 60 3c add %i1, 0x3c, %g1 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000d630: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4000d634: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000d638: 80 a0 c0 01 cmp %g3, %g1 4000d63c: 02 80 00 2a be 4000d6e4 <_Thread_queue_Extract_priority_helper+0xd8> 4000d640: c2 06 60 04 ld [ %i1 + 4 ], %g1 new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4000d644: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000d648: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000d64c: c6 20 a0 04 st %g3, [ %g2 + 4 ] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4000d650: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000d654: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000d658: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000d65c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000d660: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000d664: 80 a0 80 01 cmp %g2, %g1 4000d668: 02 80 00 07 be 4000d684 <_Thread_queue_Extract_priority_helper+0x78> 4000d66c: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000d670: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000d674: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000d678: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000d67c: 82 00 e0 3c add %g3, 0x3c, %g1 4000d680: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000d684: 80 8e a0 ff btst 0xff, %i2 4000d688: 12 80 00 0d bne 4000d6bc <_Thread_queue_Extract_priority_helper+0xb0> 4000d68c: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000d690: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000d694: 80 a0 60 02 cmp %g1, 2 4000d698: 02 80 00 0b be 4000d6c4 <_Thread_queue_Extract_priority_helper+0xb8> 4000d69c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000d6a0: 7f ff d1 e6 call 40001e38 4000d6a4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000d6a8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000d6ac: 7f ff ec 7e call 400088a4 <_Thread_Clear_state> 4000d6b0: 81 e8 00 00 restore 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 ); 4000d6b4: 7f ff d1 e1 call 40001e38 <== NOT EXECUTED 4000d6b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4000d6bc: 7f ff d1 df call 40001e38 4000d6c0: 91 e8 00 08 restore %g0, %o0, %o0 4000d6c4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000d6c8: 7f ff d1 dc call 40001e38 4000d6cc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000d6d0: 7f ff f2 6f call 4000a08c <_Watchdog_Remove> 4000d6d4: 90 06 20 48 add %i0, 0x48, %o0 4000d6d8: b2 16 63 f8 or %i1, 0x3f8, %i1 4000d6dc: 7f ff ec 72 call 400088a4 <_Thread_Clear_state> 4000d6e0: 81 e8 00 00 restore new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000d6e4: c2 20 a0 04 st %g1, [ %g2 + 4 ] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4000d6e8: 10 bf ff e7 b 4000d684 <_Thread_queue_Extract_priority_helper+0x78> 4000d6ec: c4 20 40 00 st %g2, [ %g1 ] 4000d6f0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4000d6f0: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000d6f4: d0 02 20 44 ld [ %o0 + 0x44 ], %o0 * 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 && 4000d6f8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000d6fc: 80 a0 e0 00 cmp %g3, 0 4000d700: 02 80 00 06 be 4000d718 <_Thread_queue_Process_timeout+0x28> 4000d704: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000d708: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 4001ab00 <_Thread_Executing> 4000d70c: 80 a2 40 02 cmp %o1, %g2 4000d710: 02 80 00 07 be 4000d72c <_Thread_queue_Process_timeout+0x3c> 4000d714: 80 a0 e0 03 cmp %g3, 3 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; 4000d718: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000d71c: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000d720: 82 13 c0 00 mov %o7, %g1 4000d724: 7f ff ff af call 4000d5e0 <_Thread_queue_Extract> 4000d728: 9e 10 40 00 mov %g1, %o7 * 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 ) { 4000d72c: 02 80 00 06 be 4000d744 <_Thread_queue_Process_timeout+0x54> 4000d730: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000d734: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 4000d738: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000d73c: 81 c3 e0 08 retl 4000d740: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 4000d744: 81 c3 e0 08 retl <== NOT EXECUTED 4000d748: 01 00 00 00 nop 4000956c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000956c: 9d e3 bf 90 save %sp, -112, %sp /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 40009570: 80 a6 20 00 cmp %i0, 0 40009574: 02 80 00 13 be 400095c0 <_Thread_queue_Requeue+0x54> 40009578: 01 00 00 00 nop /* * 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 ) { 4000957c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 40009580: 80 a4 20 01 cmp %l0, 1 40009584: 02 80 00 04 be 40009594 <_Thread_queue_Requeue+0x28> 40009588: 01 00 00 00 nop 4000958c: 81 c7 e0 08 ret <== NOT EXECUTED 40009590: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 40009594: 7f ff e2 25 call 40001e28 40009598: 01 00 00 00 nop 4000959c: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 400095a0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 400095a4: 03 00 00 ef sethi %hi(0x3bc00), %g1 400095a8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 400095ac: 80 88 80 01 btst %g2, %g1 400095b0: 12 80 00 06 bne 400095c8 <_Thread_queue_Requeue+0x5c> 400095b4: 90 10 00 18 mov %i0, %o0 _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 ); 400095b8: 7f ff e2 20 call 40001e38 400095bc: 90 10 00 11 mov %l1, %o0 400095c0: 81 c7 e0 08 ret 400095c4: 81 e8 00 00 restore 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 ); 400095c8: 92 10 00 19 mov %i1, %o1 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; 400095cc: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 400095d0: 40 00 10 0f call 4000d60c <_Thread_queue_Extract_priority_helper> 400095d4: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 400095d8: 90 10 00 18 mov %i0, %o0 400095dc: 92 10 00 19 mov %i1, %o1 400095e0: 7f ff ff 13 call 4000922c <_Thread_queue_Enqueue_priority> 400095e4: 94 07 bf f4 add %fp, -12, %o2 400095e8: 30 bf ff f4 b,a 400095b8 <_Thread_queue_Requeue+0x4c> 40012cac <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 40012cac: 9d e3 bf 98 save %sp, -104, %sp 40012cb0: 03 10 00 d2 sethi %hi(0x40034800), %g1 break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40012cb4: 05 10 00 d2 sethi %hi(0x40034800), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40012cb8: a0 10 60 9c or %g1, 0x9c, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40012cbc: 03 10 00 d2 sethi %hi(0x40034800), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40012cc0: a4 10 a0 90 or %g2, 0x90, %l2 the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40012cc4: a2 10 60 7c or %g1, 0x7c, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40012cc8: 40 00 02 ca call 400137f0 <_Chain_Get> 40012ccc: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40012cd0: 80 a2 20 00 cmp %o0, 0 40012cd4: 02 80 00 0f be 40012d10 <_Timer_Server_process_insertions+0x64> 40012cd8: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 40012cdc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40012ce0: 80 a0 60 01 cmp %g1, 1 40012ce4: 02 80 00 12 be 40012d2c <_Timer_Server_process_insertions+0x80> 40012ce8: 80 a0 60 03 cmp %g1, 3 _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 40012cec: 02 80 00 0b be 40012d18 <_Timer_Server_process_insertions+0x6c> 40012cf0: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012cf4: 7f ff ff ee call 40012cac <_Timer_Server_process_insertions> <== NOT EXECUTED 40012cf8: 01 00 00 00 nop <== NOT EXECUTED static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 40012cfc: 40 00 02 bd call 400137f0 <_Chain_Get> 40012d00: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 40012d04: 80 a2 20 00 cmp %o0, 0 40012d08: 32 bf ff f6 bne,a 40012ce0 <_Timer_Server_process_insertions+0x34> 40012d0c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 40012d10: 81 c7 e0 08 ret 40012d14: 81 e8 00 00 restore break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 40012d18: 40 00 12 10 call 40017558 <_Watchdog_Insert> 40012d1c: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012d20: 7f ff ff e3 call 40012cac <_Timer_Server_process_insertions> 40012d24: 01 00 00 00 nop 40012d28: 30 bf ff f5 b,a 40012cfc <_Timer_Server_process_insertions+0x50> the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 40012d2c: 92 02 20 10 add %o0, 0x10, %o1 40012d30: 40 00 12 0a call 40017558 <_Watchdog_Insert> 40012d34: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 40012d38: 7f ff ff dd call 40012cac <_Timer_Server_process_insertions> 40012d3c: 01 00 00 00 nop 40012d40: 30 bf ff ef b,a 40012cfc <_Timer_Server_process_insertions+0x50> 4000b790 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000b790: 9d e3 bf 98 save %sp, -104, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000b794: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000b798: de 06 60 04 ld [ %i1 + 4 ], %o7 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000b79c: 91 38 60 1f sra %g1, 0x1f, %o0 4000b7a0: 92 10 00 01 mov %g1, %o1 4000b7a4: 83 30 60 1d srl %g1, 0x1d, %g1 4000b7a8: 87 2a 60 03 sll %o1, 3, %g3 4000b7ac: 85 2a 20 03 sll %o0, 3, %g2 4000b7b0: 84 10 40 02 or %g1, %g2, %g2 4000b7b4: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b7b8: 99 28 a0 05 sll %g2, 5, %o4 4000b7bc: 9b 28 e0 05 sll %g3, 5, %o5 4000b7c0: 98 10 40 0c or %g1, %o4, %o4 4000b7c4: 9a a3 40 03 subcc %o5, %g3, %o5 4000b7c8: 83 33 60 1a srl %o5, 0x1a, %g1 4000b7cc: 98 63 00 02 subx %o4, %g2, %o4 4000b7d0: 97 2b 60 06 sll %o5, 6, %o3 4000b7d4: 95 2b 20 06 sll %o4, 6, %o2 4000b7d8: 96 a2 c0 0d subcc %o3, %o5, %o3 4000b7dc: 94 10 40 0a or %g1, %o2, %o2 4000b7e0: 94 62 80 0c subx %o2, %o4, %o2 4000b7e4: 96 82 c0 09 addcc %o3, %o1, %o3 4000b7e8: 94 42 80 08 addx %o2, %o0, %o2 4000b7ec: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b7f0: 85 2a a0 02 sll %o2, 2, %g2 4000b7f4: 84 10 40 02 or %g1, %g2, %g2 4000b7f8: 87 2a e0 02 sll %o3, 2, %g3 4000b7fc: 96 82 c0 03 addcc %o3, %g3, %o3 4000b800: 94 42 80 02 addx %o2, %g2, %o2 4000b804: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b808: 85 2a a0 02 sll %o2, 2, %g2 4000b80c: 84 10 40 02 or %g1, %g2, %g2 4000b810: 87 2a e0 02 sll %o3, 2, %g3 4000b814: 96 82 c0 03 addcc %o3, %g3, %o3 4000b818: 94 42 80 02 addx %o2, %g2, %o2 4000b81c: 83 32 e0 1e srl %o3, 0x1e, %g1 4000b820: 85 2a a0 02 sll %o2, 2, %g2 4000b824: 84 10 40 02 or %g1, %g2, %g2 4000b828: 87 2a e0 02 sll %o3, 2, %g3 4000b82c: 96 82 c0 03 addcc %o3, %g3, %o3 4000b830: 94 42 80 02 addx %o2, %g2, %o2 4000b834: 85 32 e0 17 srl %o3, 0x17, %g2 4000b838: 83 2a a0 09 sll %o2, 9, %g1 4000b83c: 9b 2a e0 09 sll %o3, 9, %o5 4000b840: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000b844: 96 83 40 0f addcc %o5, %o7, %o3 4000b848: 85 3b e0 1f sra %o7, 0x1f, %g2 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 4000b84c: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000b850: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000b854: 80 92 80 0b orcc %o2, %o3, %g0 4000b858: 02 80 00 5d be 4000b9cc <_Timespec_Divide+0x23c> 4000b85c: d0 06 00 00 ld [ %i0 ], %o0 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000b860: 92 10 00 08 mov %o0, %o1 4000b864: 83 32 60 1d srl %o1, 0x1d, %g1 4000b868: 9b 2a 60 03 sll %o1, 3, %o5 4000b86c: 91 3a 20 1f sra %o0, 0x1f, %o0 4000b870: 99 2a 20 03 sll %o0, 3, %o4 4000b874: 98 10 40 0c or %g1, %o4, %o4 4000b878: 83 33 60 1b srl %o5, 0x1b, %g1 4000b87c: 85 2b 20 05 sll %o4, 5, %g2 4000b880: 87 2b 60 05 sll %o5, 5, %g3 4000b884: 84 10 40 02 or %g1, %g2, %g2 4000b888: 86 a0 c0 0d subcc %g3, %o5, %g3 4000b88c: 83 30 e0 1a srl %g3, 0x1a, %g1 4000b890: 84 60 80 0c subx %g2, %o4, %g2 4000b894: 9b 28 e0 06 sll %g3, 6, %o5 4000b898: 99 28 a0 06 sll %g2, 6, %o4 4000b89c: 9a a3 40 03 subcc %o5, %g3, %o5 4000b8a0: 98 10 40 0c or %g1, %o4, %o4 4000b8a4: 98 63 00 02 subx %o4, %g2, %o4 4000b8a8: 9a 83 40 09 addcc %o5, %o1, %o5 4000b8ac: 83 33 60 1e srl %o5, 0x1e, %g1 4000b8b0: 98 43 00 08 addx %o4, %o0, %o4 4000b8b4: 87 2b 60 02 sll %o5, 2, %g3 4000b8b8: 85 2b 20 02 sll %o4, 2, %g2 4000b8bc: 9a 83 40 03 addcc %o5, %g3, %o5 4000b8c0: 84 10 40 02 or %g1, %g2, %g2 4000b8c4: 83 33 60 1e srl %o5, 0x1e, %g1 4000b8c8: 98 43 00 02 addx %o4, %g2, %o4 4000b8cc: 87 2b 60 02 sll %o5, 2, %g3 4000b8d0: 85 2b 20 02 sll %o4, 2, %g2 4000b8d4: 9a 83 40 03 addcc %o5, %g3, %o5 4000b8d8: 84 10 40 02 or %g1, %g2, %g2 4000b8dc: 83 33 60 1e srl %o5, 0x1e, %g1 4000b8e0: 98 43 00 02 addx %o4, %g2, %o4 4000b8e4: 87 2b 60 02 sll %o5, 2, %g3 4000b8e8: 85 2b 20 02 sll %o4, 2, %g2 4000b8ec: 9a 83 40 03 addcc %o5, %g3, %o5 4000b8f0: 84 10 40 02 or %g1, %g2, %g2 4000b8f4: 98 43 00 02 addx %o4, %g2, %o4 4000b8f8: 83 2b 20 09 sll %o4, 9, %g1 4000b8fc: 89 33 60 17 srl %o5, 0x17, %g4 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000b900: a6 10 00 12 mov %l2, %l3 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000b904: a0 11 00 01 or %g4, %g1, %l0 4000b908: a3 2b 60 09 sll %o5, 9, %l1 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000b90c: a2 84 40 13 addcc %l1, %l3, %l1 4000b910: 83 34 60 1e srl %l1, 0x1e, %g1 4000b914: 87 2c 60 02 sll %l1, 2, %g3 4000b918: a5 3c a0 1f sra %l2, 0x1f, %l2 4000b91c: a0 44 00 12 addx %l0, %l2, %l0 4000b920: 85 2c 20 02 sll %l0, 2, %g2 4000b924: 84 10 40 02 or %g1, %g2, %g2 4000b928: 83 30 e0 1b srl %g3, 0x1b, %g1 4000b92c: 99 28 a0 05 sll %g2, 5, %o4 4000b930: 9b 28 e0 05 sll %g3, 5, %o5 4000b934: 98 10 40 0c or %g1, %o4, %o4 4000b938: 9a a3 40 03 subcc %o5, %g3, %o5 4000b93c: 98 63 00 02 subx %o4, %g2, %o4 4000b940: 9a 83 40 11 addcc %o5, %l1, %o5 4000b944: 83 33 60 1e srl %o5, 0x1e, %g1 4000b948: 98 43 00 10 addx %o4, %l0, %o4 4000b94c: 87 2b 60 02 sll %o5, 2, %g3 4000b950: 85 2b 20 02 sll %o4, 2, %g2 4000b954: 9a 83 40 03 addcc %o5, %g3, %o5 4000b958: 84 10 40 02 or %g1, %g2, %g2 4000b95c: 83 33 60 1e srl %o5, 0x1e, %g1 4000b960: 87 2b 60 02 sll %o5, 2, %g3 4000b964: 98 43 00 02 addx %o4, %g2, %o4 4000b968: 9a 83 40 03 addcc %o5, %g3, %o5 4000b96c: 85 2b 20 02 sll %o4, 2, %g2 4000b970: 84 10 40 02 or %g1, %g2, %g2 4000b974: 83 33 60 1b srl %o5, 0x1b, %g1 4000b978: 98 43 00 02 addx %o4, %g2, %o4 4000b97c: 99 2b 20 05 sll %o4, 5, %o4 4000b980: 98 10 40 0c or %g1, %o4, %o4 4000b984: 93 2b 60 05 sll %o5, 5, %o1 4000b988: 40 00 36 fe call 40019580 <__udivdi3> 4000b98c: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000b990: 94 10 20 00 clr %o2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000b994: a0 10 00 08 mov %o0, %l0 4000b998: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000b99c: 96 10 23 e8 mov 0x3e8, %o3 4000b9a0: 40 00 36 f8 call 40019580 <__udivdi3> 4000b9a4: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000b9a8: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000b9ac: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000b9b0: 94 10 20 00 clr %o2 4000b9b4: 92 10 00 11 mov %l1, %o1 4000b9b8: 40 00 37 ce call 400198f0 <__umoddi3> 4000b9bc: 96 10 23 e8 mov 0x3e8, %o3 4000b9c0: d2 26 c0 00 st %o1, [ %i3 ] 4000b9c4: 81 c7 e0 08 ret 4000b9c8: 81 e8 00 00 restore left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; if ( right == 0 ) { *ival_percentage = 0; 4000b9cc: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000b9d0: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000b9d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b9d8: 81 e8 00 00 restore <== NOT EXECUTED 400103ac <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 400103ac: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 400103b0: 40 00 14 e1 call 40015734 <_Chain_Extract> 400103b4: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 400103b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 400103bc: 80 a0 60 00 cmp %g1, 0 400103c0: 02 80 00 04 be 400103d0 <_User_extensions_Remove_set+0x24> 400103c4: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 400103c8: 40 00 14 db call 40015734 <_Chain_Extract> <== NOT EXECUTED 400103cc: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 400103d0: 81 c7 e0 08 ret 400103d4: 81 e8 00 00 restore 40009d88 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40009d88: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; 40009d8c: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40009d90: e0 00 60 78 ld [ %g1 + 0x78 ], %l0 ! 4001ac78 <_User_extensions_List> 40009d94: 82 10 60 78 or %g1, 0x78, %g1 40009d98: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40009d9c: 80 a4 00 11 cmp %l0, %l1 40009da0: 02 80 00 10 be 40009de0 <_User_extensions_Thread_create+0x58> 40009da4: 03 10 00 6a sethi %hi(0x4001a800), %g1 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( 40009da8: a4 10 63 00 or %g1, 0x300, %l2 ! 4001ab00 <_Thread_Executing> !_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 ) { 40009dac: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 40009db0: 80 a0 60 00 cmp %g1, 0 40009db4: 02 80 00 07 be 40009dd0 <_User_extensions_Thread_create+0x48> 40009db8: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40009dbc: 9f c0 40 00 call %g1 40009dc0: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40009dc4: 80 8a 20 ff btst 0xff, %o0 40009dc8: 02 80 00 08 be 40009de8 <_User_extensions_Thread_create+0x60> 40009dcc: 01 00 00 00 nop 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 ) { 40009dd0: e0 04 00 00 ld [ %l0 ], %l0 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40009dd4: 80 a4 00 11 cmp %l0, %l1 40009dd8: 32 bf ff f6 bne,a 40009db0 <_User_extensions_Thread_create+0x28> 40009ddc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 40009de0: 81 c7 e0 08 ret 40009de4: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 40009de8: 81 c7 e0 08 ret <== NOT EXECUTED 40009dec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000bd64 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4000bd64: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000bd68: 7f ff db 4d call 40002a9c 4000bd6c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bd70: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000bd74: a0 06 20 04 add %i0, 4, %l0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4000bd78: 80 a0 80 10 cmp %g2, %l0 4000bd7c: 02 80 00 1f be 4000bdf8 <_Watchdog_Adjust+0x94> 4000bd80: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 4000bd84: 12 80 00 1f bne 4000be00 <_Watchdog_Adjust+0x9c> 4000bd88: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000bd8c: 80 a6 a0 00 cmp %i2, 0 4000bd90: 02 80 00 1a be 4000bdf8 <_Watchdog_Adjust+0x94> 4000bd94: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000bd98: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000bd9c: 80 a6 80 19 cmp %i2, %i1 4000bda0: 1a 80 00 0b bcc 4000bdcc <_Watchdog_Adjust+0x68> 4000bda4: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 4000bda8: 10 80 00 1d b 4000be1c <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 4000bdac: 82 26 40 1a sub %i1, %i2, %g1 <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4000bdb0: b4 a6 80 19 subcc %i2, %i1, %i2 4000bdb4: 02 80 00 11 be 4000bdf8 <_Watchdog_Adjust+0x94> 4000bdb8: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 4000bdbc: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 4000bdc0: 80 a6 40 1a cmp %i1, %i2 4000bdc4: 18 80 00 16 bgu 4000be1c <_Watchdog_Adjust+0xb8> 4000bdc8: 82 26 40 1a sub %i1, %i2, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4000bdcc: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 4000bdd0: 7f ff db 37 call 40002aac 4000bdd4: 01 00 00 00 nop _Watchdog_Tickle( header ); 4000bdd8: 40 00 00 b4 call 4000c0a8 <_Watchdog_Tickle> 4000bddc: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000bde0: 7f ff db 2f call 40002a9c 4000bde4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000bde8: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 4000bdec: 80 a4 00 01 cmp %l0, %g1 4000bdf0: 12 bf ff f0 bne 4000bdb0 <_Watchdog_Adjust+0x4c> 4000bdf4: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 4000bdf8: 7f ff db 2d call 40002aac 4000bdfc: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4000be00: 12 bf ff fe bne 4000bdf8 <_Watchdog_Adjust+0x94> 4000be04: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4000be08: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000be0c: 82 00 40 1a add %g1, %i2, %g1 4000be10: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 4000be14: 7f ff db 26 call 40002aac 4000be18: 91 e8 00 08 restore %g0, %o0, %o0 _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 4000be1c: 10 bf ff f7 b 4000bdf8 <_Watchdog_Adjust+0x94> 4000be20: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 40017488 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 40017488: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 4001748c: a2 96 60 00 orcc %i1, 0, %l1 40017490: 12 80 00 04 bne 400174a0 <_Watchdog_Adjust_to_chain+0x18> 40017494: 01 00 00 00 nop 40017498: 81 c7 e0 08 ret 4001749c: 81 e8 00 00 restore return; } _ISR_Disable( level ); 400174a0: 7f ff cf 86 call 4000b2b8 400174a4: 01 00 00 00 nop 400174a8: a6 10 00 08 mov %o0, %l3 400174ac: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400174b0: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 400174b4: 80 a0 80 10 cmp %g2, %l0 400174b8: 02 80 00 25 be 4001754c <_Watchdog_Adjust_to_chain+0xc4> 400174bc: a4 06 a0 04 add %i2, 4, %l2 400174c0: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 400174c4: 80 a6 40 11 cmp %i1, %l1 400174c8: 18 80 00 20 bgu 40017548 <_Watchdog_Adjust_to_chain+0xc0> 400174cc: 82 26 40 11 sub %i1, %l1, %g1 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 400174d0: 10 80 00 15 b 40017524 <_Watchdog_Adjust_to_chain+0x9c> 400174d4: c0 20 a0 10 clr [ %g2 + 0x10 ] Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 400174d8: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 400174dc: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 400174e0: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 400174e4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 400174e8: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 400174ec: c2 20 a0 04 st %g1, [ %g2 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 400174f0: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 400174f4: 7f ff cf 75 call 4000b2c8 400174f8: 90 10 00 13 mov %l3, %o0 400174fc: 7f ff cf 6f call 4000b2b8 40017500: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40017504: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40017508: 80 a4 00 02 cmp %l0, %g2 4001750c: 02 80 00 10 be 4001754c <_Watchdog_Adjust_to_chain+0xc4> 40017510: 01 00 00 00 nop 40017514: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40017518: 80 a0 60 00 cmp %g1, 0 4001751c: 32 80 00 07 bne,a 40017538 <_Watchdog_Adjust_to_chain+0xb0> 40017520: a2 a4 40 19 subcc %l1, %i1, %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40017524: 80 a4 00 02 cmp %l0, %g2 40017528: 32 bf ff ec bne,a 400174d8 <_Watchdog_Adjust_to_chain+0x50> 4001752c: c2 00 80 00 ld [ %g2 ], %g1 40017530: 10 bf ff ec b 400174e0 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 40017534: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 40017538: 02 80 00 05 be 4001754c <_Watchdog_Adjust_to_chain+0xc4> 4001753c: 01 00 00 00 nop 40017540: 10 bf ff e1 b 400174c4 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 40017544: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 40017548: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 4001754c: 7f ff cf 5f call 4000b2c8 40017550: 91 e8 00 13 restore %g0, %l3, %o0 40017554: 01 00 00 00 nop 40009ee0 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009ee0: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 40009ee4: 03 10 00 6a sethi %hi(0x4001a800), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40009ee8: ac 10 00 18 mov %i0, %l6 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 40009eec: e6 00 62 dc ld [ %g1 + 0x2dc ], %l3 _ISR_Disable( level ); 40009ef0: 7f ff df ce call 40001e28 40009ef4: 01 00 00 00 nop 40009ef8: b0 10 00 08 mov %o0, %i0 /* * 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 ) { 40009efc: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009f00: 80 a0 60 00 cmp %g1, 0 40009f04: 12 80 00 4a bne 4000a02c <_Watchdog_Insert+0x14c> 40009f08: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 40009f0c: 2b 10 00 6a sethi %hi(0x4001a800), %l5 40009f10: c2 05 63 90 ld [ %l5 + 0x390 ], %g1 ! 4001ab90 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009f14: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40009f18: 82 00 60 01 inc %g1 40009f1c: 2f 10 00 6a sethi %hi(0x4001a800), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40009f20: c4 26 60 08 st %g2, [ %i1 + 8 ] 40009f24: a8 15 e2 fc or %l7, 0x2fc, %l4 _Watchdog_Sync_count++; 40009f28: c2 25 63 90 st %g1, [ %l5 + 0x390 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009f2c: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 40009f30: e4 06 60 0c ld [ %i1 + 0xc ], %l2 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 40009f34: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40009f38: 80 a4 a0 00 cmp %l2, 0 40009f3c: 02 80 00 2b be 40009fe8 <_Watchdog_Insert+0x108> 40009f40: 03 10 00 6a sethi %hi(0x4001a800), %g1 40009f44: c2 04 40 00 ld [ %l1 ], %g1 40009f48: 80 a0 60 00 cmp %g1, 0 40009f4c: 02 80 00 27 be 40009fe8 <_Watchdog_Insert+0x108> 40009f50: 03 10 00 6a sethi %hi(0x4001a800), %g1 break; if ( delta_interval < after->delta_interval ) { 40009f54: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40009f58: 80 a4 80 10 cmp %l2, %l0 40009f5c: 1a 80 00 13 bcc 40009fa8 <_Watchdog_Insert+0xc8> 40009f60: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 40009f64: 10 80 00 20 b 40009fe4 <_Watchdog_Insert+0x104> 40009f68: c2 24 60 10 st %g1, [ %l1 + 0x10 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40009f6c: c2 05 00 00 ld [ %l4 ], %g1 40009f70: 80 a4 c0 01 cmp %l3, %g1 40009f74: 0a 80 00 30 bcs 4000a034 <_Watchdog_Insert+0x154> 40009f78: 01 00 00 00 nop */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40009f7c: a4 a4 80 10 subcc %l2, %l0, %l2 40009f80: 02 80 00 19 be 40009fe4 <_Watchdog_Insert+0x104> 40009f84: e2 04 40 00 ld [ %l1 ], %l1 40009f88: c2 04 40 00 ld [ %l1 ], %g1 40009f8c: 80 a0 60 00 cmp %g1, 0 40009f90: 02 80 00 16 be 40009fe8 <_Watchdog_Insert+0x108> 40009f94: 03 10 00 6a sethi %hi(0x4001a800), %g1 break; if ( delta_interval < after->delta_interval ) { 40009f98: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 40009f9c: 80 a4 00 12 cmp %l0, %l2 40009fa0: 18 80 00 10 bgu 40009fe0 <_Watchdog_Insert+0x100> 40009fa4: 82 24 00 12 sub %l0, %l2, %g1 * 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 ); 40009fa8: 7f ff df a4 call 40001e38 40009fac: 90 10 00 18 mov %i0, %o0 40009fb0: 7f ff df 9e call 40001e28 40009fb4: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 40009fb8: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009fbc: 80 a0 60 01 cmp %g1, 1 40009fc0: 02 bf ff eb be 40009f6c <_Watchdog_Insert+0x8c> 40009fc4: 01 00 00 00 nop _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; 40009fc8: e6 25 e2 fc st %l3, [ %l7 + 0x2fc ] <== NOT EXECUTED _Watchdog_Sync_count--; 40009fcc: c2 05 63 90 ld [ %l5 + 0x390 ], %g1 <== NOT EXECUTED 40009fd0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009fd4: c2 25 63 90 st %g1, [ %l5 + 0x390 ] <== NOT EXECUTED _ISR_Enable( level ); 40009fd8: 7f ff df 98 call 40001e38 <== NOT EXECUTED 40009fdc: 81 e8 00 00 restore <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 40009fe0: c2 24 60 10 st %g1, [ %l1 + 0x10 ] the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40009fe4: 03 10 00 6a sethi %hi(0x4001a800), %g1 40009fe8: c6 00 63 94 ld [ %g1 + 0x394 ], %g3 ! 4001ab94 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 40009fec: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40009ff0: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40009ff4: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40009ff8: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40009ffc: c8 00 80 00 ld [ %g2 ], %g4 _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; 4000a000: e6 25 e2 fc st %l3, [ %l7 + 0x2fc ] 4000a004: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 4000a008: c2 05 63 90 ld [ %l5 + 0x390 ], %g1 after_node->next = the_node; 4000a00c: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4000a010: c4 26 60 04 st %g2, [ %i1 + 4 ] 4000a014: 82 00 7f ff add %g1, -1, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 4000a018: f2 21 20 04 st %i1, [ %g4 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 4000a01c: c8 26 40 00 st %g4, [ %i1 ] 4000a020: c2 25 63 90 st %g1, [ %l5 + 0x390 ] _ISR_Enable( level ); 4000a024: 7f ff df 85 call 40001e38 4000a028: 81 e8 00 00 restore * 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 ); 4000a02c: 7f ff df 83 call 40001e38 <== NOT EXECUTED 4000a030: 81 e8 00 00 restore <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 4000a034: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000a038: 10 bf ff bf b 40009f34 <_Watchdog_Insert+0x54> 4000a03c: e4 06 60 0c ld [ %i1 + 0xc ], %l2 4000a08c <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4000a08c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4000a090: 7f ff df 66 call 40001e28 4000a094: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 4000a098: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 4000a09c: 80 a6 20 01 cmp %i0, 1 4000a0a0: 02 80 00 2a be 4000a148 <_Watchdog_Remove+0xbc> 4000a0a4: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a0a8: 1a 80 00 09 bcc 4000a0cc <_Watchdog_Remove+0x40> 4000a0ac: 80 a6 20 03 cmp %i0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a0b0: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a0b4: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 4001ab94 <_Watchdog_Ticks_since_boot> 4000a0b8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000a0bc: 7f ff df 5f call 40001e38 4000a0c0: 01 00 00 00 nop return( previous_state ); } 4000a0c4: 81 c7 e0 08 ret 4000a0c8: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4000a0cc: 18 bf ff fa bgu 4000a0b4 <_Watchdog_Remove+0x28> 4000a0d0: 03 10 00 6a sethi %hi(0x4001a800), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000a0d4: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000a0d8: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000a0dc: c2 01 00 00 ld [ %g4 ], %g1 4000a0e0: 80 a0 60 00 cmp %g1, 0 4000a0e4: 02 80 00 07 be 4000a100 <_Watchdog_Remove+0x74> 4000a0e8: 03 10 00 6a sethi %hi(0x4001a800), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000a0ec: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 4000a0f0: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 4000a0f4: 82 00 40 02 add %g1, %g2, %g1 4000a0f8: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 4000a0fc: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a100: c4 00 63 90 ld [ %g1 + 0x390 ], %g2 ! 4001ab90 <_Watchdog_Sync_count> 4000a104: 80 a0 a0 00 cmp %g2, 0 4000a108: 22 80 00 07 be,a 4000a124 <_Watchdog_Remove+0x98> 4000a10c: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 4000a110: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a114: c6 00 62 dc ld [ %g1 + 0x2dc ], %g3 ! 4001aadc <_ISR_Nest_level> 4000a118: 05 10 00 6a sethi %hi(0x4001a800), %g2 4000a11c: c6 20 a2 fc st %g3, [ %g2 + 0x2fc ] ! 4001aafc <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000a120: c2 04 20 04 ld [ %l0 + 4 ], %g1 next->previous = previous; previous->next = next; 4000a124: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000a128: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a12c: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a130: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 4001ab94 <_Watchdog_Ticks_since_boot> 4000a134: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000a138: 7f ff df 40 call 40001e38 4000a13c: 01 00 00 00 nop return( previous_state ); } 4000a140: 81 c7 e0 08 ret 4000a144: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a148: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 4000a14c: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000a150: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 4000a154: 7f ff df 39 call 40001e38 <== NOT EXECUTED 4000a158: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 4000a15c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a160: 81 e8 00 00 restore <== NOT EXECUTED 4000a27c <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 4000a27c: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 4000a280: 80 a6 20 00 cmp %i0, 0 4000a284: 02 80 00 15 be 4000a2d8 <_Workspace_Handler_initialization+0x5c> 4000a288: 80 8e 20 07 btst 7, %i0 4000a28c: 12 80 00 14 bne 4000a2dc <_Workspace_Handler_initialization+0x60> 4000a290: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 4000a294: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000a298: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001aad8 <_Configuration_Table> 4000a29c: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 4000a2a0: 80 a0 e0 00 cmp %g3, 0 4000a2a4: 32 80 00 11 bne,a 4000a2e8 <_Workspace_Handler_initialization+0x6c> 4000a2a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 4000a2ac: 92 10 00 18 mov %i0, %o1 4000a2b0: 94 10 00 19 mov %i1, %o2 4000a2b4: 11 10 00 6a sethi %hi(0x4001a800), %o0 4000a2b8: 96 10 20 08 mov 8, %o3 4000a2bc: 7f ff f5 eb call 40007a68 <_Heap_Initialize> 4000a2c0: 90 12 22 64 or %o0, 0x264, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000a2c4: 80 a2 20 00 cmp %o0, 0 4000a2c8: 02 80 00 0d be 4000a2fc <_Workspace_Handler_initialization+0x80> 4000a2cc: 92 10 20 01 mov 1, %o1 4000a2d0: 81 c7 e0 08 ret 4000a2d4: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 4000a2d8: 90 10 20 00 clr %o0 4000a2dc: 92 10 20 01 mov 1, %o1 4000a2e0: 7f ff f6 6f call 40007c9c <_Internal_error_Occurred> 4000a2e4: 94 10 20 02 mov 2, %o2 TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 4000a2e8: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000a2ec: 40 00 13 c3 call 4000f1f8 <== NOT EXECUTED 4000a2f0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 4000a2f4: 10 bf ff ef b 4000a2b0 <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 4000a2f8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4000a2fc: 7f ff f6 68 call 40007c9c <_Internal_error_Occurred> <== NOT EXECUTED 4000a300: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 4000a304: 01 00 00 00 nop 400030c4 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 400030c4: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 400030c8: 94 10 20 00 clr %o2 <== NOT EXECUTED 400030cc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400030d0: 7f ff ff eb call 4000307c <__assert_func> <== NOT EXECUTED 400030d4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400030d8: 01 00 00 00 nop 4000307c <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 4000307c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40003080: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 40003084: 9a 10 00 1a mov %i2, %o5 <== NOT EXECUTED 40003088: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 4000308c: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED 40003090: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40003094: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 40003098: 02 80 00 07 be 400030b4 <__assert_func+0x38> <== NOT EXECUTED 4000309c: 98 10 63 f8 or %g1, 0x3f8, %o4 <== NOT EXECUTED 400030a0: 11 10 00 63 sethi %hi(0x40018c00), %o0 <== NOT EXECUTED 400030a4: 40 00 04 0a call 400040cc <== NOT EXECUTED 400030a8: 90 12 20 08 or %o0, 8, %o0 ! 40018c08 <__func__.4894+0x208> <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 400030ac: 40 00 0f ee call 40007064 <== NOT EXECUTED 400030b0: 90 10 20 00 clr %o0 <== NOT EXECUTED int line, const char *func, const char *failedexpr ) { printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 400030b4: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 400030b8: 9a 10 63 c8 or %g1, 0x3c8, %o5 ! 40018bc8 <__func__.4894+0x1c8> <== NOT EXECUTED 400030bc: 10 bf ff f9 b 400030a0 <__assert_func+0x24> <== NOT EXECUTED 400030c0: 98 10 00 0d mov %o5, %o4 <== NOT EXECUTED 40017e28 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 40017e28: 9d e3 bf 98 save %sp, -104, %sp 40017e2c: 40 00 07 2a call 40019ad4 <_fini> 40017e30: 01 00 00 00 nop * 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(); 40017e34: 7f ff ff e1 call 40017db8 40017e38: 01 00 00 00 nop rtems_shutdown_executive(status); 40017e3c: 40 00 00 52 call 40017f84 40017e40: 90 10 00 18 mov %i0, %o0 40017e44: 30 80 00 00 b,a 40017e44 <_exit+0x1c> <== NOT EXECUTED 40030fac <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 40030fac: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40030fb0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40030fb4: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 40030fb8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40030fbc: 7f ff ff 6a call 40030d64 <== NOT EXECUTED 40030fc0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40030fc4: 01 00 00 00 nop 40024d4c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 40024d4c: 81 c3 e0 08 retl <== NOT EXECUTED 40024d50: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000baa8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000baa8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000baac: 7f ff ff e6 call 4000ba44 <== NOT EXECUTED 4000bab0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000bab4: 01 00 00 00 nop 40023c78 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 40023c78: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40023c7c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40023c80: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40023c84: 7f ff ff 59 call 400239e8 <== NOT EXECUTED 40023c88: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40023c8c: 01 00 00 00 nop 40023edc <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40023edc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40023ee0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40023ee4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40023ee8: 7f ff ff b3 call 40023db4 <== NOT EXECUTED 40023eec: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40023ef0: 01 00 00 00 nop 40003c2c <_open_r>: const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 40003c2c: 90 10 00 09 mov %o1, %o0 40003c30: 92 10 00 0a mov %o2, %o1 40003c34: 94 10 00 0b mov %o3, %o2 40003c38: 82 13 c0 00 mov %o7, %g1 40003c3c: 7f ff ff 38 call 4000391c 40003c40: 9e 10 40 00 mov %g1, %o7 40003c44: 01 00 00 00 nop <== NOT EXECUTED 40017f50 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 40017f50: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40017f54: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40017f58: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40017f5c: 40 00 00 17 call 40017fb8 <== NOT EXECUTED 40017f60: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40017f64: 01 00 00 00 nop 40045258 <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 40045258: 9d e3 bf 48 save %sp, -184, %sp <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 4004525c: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 40045260: 7f ff 0b e3 call 400081ec <== NOT EXECUTED 40045264: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 40045268: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4004526c: 06 80 00 0f bl 400452a8 <_rename_r+0x50> <== NOT EXECUTED 40045270: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED return s; s = link( old, new ); 40045274: 7f ff 79 dd call 400239e8 <== NOT EXECUTED 40045278: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 4004527c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40045280: 06 80 00 0a bl 400452a8 <_rename_r+0x50> <== NOT EXECUTED 40045284: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 40045288: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 4004528c: 07 00 00 10 sethi %hi(0x4000), %g3 <== NOT EXECUTED 40045290: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40045294: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40045298: 02 80 00 06 be 400452b0 <_rename_r+0x58> <== NOT EXECUTED 4004529c: 01 00 00 00 nop <== NOT EXECUTED 400452a0: 7f ff 7e 27 call 40024b3c <== NOT EXECUTED 400452a4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 400452a8: 81 c7 e0 08 ret <== NOT EXECUTED 400452ac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( s < 0 ) return s; s = link( old, new ); if ( s < 0 ) return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 400452b0: 7f ff 7d 08 call 400246d0 <== NOT EXECUTED 400452b4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 400452b8: 81 c7 e0 08 ret <== NOT EXECUTED 400452bc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40008314 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40008314: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40008318: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4000831c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40008320: 7f ff ff b3 call 400081ec <== NOT EXECUTED 40008324: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40008328: 01 00 00 00 nop 40024ca0 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 40024ca0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40024ca4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40024ca8: 7f ff ff a5 call 40024b3c <== NOT EXECUTED 40024cac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40024cb0: 01 00 00 00 nop 400083c4 : } unsigned int alarm( unsigned int seconds ) { 400083c4: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 400083c8: 03 10 00 69 sethi %hi(0x4001a400), %g1 400083cc: a2 10 60 84 or %g1, 0x84, %l1 ! 4001a484 <_POSIX_signals_Alarm_timer> 400083d0: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400083d4: 80 a0 a0 00 cmp %g2, 0 400083d8: 02 80 00 23 be 40008464 400083dc: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 400083e0: 40 00 14 a0 call 4000d660 <_Watchdog_Remove> 400083e4: 90 10 00 11 mov %l1, %o0 400083e8: 90 02 3f fe add %o0, -2, %o0 400083ec: 80 a2 20 01 cmp %o0, 1 400083f0: 08 80 00 09 bleu 40008414 400083f4: b0 10 20 00 clr %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400083f8: e4 24 60 0c st %l2, [ %l1 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 400083fc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40008400: 11 10 00 69 sethi %hi(0x4001a400), %o0 <== NOT EXECUTED 40008404: 40 00 14 2c call 4000d4b4 <_Watchdog_Insert> <== NOT EXECUTED 40008408: 90 12 22 b4 or %o0, 0x2b4, %o0 ! 4001a6b4 <_Watchdog_Seconds_chain> <== NOT EXECUTED } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 4000840c: 81 c7 e0 08 ret <== NOT EXECUTED 40008410: 81 e8 00 00 restore <== NOT EXECUTED * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 40008414: c4 04 60 14 ld [ %l1 + 0x14 ], %g2 40008418: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000841c: e0 04 60 18 ld [ %l1 + 0x18 ], %l0 40008420: d2 00 63 80 ld [ %g1 + 0x380 ], %o1 40008424: a0 24 00 02 sub %l0, %g2, %l0 40008428: 11 00 03 d0 sethi %hi(0xf4000), %o0 4000842c: 40 00 36 7d call 40015e20 <.udiv> 40008430: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 40008434: 92 10 00 08 mov %o0, %o1 40008438: 40 00 36 7a call 40015e20 <.udiv> 4000843c: 90 10 00 10 mov %l0, %o0 40008440: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40008444: 92 10 00 11 mov %l1, %o1 40008448: b0 20 40 08 sub %g1, %o0, %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000844c: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40008450: 11 10 00 69 sethi %hi(0x4001a400), %o0 40008454: 40 00 14 18 call 4000d4b4 <_Watchdog_Insert> 40008458: 90 12 22 b4 or %o0, 0x2b4, %o0 ! 4001a6b4 <_Watchdog_Seconds_chain> } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 4000845c: 81 c7 e0 08 ret 40008460: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40008464: 03 10 00 21 sethi %hi(0x40008400), %g1 40008468: 82 10 60 9c or %g1, 0x9c, %g1 ! 4000849c <_POSIX_signals_Alarm_TSR> the_watchdog->id = id; the_watchdog->user_data = user_data; 4000846c: b0 10 20 00 clr %i0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40008470: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40008474: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 40008478: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000847c: c2 24 60 1c st %g1, [ %l1 + 0x1c ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008480: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40008484: 92 10 00 11 mov %l1, %o1 40008488: 11 10 00 69 sethi %hi(0x4001a400), %o0 4000848c: 40 00 14 0a call 4000d4b4 <_Watchdog_Insert> 40008490: 90 12 22 b4 or %o0, 0x2b4, %o0 ! 4001a6b4 <_Watchdog_Seconds_chain> 40008494: 81 c7 e0 08 ret 40008498: 81 e8 00 00 restore 400068f8 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 400068f8: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 400068fc: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED 40006900: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED 40006904: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED 40006908: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000690c: 40 00 35 65 call 40013ea0 <== NOT EXECUTED 40006910: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006914: 01 00 00 00 nop 40022040 : #include int chdir( const char *pathname ) { 40022040: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40022044: 92 10 20 01 mov 1, %o1 40022048: 90 10 00 18 mov %i0, %o0 4002204c: a0 07 bf e8 add %fp, -24, %l0 40022050: 96 10 20 01 mov 1, %o3 40022054: 94 10 00 10 mov %l0, %o2 40022058: 7f ff 91 c7 call 40006774 4002205c: b0 10 3f ff mov -1, %i0 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 40022060: 80 a2 20 00 cmp %o0, 0 40022064: 12 80 00 2f bne 40022120 40022068: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4002206c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40022070: 80 a0 60 00 cmp %g1, 0 40022074: 22 80 00 2d be,a 40022128 40022078: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4002207c: 9f c0 40 00 call %g1 40022080: 90 10 00 10 mov %l0, %o0 40022084: 80 a2 20 01 cmp %o0, 1 40022088: 12 80 00 19 bne 400220ec 4002208c: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 40022090: 21 10 01 32 sethi %hi(0x4004c800), %l0 40022094: d0 04 23 44 ld [ %l0 + 0x344 ], %o0 ! 4004cb44 40022098: c2 02 20 0c ld [ %o0 + 0xc ], %g1 4002209c: 80 a0 60 00 cmp %g1, 0 400220a0: 22 80 00 09 be,a 400220c4 400220a4: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 400220a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400220ac: 80 a0 60 00 cmp %g1, 0 400220b0: 22 80 00 05 be,a 400220c4 400220b4: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 400220b8: 9f c0 40 00 call %g1 400220bc: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 400220c0: c2 07 bf e8 ld [ %fp + -24 ], %g1 400220c4: c6 04 23 44 ld [ %l0 + 0x344 ], %g3 400220c8: c2 20 e0 04 st %g1, [ %g3 + 4 ] 400220cc: c4 07 bf ec ld [ %fp + -20 ], %g2 400220d0: c4 20 e0 08 st %g2, [ %g3 + 8 ] 400220d4: c2 07 bf f0 ld [ %fp + -16 ], %g1 400220d8: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 400220dc: c4 07 bf f4 ld [ %fp + -12 ], %g2 400220e0: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] return 0; } 400220e4: 81 c7 e0 08 ret 400220e8: 91 e8 20 00 restore %g0, 0, %o0 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 ); 400220ec: 80 a0 60 00 cmp %g1, 0 400220f0: 02 80 00 08 be 40022110 400220f4: 01 00 00 00 nop 400220f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400220fc: 80 a0 60 00 cmp %g1, 0 40022100: 02 80 00 04 be 40022110 40022104: 01 00 00 00 nop 40022108: 9f c0 40 00 call %g1 4002210c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40022110: 40 00 45 a2 call 40033798 <__errno> 40022114: b0 10 3f ff mov -1, %i0 40022118: 82 10 20 14 mov 0x14, %g1 4002211c: c2 22 00 00 st %g1, [ %o0 ] 40022120: 81 c7 e0 08 ret 40022124: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 40022128: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002212c: 02 80 00 04 be 4002213c <== NOT EXECUTED 40022130: 01 00 00 00 nop <== NOT EXECUTED 40022134: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022138: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002213c: 40 00 45 97 call 40033798 <__errno> <== NOT EXECUTED 40022140: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40022144: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40022148: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002214c: 81 c7 e0 08 ret <== NOT EXECUTED 40022150: 81 e8 00 00 restore <== NOT EXECUTED 400064f0 : int chmod( const char *path, mode_t mode ) { 400064f0: 9d e3 bf 88 save %sp, -120, %sp int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); 400064f4: 92 10 20 00 clr %o1 400064f8: 90 10 00 18 mov %i0, %o0 400064fc: a0 07 bf e8 add %fp, -24, %l0 40006500: 96 10 20 01 mov 1, %o3 40006504: 94 10 00 10 mov %l0, %o2 40006508: 40 00 00 9b call 40006774 4000650c: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40006510: 80 a2 20 00 cmp %o0, 0 40006514: 12 80 00 16 bne 4000656c 40006518: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers ){ 4000651c: 80 a0 60 00 cmp %g1, 0 40006520: 22 80 00 25 be,a 400065b4 40006524: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 40006528: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000652c: 80 a0 60 00 cmp %g1, 0 40006530: 02 80 00 11 be 40006574 40006534: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 40006538: 90 10 00 10 mov %l0, %o0 4000653c: 9f c0 40 00 call %g1 40006540: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40006544: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006548: 80 a0 60 00 cmp %g1, 0 4000654c: 02 80 00 08 be 4000656c 40006550: b0 10 00 08 mov %o0, %i0 40006554: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006558: 80 a0 60 00 cmp %g1, 0 4000655c: 02 80 00 23 be 400065e8 40006560: 01 00 00 00 nop 40006564: 9f c0 40 00 call %g1 40006568: 90 10 00 10 mov %l0, %o0 return result; } 4000656c: 81 c7 e0 08 ret 40006570: 81 e8 00 00 restore rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 40006574: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40006578: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000657c: 02 80 00 08 be 4000659c <== NOT EXECUTED 40006580: 01 00 00 00 nop <== NOT EXECUTED 40006584: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006588: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000658c: 02 80 00 04 be 4000659c <== NOT EXECUTED 40006590: 01 00 00 00 nop <== NOT EXECUTED 40006594: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006598: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000659c: 40 00 b4 7f call 40033798 <__errno> <== NOT EXECUTED 400065a0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400065a4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400065a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400065ac: 81 c7 e0 08 ret <== NOT EXECUTED 400065b0: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, true ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 400065b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400065b8: 02 80 00 08 be 400065d8 <== NOT EXECUTED 400065bc: 01 00 00 00 nop <== NOT EXECUTED 400065c0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400065c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400065c8: 02 80 00 04 be 400065d8 <== NOT EXECUTED 400065cc: 01 00 00 00 nop <== NOT EXECUTED 400065d0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400065d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 400065d8: 40 00 b4 70 call 40033798 <__errno> <== NOT EXECUTED 400065dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400065e0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400065e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400065e8: 81 c7 e0 08 ret <== NOT EXECUTED 400065ec: 81 e8 00 00 restore <== NOT EXECUTED 40022154 : int chown( const char *path, uid_t owner, gid_t group ) { 40022154: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) 40022158: 92 10 20 00 clr %o1 4002215c: 90 10 00 18 mov %i0, %o0 40022160: a0 07 bf e8 add %fp, -24, %l0 40022164: 96 10 20 01 mov 1, %o3 40022168: 94 10 00 10 mov %l0, %o2 4002216c: 7f ff 91 82 call 40006774 40022170: b0 10 3f ff mov -1, %i0 40022174: 80 a2 20 00 cmp %o0, 0 40022178: 12 80 00 15 bne 400221cc 4002217c: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !loc.ops->chown_h ) { 40022180: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40022184: 80 a0 a0 00 cmp %g2, 0 40022188: 02 80 00 13 be 400221d4 4002218c: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 40022190: 95 2e a0 10 sll %i2, 0x10, %o2 40022194: 93 32 60 10 srl %o1, 0x10, %o1 40022198: 95 32 a0 10 srl %o2, 0x10, %o2 4002219c: 9f c0 80 00 call %g2 400221a0: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 400221a4: c2 07 bf f0 ld [ %fp + -16 ], %g1 400221a8: 80 a0 60 00 cmp %g1, 0 400221ac: 02 80 00 08 be 400221cc 400221b0: b0 10 00 08 mov %o0, %i0 400221b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400221b8: 80 a0 60 00 cmp %g1, 0 400221bc: 02 80 00 10 be 400221fc 400221c0: 01 00 00 00 nop 400221c4: 9f c0 40 00 call %g1 400221c8: 90 10 00 10 mov %l0, %o0 return result; } 400221cc: 81 c7 e0 08 ret 400221d0: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 400221d4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400221d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400221dc: 02 80 00 04 be 400221ec <== NOT EXECUTED 400221e0: 01 00 00 00 nop <== NOT EXECUTED 400221e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400221e8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400221ec: 40 00 45 6b call 40033798 <__errno> <== NOT EXECUTED 400221f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400221f4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400221f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400221fc: 81 c7 e0 08 ret <== NOT EXECUTED 40022200: 81 e8 00 00 restore <== NOT EXECUTED 40022204 : #include int chroot( const char *pathname ) { 40022204: 9d e3 bf 88 save %sp, -120, %sp 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) { 40022208: 23 10 01 32 sethi %hi(0x4004c800), %l1 4002220c: e0 04 63 44 ld [ %l1 + 0x344 ], %l0 ! 4004cb44 40022210: 03 10 01 86 sethi %hi(0x40061800), %g1 40022214: 82 10 62 9c or %g1, 0x29c, %g1 ! 40061a9c 40022218: 80 a4 00 01 cmp %l0, %g1 4002221c: 02 80 00 24 be 400222ac 40022220: 01 00 00 00 nop 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); 40022224: 7f ff ff 87 call 40022040 40022228: 90 10 00 18 mov %i0, %o0 if (result) { 4002222c: 80 a2 20 00 cmp %o0, 0 40022230: 12 80 00 2b bne 400222dc 40022234: 11 10 01 1d sethi %hi(0x40047400), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40022238: 92 10 20 00 clr %o1 4002223c: 90 12 21 90 or %o0, 0x190, %o0 40022240: 94 07 bf e8 add %fp, -24, %o2 40022244: 7f ff 91 4c call 40006774 40022248: 96 10 20 00 clr %o3 4002224c: 80 a2 20 00 cmp %o0, 0 40022250: 12 80 00 23 bne 400222dc 40022254: d0 04 63 44 ld [ %l1 + 0x344 ], %o0 /* 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); 40022258: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4002225c: 80 a0 60 00 cmp %g1, 0 40022260: 22 80 00 09 be,a 40022284 40022264: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40022268: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002226c: 80 a0 60 00 cmp %g1, 0 40022270: 22 80 00 05 be,a 40022284 40022274: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40022278: 9f c0 40 00 call %g1 4002227c: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_root = loc; 40022280: c2 07 bf e8 ld [ %fp + -24 ], %g1 40022284: c6 04 63 44 ld [ %l1 + 0x344 ], %g3 40022288: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] 4002228c: c4 07 bf ec ld [ %fp + -20 ], %g2 40022290: c4 20 e0 18 st %g2, [ %g3 + 0x18 ] 40022294: c2 07 bf f0 ld [ %fp + -16 ], %g1 40022298: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 4002229c: c4 07 bf f4 ld [ %fp + -12 ], %g2 400222a0: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] return 0; } 400222a4: 81 c7 e0 08 ret 400222a8: 91 e8 20 00 restore %g0, 0, %o0 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*/ 400222ac: 40 00 07 f0 call 4002426c 400222b0: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 400222b4: c2 04 63 44 ld [ %l1 + 0x344 ], %g1 400222b8: 80 a0 40 10 cmp %g1, %l0 400222bc: 12 bf ff da bne 40022224 400222c0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 400222c4: 40 00 45 35 call 40033798 <__errno> <== NOT EXECUTED 400222c8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400222cc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400222d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400222d4: 81 c7 e0 08 ret <== NOT EXECUTED 400222d8: 81 e8 00 00 restore <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 400222dc: 40 00 45 2f call 40033798 <__errno> <== NOT EXECUTED 400222e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400222e4: 40 00 45 2d call 40033798 <__errno> <== NOT EXECUTED 400222e8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400222ec: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400222f0: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 400222f4: 81 c7 e0 08 ret <== NOT EXECUTED 400222f8: 81 e8 00 00 restore <== NOT EXECUTED 40030b2c : * close a directory. */ int closedir( DIR *dirp ) { 40030b2c: 9d e3 bf 98 save %sp, -104, %sp int fd; if ( !dirp ) 40030b30: a0 96 20 00 orcc %i0, 0, %l0 40030b34: 02 80 00 0b be 40030b60 40030b38: 82 10 3f ff mov -1, %g1 rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 40030b3c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 40030b40: f0 04 00 00 ld [ %l0 ], %i0 dirp->dd_fd = -1; dirp->dd_loc = 0; 40030b44: c0 24 20 04 clr [ %l0 + 4 ] (void)free((void *)dirp->dd_buf); 40030b48: 7f ff 57 69 call 400068ec 40030b4c: c2 24 00 00 st %g1, [ %l0 ] (void)free((void *)dirp); 40030b50: 7f ff 57 67 call 400068ec 40030b54: 90 10 00 10 mov %l0, %o0 return(close(fd)); 40030b58: 7f ff 56 a6 call 400065f0 40030b5c: 81 e8 00 00 restore DIR *dirp ) { int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 40030b60: 40 00 0b 0e call 40033798 <__errno> <== NOT EXECUTED 40030b64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40030b68: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40030b6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); (void)free((void *)dirp); return(close(fd)); } 40030b70: 81 c7 e0 08 ret <== NOT EXECUTED 40030b74: 81 e8 00 00 restore <== NOT EXECUTED 4000db78 : */ int device_close( rtems_libio_t *iop ) { 4000db78: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000db7c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 4000db80: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 4000db84: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 4000db88: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 4000db8c: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 4000db90: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 4000db94: 94 07 bf ec add %fp, -20, %o2 4000db98: 40 00 02 4b call 4000e4c4 4000db9c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000dba0: 80 a2 20 00 cmp %o0, 0 4000dba4: 12 80 00 04 bne 4000dbb4 4000dba8: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000dbac: 81 c7 e0 08 ret 4000dbb0: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000dbb4: 7f ff ff a1 call 4000da38 <== NOT EXECUTED 4000dbb8: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000dbbc: 81 c7 e0 08 ret <== NOT EXECUTED 4000dbc0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000da6c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000da6c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000da70: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4000da74: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 4000da78: f4 27 bf f0 st %i2, [ %fp + -16 ] <== NOT EXECUTED { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4000da7c: f0 27 bf e8 st %i0, [ %fp + -24 ] <== NOT EXECUTED args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000da80: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 4000da84: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 4000da88: 40 00 02 a5 call 4000e51c <== NOT EXECUTED 4000da8c: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000da90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000da94: 12 80 00 05 bne 4000daa8 <== NOT EXECUTED 4000da98: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; 4000da9c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 4000daa0: 81 c7 e0 08 ret <== NOT EXECUTED 4000daa4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000daa8: 7f ff ff e4 call 4000da38 <== NOT EXECUTED 4000daac: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 4000dab0: 81 c7 e0 08 ret <== NOT EXECUTED 4000dab4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000dbc4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000dbc4: 9d e3 bf 88 save %sp, -120, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4000dbc8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000dbcc: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 4000dbd0: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 4000dbd4: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 4000dbd8: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 4000dbdc: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 4000dbe0: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 4000dbe4: 94 07 bf ec add %fp, -20, %o2 4000dbe8: 40 00 02 63 call 4000e574 4000dbec: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000dbf0: 80 a2 20 00 cmp %o0, 0 4000dbf4: 12 80 00 04 bne 4000dc04 4000dbf8: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000dbfc: 81 c7 e0 08 ret 4000dc00: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000dc04: 7f ff ff 8d call 4000da38 <== NOT EXECUTED 4000dc08: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000dc0c: 81 c7 e0 08 ret <== NOT EXECUTED 4000dc10: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000db18 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000db18: 9d e3 bf 80 save %sp, -128, %sp <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 4000db1c: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000db20: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000db24: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4000db28: f2 27 bf e8 st %i1, [ %fp + -24 ] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000db2c: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000db30: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 4000db34: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4000db38: f0 27 bf e0 st %i0, [ %fp + -32 ] <== NOT EXECUTED args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4000db3c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 4000db40: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 4000db44: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 4000db48: 40 00 02 a1 call 4000e5cc <== NOT EXECUTED 4000db4c: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000db50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000db54: 12 80 00 05 bne 4000db68 <== NOT EXECUTED 4000db58: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000db5c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 4000db60: 81 c7 e0 08 ret <== NOT EXECUTED 4000db64: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000db68: 7f ff ff b4 call 4000da38 <== NOT EXECUTED 4000db6c: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000db70: 81 c7 e0 08 ret <== NOT EXECUTED 4000db74: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000dab8 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000dab8: 9d e3 bf 80 save %sp, -128, %sp args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; 4000dabc: c4 06 20 0c ld [ %i0 + 0xc ], %g2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000dac0: c2 06 20 08 ld [ %i0 + 8 ], %g1 { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000dac4: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4000dac8: f2 27 bf e8 st %i1, [ %fp + -24 ] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000dacc: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 4000dad0: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 4000dad4: c4 27 bf f0 st %g2, [ %fp + -16 ] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4000dad8: f0 27 bf e0 st %i0, [ %fp + -32 ] args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 4000dadc: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 4000dae0: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 4000dae4: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 4000dae8: 40 00 02 cf call 4000e624 4000daec: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000daf0: 80 a2 20 00 cmp %o0, 0 4000daf4: 12 80 00 05 bne 4000db08 4000daf8: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000dafc: d0 07 bf f4 ld [ %fp + -12 ], %o0 } 4000db00: 81 c7 e0 08 ret 4000db04: 91 e8 00 08 restore %g0, %o0, %o0 the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000db08: 7f ff ff cc call 4000da38 <== NOT EXECUTED 4000db0c: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000db10: 81 c7 e0 08 ret <== NOT EXECUTED 4000db14: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40004fb4 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40004fb4: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40004fb8: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40004fbc: 80 a0 60 00 cmp %g1, 0 40004fc0: 12 80 00 04 bne 40004fd0 40004fc4: 01 00 00 00 nop 40004fc8: 81 c7 e0 08 ret 40004fcc: 81 e8 00 00 restore rtems_interrupt_disable (level); 40004fd0: 7f ff f3 96 call 40001e28 <== NOT EXECUTED 40004fd4: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40004fd8: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40004fdc: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40004fe0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004fe4: 02 80 00 14 be 40005034 <== NOT EXECUTED 40004fe8: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40004fec: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED 40004ff0: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40004ff4: 7f ff f3 91 call 40001e38 <== NOT EXECUTED 40004ff8: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40004ffc: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40005000: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005004: 40 00 06 55 call 40006958 <== NOT EXECUTED 40005008: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4000500c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005010: 12 80 00 0b bne 4000503c <== NOT EXECUTED 40005014: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 40005018: 7f ff f3 84 call 40001e28 <== NOT EXECUTED 4000501c: 01 00 00 00 nop <== NOT EXECUTED 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) { 40005020: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40005024: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40005028: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000502c: 32 bf ff f2 bne,a 40004ff4 <== NOT EXECUTED 40005030: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 40005034: 7f ff f3 81 call 40001e38 <== NOT EXECUTED 40005038: 91 e8 00 08 restore %g0, %o0, %o0 <== 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); 4000503c: 40 00 08 0a call 40007064 <== NOT EXECUTED 40005040: 01 00 00 00 nop 40005044: 01 00 00 00 nop 40003fec : int dup2( int fildes, int fildes2 ) { 40003fec: 9d e3 bf 48 save %sp, -184, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40003ff0: a0 07 bf a8 add %fp, -88, %l0 40003ff4: 90 10 00 18 mov %i0, %o0 40003ff8: 40 00 01 fe call 400047f0 40003ffc: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40004000: 80 a2 3f ff cmp %o0, -1 40004004: 32 80 00 05 bne,a 40004018 40004008: 92 10 00 10 mov %l0, %o1 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 4000400c: 90 10 3f ff mov -1, %o0 } 40004010: 81 c7 e0 08 ret 40004014: 91 e8 00 08 restore %g0, %o0, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40004018: 40 00 01 f6 call 400047f0 4000401c: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40004020: 80 a2 3f ff cmp %o0, -1 40004024: 02 bf ff fa be 4000400c 40004028: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 4000402c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40004030: 40 00 00 a1 call 400042b4 <== NOT EXECUTED 40004034: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004038: 30 bf ff f6 b,a 40004010 <== NOT EXECUTED 400049fc : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 400049fc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40004a00: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004a04: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004a08: 02 80 00 0d be 40004a3c <== NOT EXECUTED 40004a0c: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40004a10: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40004a14: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 4001a0b0 <__ctype_ptr> <== NOT EXECUTED 40004a18: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40004a1c: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED 40004a20: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004a24: 02 80 00 06 be 40004a3c <== NOT EXECUTED 40004a28: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 40004a2c: 02 80 00 04 be 40004a3c <== NOT EXECUTED 40004a30: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40004a34: 12 80 00 06 bne 40004a4c <== NOT EXECUTED 40004a38: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 40004a3c: 7f ff ff 8f call 40004878 <== NOT EXECUTED 40004a40: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004a44: 81 c7 e0 08 ret <== NOT EXECUTED 40004a48: 81 e8 00 00 restore <== 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] = '^'; 40004a4c: 84 10 20 5e mov 0x5e, %g2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 40004a50: c2 2f bf f1 stb %g1, [ %fp + -15 ] <== 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] = '^'; 40004a54: c4 2f bf f0 stb %g2, [ %fp + -16 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 40004a58: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 40004a5c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004a60: 7f ff ff 38 call 40004740 <== NOT EXECUTED 40004a64: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40004a68: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004a6c: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 40004a70: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 40004a74: 81 c7 e0 08 ret <== NOT EXECUTED 40004a78: 81 e8 00 00 restore <== NOT EXECUTED 40022e64 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40022e64: 03 10 01 82 sethi %hi(0x40060800), %g1 <== NOT EXECUTED 40022e68: d0 00 60 cc ld [ %g1 + 0xcc ], %o0 ! 400608cc <== NOT EXECUTED 40022e6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022e70: 02 80 00 05 be 40022e84 <== NOT EXECUTED 40022e74: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40022e78: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022e7c: 40 00 42 9f call 400338f8 <== NOT EXECUTED 40022e80: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022e84: 81 c3 e0 08 retl <== NOT EXECUTED 40022e88: 01 00 00 00 nop 40022e8c : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40022e8c: 03 10 01 81 sethi %hi(0x40060400), %g1 <== NOT EXECUTED 40022e90: d0 00 63 e4 ld [ %g1 + 0x3e4 ], %o0 ! 400607e4 <== NOT EXECUTED 40022e94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022e98: 02 80 00 05 be 40022eac <== NOT EXECUTED 40022e9c: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 40022ea0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40022ea4: 40 00 42 95 call 400338f8 <== NOT EXECUTED 40022ea8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40022eac: 81 c3 e0 08 retl <== NOT EXECUTED 40022eb0: 01 00 00 00 nop 40004a7c : * 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) { 40004a7c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 40004a80: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 <== NOT EXECUTED 40004a84: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40004a88: 02 80 00 80 be 40004c88 <== NOT EXECUTED 40004a8c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 40004a90: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004a94: 12 80 00 28 bne 40004b34 <== NOT EXECUTED 40004a98: c8 06 20 3c ld [ %i0 + 0x3c ], %g4 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004a9c: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40004aa0: 05 10 00 63 sethi %hi(0x40018c00), %g2 <== NOT EXECUTED 40004aa4: a4 10 60 b0 or %g1, 0xb0, %l2 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40004aa8: a6 10 a0 80 or %g2, 0x80, %l3 <== NOT EXECUTED 40004aac: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 40004ab0: a2 10 60 78 or %g1, 0x78, %l1 ! 40018c78 <__func__.4894+0x278> <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 40004ab4: da 04 20 1c ld [ %l0 + 0x1c ], %o5 <== NOT EXECUTED 40004ab8: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 40004abc: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40004ac0: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 40004ac4: 02 80 00 13 be 40004b10 <== NOT EXECUTED 40004ac8: c2 0b 40 03 ldub [ %o5 + %g3 ], %g1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40004acc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004ad0: 12 80 00 05 bne 40004ae4 <== NOT EXECUTED 40004ad4: b0 08 60 ff and %g1, 0xff, %i0 <== NOT EXECUTED 40004ad8: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED 40004adc: 22 80 00 6d be,a 40004c90 <== NOT EXECUTED 40004ae0: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 40004ae4: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED 40004ae8: 02 80 00 3f be 40004be4 <== NOT EXECUTED 40004aec: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004af0: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 40004af4: c4 08 40 18 ldub [ %g1 + %i0 ], %g2 <== NOT EXECUTED 40004af8: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40004afc: 02 80 00 2f be 40004bb8 <== NOT EXECUTED 40004b00: 11 10 00 63 sethi %hi(0x40018c00), %o0 <== NOT EXECUTED 40004b04: 80 89 22 00 btst 0x200, %g4 <== NOT EXECUTED 40004b08: 12 80 00 1a bne 40004b70 <== NOT EXECUTED 40004b0c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004b10: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004b14: 02 80 00 5d be 40004c88 <== NOT EXECUTED 40004b18: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 40004b1c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 40004b20: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40004b24: 02 80 00 59 be 40004c88 <== NOT EXECUTED 40004b28: 01 00 00 00 nop <== NOT EXECUTED 40004b2c: 10 bf ff e2 b 40004ab4 <== NOT EXECUTED 40004b30: c8 04 20 3c ld [ %l0 + 0x3c ], %g4 <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 40004b34: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 40004b38: 02 80 00 53 be 40004c84 <== NOT EXECUTED 40004b3c: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 40004b40: 12 bf ff d8 bne 40004aa0 <== NOT EXECUTED 40004b44: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40004b48: d0 0e 20 44 ldub [ %i0 + 0x44 ], %o0 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; 40004b4c: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40004b50: 7f ff ff ab call 400049fc <== NOT EXECUTED 40004b54: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40004b58: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40004b5c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004b60: 02 80 00 4a be 40004c88 <== NOT EXECUTED 40004b64: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 40004b68: 7f ff ff a5 call 400049fc <== NOT EXECUTED 40004b6c: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40004b70: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004b74: 7f ff fe f3 call 40004740 <== NOT EXECUTED 40004b78: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004b7c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004b80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004b84: 22 80 00 05 be,a 40004b98 <== NOT EXECUTED 40004b88: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED tty->column--; 40004b8c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004b90: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40004b94: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 40004b98: c4 08 40 18 ldub [ %g1 + %i0 ], %g2 <== NOT EXECUTED 40004b9c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40004ba0: 02 80 00 06 be 40004bb8 <== NOT EXECUTED 40004ba4: 11 10 00 63 sethi %hi(0x40018c00), %o0 <== NOT EXECUTED 40004ba8: c8 04 20 3c ld [ %l0 + 0x3c ], %g4 <== NOT EXECUTED 40004bac: 80 89 22 00 btst 0x200, %g4 <== NOT EXECUTED 40004bb0: 02 bf ff d9 be 40004b14 <== NOT EXECUTED 40004bb4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 40004bb8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004bbc: 90 12 20 80 or %o0, 0x80, %o0 <== NOT EXECUTED 40004bc0: 7f ff fe e0 call 40004740 <== NOT EXECUTED 40004bc4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004bc8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004bcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004bd0: 02 bf ff d1 be 40004b14 <== NOT EXECUTED 40004bd4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40004bd8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004bdc: 10 bf ff ce b 40004b14 <== NOT EXECUTED 40004be0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004be4: 02 80 00 16 be 40004c3c <== NOT EXECUTED 40004be8: f0 04 20 2c ld [ %l0 + 0x2c ], %i0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40004bec: d8 04 80 00 ld [ %l2 ], %o4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40004bf0: 88 09 22 00 and %g4, 0x200, %g4 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40004bf4: 10 80 00 07 b 40004c10 <== NOT EXECUTED 40004bf8: 84 10 20 00 clr %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40004bfc: 32 80 00 02 bne,a 40004c04 <== NOT EXECUTED 40004c00: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004c04: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40004c08: 22 80 00 0e be,a 40004c40 <== NOT EXECUTED 40004c0c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 40004c10: c2 0b 40 02 ldub [ %o5 + %g2 ], %g1 <== NOT EXECUTED if (c == '\t') { 40004c14: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 40004c18: 02 80 00 18 be 40004c78 <== NOT EXECUTED 40004c1c: 84 00 a0 01 inc %g2 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 40004c20: c2 0b 00 01 ldub [ %o4 + %g1 ], %g1 <== NOT EXECUTED 40004c24: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004c28: 12 bf ff f5 bne 40004bfc <== NOT EXECUTED 40004c2c: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004c30: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40004c34: 12 bf ff f7 bne 40004c10 <== NOT EXECUTED 40004c38: b0 06 20 01 inc %i0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004c3c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004c40: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40004c44: 04 bf ff b4 ble 40004b14 <== NOT EXECUTED 40004c48: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40004c4c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004c50: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004c54: 7f ff fe bb call 40004740 <== NOT EXECUTED 40004c58: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 40004c5c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004c60: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004c64: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40004c68: 14 bf ff f9 bg 40004c4c <== NOT EXECUTED 40004c6c: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004c70: 10 bf ff a9 b 40004b14 <== NOT EXECUTED 40004c74: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 40004c78: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 40004c7c: 10 bf ff e2 b 40004c04 <== NOT EXECUTED 40004c80: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { tty->ccount = 0; 40004c84: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED 40004c88: 81 c7 e0 08 ret <== NOT EXECUTED 40004c8c: 81 e8 00 00 restore <== 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); 40004c90: 7f ff ff 5b call 400049fc <== NOT EXECUTED 40004c94: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED 40004c98: 01 00 00 00 nop 40030b78 : #include int fchdir( int fd ) { 40030b78: 9d e3 bf 78 save %sp, -136, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 40030b7c: 03 10 01 30 sethi %hi(0x4004c000), %g1 <== NOT EXECUTED 40030b80: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 4004c0b8 <== NOT EXECUTED 40030b84: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40030b88: 1a 80 00 50 bcc 40030cc8 <== NOT EXECUTED 40030b8c: 03 10 01 84 sethi %hi(0x40061000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40030b90: c6 00 62 04 ld [ %g1 + 0x204 ], %g3 ! 40061204 <== NOT EXECUTED 40030b94: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40030b98: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40030b9c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40030ba0: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 40030ba4: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40030ba8: b0 00 c0 01 add %g3, %g1, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40030bac: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40030bb0: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40030bb4: 02 80 00 45 be 40030cc8 <== NOT EXECUTED 40030bb8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40030bbc: 02 80 00 54 be 40030d0c <== NOT EXECUTED 40030bc0: 01 00 00 00 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 40030bc4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 40030bc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40030bcc: 02 80 00 56 be 40030d24 <== NOT EXECUTED 40030bd0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 40030bd4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 40030bd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40030bdc: 02 80 00 52 be 40030d24 <== NOT EXECUTED 40030be0: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 40030be4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40030be8: 90 06 20 10 add %i0, 0x10, %o0 <== NOT EXECUTED 40030bec: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 40030bf0: 12 80 00 30 bne 40030cb0 <== NOT EXECUTED 40030bf4: 21 10 01 32 sethi %hi(0x4004c800), %l0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 40030bf8: c6 04 23 44 ld [ %l0 + 0x344 ], %g3 ! 4004cb44 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40030bfc: 11 10 01 1d sethi %hi(0x40047400), %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 40030c00: c4 00 e0 04 ld [ %g3 + 4 ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40030c04: 90 12 21 90 or %o0, 0x190, %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 40030c08: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 40030c0c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40030c10: 92 10 20 00 clr %o1 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 40030c14: c2 27 bf dc st %g1, [ %fp + -36 ] <== NOT EXECUTED 40030c18: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40030c1c: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 40030c20: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 40030c24: c8 00 e0 10 ld [ %g3 + 0x10 ], %g4 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40030c28: 96 10 20 00 clr %o3 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 40030c2c: c8 27 bf e4 st %g4, [ %fp + -28 ] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 40030c30: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40030c34: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 40030c38: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED 40030c3c: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 40030c40: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 40030c44: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 40030c48: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40030c4c: 7f ff 56 ca call 40006774 <== NOT EXECUTED 40030c50: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED 40030c54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40030c58: 12 80 00 22 bne 40030ce0 <== NOT EXECUTED 40030c5c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 40030c60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40030c64: 22 80 00 09 be,a 40030c88 <== NOT EXECUTED 40030c68: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40030c6c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40030c70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40030c74: 22 80 00 05 be,a 40030c88 <== NOT EXECUTED 40030c78: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40030c7c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40030c80: 90 07 bf d8 add %fp, -40, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 40030c84: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40030c88: c6 04 23 44 ld [ %l0 + 0x344 ], %g3 <== NOT EXECUTED 40030c8c: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 40030c90: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 40030c94: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 40030c98: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40030c9c: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 40030ca0: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 40030ca4: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED return 0; } 40030ca8: 81 c7 e0 08 ret <== NOT EXECUTED 40030cac: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 40030cb0: 40 00 0a ba call 40033798 <__errno> <== NOT EXECUTED 40030cb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40030cb8: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40030cbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40030cc0: 81 c7 e0 08 ret <== NOT EXECUTED 40030cc4: 81 e8 00 00 restore <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40030cc8: 40 00 0a b4 call 40033798 <__errno> <== NOT EXECUTED 40030ccc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40030cd0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40030cd4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40030cd8: 81 c7 e0 08 ret <== NOT EXECUTED 40030cdc: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 40030ce0: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED 40030ce4: c6 04 23 44 ld [ %l0 + 0x344 ], %g3 <== NOT EXECUTED 40030ce8: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 40030cec: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED 40030cf0: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 40030cf4: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 40030cf8: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 40030cfc: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 40030d00: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED 40030d04: 81 c7 e0 08 ret <== NOT EXECUTED 40030d08: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40030d0c: 40 00 0a a3 call 40033798 <__errno> <== NOT EXECUTED 40030d10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40030d14: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40030d18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40030d1c: 81 c7 e0 08 ret <== NOT EXECUTED 40030d20: 81 e8 00 00 restore <== NOT EXECUTED if ( !iop->pathinfo.ops ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); 40030d24: 40 00 0a 9d call 40033798 <__errno> <== NOT EXECUTED 40030d28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40030d2c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40030d30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40030d34: 81 c7 e0 08 ret <== NOT EXECUTED 40030d38: 81 e8 00 00 restore <== NOT EXECUTED 40022564 : int fchmod( int fd, mode_t mode ) { 40022564: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40022568: 03 10 01 30 sethi %hi(0x4004c000), %g1 <== NOT EXECUTED 4002256c: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 4004c0b8 <== NOT EXECUTED 40022570: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40022574: 1a 80 00 1b bcc 400225e0 <== NOT EXECUTED 40022578: 03 10 01 84 sethi %hi(0x40061000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002257c: c6 00 62 04 ld [ %g1 + 0x204 ], %g3 ! 40061204 <== NOT EXECUTED 40022580: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40022584: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 40022588: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002258c: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 40022590: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40022594: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 40022598: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 4002259c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 400225a0: 02 80 00 10 be 400225e0 <== NOT EXECUTED 400225a4: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400225a8: 02 80 00 14 be 400225f8 <== NOT EXECUTED 400225ac: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 400225b0: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 <== NOT EXECUTED 400225b4: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 400225b8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400225bc: 02 80 00 15 be 40022610 <== NOT EXECUTED 400225c0: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 400225c4: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 400225c8: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 400225cc: 90 00 e0 10 add %g3, 0x10, %o0 <== NOT EXECUTED 400225d0: 9f c0 80 00 call %g2 <== NOT EXECUTED 400225d4: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 400225d8: 81 c7 e0 08 ret <== NOT EXECUTED 400225dc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 400225e0: 40 00 44 6e call 40033798 <__errno> <== NOT EXECUTED 400225e4: 01 00 00 00 nop <== NOT EXECUTED 400225e8: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400225ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400225f0: 10 bf ff fa b 400225d8 <== NOT EXECUTED 400225f4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400225f8: 40 00 44 68 call 40033798 <__errno> <== NOT EXECUTED 400225fc: 01 00 00 00 nop <== NOT EXECUTED 40022600: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40022604: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40022608: 10 bf ff f4 b 400225d8 <== NOT EXECUTED 4002260c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40022610: 40 00 44 62 call 40033798 <__errno> <== NOT EXECUTED 40022614: 01 00 00 00 nop <== NOT EXECUTED 40022618: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4002261c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40022620: 10 bf ff ee b 400225d8 <== NOT EXECUTED 40022624: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40022628 : int fchown( int fd, uid_t owner, gid_t group ) { 40022628: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4002262c: 03 10 01 30 sethi %hi(0x4004c000), %g1 <== NOT EXECUTED 40022630: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 4004c0b8 <== NOT EXECUTED 40022634: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40022638: 1a 80 00 1b bcc 400226a4 <== NOT EXECUTED 4002263c: 03 10 01 84 sethi %hi(0x40061000), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 40022640: c6 00 62 04 ld [ %g1 + 0x204 ], %g3 ! 40061204 <== NOT EXECUTED 40022644: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 40022648: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4002264c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40022650: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 40022654: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40022658: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002265c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 40022660: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40022664: 02 80 00 10 be 400226a4 <== NOT EXECUTED 40022668: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4002266c: 02 80 00 14 be 400226bc <== NOT EXECUTED 40022670: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 40022674: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40022678: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4002267c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022680: 02 80 00 15 be 400226d4 <== NOT EXECUTED 40022684: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 40022688: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 4002268c: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 40022690: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40022694: 9f c0 40 00 call %g1 <== NOT EXECUTED 40022698: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 4002269c: 81 c7 e0 08 ret <== NOT EXECUTED 400226a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 400226a4: 40 00 44 3d call 40033798 <__errno> <== NOT EXECUTED 400226a8: 01 00 00 00 nop <== NOT EXECUTED 400226ac: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400226b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400226b4: 10 bf ff fa b 4002269c <== NOT EXECUTED 400226b8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400226bc: 40 00 44 37 call 40033798 <__errno> <== NOT EXECUTED 400226c0: 01 00 00 00 nop <== NOT EXECUTED 400226c4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400226c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400226cc: 10 bf ff f4 b 4002269c <== NOT EXECUTED 400226d0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400226d4: 40 00 44 31 call 40033798 <__errno> <== NOT EXECUTED 400226d8: 01 00 00 00 nop <== NOT EXECUTED 400226dc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400226e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400226e4: 10 bf ff ee b 4002269c <== NOT EXECUTED 400226e8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40030d64 : int fcntl( int fd, int cmd, ... ) { 40030d64: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40030d68: 03 10 01 30 sethi %hi(0x4004c000), %g1 40030d6c: c8 00 60 b8 ld [ %g1 + 0xb8 ], %g4 ! 4004c0b8 ... ) { int ret; va_list ap; va_start( ap, cmd ); 40030d70: 90 07 a0 4c add %fp, 0x4c, %o0 40030d74: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40030d78: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40030d7c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40030d80: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40030d84: 80 a6 00 04 cmp %i0, %g4 40030d88: 1a 80 00 7c bcc 40030f78 40030d8c: d0 27 bf f4 st %o0, [ %fp + -12 ] iop = rtems_libio_iop( fd ); 40030d90: 39 10 01 84 sethi %hi(0x40061000), %i4 40030d94: da 07 22 04 ld [ %i4 + 0x204 ], %o5 ! 40061204 40030d98: 85 2e 20 02 sll %i0, 2, %g2 40030d9c: 83 2e 20 04 sll %i0, 4, %g1 40030da0: 82 20 40 02 sub %g1, %g2, %g1 40030da4: 82 00 40 18 add %g1, %i0, %g1 40030da8: 83 28 60 02 sll %g1, 2, %g1 40030dac: ba 03 40 01 add %o5, %g1, %i5 rtems_libio_check_is_open(iop); 40030db0: d8 07 60 0c ld [ %i5 + 0xc ], %o4 40030db4: 80 8b 21 00 btst 0x100, %o4 40030db8: 02 80 00 70 be 40030f78 40030dbc: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40030dc0: 08 80 00 08 bleu 40030de0 40030dc4: 83 2e 60 02 sll %i1, 2, %g1 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 40030dc8: 40 00 0a 74 call 40033798 <__errno> 40030dcc: b0 10 3f ff mov -1, %i0 40030dd0: 82 10 20 16 mov 0x16, %g1 40030dd4: c2 22 00 00 st %g1, [ %o0 ] 40030dd8: 81 c7 e0 08 ret 40030ddc: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40030de0: 05 10 00 c3 sethi %hi(0x40030c00), %g2 40030de4: 84 10 a1 3c or %g2, 0x13c, %g2 ! 40030d3c 40030de8: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40030dec: 81 c0 c0 00 jmp %g3 40030df0: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 40030df4: 40 00 0a 69 call 40033798 <__errno> 40030df8: b0 10 3f ff mov -1, %i0 ! ffffffff 40030dfc: 82 10 20 86 mov 0x86, %g1 40030e00: c2 22 00 00 st %g1, [ %o0 ] 40030e04: 81 c7 e0 08 ret 40030e08: 81 e8 00 00 restore 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 ) ); 40030e0c: d0 02 00 00 ld [ %o0 ], %o0 40030e10: 7f ff 57 ef call 40006dcc 40030e14: b0 10 20 00 clr %i0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 40030e18: c2 07 60 0c ld [ %i5 + 0xc ], %g1 40030e1c: 90 0a 22 01 and %o0, 0x201, %o0 40030e20: 82 08 7d fe and %g1, -514, %g1 40030e24: 90 12 00 01 or %o0, %g1, %o0 40030e28: d0 27 60 0c st %o0, [ %i5 + 0xc ] * 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) { 40030e2c: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 40030e30: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 40030e34: 80 a0 60 00 cmp %g1, 0 40030e38: 02 bf ff e8 be 40030dd8 40030e3c: 92 10 00 1d mov %i5, %o1 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 40030e40: 9f c0 40 00 call %g1 40030e44: 90 10 00 19 mov %i1, %o0 if (err) { 40030e48: ba 92 20 00 orcc %o0, 0, %i5 40030e4c: 12 80 00 04 bne 40030e5c 40030e50: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 40030e54: 81 c7 e0 08 ret 40030e58: 81 e8 00 00 restore if (ret >= 0) { if (iop->handlers->fcntl_h) { int err = (*iop->handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; 40030e5c: 40 00 0a 4f call 40033798 <__errno> <== NOT EXECUTED 40030e60: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40030e64: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 40030e68: 81 c7 e0 08 ret <== NOT EXECUTED 40030e6c: 81 e8 00 00 restore <== 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 ); 40030e70: 7f ff 57 29 call 40006b14 40030e74: 90 10 00 0c mov %o4, %o0 40030e78: b0 10 00 08 mov %o0, %i0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 40030e7c: 80 a6 20 00 cmp %i0, 0 40030e80: 36 bf ff ec bge,a 40030e30 40030e84: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 40030e88: 81 c7 e0 08 ret <== NOT EXECUTED 40030e8c: 81 e8 00 00 restore <== 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 ) ) 40030e90: c2 02 00 00 ld [ %o0 ], %g1 40030e94: 80 a0 60 00 cmp %g1, 0 40030e98: 02 80 00 2d be 40030f4c 40030e9c: 82 0b 37 ff and %o4, -2049, %g1 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 40030ea0: 82 13 28 00 or %o4, 0x800, %g1 40030ea4: b0 10 20 00 clr %i0 40030ea8: 10 bf ff e1 b 40030e2c 40030eac: c2 27 60 0c st %g1, [ %i5 + 0xc ] 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); 40030eb0: 83 33 20 0b srl %o4, 0xb, %g1 40030eb4: 10 bf ff de b 40030e2c 40030eb8: b0 08 60 01 and %g1, 1, %i0 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 40030ebc: c6 02 00 00 ld [ %o0 ], %g3 if ( fd2 ) 40030ec0: 80 a0 e0 00 cmp %g3, 0 40030ec4: 02 80 00 33 be 40030f90 40030ec8: 80 a1 00 03 cmp %g4, %g3 diop = rtems_libio_iop( fd2 ); 40030ecc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40030ed0: 18 80 00 22 bgu 40030f58 <== NOT EXECUTED 40030ed4: 96 10 20 00 clr %o3 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40030ed8: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 40030edc: c6 07 60 2c ld [ %i5 + 0x2c ], %g3 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40030ee0: c2 22 20 10 st %g1, [ %o0 + 0x10 ] 40030ee4: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 ret = (int) (diop - rtems_libio_iops); 40030ee8: c8 07 22 04 ld [ %i4 + 0x204 ], %g4 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40030eec: c4 22 20 14 st %g2, [ %o0 + 0x14 ] 40030ef0: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 40030ef4: da 07 60 30 ld [ %i5 + 0x30 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40030ef8: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 40030efc: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 ret = (int) (diop - rtems_libio_iops); 40030f00: 88 22 c0 04 sub %o3, %g4, %g4 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 40030f04: c6 22 20 2c st %g3, [ %o0 + 0x2c ] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40030f08: 89 39 20 02 sra %g4, 2, %g4 40030f0c: 87 29 20 02 sll %g4, 2, %g3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40030f10: c4 22 20 1c st %g2, [ %o0 + 0x1c ] ret = -1; break; } } diop->handlers = iop->handlers; 40030f14: da 22 20 30 st %o5, [ %o0 + 0x30 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40030f18: 85 29 20 06 sll %g4, 6, %g2 } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; 40030f1c: d8 22 20 0c st %o4, [ %o0 + 0xc ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40030f20: 84 20 80 03 sub %g2, %g3, %g2 40030f24: 83 28 a0 06 sll %g2, 6, %g1 40030f28: 82 20 40 02 sub %g1, %g2, %g1 40030f2c: 87 28 60 0c sll %g1, 0xc, %g3 40030f30: 82 00 40 03 add %g1, %g3, %g1 40030f34: 82 00 40 04 add %g1, %g4, %g1 40030f38: 83 28 60 04 sll %g1, 4, %g1 40030f3c: 82 20 40 04 sub %g1, %g4, %g1 40030f40: 83 28 60 02 sll %g1, 2, %g1 40030f44: 10 bf ff ce b 40030e7c 40030f48: b0 21 00 01 sub %g4, %g1, %i0 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 40030f4c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40030f50: 10 bf ff b7 b 40030e2c <== NOT EXECUTED 40030f54: c2 27 60 0c st %g1, [ %i5 + 0xc ] <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 40030f58: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 40030f5c: 83 28 e0 04 sll %g3, 4, %g1 <== NOT EXECUTED 40030f60: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40030f64: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED 40030f68: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40030f6c: 90 03 40 01 add %o5, %g1, %o0 <== NOT EXECUTED 40030f70: 10 bf ff da b 40030ed8 <== NOT EXECUTED 40030f74: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40030f78: 40 00 0a 08 call 40033798 <__errno> <== NOT EXECUTED 40030f7c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40030f80: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40030f84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40030f88: 81 c7 e0 08 ret <== NOT EXECUTED 40030f8c: 81 e8 00 00 restore <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 40030f90: 7f ff 57 51 call 40006cd4 40030f94: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 40030f98: 80 a2 20 00 cmp %o0, 0 40030f9c: 02 bf ff 8f be 40030dd8 40030fa0: 96 10 00 08 mov %o0, %o3 40030fa4: 10 bf ff cd b 40030ed8 40030fa8: d8 07 60 0c ld [ %i5 + 0xc ], %o4 40024ccc : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 40024ccc: 03 10 01 84 sethi %hi(0x40061000), %g1 <== NOT EXECUTED 40024cd0: c4 00 62 a8 ld [ %g1 + 0x2a8 ], %g2 ! 400612a8 <== NOT EXECUTED 40024cd4: 82 10 62 a8 or %g1, 0x2a8, %g1 <== NOT EXECUTED 40024cd8: 86 00 60 04 add %g1, 4, %g3 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40024cdc: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 40024ce0: 02 80 00 10 be 40024d20 <== NOT EXECUTED 40024ce4: 01 00 00 00 nop <== NOT EXECUTED the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 40024ce8: d2 02 60 0c ld [ %o1 + 0xc ], %o1 <== NOT EXECUTED 40024cec: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED 40024cf0: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 40024cf4: 32 80 00 08 bne,a 40024d14 <== NOT EXECUTED 40024cf8: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40024cfc: 81 c3 e0 08 retl <== NOT EXECUTED 40024d00: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 40024d04: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 40024d08: 02 80 00 08 be 40024d28 <== NOT EXECUTED 40024d0c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 40024d10: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40024d14: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 40024d18: 32 bf ff fb bne,a 40024d04 <== NOT EXECUTED 40024d1c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED return true; } } return false; } 40024d20: 81 c3 e0 08 retl <== NOT EXECUTED 40024d24: 90 10 20 00 clr %o0 <== NOT EXECUTED 40024d28: 81 c3 e0 08 retl <== NOT EXECUTED 40024d2c: 01 00 00 00 nop 40004600 : long fpathconf( int fd, int name ) { 40004600: 9d e3 bf 98 save %sp, -104, %sp long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 40004604: 03 10 00 60 sethi %hi(0x40018000), %g1 40004608: c4 00 61 d8 ld [ %g1 + 0x1d8 ], %g2 ! 400181d8 4000460c: 80 a6 00 02 cmp %i0, %g2 40004610: 1a 80 00 41 bcc 40004714 40004614: 03 10 00 63 sethi %hi(0x40018c00), %g1 iop = rtems_libio_iop(fd); 40004618: c6 00 62 ec ld [ %g1 + 0x2ec ], %g3 ! 40018eec 4000461c: 85 2e 20 02 sll %i0, 2, %g2 40004620: 83 2e 20 04 sll %i0, 4, %g1 40004624: 82 20 40 02 sub %g1, %g2, %g1 40004628: 82 00 40 18 add %g1, %i0, %g1 4000462c: 83 28 60 02 sll %g1, 2, %g1 40004630: 82 00 c0 01 add %g3, %g1, %g1 rtems_libio_check_is_open(iop); 40004634: c8 00 60 0c ld [ %g1 + 0xc ], %g4 40004638: 80 89 21 00 btst 0x100, %g4 4000463c: 02 80 00 36 be 40004714 40004640: 80 89 20 02 btst 2, %g4 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40004644: 02 80 00 3a be 4000472c 40004648: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4000464c: 08 80 00 08 bleu 4000466c 40004650: f0 00 60 1c ld [ %g1 + 0x1c ], %i0 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40004654: 40 00 33 68 call 400113f4 <__errno> 40004658: b0 10 3f ff mov -1, %i0 4000465c: 82 10 20 16 mov 0x16, %g1 40004660: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 40004664: 81 c7 e0 08 ret 40004668: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4000466c: 83 2e 60 02 sll %i1, 2, %g1 40004670: 05 10 00 11 sethi %hi(0x40004400), %g2 40004674: 84 10 a1 d0 or %g2, 0x1d0, %g2 ! 400045d0 40004678: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000467c: 81 c0 c0 00 jmp %g3 40004680: 01 00 00 00 nop break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 40004684: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 40004688: 81 c7 e0 08 ret 4000468c: 81 e8 00 00 restore break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 40004690: f0 06 20 54 ld [ %i0 + 0x54 ], %i0 40004694: 81 c7 e0 08 ret 40004698: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 4000469c: f0 06 20 48 ld [ %i0 + 0x48 ], %i0 400046a0: 81 c7 e0 08 ret 400046a4: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 400046a8: f0 06 20 5c ld [ %i0 + 0x5c ], %i0 400046ac: 81 c7 e0 08 ret 400046b0: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 400046b4: f0 06 20 50 ld [ %i0 + 0x50 ], %i0 400046b8: 81 c7 e0 08 ret 400046bc: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 400046c0: f0 06 20 4c ld [ %i0 + 0x4c ], %i0 400046c4: 81 c7 e0 08 ret 400046c8: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 400046cc: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 400046d0: 81 c7 e0 08 ret 400046d4: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 400046d8: f0 06 20 40 ld [ %i0 + 0x40 ], %i0 400046dc: 81 c7 e0 08 ret 400046e0: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 400046e4: f0 06 20 3c ld [ %i0 + 0x3c ], %i0 400046e8: 81 c7 e0 08 ret 400046ec: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 400046f0: f0 06 20 38 ld [ %i0 + 0x38 ], %i0 400046f4: 81 c7 e0 08 ret 400046f8: 81 e8 00 00 restore switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 400046fc: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 40004700: 81 c7 e0 08 ret 40004704: 81 e8 00 00 restore the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 40004708: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 4000470c: 81 c7 e0 08 ret 40004710: 81 e8 00 00 restore 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); 40004714: 40 00 33 38 call 400113f4 <__errno> 40004718: b0 10 3f ff mov -1, %i0 4000471c: 82 10 20 09 mov 9, %g1 40004720: c2 22 00 00 st %g1, [ %o0 ] 40004724: 81 c7 e0 08 ret 40004728: 81 e8 00 00 restore rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 4000472c: 40 00 33 32 call 400113f4 <__errno> <== NOT EXECUTED 40004730: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004734: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004738: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000473c: 81 c7 e0 08 ret <== NOT EXECUTED 40004740: 81 e8 00 00 restore <== NOT EXECUTED 4000b85c : void free( void *ptr ) { MSBUMP(free_calls, 1); 4000b85c: 9d e3 bf 98 save %sp, -104, %sp 4000b860: 05 10 00 6a sethi %hi(0x4001a800), %g2 4000b864: 84 10 a0 d0 or %g2, 0xd0, %g2 ! 4001a8d0 4000b868: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4000b86c: b2 10 00 18 mov %i0, %i1 4000b870: 82 00 60 01 inc %g1 if ( !ptr ) 4000b874: 80 a6 20 00 cmp %i0, 0 4000b878: 02 80 00 15 be 4000b8cc 4000b87c: c2 20 a0 0c st %g1, [ %g2 + 0xc ] /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000b880: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000b884: c4 00 63 e4 ld [ %g1 + 0x3e4 ], %g2 ! 4001abe4 <_System_state_Current> 4000b888: 80 a0 a0 03 cmp %g2, 3 4000b88c: 02 80 00 17 be 4000b8e8 4000b890: 03 10 00 69 sethi %hi(0x4001a400), %g1 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000b894: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 4001a564 4000b898: 80 a0 60 00 cmp %g1, 0 4000b89c: 02 80 00 06 be 4000b8b4 4000b8a0: 37 10 00 6a sethi %hi(0x4001a800), %i3 (*rtems_malloc_statistics_helpers->at_free)(ptr); 4000b8a4: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 4000b8a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b8ac: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 4000b8b0: 37 10 00 6a sethi %hi(0x4001a800), %i3 <== NOT EXECUTED 4000b8b4: 92 10 00 19 mov %i1, %o1 4000b8b8: 40 00 06 f1 call 4000d47c <_Protected_heap_Free> 4000b8bc: 90 16 e0 78 or %i3, 0x78, %o0 4000b8c0: 80 8a 20 ff btst 0xff, %o0 4000b8c4: 02 80 00 04 be 4000b8d4 4000b8c8: 82 16 e0 78 or %i3, 0x78, %g1 4000b8cc: 81 c7 e0 08 ret 4000b8d0: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 4000b8d4: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 4000b8d8: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000b8dc: 31 10 00 63 sethi %hi(0x40018c00), %i0 <== NOT EXECUTED 4000b8e0: 7f ff e1 fb call 400040cc <== NOT EXECUTED 4000b8e4: 91 ee 23 b8 restore %i0, 0x3b8, %o0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 4000b8e8: 40 00 01 35 call 4000bdbc 4000b8ec: 01 00 00 00 nop 4000b8f0: 80 8a 20 ff btst 0xff, %o0 4000b8f4: 12 bf ff e8 bne 4000b894 4000b8f8: 03 10 00 69 sethi %hi(0x4001a400), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 4000b8fc: 40 00 01 43 call 4000be08 <== NOT EXECUTED 4000b900: 81 e8 00 00 restore <== NOT EXECUTED 4000b904: 01 00 00 00 nop 40024140 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 40024140: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 40024144: 03 10 01 86 sethi %hi(0x40061800), %g1 <== NOT EXECUTED 40024148: 82 10 62 9c or %g1, 0x29c, %g1 ! 40061a9c <== NOT EXECUTED 4002414c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40024150: 02 80 00 18 be 400241b0 <== NOT EXECUTED 40024154: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 40024158: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4002415c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024160: 22 80 00 09 be,a 40024184 <== NOT EXECUTED 40024164: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40024168: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002416c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024170: 22 80 00 05 be,a 40024184 <== NOT EXECUTED 40024174: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40024178: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002417c: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 40024180: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 40024184: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024188: 02 80 00 08 be 400241a8 <== NOT EXECUTED 4002418c: 01 00 00 00 nop <== NOT EXECUTED 40024190: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40024194: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024198: 02 80 00 04 be 400241a8 <== NOT EXECUTED 4002419c: 01 00 00 00 nop <== NOT EXECUTED 400241a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400241a4: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 400241a8: 7f ff 89 d1 call 400068ec <== NOT EXECUTED 400241ac: 81 e8 00 00 restore <== NOT EXECUTED 400241b0: 81 c7 e0 08 ret <== NOT EXECUTED 400241b4: 81 e8 00 00 restore <== NOT EXECUTED 40017b0c : int fstat( int fd, struct stat *sbuf ) { 40017b0c: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40017b10: 92 96 60 00 orcc %i1, 0, %o1 40017b14: 02 80 00 3f be 40017c10 40017b18: 03 10 00 66 sethi %hi(0x40019800), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 40017b1c: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 40019af8 40017b20: 80 a6 00 02 cmp %i0, %g2 40017b24: 1a 80 00 2f bcc 40017be0 40017b28: 03 10 00 6a sethi %hi(0x4001a800), %g1 40017b2c: c6 00 60 6c ld [ %g1 + 0x6c ], %g3 ! 4001a86c 40017b30: 85 2e 20 02 sll %i0, 2, %g2 40017b34: 83 2e 20 04 sll %i0, 4, %g1 40017b38: 82 20 40 02 sub %g1, %g2, %g1 40017b3c: 82 00 40 18 add %g1, %i0, %g1 40017b40: 83 28 60 02 sll %g1, 2, %g1 40017b44: 86 00 c0 01 add %g3, %g1, %g3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 40017b48: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 40017b4c: 80 88 a1 00 btst 0x100, %g2 40017b50: 02 80 00 24 be 40017be0 40017b54: 01 00 00 00 nop if ( !iop->handlers ) 40017b58: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 40017b5c: 80 a0 60 00 cmp %g1, 0 40017b60: 02 80 00 20 be 40017be0 40017b64: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 40017b68: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40017b6c: 80 a0 60 00 cmp %g1, 0 40017b70: 02 80 00 22 be 40017bf8 40017b74: 01 00 00 00 nop /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 40017b78: c0 22 40 00 clr [ %o1 ] 40017b7c: c0 22 60 04 clr [ %o1 + 4 ] 40017b80: c0 22 60 08 clr [ %o1 + 8 ] 40017b84: c0 22 60 0c clr [ %o1 + 0xc ] 40017b88: c0 22 60 10 clr [ %o1 + 0x10 ] 40017b8c: c0 22 60 14 clr [ %o1 + 0x14 ] 40017b90: c0 22 60 18 clr [ %o1 + 0x18 ] 40017b94: c0 22 60 1c clr [ %o1 + 0x1c ] 40017b98: c0 22 60 20 clr [ %o1 + 0x20 ] 40017b9c: c0 22 60 24 clr [ %o1 + 0x24 ] 40017ba0: c0 22 60 28 clr [ %o1 + 0x28 ] 40017ba4: c0 22 60 2c clr [ %o1 + 0x2c ] 40017ba8: c0 22 60 30 clr [ %o1 + 0x30 ] 40017bac: c0 22 60 34 clr [ %o1 + 0x34 ] 40017bb0: c0 22 60 38 clr [ %o1 + 0x38 ] 40017bb4: c0 22 60 3c clr [ %o1 + 0x3c ] 40017bb8: c0 22 60 40 clr [ %o1 + 0x40 ] 40017bbc: c0 22 60 44 clr [ %o1 + 0x44 ] 40017bc0: c0 22 60 48 clr [ %o1 + 0x48 ] 40017bc4: c0 22 60 4c clr [ %o1 + 0x4c ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 40017bc8: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 40017bcc: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40017bd0: 9f c0 80 00 call %g2 40017bd4: 90 00 e0 10 add %g3, 0x10, %o0 } 40017bd8: 81 c7 e0 08 ret 40017bdc: 91 e8 00 08 restore %g0, %o0, %o0 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 ); 40017be0: 7f ff db 5b call 4000e94c <__errno> 40017be4: 01 00 00 00 nop 40017be8: 82 10 20 09 mov 9, %g1 ! 9 40017bec: c2 22 00 00 st %g1, [ %o0 ] 40017bf0: 10 bf ff fa b 40017bd8 40017bf4: 90 10 3f ff mov -1, %o0 if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40017bf8: 7f ff db 55 call 4000e94c <__errno> <== NOT EXECUTED 40017bfc: 01 00 00 00 nop <== NOT EXECUTED 40017c00: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40017c04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017c08: 10 bf ff f4 b 40017bd8 <== NOT EXECUTED 40017c0c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 40017c10: 7f ff db 4f call 4000e94c <__errno> 40017c14: 01 00 00 00 nop 40017c18: 82 10 20 0e mov 0xe, %g1 ! e 40017c1c: c2 22 00 00 st %g1, [ %o0 ] 40017c20: 10 bf ff ee b 40017bd8 40017c24: 90 10 3f ff mov -1, %o0 40022820 : #include int fsync( int fd ) { 40022820: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40022824: 03 10 01 30 sethi %hi(0x4004c000), %g1 40022828: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 4004c0b8 4002282c: 80 a6 00 02 cmp %i0, %g2 40022830: 1a 80 00 1b bcc 4002289c 40022834: 03 10 01 84 sethi %hi(0x40061000), %g1 iop = rtems_libio_iop( fd ); 40022838: c6 00 62 04 ld [ %g1 + 0x204 ], %g3 ! 40061204 4002283c: 85 2e 20 02 sll %i0, 2, %g2 40022840: 83 2e 20 04 sll %i0, 4, %g1 40022844: 82 20 40 02 sub %g1, %g2, %g1 40022848: 82 00 40 18 add %g1, %i0, %g1 4002284c: 83 28 60 02 sll %g1, 2, %g1 40022850: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 40022854: c8 02 20 0c ld [ %o0 + 0xc ], %g4 40022858: 80 89 21 00 btst 0x100, %g4 4002285c: 02 80 00 10 be 4002289c 40022860: 80 89 20 04 btst 4, %g4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40022864: 02 80 00 14 be 400228b4 40022868: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 4002286c: c8 02 20 30 ld [ %o0 + 0x30 ], %g4 40022870: 80 a1 20 00 cmp %g4, 0 40022874: 02 80 00 0a be 4002289c 40022878: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 4002287c: c8 01 20 28 ld [ %g4 + 0x28 ], %g4 40022880: 80 a1 20 00 cmp %g4, 0 40022884: 02 80 00 12 be 400228cc 40022888: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 4002288c: 9f c1 00 00 call %g4 40022890: 01 00 00 00 nop } 40022894: 81 c7 e0 08 ret 40022898: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 4002289c: 40 00 43 bf call 40033798 <__errno> <== NOT EXECUTED 400228a0: 01 00 00 00 nop <== NOT EXECUTED 400228a4: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400228a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400228ac: 10 bf ff fa b 40022894 <== NOT EXECUTED 400228b0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400228b4: 40 00 43 b9 call 40033798 <__errno> 400228b8: 01 00 00 00 nop 400228bc: 82 10 20 16 mov 0x16, %g1 ! 16 400228c0: c2 22 00 00 st %g1, [ %o0 ] 400228c4: 10 bf ff f4 b 40022894 400228c8: 90 10 3f ff mov -1, %o0 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400228cc: 40 00 43 b3 call 40033798 <__errno> 400228d0: 01 00 00 00 nop 400228d4: 82 10 20 86 mov 0x86, %g1 ! 86 400228d8: c2 22 00 00 st %g1, [ %o0 ] 400228dc: 10 bf ff ee b 40022894 400228e0: 90 10 3f ff mov -1, %o0 4000b908 : int ftruncate( int fd, off_t length ) { 4000b908: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000b90c: 03 10 00 66 sethi %hi(0x40019800), %g1 4000b910: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 40019af8 4000b914: 80 a6 00 02 cmp %i0, %g2 4000b918: 1a 80 00 2b bcc 4000b9c4 4000b91c: 03 10 00 6a sethi %hi(0x4001a800), %g1 iop = rtems_libio_iop( fd ); 4000b920: c6 00 60 6c ld [ %g1 + 0x6c ], %g3 ! 4001a86c 4000b924: 85 2e 20 02 sll %i0, 2, %g2 4000b928: 83 2e 20 04 sll %i0, 4, %g1 4000b92c: 82 20 40 02 sub %g1, %g2, %g1 4000b930: 82 00 40 18 add %g1, %i0, %g1 4000b934: 83 28 60 02 sll %g1, 2, %g1 4000b938: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 4000b93c: c4 06 20 0c ld [ %i0 + 0xc ], %g2 4000b940: 80 88 a1 00 btst 0x100, %g2 4000b944: 02 80 00 20 be 4000b9c4 4000b948: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000b94c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000b950: c2 27 bf e8 st %g1, [ %fp + -24 ] 4000b954: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000b958: c4 27 bf ec st %g2, [ %fp + -20 ] 4000b95c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000b960: c2 27 bf f0 st %g1, [ %fp + -16 ] 4000b964: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 if ( !loc.ops->node_type_h ) 4000b968: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000b96c: 80 a0 60 00 cmp %g1, 0 4000b970: 02 80 00 21 be 4000b9f4 4000b974: c4 27 bf f4 st %g2, [ %fp + -12 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000b978: 9f c0 40 00 call %g1 4000b97c: 90 07 bf e8 add %fp, -24, %o0 4000b980: 80 a2 20 01 cmp %o0, 1 4000b984: 02 80 00 22 be 4000ba0c 4000b988: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000b98c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000b990: 80 88 60 04 btst 4, %g1 4000b994: 02 80 00 12 be 4000b9dc 4000b998: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 4000b99c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000b9a0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000b9a4: 80 a0 60 00 cmp %g1, 0 4000b9a8: 02 80 00 13 be 4000b9f4 4000b9ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4000b9b0: 90 10 00 18 mov %i0, %o0 4000b9b4: 9f c0 40 00 call %g1 4000b9b8: 92 10 00 19 mov %i1, %o1 } 4000b9bc: 81 c7 e0 08 ret 4000b9c0: 91 e8 00 08 restore %g0, %o0, %o0 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); 4000b9c4: 40 00 0b e2 call 4000e94c <__errno> <== NOT EXECUTED 4000b9c8: 01 00 00 00 nop <== NOT EXECUTED 4000b9cc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4000b9d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b9d4: 10 bf ff fa b 4000b9bc <== NOT EXECUTED 4000b9d8: 90 10 3f ff mov -1, %o0 <== 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 ); 4000b9dc: 40 00 0b dc call 4000e94c <__errno> <== NOT EXECUTED 4000b9e0: 01 00 00 00 nop <== NOT EXECUTED 4000b9e4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000b9e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b9ec: 10 bf ff f4 b 4000b9bc <== NOT EXECUTED 4000b9f0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000b9f4: 40 00 0b d6 call 4000e94c <__errno> <== NOT EXECUTED 4000b9f8: 01 00 00 00 nop <== NOT EXECUTED 4000b9fc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000ba00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ba04: 10 bf ff ee b 4000b9bc <== NOT EXECUTED 4000ba08: 90 10 3f ff mov -1, %o0 <== 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 ); 4000ba0c: 40 00 0b d0 call 4000e94c <__errno> 4000ba10: 01 00 00 00 nop 4000ba14: 82 10 20 15 mov 0x15, %g1 ! 15 4000ba18: c2 22 00 00 st %g1, [ %o0 ] 4000ba1c: 10 bf ff e8 b 4000b9bc 4000ba20: 90 10 3f ff mov -1, %o0 40022a00 : char * getcwd ( char *pt, size_t size) { 40022a00: 9d e3 bf 30 save %sp, -208, %sp <== NOT EXECUTED * If no buffer specified by the user, allocate one as necessary. * If a buffer is specified, the size has to be non-zero. The path * is built from the end of the buffer backwards. */ if (pt) 40022a04: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40022a08: 02 80 00 fa be 40022df0 <== NOT EXECUTED 40022a0c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 40022a10: ae 10 20 00 clr %l7 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 40022a14: 02 80 00 f1 be 40022dd8 <== NOT EXECUTED 40022a18: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; *bpt = '\0'; 40022a1c: c0 2e 7f ff clrb [ %i1 + -1 ] <== NOT EXECUTED * Allocate bytes (1024 - malloc space) for the string of "../"'s. * Should always be enough (it's 340 levels). If it's not, allocate * as necessary. Special * case the first stat, it's ".", not "..". */ if (!(up = (char *) malloc (upsize = 1024 - 4))) 40022a20: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 40022a24: 7f ff 91 56 call 40006f7c <== NOT EXECUTED 40022a28: b8 06 7f ff add %i1, -1, %i4 <== NOT EXECUTED 40022a2c: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40022a30: 02 80 00 0c be 40022a60 <== NOT EXECUTED 40022a34: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 40022a38: c0 2c 60 01 clrb [ %l1 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 40022a3c: c2 2c 40 00 stb %g1, [ %l1 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 40022a40: ac 07 bf a8 add %fp, -88, %l6 <== NOT EXECUTED 40022a44: 11 10 01 1b sethi %hi(0x40046c00), %o0 <== NOT EXECUTED 40022a48: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40022a4c: 7f ff 95 e8 call 400081ec <== NOT EXECUTED 40022a50: 90 12 23 e0 or %o0, 0x3e0, %o0 <== NOT EXECUTED 40022a54: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022a58: 02 80 00 0e be 40022a90 <== NOT EXECUTED 40022a5c: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 40022a60: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 40022a64: 12 80 00 07 bne 40022a80 <== NOT EXECUTED 40022a68: 01 00 00 00 nop <== NOT EXECUTED free (pt); free (up); 40022a6c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40022a70: 7f ff 8f 9f call 400068ec <== NOT EXECUTED 40022a74: b0 10 20 00 clr %i0 <== NOT EXECUTED return (char *) NULL; } 40022a78: 81 c7 e0 08 ret <== NOT EXECUTED 40022a7c: 81 e8 00 00 restore <== NOT EXECUTED err: if(dir) (void) _closedir (dir); if (ptsize) free (pt); 40022a80: 7f ff 8f 9b call 400068ec <== NOT EXECUTED 40022a84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40022a88: 10 bf ff fa b 40022a70 <== NOT EXECUTED 40022a8c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; 40022a90: c4 07 bf ac ld [ %fp + -84 ], %g2 <== NOT EXECUTED root_ino = s.st_ino; 40022a94: c6 07 bf b0 ld [ %fp + -80 ], %g3 <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; 40022a98: c2 27 bf 98 st %g1, [ %fp + -104 ] <== NOT EXECUTED 40022a9c: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 40022aa0: 82 04 64 00 add %l1, 0x400, %g1 <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 40022aa4: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; 40022aa8: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 40022aac: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 40022ab0: c4 27 bf 9c st %g2, [ %fp + -100 ] <== NOT EXECUTED 40022ab4: 40 00 43 39 call 40033798 <__errno> <== NOT EXECUTED 40022ab8: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED 40022abc: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED 40022ac0: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 40022ac4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40022ac8: 7f ff 95 c9 call 400081ec <== NOT EXECUTED 40022acc: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40022ad0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022ad4: 12 bf ff e3 bne 40022a60 <== NOT EXECUTED 40022ad8: ea 07 bf a8 ld [ %fp + -88 ], %l5 <== NOT EXECUTED /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 40022adc: c6 07 bf 98 ld [ %fp + -104 ], %g3 <== NOT EXECUTED /* Stat the current level. */ if (_stat (up, &s)) goto err; /* Save current node values. */ ino = s.st_ino; 40022ae0: fa 07 bf b0 ld [ %fp + -80 ], %i5 <== NOT EXECUTED dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 40022ae4: 80 a0 c0 15 cmp %g3, %l5 <== NOT EXECUTED 40022ae8: 02 80 00 a8 be 40022d88 <== NOT EXECUTED 40022aec: f6 07 bf ac ld [ %fp + -84 ], %i3 <== NOT EXECUTED * Build pointer to the parent directory, allocating memory * as necessary. Max length is 3 for "../", the largest * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) 40022af0: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40022af4: 82 04 a4 04 add %l2, 0x404, %g1 <== NOT EXECUTED 40022af8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40022afc: 08 80 00 5a bleu 40022c64 <== NOT EXECUTED 40022b00: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 40022b04: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 40022b08: c0 2c a0 02 clrb [ %l2 + 2 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 40022b0c: c4 2c 80 00 stb %g2, [ %l2 ] <== NOT EXECUTED *bup++ = '.'; 40022b10: c4 2c a0 01 stb %g2, [ %l2 + 1 ] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 40022b14: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40022b18: 40 00 05 66 call 400240b0 <== NOT EXECUTED 40022b1c: a0 04 a0 02 add %l2, 2, %l0 <== NOT EXECUTED 40022b20: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 40022b24: 02 bf ff d0 be 40022a64 <== NOT EXECUTED 40022b28: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 40022b2c: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED 40022b30: 7f ff fe ef call 400226ec <== NOT EXECUTED 40022b34: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40022b38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022b3c: 12 80 00 34 bne 40022c0c <== NOT EXECUTED 40022b40: 86 10 20 2f mov 0x2f, %g3 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 40022b44: c6 2c 00 00 stb %g3, [ %l0 ] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 40022b48: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 40022b4c: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 40022b50: 02 80 00 4e be 40022c88 <== NOT EXECUTED 40022b54: a4 04 a0 03 add %l2, 3, %l2 <== NOT EXECUTED 40022b58: a8 10 20 00 clr %l4 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 40022b5c: 40 00 06 17 call 400243b8 <== NOT EXECUTED 40022b60: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40022b64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022b68: 02 80 00 23 be 40022bf4 <== NOT EXECUTED 40022b6c: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 40022b70: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED 40022b74: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 40022b78: 12 80 00 08 bne 40022b98 <== NOT EXECUTED 40022b7c: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED 40022b80: c2 4a 20 0d ldsb [ %o0 + 0xd ], %g1 <== NOT EXECUTED 40022b84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022b88: 02 bf ff f5 be 40022b5c <== NOT EXECUTED 40022b8c: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 40022b90: 22 80 00 31 be,a 40022c54 <== NOT EXECUTED 40022b94: c2 4a 20 0e ldsb [ %o0 + 0xe ], %g1 <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 40022b98: 40 00 59 a2 call 40039220 <== NOT EXECUTED 40022b9c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40022ba0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40022ba4: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 40022ba8: 40 00 4d 22 call 40036030 <== NOT EXECUTED 40022bac: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 40022bb0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40022bb4: 7f ff 95 8e call 400081ec <== NOT EXECUTED 40022bb8: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40022bbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022bc0: 02 80 00 17 be 40022c1c <== NOT EXECUTED 40022bc4: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 40022bc8: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40022bcc: 02 80 00 1e be 40022c44 <== NOT EXECUTED 40022bd0: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; errno = 0; 40022bd4: 40 00 42 f1 call 40033798 <__errno> <== NOT EXECUTED 40022bd8: 01 00 00 00 nop <== NOT EXECUTED 40022bdc: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 40022be0: 40 00 05 f6 call 400243b8 <== NOT EXECUTED 40022be4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40022be8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022bec: 32 bf ff e2 bne,a 40022b74 <== NOT EXECUTED 40022bf0: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED * If readdir set errno, use it, not any saved error; otherwise, * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) 40022bf4: 40 00 42 e9 call 40033798 <__errno> <== NOT EXECUTED 40022bf8: 01 00 00 00 nop <== NOT EXECUTED 40022bfc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40022c00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022c04: 02 80 00 5a be 40022d6c <== NOT EXECUTED 40022c08: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 40022c0c: 40 00 37 c8 call 40030b2c <== NOT EXECUTED 40022c10: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (ptsize) 40022c14: 10 bf ff 94 b 40022a64 <== NOT EXECUTED 40022c18: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED if (!save_errno) save_errno = errno; errno = 0; continue; } if (s.st_dev == dev && s.st_ino == ino) 40022c1c: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 40022c20: 12 bf ff cf bne 40022b5c <== NOT EXECUTED 40022c24: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 40022c28: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 40022c2c: 12 bf ff cc bne 40022b5c <== NOT EXECUTED 40022c30: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 40022c34: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 40022c38: 12 bf ff c9 bne 40022b5c <== NOT EXECUTED 40022c3c: 01 00 00 00 nop <== NOT EXECUTED 40022c40: 30 80 00 1f b,a 40022cbc <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) { if (!save_errno) save_errno = errno; 40022c44: 40 00 42 d5 call 40033798 <__errno> <== NOT EXECUTED 40022c48: 01 00 00 00 nop <== NOT EXECUTED 40022c4c: 10 bf ff e2 b 40022bd4 <== NOT EXECUTED 40022c50: e8 02 00 00 ld [ %o0 ], %l4 <== NOT EXECUTED else for (;;) { if (!(dp = _readdir (dir))) goto notfound; if (ISDOT (dp)) 40022c54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022c58: 02 bf ff c1 be 40022b5c <== NOT EXECUTED 40022c5c: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED 40022c60: 30 bf ff ce b,a 40022b98 <== NOT EXECUTED * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) { if (!(up = (char *) realloc (up, upsize *= 2))) 40022c64: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 40022c68: 40 00 06 4c call 40024598 <== NOT EXECUTED 40022c6c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40022c70: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40022c74: 02 bf ff 7b be 40022a60 <== NOT EXECUTED 40022c78: 82 04 40 1a add %l1, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 40022c7c: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED 40022c80: 10 bf ff a1 b 40022b04 <== NOT EXECUTED 40022c84: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 40022c88: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 40022c8c: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 40022c90: 12 bf ff b3 bne 40022b5c <== NOT EXECUTED 40022c94: a8 10 20 00 clr %l4 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 40022c98: 40 00 05 c8 call 400243b8 <== NOT EXECUTED 40022c9c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40022ca0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40022ca4: 02 bf ff d4 be 40022bf4 <== NOT EXECUTED 40022ca8: a8 10 20 00 clr %l4 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 40022cac: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40022cb0: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 40022cb4: 12 bf ff f9 bne 40022c98 <== NOT EXECUTED 40022cb8: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED /* * Check for length of the current name, preceding slash, * leading slash. */ if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2)) 40022cbc: 40 00 59 59 call 40039220 <== NOT EXECUTED 40022cc0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40022cc4: c6 07 bf 9c ld [ %fp + -100 ], %g3 <== NOT EXECUTED 40022cc8: a8 27 00 18 sub %i4, %i0, %l4 <== NOT EXECUTED 40022ccc: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 40022cd0: 82 20 80 03 sub %g2, %g3, %g1 <== NOT EXECUTED 40022cd4: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40022cd8: 80 a5 00 01 cmp %l4, %g1 <== NOT EXECUTED 40022cdc: 18 80 00 13 bgu 40022d28 <== NOT EXECUTED 40022ce0: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED { size_t len, off; if (!ptsize) 40022ce4: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 40022ce8: 02 80 00 49 be 40022e0c <== NOT EXECUTED 40022cec: 01 00 00 00 nop <== NOT EXECUTED errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 40022cf0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40022cf4: af 2d e0 01 sll %l7, 1, %l7 <== NOT EXECUTED 40022cf8: 40 00 06 28 call 40024598 <== NOT EXECUTED 40022cfc: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40022d00: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40022d04: 02 bf ff c2 be 40022c0c <== NOT EXECUTED 40022d08: 82 26 40 1c sub %i1, %i4, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 40022d0c: 92 06 00 14 add %i0, %l4, %o1 <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 40022d10: b2 06 00 17 add %i0, %l7, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 40022d14: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40022d18: b8 26 40 01 sub %i1, %g1, %i4 <== NOT EXECUTED 40022d1c: 40 00 4c c5 call 40036030 <== NOT EXECUTED 40022d20: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 40022d24: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 40022d28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022d2c: 12 80 00 04 bne 40022d3c <== NOT EXECUTED 40022d30: 84 10 20 2f mov 0x2f, %g2 <== NOT EXECUTED *--bpt = '/'; 40022d34: b8 07 3f ff add %i4, -1, %i4 <== NOT EXECUTED 40022d38: c4 2f 00 00 stb %g2, [ %i4 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 40022d3c: 40 00 59 39 call 40039220 <== NOT EXECUTED 40022d40: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40022d44: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40022d48: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= strlen (dp->d_name); 40022d4c: b8 27 00 08 sub %i4, %o0, %i4 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); (void) _closedir (dir); dir = 0; /* Truncate any file name. */ *bup = '\0'; 40022d50: c0 27 bf 9c clr [ %fp + -100 ] <== NOT EXECUTED bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= strlen (dp->d_name); bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40022d54: 40 00 4c b7 call 40036030 <== NOT EXECUTED 40022d58: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED (void) _closedir (dir); 40022d5c: 40 00 37 74 call 40030b2c <== NOT EXECUTED 40022d60: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 40022d64: 10 bf ff 58 b 40022ac4 <== NOT EXECUTED 40022d68: c0 2c 80 00 clrb [ %l2 ] <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 40022d6c: 40 00 42 8b call 40033798 <__errno> <== NOT EXECUTED 40022d70: 01 00 00 00 nop <== NOT EXECUTED 40022d74: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40022d78: 22 80 00 16 be,a 40022dd0 <== NOT EXECUTED 40022d7c: a8 10 20 02 mov 2, %l4 <== NOT EXECUTED 40022d80: 10 bf ff a3 b 40022c0c <== NOT EXECUTED 40022d84: e8 22 00 00 st %l4, [ %o0 ] <== NOT EXECUTED /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 40022d88: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 40022d8c: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 40022d90: 12 bf ff 59 bne 40022af4 <== NOT EXECUTED 40022d94: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40022d98: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 40022d9c: 80 a0 80 1d cmp %g2, %i5 <== NOT EXECUTED 40022da0: 12 bf ff 56 bne 40022af8 <== NOT EXECUTED 40022da4: 82 04 a4 04 add %l2, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 40022da8: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 40022dac: 92 07 3f ff add %i4, -1, %o1 <== NOT EXECUTED 40022db0: c2 2f 3f ff stb %g1, [ %i4 + -1 ] <== NOT EXECUTED /* * It's unclear that it's a requirement to copy the * path to the beginning of the buffer, but it's always * been that way and stuff would probably break. */ (void) bcopy (bpt, pt, ept - bpt); 40022db4: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 40022db8: 40 00 4c 9e call 40036030 <== NOT EXECUTED 40022dbc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40022dc0: 7f ff 8e cb call 400068ec <== NOT EXECUTED 40022dc4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40022dc8: 81 c7 e0 08 ret <== NOT EXECUTED 40022dcc: 81 e8 00 00 restore <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 40022dd0: 10 bf ff 8f b 40022c0c <== NOT EXECUTED 40022dd4: e8 22 00 00 st %l4, [ %o0 ] <== NOT EXECUTED if (pt) { ptsize = 0; if (!size) { errno = EINVAL; 40022dd8: 40 00 42 70 call 40033798 <__errno> <== NOT EXECUTED 40022ddc: b0 10 20 00 clr %i0 <== NOT EXECUTED 40022de0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40022de4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40022de8: 81 c7 e0 08 ret <== NOT EXECUTED 40022dec: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 40022df0: 7f ff 90 63 call 40006f7c <== NOT EXECUTED 40022df4: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 40022df8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40022dfc: 02 bf ff 1f be 40022a78 <== NOT EXECUTED 40022e00: b2 06 23 fc add %i0, 0x3fc, %i1 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 40022e04: 10 bf ff 06 b 40022a1c <== NOT EXECUTED 40022e08: ae 10 23 fc mov 0x3fc, %l7 <== NOT EXECUTED { size_t len, off; if (!ptsize) { errno = ERANGE; 40022e0c: 40 00 42 63 call 40033798 <__errno> <== NOT EXECUTED 40022e10: 01 00 00 00 nop <== NOT EXECUTED 40022e14: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 40022e18: 10 bf ff 7d b 40022c0c <== NOT EXECUTED 40022e1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40030fc8 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 40030fc8: 9d e3 bf 88 save %sp, -120, %sp /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 40030fcc: 03 10 01 30 sethi %hi(0x4004c000), %g1 40030fd0: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 4004c0b8 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 40030fd4: 88 10 00 18 mov %i0, %g4 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 40030fd8: 80 a6 00 02 cmp %i0, %g2 40030fdc: 1a 80 00 0a bcc 40031004 40030fe0: b0 10 20 00 clr %i0 40030fe4: 03 10 01 84 sethi %hi(0x40061000), %g1 40030fe8: c6 00 62 04 ld [ %g1 + 0x204 ], %g3 ! 40061204 40030fec: 85 29 20 02 sll %g4, 2, %g2 40030ff0: 83 29 20 04 sll %g4, 4, %g1 40030ff4: 82 20 40 02 sub %g1, %g2, %g1 40030ff8: 82 00 40 04 add %g1, %g4, %g1 40030ffc: 83 28 60 02 sll %g1, 2, %g1 40031000: b0 00 c0 01 add %g3, %g1, %i0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 40031004: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40031008: c2 27 bf e8 st %g1, [ %fp + -24 ] 4003100c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 40031010: c4 27 bf ec st %g2, [ %fp + -20 ] 40031014: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40031018: c2 27 bf f0 st %g1, [ %fp + -16 ] 4003101c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 if ( !loc.ops->node_type_h ) 40031020: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40031024: 80 a0 60 00 cmp %g1, 0 40031028: 02 80 00 17 be 40031084 4003102c: c4 27 bf f4 st %g2, [ %fp + -12 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 40031030: 9f c0 40 00 call %g1 40031034: 90 07 bf e8 add %fp, -24, %o0 40031038: 80 a2 20 01 cmp %o0, 1 4003103c: 12 80 00 0c bne 4003106c 40031040: 01 00 00 00 nop /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 40031044: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40031048: c2 00 60 08 ld [ %g1 + 8 ], %g1 4003104c: 80 a0 60 00 cmp %g1, 0 40031050: 02 80 00 0d be 40031084 40031054: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 40031058: 90 10 00 18 mov %i0, %o0 4003105c: 9f c0 40 00 call %g1 40031060: 94 10 00 1a mov %i2, %o2 } 40031064: 81 c7 e0 08 ret 40031068: 91 e8 00 08 restore %g0, %o0, %o0 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 ); 4003106c: 40 00 09 cb call 40033798 <__errno> 40031070: 01 00 00 00 nop 40031074: 82 10 20 14 mov 0x14, %g1 ! 14 40031078: c2 22 00 00 st %g1, [ %o0 ] 4003107c: 10 bf ff fa b 40031064 40031080: 90 10 3f ff mov -1, %o0 * 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 ); 40031084: 40 00 09 c5 call 40033798 <__errno> <== NOT EXECUTED 40031088: 01 00 00 00 nop <== NOT EXECUTED 4003108c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40031090: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40031094: 10 bf ff f4 b 40031064 <== NOT EXECUTED 40031098: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40022e40 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40022e40: 03 10 01 32 sethi %hi(0x4004c800), %g1 <== NOT EXECUTED 40022e44: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 4004cb44 <== NOT EXECUTED return _POSIX_types_Gid; } 40022e48: 81 c3 e0 08 retl <== NOT EXECUTED 40022e4c: d0 10 a0 2a lduh [ %g2 + 0x2a ], %o0 <== NOT EXECUTED 40023528 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40023528: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 4002352c: 7f ff ff b3 call 400233f8 <== NOT EXECUTED 40023530: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 40023534: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED 40023538: 13 10 01 2f sethi %hi(0x4004bc00), %o1 <== NOT EXECUTED 4002353c: 90 12 22 80 or %o0, 0x280, %o0 <== NOT EXECUTED 40023540: 40 00 43 08 call 40034160 <== NOT EXECUTED 40023544: 92 12 60 80 or %o1, 0x80, %o1 <== NOT EXECUTED 40023548: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4002354c: 12 80 00 0b bne 40023578 <== NOT EXECUTED 40023550: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40023554: 30 80 00 27 b,a 400235f0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 40023558: 40 00 55 14 call 400389a8 <== NOT EXECUTED 4002355c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40023560: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40023564: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); } if (match) { 40023568: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002356c: 12 80 00 14 bne 400235bc <== NOT EXECUTED 40023570: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 40023574: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40023578: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4002357c: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40023580: 7f ff fe d1 call 400230c4 <== NOT EXECUTED 40023584: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40023588: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002358c: 02 80 00 11 be 400235d0 <== NOT EXECUTED 40023590: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 40023594: 32 bf ff f1 bne,a 40023558 <== NOT EXECUTED 40023598: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 4002359c: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 400235a0: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 400235a4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 400235a8: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 400235ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400235b0: 02 bf ff f2 be 40023578 <== NOT EXECUTED 400235b4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 400235b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400235bc: 40 00 40 cf call 400338f8 <== NOT EXECUTED 400235c0: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 400235c4: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 400235c8: 81 c7 e0 08 ret <== NOT EXECUTED 400235cc: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 400235d0: 40 00 40 72 call 40033798 <__errno> <== NOT EXECUTED 400235d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400235d8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400235dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 400235e0: 40 00 40 c6 call 400338f8 <== NOT EXECUTED 400235e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400235e8: 81 c7 e0 08 ret <== NOT EXECUTED 400235ec: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 400235f0: 40 00 40 6a call 40033798 <__errno> <== NOT EXECUTED 400235f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400235f8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400235fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023600: 81 c7 e0 08 ret <== NOT EXECUTED 40023604: 81 e8 00 00 restore <== NOT EXECUTED 40023244 : return NULL; return p; } struct group *getgrent() { 40023244: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 40023248: 03 10 01 82 sethi %hi(0x40060800), %g1 <== NOT EXECUTED 4002324c: d0 00 60 cc ld [ %g1 + 0xcc ], %o0 ! 400608cc <== NOT EXECUTED 40023250: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023254: 02 80 00 0d be 40023288 <== NOT EXECUTED 40023258: 21 10 01 82 sethi %hi(0x40060800), %l0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 4002325c: 15 10 01 82 sethi %hi(0x40060800), %o2 <== NOT EXECUTED 40023260: 92 14 21 98 or %l0, 0x198, %o1 <== NOT EXECUTED 40023264: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED 40023268: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002326c: 7f ff ff 96 call 400230c4 <== NOT EXECUTED 40023270: b0 14 21 98 or %l0, 0x198, %i0 <== NOT EXECUTED 40023274: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023278: 02 80 00 04 be 40023288 <== NOT EXECUTED 4002327c: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 40023280: 81 c7 e0 08 ret <== NOT EXECUTED 40023284: 81 e8 00 00 restore <== NOT EXECUTED 40023288: 81 c7 e0 08 ret <== NOT EXECUTED 4002328c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40023640 : } struct group *getgrgid( gid_t gid ) { 40023640: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 40023644: 13 10 01 82 sethi %hi(0x40060800), %o1 <== NOT EXECUTED 40023648: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4002364c: 92 12 61 98 or %o1, 0x198, %o1 <== NOT EXECUTED 40023650: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40023654: 15 10 01 82 sethi %hi(0x40060800), %o2 <== NOT EXECUTED 40023658: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4002365c: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED 40023660: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40023664: 7f ff ff e9 call 40023608 <== NOT EXECUTED 40023668: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002366c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023670: 22 80 00 02 be,a 40023678 <== NOT EXECUTED 40023674: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 40023678: 81 c7 e0 08 ret <== NOT EXECUTED 4002367c: 81 e8 00 00 restore <== NOT EXECUTED 40023608 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40023608: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 4002360c: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40023610: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 40023614: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40023618: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4002361c: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40023620: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40023624: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 40023628: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 4002362c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40023630: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40023634: 7f ff ff bd call 40023528 <== NOT EXECUTED 40023638: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002363c: 01 00 00 00 nop 400236ac : } struct group *getgrnam( const char *name ) { 400236ac: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 400236b0: 13 10 01 82 sethi %hi(0x40060800), %o1 <== NOT EXECUTED 400236b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400236b8: 92 12 61 98 or %o1, 0x198, %o1 <== NOT EXECUTED 400236bc: 15 10 01 82 sethi %hi(0x40060800), %o2 <== NOT EXECUTED 400236c0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400236c4: 94 12 a0 d0 or %o2, 0xd0, %o2 <== NOT EXECUTED 400236c8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 400236cc: 7f ff ff ed call 40023680 <== NOT EXECUTED 400236d0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400236d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400236d8: 22 80 00 02 be,a 400236e0 <== NOT EXECUTED 400236dc: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 400236e0: 81 c7 e0 08 ret <== NOT EXECUTED 400236e4: 81 e8 00 00 restore <== NOT EXECUTED 40023680 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 40023680: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40023684: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 40023688: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 4002368c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40023690: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40023694: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 40023698: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002369c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400236a0: 7f ff ff a2 call 40023528 <== NOT EXECUTED 400236a4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400236a8: 01 00 00 00 nop 4002372c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002372c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 40023730: 7f ff ff 32 call 400233f8 <== NOT EXECUTED 40023734: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 40023738: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED 4002373c: 13 10 01 2f sethi %hi(0x4004bc00), %o1 <== NOT EXECUTED 40023740: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40023744: 40 00 42 87 call 40034160 <== NOT EXECUTED 40023748: 92 12 60 80 or %o1, 0x80, %o1 <== NOT EXECUTED 4002374c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 40023750: 12 80 00 0b bne 4002377c <== NOT EXECUTED 40023754: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40023758: 30 80 00 27 b,a 400237f4 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 4002375c: 40 00 54 93 call 400389a8 <== NOT EXECUTED 40023760: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40023764: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40023768: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); } if (match) { 4002376c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023770: 12 80 00 14 bne 400237c0 <== NOT EXECUTED 40023774: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 40023778: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4002377c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40023780: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 40023784: 7f ff fe c3 call 40023290 <== NOT EXECUTED 40023788: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002378c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023790: 02 80 00 11 be 400237d4 <== NOT EXECUTED 40023794: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 40023798: 32 bf ff f1 bne,a 4002375c <== NOT EXECUTED 4002379c: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 400237a0: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 400237a4: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 400237a8: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 400237ac: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 400237b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400237b4: 02 bf ff f2 be 4002377c <== NOT EXECUTED 400237b8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 400237bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400237c0: 40 00 40 4e call 400338f8 <== NOT EXECUTED 400237c4: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 400237c8: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 400237cc: 81 c7 e0 08 ret <== NOT EXECUTED 400237d0: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 400237d4: 40 00 3f f1 call 40033798 <__errno> <== NOT EXECUTED 400237d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400237dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400237e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 400237e4: 40 00 40 45 call 400338f8 <== NOT EXECUTED 400237e8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400237ec: 81 c7 e0 08 ret <== NOT EXECUTED 400237f0: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 400237f4: 40 00 3f e9 call 40033798 <__errno> <== NOT EXECUTED 400237f8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400237fc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40023800: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023804: 81 c7 e0 08 ret <== NOT EXECUTED 40023808: 81 e8 00 00 restore <== NOT EXECUTED 400233ac : return NULL; return p; } struct passwd *getpwent() { 400233ac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 400233b0: 03 10 01 81 sethi %hi(0x40060400), %g1 <== NOT EXECUTED 400233b4: d0 00 63 e4 ld [ %g1 + 0x3e4 ], %o0 ! 400607e4 <== NOT EXECUTED 400233b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400233bc: 02 80 00 0d be 400233f0 <== NOT EXECUTED 400233c0: 21 10 01 82 sethi %hi(0x40060800), %l0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 400233c4: 15 10 01 81 sethi %hi(0x40060400), %o2 <== NOT EXECUTED 400233c8: 92 14 20 b0 or %l0, 0xb0, %o1 <== NOT EXECUTED 400233cc: 94 12 a3 e8 or %o2, 0x3e8, %o2 <== NOT EXECUTED 400233d0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400233d4: 7f ff ff af call 40023290 <== NOT EXECUTED 400233d8: b0 14 20 b0 or %l0, 0xb0, %i0 <== NOT EXECUTED 400233dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400233e0: 02 80 00 04 be 400233f0 <== NOT EXECUTED 400233e4: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 400233e8: 81 c7 e0 08 ret <== NOT EXECUTED 400233ec: 81 e8 00 00 restore <== NOT EXECUTED 400233f0: 81 c7 e0 08 ret <== NOT EXECUTED 400233f4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400238b0 : } struct passwd *getpwnam( const char *name ) { 400238b0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 400238b4: 13 10 01 82 sethi %hi(0x40060800), %o1 <== NOT EXECUTED 400238b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400238bc: 92 12 60 b0 or %o1, 0xb0, %o1 <== NOT EXECUTED 400238c0: 15 10 01 81 sethi %hi(0x40060400), %o2 <== NOT EXECUTED 400238c4: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 400238c8: 94 12 a3 e8 or %o2, 0x3e8, %o2 <== NOT EXECUTED 400238cc: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 400238d0: 7f ff ff ed call 40023884 <== NOT EXECUTED 400238d4: b0 10 20 00 clr %i0 <== NOT EXECUTED 400238d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400238dc: 22 80 00 02 be,a 400238e4 <== NOT EXECUTED 400238e0: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 400238e4: 81 c7 e0 08 ret <== NOT EXECUTED 400238e8: 81 e8 00 00 restore <== NOT EXECUTED 40023884 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 40023884: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 40023888: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 4002388c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 40023890: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 40023894: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40023898: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 4002389c: 92 10 20 00 clr %o1 <== NOT EXECUTED 400238a0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400238a4: 7f ff ff a2 call 4002372c <== NOT EXECUTED 400238a8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400238ac: 01 00 00 00 nop 40023844 : } struct passwd *getpwuid( uid_t uid ) { 40023844: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 40023848: 13 10 01 82 sethi %hi(0x40060800), %o1 <== NOT EXECUTED 4002384c: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 40023850: 92 12 60 b0 or %o1, 0xb0, %o1 <== NOT EXECUTED 40023854: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 40023858: 15 10 01 81 sethi %hi(0x40060400), %o2 <== NOT EXECUTED 4002385c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 40023860: 94 12 a3 e8 or %o2, 0x3e8, %o2 <== NOT EXECUTED 40023864: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 40023868: 7f ff ff e9 call 4002380c <== NOT EXECUTED 4002386c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40023870: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023874: 22 80 00 02 be,a 4002387c <== NOT EXECUTED 40023878: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4002387c: 81 c7 e0 08 ret <== NOT EXECUTED 40023880: 81 e8 00 00 restore <== NOT EXECUTED 4002380c : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002380c: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 40023810: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 40023814: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40023818: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4002381c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 40023820: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40023824: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 40023828: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4002382c: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 40023830: 90 10 20 00 clr %o0 <== NOT EXECUTED 40023834: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40023838: 7f ff ff bd call 4002372c <== NOT EXECUTED 4002383c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40023840: 01 00 00 00 nop 4000ba44 : int gettimeofday( struct timeval *tp, void * __tz ) { 4000ba44: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000ba48: 80 a6 20 00 cmp %i0, 0 4000ba4c: 02 80 00 11 be 4000ba90 4000ba50: 01 00 00 00 nop ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 4000ba54: 7f ff d8 f5 call 40001e28 4000ba58: 01 00 00 00 nop 4000ba5c: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000ba60: 7f ff ef b8 call 40007940 <_TOD_Get> 4000ba64: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 4000ba68: 7f ff d8 f4 call 40001e38 4000ba6c: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000ba70: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 4000ba74: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000ba78: 92 10 23 e8 mov 0x3e8, %o1 4000ba7c: 40 00 27 84 call 4001588c <.udiv> 4000ba80: c2 26 00 00 st %g1, [ %i0 ] 4000ba84: d0 26 20 04 st %o0, [ %i0 + 4 ] * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; } 4000ba88: 81 c7 e0 08 ret 4000ba8c: 91 e8 20 00 restore %g0, 0, %o0 void * __tz ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4000ba90: 40 00 0b af call 4000e94c <__errno> <== NOT EXECUTED 4000ba94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000ba98: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000ba9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000baa0: 81 c7 e0 08 ret <== NOT EXECUTED 4000baa4: 81 e8 00 00 restore <== NOT EXECUTED 40006a24 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 40006a24: 03 10 01 32 sethi %hi(0x4004c800), %g1 <== NOT EXECUTED 40006a28: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 4004cb44 <== NOT EXECUTED return _POSIX_types_Uid; } 40006a2c: 81 c3 e0 08 retl <== NOT EXECUTED 40006a30: d0 10 a0 28 lduh [ %g2 + 0x28 ], %o0 <== NOT EXECUTED 40030694 : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 40030694: c4 02 20 2c ld [ %o0 + 0x2c ], %g2 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 40030698: 86 10 00 08 mov %o0, %g3 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 4003069c: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 400306a0: 80 a0 60 01 cmp %g1, 1 400306a4: 02 80 00 04 be 400306b4 400306a8: 90 10 3f ff mov -1, %o0 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 400306ac: 81 c3 e0 08 retl <== NOT EXECUTED 400306b0: 01 00 00 00 nop <== 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; 400306b4: c0 20 e0 08 clr [ %g3 + 8 ] return 0; } 400306b8: 81 c3 e0 08 retl 400306bc: 90 10 20 00 clr %o0 400307b0 : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 400307b0: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 400307b4: e0 06 00 00 ld [ %i0 ], %l0 /* * You cannot remove a node that still has children */ if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) ) 400307b8: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 400307bc: 82 04 20 50 add %l0, 0x50, %g1 400307c0: 80 a0 80 01 cmp %g2, %g1 400307c4: 12 80 00 30 bne 40030884 400307c8: 01 00 00 00 nop /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 400307cc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 400307d0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 400307d4: 80 a4 00 02 cmp %l0, %g2 400307d8: 02 80 00 31 be 4003089c 400307dc: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 400307e0: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 400307e4: 80 a0 60 00 cmp %g1, 0 400307e8: 12 80 00 2d bne 4003089c 400307ec: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 400307f0: c2 04 20 08 ld [ %l0 + 8 ], %g1 400307f4: 80 a0 60 00 cmp %g1, 0 400307f8: 22 80 00 06 be,a 40030810 400307fc: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40030800: 7f ff d7 69 call 400265a4 <_Chain_Extract> 40030804: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40030808: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4003080c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40030810: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40030814: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40030818: 90 07 bf f0 add %fp, -16, %o0 4003081c: 7f ff 58 5f call 40006998 40030820: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40030824: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * 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) ) { 40030828: 90 10 00 10 mov %l0, %o0 4003082c: 7f ff 58 d1 call 40006b70 40030830: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40030834: 80 a2 20 00 cmp %o0, 0 40030838: 12 80 00 11 bne 4003087c 4003083c: 01 00 00 00 nop 40030840: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40030844: 80 a0 60 00 cmp %g1, 0 40030848: 12 80 00 0d bne 4003087c 4003084c: 03 10 01 32 sethi %hi(0x4004c800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40030850: c6 00 63 44 ld [ %g1 + 0x344 ], %g3 ! 4004cb44 40030854: c4 06 00 00 ld [ %i0 ], %g2 40030858: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4003085c: 80 a0 40 02 cmp %g1, %g2 40030860: 22 80 00 02 be,a 40030868 40030864: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 40030868: 90 10 00 10 mov %l0, %o0 4003086c: 7f ff 58 20 call 400068ec 40030870: b0 10 20 00 clr %i0 40030874: 81 c7 e0 08 ret 40030878: 81 e8 00 00 restore } return 0; } 4003087c: 81 c7 e0 08 ret 40030880: 91 e8 20 00 restore %g0, 0, %o0 /* * 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 ); 40030884: 40 00 0b c5 call 40033798 <__errno> 40030888: b0 10 3f ff mov -1, %i0 4003088c: 82 10 20 5a mov 0x5a, %g1 40030890: c2 22 00 00 st %g1, [ %o0 ] 40030894: 81 c7 e0 08 ret 40030898: 81 e8 00 00 restore /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 4003089c: 40 00 0b bf call 40033798 <__errno> 400308a0: b0 10 3f ff mov -1, %i0 400308a4: 82 10 20 10 mov 0x10, %g1 400308a8: c2 22 00 00 st %g1, [ %o0 ] 400308ac: 81 c7 e0 08 ret 400308b0: 81 e8 00 00 restore 400233f8 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 400233f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 400233fc: 05 10 01 81 sethi %hi(0x40060400), %g2 <== NOT EXECUTED 40023400: c2 48 a3 e0 ldsb [ %g2 + 0x3e0 ], %g1 ! 400607e0 <== NOT EXECUTED 40023404: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023408: 02 80 00 04 be 40023418 <== NOT EXECUTED 4002340c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40023410: 81 c7 e0 08 ret <== NOT EXECUTED 40023414: 81 e8 00 00 restore <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 40023418: 92 10 21 ff mov 0x1ff, %o1 <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 4002341c: c2 28 a3 e0 stb %g1, [ %g2 + 0x3e0 ] <== NOT EXECUTED mkdir("/etc", 0777); 40023420: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED 40023424: 7f ff 8f 4c call 40007154 <== NOT EXECUTED 40023428: 90 12 22 00 or %o0, 0x200, %o0 ! 40049200 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4002342c: 31 10 01 24 sethi %hi(0x40049000), %i0 <== NOT EXECUTED 40023430: 21 10 01 2f sethi %hi(0x4004bc00), %l0 <== NOT EXECUTED 40023434: 90 16 22 08 or %i0, 0x208, %o0 <== NOT EXECUTED 40023438: 40 00 43 4a call 40034160 <== NOT EXECUTED 4002343c: 92 14 20 80 or %l0, 0x80, %o1 <== NOT EXECUTED 40023440: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023444: 22 80 00 0d be,a 40023478 <== NOT EXECUTED 40023448: 90 16 22 08 or %i0, 0x208, %o0 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4002344c: 40 00 41 2b call 400338f8 <== NOT EXECUTED 40023450: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 40023454: 92 14 20 80 or %l0, 0x80, %o1 <== NOT EXECUTED 40023458: 31 10 01 24 sethi %hi(0x40049000), %i0 <== NOT EXECUTED 4002345c: 40 00 43 41 call 40034160 <== NOT EXECUTED 40023460: 90 16 22 80 or %i0, 0x280, %o0 ! 40049280 <== NOT EXECUTED 40023464: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023468: 22 80 00 11 be,a 400234ac <== NOT EXECUTED 4002346c: 90 16 22 80 or %i0, 0x280, %o0 <== NOT EXECUTED fclose(fp); 40023470: 40 00 41 22 call 400338f8 <== NOT EXECUTED 40023474: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 40023478: 13 10 01 20 sethi %hi(0x40048000), %o1 <== NOT EXECUTED 4002347c: 40 00 43 39 call 40034160 <== NOT EXECUTED 40023480: 92 12 63 88 or %o1, 0x388, %o1 ! 40048388 <_CPU_Trap_slot_template+0x1518> <== NOT EXECUTED 40023484: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40023488: 02 bf ff f3 be 40023454 <== NOT EXECUTED 4002348c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 40023490: 94 10 20 66 mov 0x66, %o2 <== NOT EXECUTED 40023494: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 40023498: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED 4002349c: 40 00 46 5b call 40034e08 <== NOT EXECUTED 400234a0: 90 12 22 18 or %o0, 0x218, %o0 ! 40049218 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 400234a4: 10 bf ff ea b 4002344c <== NOT EXECUTED 400234a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 400234ac: 13 10 01 20 sethi %hi(0x40048000), %o1 <== NOT EXECUTED 400234b0: 40 00 43 2c call 40034160 <== NOT EXECUTED 400234b4: 92 12 63 88 or %o1, 0x388, %o1 ! 40048388 <_CPU_Trap_slot_template+0x1518> <== NOT EXECUTED 400234b8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400234bc: 02 bf ff d5 be 40023410 <== NOT EXECUTED 400234c0: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 400234c4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400234c8: 94 10 20 2a mov 0x2a, %o2 <== NOT EXECUTED 400234cc: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 400234d0: 40 00 46 4e call 40034e08 <== NOT EXECUTED 400234d4: 90 12 22 90 or %o0, 0x290, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 400234d8: 40 00 41 08 call 400338f8 <== NOT EXECUTED 400234dc: 81 e8 00 00 restore <== NOT EXECUTED 400234e0: 01 00 00 00 nop 40018878 : int ioctl( int fd, ioctl_command_t command, ... ) { 40018878: 9d e3 bf 90 save %sp, -112, %sp va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4001887c: 03 10 00 a6 sethi %hi(0x40029800), %g1 40018880: c4 00 62 68 ld [ %g1 + 0x268 ], %g2 ! 40029a68 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40018884: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40018888: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4001888c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40018890: fa 27 a0 58 st %i5, [ %fp + 0x58 ] va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 40018894: 80 a6 00 02 cmp %i0, %g2 40018898: 1a 80 00 1b bcc 40018904 4001889c: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 400188a0: 03 10 00 ae sethi %hi(0x4002b800), %g1 400188a4: c6 00 61 1c ld [ %g1 + 0x11c ], %g3 ! 4002b91c 400188a8: 85 2e 20 02 sll %i0, 2, %g2 400188ac: 83 2e 20 04 sll %i0, 4, %g1 400188b0: 82 20 40 02 sub %g1, %g2, %g1 400188b4: 82 00 40 18 add %g1, %i0, %g1 400188b8: 83 28 60 02 sll %g1, 2, %g1 400188bc: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 400188c0: c4 02 20 0c ld [ %o0 + 0xc ], %g2 400188c4: 80 88 a1 00 btst 0x100, %g2 400188c8: 02 80 00 0f be 40018904 400188cc: 82 07 a0 50 add %fp, 0x50, %g1 /* * Now process the ioctl(). */ if ( !iop->handlers ) 400188d0: c4 02 20 30 ld [ %o0 + 0x30 ], %g2 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 400188d4: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 400188d8: 80 a0 a0 00 cmp %g2, 0 400188dc: 02 80 00 0a be 40018904 400188e0: d4 07 a0 4c ld [ %fp + 0x4c ], %o2 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 400188e4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 400188e8: 80 a0 60 00 cmp %g1, 0 400188ec: 02 80 00 0c be 4001891c 400188f0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 400188f4: 9f c0 40 00 call %g1 400188f8: 01 00 00 00 nop return rc; } 400188fc: 81 c7 e0 08 ret 40018900: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40018904: 40 00 03 1e call 4001957c <__errno> <== NOT EXECUTED 40018908: 01 00 00 00 nop <== NOT EXECUTED 4001890c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40018910: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40018914: 10 bf ff fa b 400188fc <== NOT EXECUTED 40018918: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001891c: 40 00 03 18 call 4001957c <__errno> <== NOT EXECUTED 40018920: 01 00 00 00 nop <== NOT EXECUTED 40018924: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40018928: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001892c: 10 bf ff f4 b 400188fc <== NOT EXECUTED 40018930: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40004c9c : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40004c9c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40004ca0: c6 06 60 30 ld [ %i1 + 0x30 ], %g3 <== NOT EXECUTED 40004ca4: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40004ca8: 02 80 00 03 be 40004cb4 <== NOT EXECUTED 40004cac: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40004cb0: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40004cb4: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40004cb8: 02 80 00 0b be 40004ce4 <== NOT EXECUTED 40004cbc: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 40004cc0: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED 40004cc4: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 4001a0b0 <__ctype_ptr> <== NOT EXECUTED 40004cc8: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004ccc: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED 40004cd0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004cd4: 32 80 00 02 bne,a 40004cdc <== NOT EXECUTED 40004cd8: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 40004cdc: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == '\r') { 40004ce0: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED 40004ce4: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 40004ce8: 02 80 00 41 be 40004dec <== NOT EXECUTED 40004cec: 80 a0 60 0a cmp %g1, 0xa <== 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)) { 40004cf0: 02 80 00 14 be 40004d40 <== NOT EXECUTED 40004cf4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004cf8: 32 80 00 16 bne,a 40004d50 <== NOT EXECUTED 40004cfc: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 40004d00: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED 40004d04: 05 10 00 68 sethi %hi(0x4001a000), %g2 <== NOT EXECUTED 40004d08: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 ! 4001a00c <== NOT EXECUTED 40004d0c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004d10: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40004d14: 16 80 00 09 bge 40004d38 <== NOT EXECUTED 40004d18: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 40004d1c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004d20: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40004d24: 12 80 00 3b bne 40004e10 <== NOT EXECUTED 40004d28: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40004d2c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 40004d30: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 40004d34: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40004d38: 81 c7 e0 08 ret <== NOT EXECUTED 40004d3c: 81 e8 00 00 restore <== 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)) { 40004d40: 80 88 e0 40 btst 0x40, %g3 <== NOT EXECUTED 40004d44: 32 80 00 02 bne,a 40004d4c <== NOT EXECUTED 40004d48: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004d4c: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40004d50: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40004d54: 22 bf ff ec be,a 40004d04 <== NOT EXECUTED 40004d58: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40004d5c: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 40004d60: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004d64: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40004d68: 22 80 00 34 be,a 40004e38 <== NOT EXECUTED 40004d6c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40004d70: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 40004d74: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40004d78: 22 80 00 41 be,a 40004e7c <== NOT EXECUTED 40004d7c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40004d80: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED 40004d84: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40004d88: 02 bf ff ec be 40004d38 <== NOT EXECUTED 40004d8c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40004d90: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40004d94: 02 80 00 2e be 40004e4c <== NOT EXECUTED 40004d98: 80 88 a0 48 btst 0x48, %g2 <== 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]) 40004d9c: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED 40004da0: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40004da4: 02 80 00 07 be 40004dc0 <== NOT EXECUTED 40004da8: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004dac: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 40004db0: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 40004db4: 32 bf ff d4 bne,a 40004d04 <== NOT EXECUTED 40004db8: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 40004dbc: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40004dc0: 22 80 00 05 be,a 40004dd4 <== NOT EXECUTED 40004dc4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40004dc8: 7f ff ff 0d call 400049fc <== NOT EXECUTED 40004dcc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004dd0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004dd4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40004dd8: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40004ddc: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 40004de0: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 40004de4: 81 c7 e0 08 ret <== NOT EXECUTED 40004de8: 91 e8 20 01 restore %g0, 1, %o0 <== 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) 40004dec: 80 88 e0 80 btst 0x80, %g3 <== NOT EXECUTED 40004df0: 02 80 00 04 be 40004e00 <== NOT EXECUTED 40004df4: 80 88 e1 00 btst 0x100, %g3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; } 40004df8: 81 c7 e0 08 ret <== NOT EXECUTED 40004dfc: 91 e8 20 00 restore %g0, 0, %o0 <== 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) 40004e00: 32 bf ff d3 bne,a 40004d4c <== NOT EXECUTED 40004e04: a0 10 20 0a mov 0xa, %l0 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40004e08: 10 bf ff d2 b 40004d50 <== NOT EXECUTED 40004e0c: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 40004e10: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40004e14: 7f ff fe fa call 400049fc <== NOT EXECUTED 40004e18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004e1c: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004e20: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 40004e24: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED 40004e28: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 40004e2c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 40004e30: 81 c7 e0 08 ret <== NOT EXECUTED 40004e34: 91 e8 20 00 restore %g0, 0, %o0 <== 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); 40004e38: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004e3c: 7f ff ff 10 call 40004a7c <== NOT EXECUTED 40004e40: b0 10 20 00 clr %i0 <== NOT EXECUTED 40004e44: 81 c7 e0 08 ret <== NOT EXECUTED 40004e48: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 40004e4c: 22 80 00 05 be,a 40004e60 <== NOT EXECUTED 40004e50: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40004e54: 7f ff fe ea call 400049fc <== NOT EXECUTED 40004e58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40004e5c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40004e60: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40004e64: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED 40004e68: c4 28 c0 01 stb %g2, [ %g3 + %g1 ] <== NOT EXECUTED 40004e6c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40004e70: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED 40004e74: 81 c7 e0 08 ret <== NOT EXECUTED 40004e78: 91 e8 20 01 restore %g0, 1, %o0 <== 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); 40004e7c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004e80: 7f ff fe ff call 40004a7c <== NOT EXECUTED 40004e84: b0 10 20 00 clr %i0 <== NOT EXECUTED 40004e88: 81 c7 e0 08 ret <== NOT EXECUTED 40004e8c: 81 e8 00 00 restore <== NOT EXECUTED 40025110 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40025110: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40025114: 7f ff ff 0c call 40024d44 40025118: 01 00 00 00 nop 4002511c: 80 a2 00 18 cmp %o0, %i0 40025120: 12 80 00 c6 bne 40025438 40025124: 80 a6 60 00 cmp %i1, 0 /* * Validate the signal passed. */ if ( !sig ) 40025128: 02 80 00 ca be 40025450 4002512c: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40025130: 80 a0 e0 1f cmp %g3, 0x1f 40025134: 18 80 00 c7 bgu 40025450 40025138: 03 10 00 b0 sethi %hi(0x4002c000), %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 4002513c: a1 2e 60 02 sll %i1, 2, %l0 40025140: a4 10 61 3c or %g1, 0x13c, %l2 40025144: a3 2e 60 04 sll %i1, 4, %l1 40025148: 82 24 40 10 sub %l1, %l0, %g1 4002514c: 82 04 80 01 add %l2, %g1, %g1 40025150: c4 00 60 08 ld [ %g1 + 8 ], %g2 40025154: 80 a0 a0 01 cmp %g2, 1 40025158: 02 80 00 95 be 400253ac 4002515c: 90 10 20 00 clr %o0 * 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 ) ) 40025160: 80 a6 60 08 cmp %i1, 8 40025164: 02 80 00 94 be 400253b4 40025168: 80 a6 60 04 cmp %i1, 4 4002516c: 02 80 00 92 be 400253b4 40025170: 80 a6 60 0b cmp %i1, 0xb 40025174: 02 80 00 90 be 400253b4 40025178: 82 10 20 01 mov 1, %g1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 4002517c: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 40025180: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 40025184: 80 a6 a0 00 cmp %i2, 0 40025188: 02 80 00 a3 be 40025414 4002518c: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 40025190: c2 06 80 00 ld [ %i2 ], %g1 40025194: c2 27 bf f4 st %g1, [ %fp + -12 ] 40025198: 05 10 00 ae sethi %hi(0x4002b800), %g2 4002519c: c2 00 a3 00 ld [ %g2 + 0x300 ], %g1 ! 4002bb00 <_Thread_Dispatch_disable_level> 400251a0: 82 00 60 01 inc %g1 400251a4: c2 20 a3 00 st %g1, [ %g2 + 0x300 ] /* * 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; 400251a8: 03 10 00 ae sethi %hi(0x4002b800), %g1 400251ac: c8 00 63 c0 ld [ %g1 + 0x3c0 ], %g4 ! 4002bbc0 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 400251b0: c4 01 21 60 ld [ %g4 + 0x160 ], %g2 400251b4: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 400251b8: 80 ae 00 01 andncc %i0, %g1, %g0 400251bc: 12 80 00 69 bne 40025360 400251c0: 03 10 00 b0 sethi %hi(0x4002c000), %g1 goto process_it; 400251c4: 98 10 62 c8 or %g1, 0x2c8, %o4 ! 4002c2c8 <_POSIX_signals_Wait_queue> */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 400251c8: 96 03 20 30 add %o4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 400251cc: c4 03 00 00 ld [ %o4 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400251d0: 9a 03 20 04 add %o4, 4, %o5 !_Chain_Is_tail( the_chain, the_node ) ; 400251d4: 80 a0 80 0d cmp %g2, %o5 400251d8: 22 80 00 1a be,a 40025240 400251dc: 98 03 20 0c add %o4, 0xc, %o4 the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 400251e0: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 400251e4: 88 10 00 02 mov %g2, %g4 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 400251e8: 80 8e 00 01 btst %i0, %g1 400251ec: 12 80 00 5d bne 40025360 400251f0: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 400251f4: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 400251f8: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 400251fc: 22 80 00 0d be,a 40025230 <== NOT EXECUTED 40025200: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40025204: 10 80 00 58 b 40025364 <== NOT EXECUTED 40025208: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4002520c: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 <== NOT EXECUTED if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40025210: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40025214: 12 80 00 53 bne 40025360 <== NOT EXECUTED 40025218: 88 10 00 02 mov %g2, %g4 <== NOT EXECUTED 4002521c: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 <== NOT EXECUTED 40025220: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 40025224: 12 80 00 50 bne 40025364 <== NOT EXECUTED 40025228: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 4002522c: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 40025230: 80 a0 80 0d cmp %g2, %o5 <== NOT EXECUTED 40025234: 32 bf ff f6 bne,a 4002520c <== NOT EXECUTED 40025238: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 4002523c: 98 03 20 0c add %o4, 0xc, %o4 <== NOT EXECUTED */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 40025240: 80 a3 00 0b cmp %o4, %o3 40025244: 12 bf ff e2 bne 400251cc 40025248: 03 10 00 a6 sethi %hi(0x40029800), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 4002524c: c4 08 63 14 ldub [ %g1 + 0x314 ], %g2 ! 40029b14 40025250: 90 10 20 00 clr %o0 40025254: 03 10 00 ae sethi %hi(0x4002b800), %g1 40025258: 84 00 a0 01 inc %g2 4002525c: 94 10 62 68 or %g1, 0x268, %o2 * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 40025260: 35 04 00 00 sethi %hi(0x10000000), %i2 40025264: 9e 02 a0 0c add %o2, 0xc, %o7 the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 40025268: c2 02 80 00 ld [ %o2 ], %g1 4002526c: 80 a0 60 00 cmp %g1, 0 40025270: 22 80 00 35 be,a 40025344 40025274: 9a 10 00 02 mov %g2, %o5 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 40025278: c2 00 60 04 ld [ %g1 + 4 ], %g1 /* * This cannot happen in the current (as of Dec 2007) implementation * of initialization but at some point, the object information * structure for a particular manager may not be installed. */ if ( !the_info ) 4002527c: 80 a0 60 00 cmp %g1, 0 40025280: 22 80 00 31 be,a 40025344 40025284: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED continue; maximum = the_info->maximum; 40025288: d8 10 60 10 lduh [ %g1 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4002528c: 80 a3 20 00 cmp %o4, 0 40025290: 02 80 00 5f be 4002540c 40025294: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 40025298: 88 10 20 01 mov 1, %g4 the_thread = (Thread_Control *) object_table[ index ]; 4002529c: 83 29 20 02 sll %g4, 2, %g1 400252a0: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 400252a4: 80 a0 e0 00 cmp %g3, 0 400252a8: 02 80 00 23 be 40025334 400252ac: 9a 10 00 02 mov %g2, %o5 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 400252b0: da 00 e0 14 ld [ %g3 + 0x14 ], %o5 400252b4: 80 a3 40 02 cmp %o5, %g2 400252b8: 38 80 00 1f bgu,a 40025334 400252bc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400252c0: c2 00 e1 60 ld [ %g3 + 0x160 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 400252c4: 80 a0 60 00 cmp %g1, 0 400252c8: 22 80 00 1b be,a 40025334 400252cc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED 400252d0: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 400252d4: 80 ae 00 01 andncc %i0, %g1, %g0 400252d8: 22 80 00 17 be,a 40025334 400252dc: 9a 10 00 02 mov %g2, %o5 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 400252e0: 80 a3 40 02 cmp %o5, %g2 400252e4: 2a 80 00 0b bcs,a 40025310 400252e8: 88 01 20 01 inc %g4 * Now the thread and the interested thread have the same priority. * If the interested thread is ready, then we don't need to send it * to a blocked thread. */ if ( _States_Is_ready( interested_thread->current_state ) ) 400252ec: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 <== NOT EXECUTED 400252f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400252f4: 22 80 00 10 be,a 40025334 <== NOT EXECUTED 400252f8: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 400252fc: d2 00 e0 10 ld [ %g3 + 0x10 ], %o1 <== NOT EXECUTED 40025300: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 40025304: 12 80 00 46 bne 4002541c <== NOT EXECUTED 40025308: 80 88 40 1a btst %g1, %i2 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4002530c: 88 01 20 01 inc %g4 <== NOT EXECUTED 40025310: 80 a3 00 04 cmp %o4, %g4 40025314: 0a 80 00 0c bcs 40025344 40025318: 90 10 00 03 mov %g3, %o0 the_thread = (Thread_Control *) object_table[ index ]; 4002531c: 83 29 20 02 sll %g4, 2, %g1 40025320: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 40025324: 80 a0 e0 00 cmp %g3, 0 40025328: 12 bf ff e2 bne 400252b0 4002532c: 84 10 00 0d mov %o5, %g2 * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40025330: 9a 10 00 02 mov %g2, %o5 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 40025334: 88 01 20 01 inc %g4 40025338: 80 a3 00 04 cmp %o4, %g4 4002533c: 1a bf ff f9 bcc 40025320 40025340: 83 29 20 02 sll %g4, 2, %g1 40025344: 94 02 a0 04 add %o2, 4, %o2 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 40025348: 80 a2 80 0f cmp %o2, %o7 4002534c: 12 bf ff c7 bne 40025268 40025350: 84 10 00 0d mov %o5, %g2 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 40025354: 80 a2 20 00 cmp %o0, 0 40025358: 02 80 00 0b be 40025384 4002535c: 88 10 00 08 mov %o0, %g4 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 40025360: 82 10 20 01 mov 1, %g1 /* * 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 ) ) { 40025364: 90 10 00 04 mov %g4, %o0 40025368: 92 10 00 19 mov %i1, %o1 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 4002536c: c2 29 20 75 stb %g1, [ %g4 + 0x75 ] /* * 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 ) ) { 40025370: 40 00 00 54 call 400254c0 <_POSIX_signals_Unblock_thread> 40025374: 94 07 bf ec add %fp, -20, %o2 40025378: 80 8a 20 ff btst 0xff, %o0 4002537c: 12 80 00 09 bne 400253a0 40025380: 01 00 00 00 nop /* * 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 ); 40025384: 40 00 00 3f call 40025480 <_POSIX_signals_Set_process_signals> 40025388: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4002538c: b4 24 40 10 sub %l1, %l0, %i2 40025390: c2 04 80 1a ld [ %l2 + %i2 ], %g1 40025394: 80 a0 60 02 cmp %g1, 2 40025398: 02 80 00 0d be 400253cc 4002539c: 11 10 00 b0 sethi %hi(0x4002c000), %o0 psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); 400253a0: 7f ff a7 da call 4000f308 <_Thread_Enable_dispatch> 400253a4: 01 00 00 00 nop 400253a8: 90 10 20 00 clr %o0 ! 0 return 0; } 400253ac: 81 c7 e0 08 ret 400253b0: 91 e8 00 08 restore %g0, %o0, %o0 * 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 ); 400253b4: 40 00 00 d1 call 400256f8 400253b8: 01 00 00 00 nop 400253bc: 40 00 00 92 call 40025604 400253c0: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400253c4: 81 c7 e0 08 ret 400253c8: 91 e8 00 08 restore %g0, %o0, %o0 _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 400253cc: 7f ff a1 b7 call 4000daa8 <_Chain_Get> 400253d0: 90 12 22 bc or %o0, 0x2bc, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 400253d4: 80 a2 20 00 cmp %o0, 0 400253d8: 02 80 00 24 be 40025468 400253dc: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 400253e0: 92 10 00 08 mov %o0, %o1 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 400253e4: c2 22 20 08 st %g1, [ %o0 + 8 ] 400253e8: c4 07 bf f0 ld [ %fp + -16 ], %g2 400253ec: c4 22 20 0c st %g2, [ %o0 + 0xc ] 400253f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400253f4: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 400253f8: 11 10 00 b0 sethi %hi(0x4002c000), %o0 400253fc: 90 12 23 0c or %o0, 0x30c, %o0 ! 4002c30c <_POSIX_signals_Siginfo> 40025400: 7f ff a1 9e call 4000da78 <_Chain_Append> 40025404: 90 02 00 1a add %o0, %i2, %o0 40025408: 30 bf ff e6 b,a 400253a0 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 4002540c: 10 bf ff ce b 40025344 40025410: 9a 10 00 02 mov %g2, %o5 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 40025414: 10 bf ff 61 b 40025198 40025418: c0 27 bf f4 clr [ %fp + -12 ] * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 4002541c: 32 bf ff c6 bne,a 40025334 <== NOT EXECUTED 40025420: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40025424: 80 8a 40 1a btst %o1, %i2 <== NOT EXECUTED 40025428: 32 bf ff ba bne,a 40025310 <== NOT EXECUTED 4002542c: 88 01 20 01 inc %g4 <== NOT EXECUTED 40025430: 10 bf ff c1 b 40025334 <== NOT EXECUTED 40025434: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 40025438: 7f ff d0 51 call 4001957c <__errno> 4002543c: 01 00 00 00 nop 40025440: 82 10 20 03 mov 3, %g1 ! 3 40025444: c2 22 00 00 st %g1, [ %o0 ] 40025448: 10 bf ff d9 b 400253ac 4002544c: 90 10 3f ff mov -1, %o0 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40025450: 7f ff d0 4b call 4001957c <__errno> 40025454: 01 00 00 00 nop 40025458: 82 10 20 16 mov 0x16, %g1 ! 16 4002545c: c2 22 00 00 st %g1, [ %o0 ] 40025460: 10 bf ff d3 b 400253ac 40025464: 90 10 3f ff mov -1, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 40025468: 7f ff d0 45 call 4001957c <__errno> <== NOT EXECUTED 4002546c: 01 00 00 00 nop <== NOT EXECUTED 40025470: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 40025474: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40025478: 10 bf ff cd b 400253ac <== NOT EXECUTED 4002547c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40017db8 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 40017db8: 9d e3 bf 98 save %sp, -104, %sp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 40017dbc: 03 10 00 6a sethi %hi(0x4001a800), %g1 40017dc0: c4 00 63 e4 ld [ %g1 + 0x3e4 ], %g2 ! 4001abe4 <_System_state_Current> 40017dc4: 80 a0 a0 03 cmp %g2, 3 40017dc8: 02 80 00 04 be 40017dd8 40017dcc: 21 10 00 68 sethi %hi(0x4001a000), %l0 40017dd0: 81 c7 e0 08 ret <== NOT EXECUTED 40017dd4: 81 e8 00 00 restore <== NOT EXECUTED /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != &libc_global_reent) { 40017dd8: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 40017ddc: 03 10 00 67 sethi %hi(0x40019c00), %g1 40017de0: b0 10 60 08 or %g1, 8, %i0 ! 40019c08 40017de4: 80 a0 80 18 cmp %g2, %i0 40017de8: 02 80 00 06 be 40017e00 40017dec: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 _wrapup_reent(&libc_global_reent); 40017df0: 40 00 01 ce call 40018528 <_wrapup_reent> 40017df4: 90 10 00 18 mov %i0, %o0 /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = &libc_global_reent; 40017df8: f0 24 20 b8 st %i0, [ %l0 + 0xb8 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 40017dfc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40017e00: 7f ff db 2b call 4000eaac 40017e04: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 40017e08: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40017e0c: 7f ff db 28 call 4000eaac 40017e10: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40017e14: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 40017e18: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40017e1c: 7f ff db 24 call 4000eaac 40017e20: 81 e8 00 00 restore 40017e24: 01 00 00 00 nop 400239e8 : int link( const char *existing, const char *new ) { 400239e8: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true ); 400239ec: 92 10 20 00 clr %o1 400239f0: 90 10 00 18 mov %i0, %o0 400239f4: a0 07 bf e4 add %fp, -28, %l0 400239f8: 96 10 20 01 mov 1, %o3 400239fc: 94 10 00 10 mov %l0, %o2 40023a00: 7f ff 8b 5d call 40006774 40023a04: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40023a08: 80 a2 20 00 cmp %o0, 0 40023a0c: 12 80 00 84 bne 40023c1c 40023a10: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40023a14: c2 4e 40 00 ldsb [ %i1 ], %g1 40023a18: 80 a0 60 2f cmp %g1, 0x2f 40023a1c: 02 80 00 06 be 40023a34 40023a20: 80 a0 60 5c cmp %g1, 0x5c 40023a24: 02 80 00 04 be 40023a34 40023a28: 80 a0 60 00 cmp %g1, 0 40023a2c: 12 80 00 3a bne 40023b14 40023a30: 03 10 01 32 sethi %hi(0x4004c800), %g1 40023a34: 03 10 01 32 sethi %hi(0x4004c800), %g1 40023a38: c6 00 63 44 ld [ %g1 + 0x344 ], %g3 ! 4004cb44 40023a3c: 88 10 20 01 mov 1, %g4 40023a40: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40023a44: c2 27 bf d4 st %g1, [ %fp + -44 ] 40023a48: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40023a4c: c4 27 bf d8 st %g2, [ %fp + -40 ] 40023a50: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40023a54: c2 27 bf dc st %g1, [ %fp + -36 ] 40023a58: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 40023a5c: c4 27 bf e0 st %g2, [ %fp + -32 ] if ( !parent_loc.ops->evalformake_h ) { 40023a60: c2 07 bf dc ld [ %fp + -36 ], %g1 40023a64: c2 00 60 04 ld [ %g1 + 4 ], %g1 40023a68: 80 a0 60 00 cmp %g1, 0 40023a6c: 02 80 00 5e be 40023be4 40023a70: 90 06 40 04 add %i1, %g4, %o0 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 ); 40023a74: a2 07 bf d4 add %fp, -44, %l1 40023a78: 94 07 bf f4 add %fp, -12, %o2 40023a7c: 9f c0 40 00 call %g1 40023a80: 92 10 00 11 mov %l1, %o1 if ( result != 0 ) { 40023a84: b2 92 20 00 orcc %o0, 0, %i1 40023a88: 12 80 00 48 bne 40023ba8 40023a8c: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 40023a90: c2 07 bf e0 ld [ %fp + -32 ], %g1 40023a94: 80 a0 40 02 cmp %g1, %g2 40023a98: 12 80 00 2a bne 40023b40 40023a9c: c4 07 bf dc ld [ %fp + -36 ], %g2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 40023aa0: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40023aa4: 80 a0 60 00 cmp %g1, 0 40023aa8: 02 80 00 5f be 40023c24 40023aac: d4 07 bf f4 ld [ %fp + -12 ], %o2 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 ); 40023ab0: 90 10 00 10 mov %l0, %o0 40023ab4: 9f c0 40 00 call %g1 40023ab8: 92 10 00 11 mov %l1, %o1 rtems_filesystem_freenode( &existing_loc ); 40023abc: c2 07 bf ec ld [ %fp + -20 ], %g1 40023ac0: 80 a0 60 00 cmp %g1, 0 40023ac4: 02 80 00 08 be 40023ae4 40023ac8: b0 10 00 08 mov %o0, %i0 40023acc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40023ad0: 80 a0 60 00 cmp %g1, 0 40023ad4: 22 80 00 05 be,a 40023ae8 40023ad8: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40023adc: 9f c0 40 00 call %g1 40023ae0: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 40023ae4: c2 07 bf dc ld [ %fp + -36 ], %g1 40023ae8: 80 a0 60 00 cmp %g1, 0 40023aec: 02 80 00 4c be 40023c1c 40023af0: 01 00 00 00 nop 40023af4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40023af8: 80 a0 60 00 cmp %g1, 0 40023afc: 02 80 00 48 be 40023c1c 40023b00: 01 00 00 00 nop 40023b04: 9f c0 40 00 call %g1 40023b08: 90 10 00 11 mov %l1, %o0 return result; } 40023b0c: 81 c7 e0 08 ret 40023b10: 81 e8 00 00 restore /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40023b14: c6 00 63 44 ld [ %g1 + 0x344 ], %g3 40023b18: 88 10 20 00 clr %g4 40023b1c: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40023b20: c2 27 bf d4 st %g1, [ %fp + -44 ] 40023b24: c4 00 e0 08 ld [ %g3 + 8 ], %g2 40023b28: c4 27 bf d8 st %g2, [ %fp + -40 ] 40023b2c: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40023b30: c2 27 bf dc st %g1, [ %fp + -36 ] 40023b34: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 40023b38: 10 bf ff ca b 40023a60 40023b3c: c4 27 bf e0 st %g2, [ %fp + -32 ] * 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 ); 40023b40: c2 07 bf ec ld [ %fp + -20 ], %g1 40023b44: 80 a0 60 00 cmp %g1, 0 40023b48: 22 80 00 09 be,a 40023b6c 40023b4c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40023b50: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40023b54: 80 a0 60 00 cmp %g1, 0 40023b58: 22 80 00 05 be,a 40023b6c 40023b5c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40023b60: 9f c0 40 00 call %g1 40023b64: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 40023b68: c2 07 bf dc ld [ %fp + -36 ], %g1 40023b6c: 80 a0 60 00 cmp %g1, 0 40023b70: 02 80 00 08 be 40023b90 40023b74: 01 00 00 00 nop 40023b78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40023b7c: 80 a0 60 00 cmp %g1, 0 40023b80: 02 80 00 04 be 40023b90 40023b84: 01 00 00 00 nop 40023b88: 9f c0 40 00 call %g1 40023b8c: 90 10 00 11 mov %l1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 40023b90: 40 00 3f 02 call 40033798 <__errno> 40023b94: b0 10 3f ff mov -1, %i0 40023b98: 82 10 20 12 mov 0x12, %g1 40023b9c: c2 22 00 00 st %g1, [ %o0 ] 40023ba0: 81 c7 e0 08 ret 40023ba4: 81 e8 00 00 restore 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 ); 40023ba8: c2 07 bf ec ld [ %fp + -20 ], %g1 40023bac: 80 a0 60 00 cmp %g1, 0 40023bb0: 02 80 00 08 be 40023bd0 40023bb4: 01 00 00 00 nop 40023bb8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40023bbc: 80 a0 60 00 cmp %g1, 0 40023bc0: 02 80 00 04 be 40023bd0 40023bc4: 01 00 00 00 nop 40023bc8: 9f c0 40 00 call %g1 40023bcc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 40023bd0: 40 00 3e f2 call 40033798 <__errno> 40023bd4: b0 10 3f ff mov -1, %i0 40023bd8: f2 22 00 00 st %i1, [ %o0 ] 40023bdc: 81 c7 e0 08 ret 40023be0: 81 e8 00 00 restore */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 40023be4: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40023be8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023bec: 02 80 00 08 be 40023c0c <== NOT EXECUTED 40023bf0: 01 00 00 00 nop <== NOT EXECUTED 40023bf4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023bf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023bfc: 02 80 00 04 be 40023c0c <== NOT EXECUTED 40023c00: 01 00 00 00 nop <== NOT EXECUTED 40023c04: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023c08: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 40023c0c: 40 00 3e e3 call 40033798 <__errno> <== NOT EXECUTED 40023c10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023c14: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40023c18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023c1c: 81 c7 e0 08 ret 40023c20: 81 e8 00 00 restore rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 40023c24: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40023c28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023c2c: 02 80 00 0a be 40023c54 <== NOT EXECUTED 40023c30: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40023c34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023c38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023c3c: 02 80 00 06 be 40023c54 <== NOT EXECUTED 40023c40: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40023c44: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023c48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40023c4c: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 40023c50: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40023c54: 02 bf ff ee be 40023c0c <== NOT EXECUTED 40023c58: 01 00 00 00 nop <== NOT EXECUTED 40023c5c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40023c60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023c64: 02 bf ff ea be 40023c0c <== NOT EXECUTED 40023c68: 01 00 00 00 nop <== NOT EXECUTED 40023c6c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023c70: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40023c74: 30 bf ff e6 b,a 40023c0c <== NOT EXECUTED 40017c80 : off_t lseek( int fd, off_t offset, int whence ) { 40017c80: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40017c84: 03 10 00 66 sethi %hi(0x40019800), %g1 40017c88: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 40019af8 off_t lseek( int fd, off_t offset, int whence ) { 40017c8c: 92 10 00 19 mov %i1, %o1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40017c90: 80 a6 00 02 cmp %i0, %g2 40017c94: 1a 80 00 31 bcc 40017d58 40017c98: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40017c9c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40017ca0: c6 00 60 6c ld [ %g1 + 0x6c ], %g3 ! 4001a86c 40017ca4: 85 2e 20 02 sll %i0, 2, %g2 40017ca8: 83 2e 20 04 sll %i0, 4, %g1 40017cac: 82 20 40 02 sub %g1, %g2, %g1 40017cb0: 82 00 40 18 add %g1, %i0, %g1 40017cb4: 83 28 60 02 sll %g1, 2, %g1 40017cb8: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 40017cbc: c4 06 20 0c ld [ %i0 + 0xc ], %g2 40017cc0: 80 88 a1 00 btst 0x100, %g2 40017cc4: 02 80 00 25 be 40017d58 40017cc8: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 40017ccc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 40017cd0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40017cd4: 80 a0 60 00 cmp %g1, 0 40017cd8: 02 80 00 26 be 40017d70 40017cdc: 80 a6 a0 01 cmp %i2, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40017ce0: 02 80 00 1b be 40017d4c 40017ce4: f4 06 20 08 ld [ %i0 + 8 ], %i2 40017ce8: 80 a2 a0 02 cmp %o2, 2 40017cec: 02 80 00 0d be 40017d20 40017cf0: 80 a2 a0 00 cmp %o2, 0 40017cf4: 12 80 00 0f bne 40017d30 40017cf8: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 40017cfc: f2 26 20 08 st %i1, [ %i0 + 8 ] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 40017d00: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40017d04: 9f c0 40 00 call %g1 40017d08: 90 10 00 18 mov %i0, %o0 if ( status == (off_t) -1 ) 40017d0c: 80 a2 3f ff cmp %o0, -1 40017d10: 22 80 00 02 be,a 40017d18 40017d14: f4 26 20 08 st %i2, [ %i0 + 8 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40017d18: 81 c7 e0 08 ret 40017d1c: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 40017d20: c2 06 20 04 ld [ %i0 + 4 ], %g1 40017d24: 82 06 40 01 add %i1, %g1, %g1 40017d28: 10 bf ff f6 b 40017d00 40017d2c: c2 26 20 08 st %g1, [ %i0 + 8 ] break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40017d30: 7f ff db 07 call 4000e94c <__errno> 40017d34: 01 00 00 00 nop 40017d38: 82 10 20 16 mov 0x16, %g1 ! 16 40017d3c: c2 22 00 00 st %g1, [ %o0 ] 40017d40: 90 10 3f ff mov -1, %o0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40017d44: 81 c7 e0 08 ret 40017d48: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 40017d4c: 82 06 40 1a add %i1, %i2, %g1 40017d50: 10 bf ff ec b 40017d00 40017d54: c2 26 20 08 st %g1, [ %i0 + 8 ] off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40017d58: 7f ff da fd call 4000e94c <__errno> <== NOT EXECUTED 40017d5c: 01 00 00 00 nop <== NOT EXECUTED 40017d60: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40017d64: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017d68: 10 bf ff ec b 40017d18 <== NOT EXECUTED 40017d6c: 90 10 3f ff mov -1, %o0 <== 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 ); 40017d70: 7f ff da f7 call 4000e94c <__errno> <== NOT EXECUTED 40017d74: 01 00 00 00 nop <== NOT EXECUTED 40017d78: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40017d7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017d80: 10 bf ff e6 b 40017d18 <== NOT EXECUTED 40017d84: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40023db4 : int _STAT_NAME( const char *path, struct stat *buf ) { 40023db4: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40023db8: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40023dbc: 02 80 00 32 be 40023e84 <== NOT EXECUTED 40023dc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 40023dc4: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40023dc8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40023dcc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40023dd0: 96 10 20 00 clr %o3 <== NOT EXECUTED 40023dd4: 7f ff 8a 68 call 40006774 <== NOT EXECUTED 40023dd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( status != 0 ) 40023ddc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023de0: 12 80 00 27 bne 40023e7c <== NOT EXECUTED 40023de4: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 40023de8: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40023dec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023df0: 02 80 00 2b be 40023e9c <== NOT EXECUTED 40023df4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40023df8: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 40023dfc: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 40023e00: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 40023e04: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 40023e08: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 40023e0c: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 40023e10: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 40023e14: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 40023e18: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 40023e1c: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 40023e20: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 40023e24: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 40023e28: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 40023e2c: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 40023e30: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 40023e34: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 40023e38: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 40023e3c: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED 40023e40: c0 26 60 48 clr [ %i1 + 0x48 ] <== NOT EXECUTED 40023e44: c0 26 60 4c clr [ %i1 + 0x4c ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 40023e48: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 40023e4c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023e50: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40023e54: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40023e58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023e5c: 02 80 00 08 be 40023e7c <== NOT EXECUTED 40023e60: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40023e64: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023e68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023e6c: 02 80 00 1a be 40023ed4 <== NOT EXECUTED 40023e70: 01 00 00 00 nop <== NOT EXECUTED 40023e74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023e78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 40023e7c: 81 c7 e0 08 ret <== NOT EXECUTED 40023e80: 81 e8 00 00 restore <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 40023e84: 40 00 3e 45 call 40033798 <__errno> <== NOT EXECUTED 40023e88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023e8c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40023e90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023e94: 81 c7 e0 08 ret <== NOT EXECUTED 40023e98: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 40023e9c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40023ea0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023ea4: 02 80 00 08 be 40023ec4 <== NOT EXECUTED 40023ea8: 01 00 00 00 nop <== NOT EXECUTED 40023eac: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40023eb0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023eb4: 02 80 00 04 be 40023ec4 <== NOT EXECUTED 40023eb8: 01 00 00 00 nop <== NOT EXECUTED 40023ebc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40023ec0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40023ec4: 40 00 3e 35 call 40033798 <__errno> <== NOT EXECUTED 40023ec8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40023ecc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40023ed0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40023ed4: 81 c7 e0 08 ret <== NOT EXECUTED 40023ed8: 81 e8 00 00 restore <== NOT EXECUTED 4000be58 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000be58: 9d e3 bf 98 save %sp, -104, %sp 4000be5c: 05 10 00 6a sethi %hi(0x4001a800), %g2 4000be60: 84 10 a0 d0 or %g2, 0xd0, %g2 ! 4001a8d0 4000be64: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000be68: a2 10 00 18 mov %i0, %l1 4000be6c: 82 00 60 01 inc %g1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000be70: 7f ff ff ed call 4000be24 4000be74: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* * Validate the parameters */ if ( !size ) 4000be78: 80 a6 20 00 cmp %i0, 0 4000be7c: 02 80 00 23 be 4000bf08 4000be80: 03 10 00 6a sethi %hi(0x4001a800), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000be84: c4 00 63 e4 ld [ %g1 + 0x3e4 ], %g2 ! 4001abe4 <_System_state_Current> 4000be88: 80 a0 a0 03 cmp %g2, 3 4000be8c: 02 80 00 1a be 4000bef4 4000be90: 11 10 00 6a sethi %hi(0x4001a800), %o0 * Try to give a segment in the current heap if there is not * enough space then try to grow the heap. * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 4000be94: 92 10 00 11 mov %l1, %o1 4000be98: 40 00 05 6d call 4000d44c <_Protected_heap_Allocate> 4000be9c: 90 12 20 78 or %o0, 0x78, %o0 if ( !return_this ) { 4000bea0: b0 92 20 00 orcc %o0, 0, %i0 4000bea4: 02 80 00 1b be 4000bf10 4000bea8: a0 10 00 18 mov %i0, %l0 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4000beac: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000beb0: c2 00 61 6c ld [ %g1 + 0x16c ], %g1 ! 4001a56c 4000beb4: 80 a0 60 00 cmp %g1, 0 4000beb8: 02 80 00 04 be 4000bec8 4000bebc: 92 10 00 11 mov %l1, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000bec0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000bec4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000bec8: 03 10 00 69 sethi %hi(0x4001a400), %g1 4000becc: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 4001a564 4000bed0: 80 a0 60 00 cmp %g1, 0 4000bed4: 02 80 00 06 be 4000beec 4000bed8: b0 10 00 10 mov %l0, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000bedc: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000bee0: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED 4000bee4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000bee8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000beec: 81 c7 e0 08 ret 4000bef0: 81 e8 00 00 restore return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000bef4: 7f ff ff b2 call 4000bdbc 4000bef8: 01 00 00 00 nop 4000befc: 80 8a 20 ff btst 0xff, %o0 4000bf00: 12 bf ff e5 bne 4000be94 4000bf04: 11 10 00 6a sethi %hi(0x4001a800), %o0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000bf08: 81 c7 e0 08 ret 4000bf0c: 91 e8 20 00 restore %g0, 0, %o0 */ return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { if (rtems_malloc_sbrk_helpers) 4000bf10: 03 10 00 69 sethi %hi(0x4001a400), %g1 <== NOT EXECUTED 4000bf14: c2 00 61 68 ld [ %g1 + 0x168 ], %g1 ! 4001a568 <== NOT EXECUTED 4000bf18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000bf1c: 02 80 00 08 be 4000bf3c <== NOT EXECUTED 4000bf20: 01 00 00 00 nop <== NOT EXECUTED return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000bf24: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000bf28: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000bf2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( !return_this ) { 4000bf30: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4000bf34: 12 bf ff df bne 4000beb0 <== NOT EXECUTED 4000bf38: 03 10 00 69 sethi %hi(0x4001a400), %g1 <== NOT EXECUTED errno = ENOMEM; 4000bf3c: 40 00 0a 84 call 4000e94c <__errno> <== NOT EXECUTED 4000bf40: 01 00 00 00 nop <== NOT EXECUTED 4000bf44: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000bf48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000bf4c: 81 c7 e0 08 ret <== NOT EXECUTED 4000bf50: 81 e8 00 00 restore <== NOT EXECUTED 4000be08 : } void malloc_deferred_free( void *pointer ) { 4000be08: 92 10 00 08 mov %o0, %o1 <== 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 ); 4000be0c: 11 10 00 6b sethi %hi(0x4001ac00), %o0 <== NOT EXECUTED 4000be10: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 4001aff8 <== NOT EXECUTED 4000be14: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000be18: 7f ff ed a7 call 400074b4 <_Chain_Append> <== NOT EXECUTED 4000be1c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000be20: 01 00 00 00 nop 4000be24 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4000be24: 9d e3 bf 98 save %sp, -104, %sp 4000be28: 03 10 00 6b sethi %hi(0x4001ac00), %g1 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4000be2c: 10 80 00 04 b 4000be3c 4000be30: a0 10 63 f8 or %g1, 0x3f8, %l0 ! 4001aff8 /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 4000be34: 7f ff fe 8a call 4000b85c <== NOT EXECUTED 4000be38: 01 00 00 00 nop <== NOT EXECUTED 4000be3c: 40 00 04 16 call 4000ce94 <_Chain_Get> 4000be40: 90 10 00 10 mov %l0, %o0 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) 4000be44: 80 a2 20 00 cmp %o0, 0 4000be48: 12 bf ff fb bne 4000be34 4000be4c: 01 00 00 00 nop free(to_be_freed); } 4000be50: 81 c7 e0 08 ret 4000be54: 81 e8 00 00 restore 4002a050 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4002a050: 9d e3 bf 98 save %sp, -104, %sp /* * 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) ) { 4002a054: 7f ff 72 c7 call 40006b70 4002a058: 90 10 00 18 mov %i0, %o0 4002a05c: 80 a2 20 00 cmp %o0, 0 4002a060: 12 80 00 13 bne 4002a0ac 4002a064: 01 00 00 00 nop 4002a068: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 4002a06c: 80 a0 60 00 cmp %g1, 0 4002a070: 12 80 00 0f bne 4002a0ac 4002a074: 03 10 01 32 sethi %hi(0x4004c800), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4002a078: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 4004cb44 4002a07c: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002a080: 80 a0 80 18 cmp %g2, %i0 4002a084: 22 80 00 02 be,a 4002a08c 4002a088: c0 20 60 04 clr [ %g1 + 4 ] <== NOT EXECUTED rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 4002a08c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4002a090: 80 a0 60 06 cmp %g1, 6 4002a094: 02 80 00 04 be 4002a0a4 4002a098: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 4002a09c: 7f ff ff 7d call 40029e90 4002a0a0: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 4002a0a4: 7f ff 72 12 call 400068ec 4002a0a8: 90 10 00 18 mov %i0, %o0 } return 0; } 4002a0ac: 81 c7 e0 08 ret 4002a0b0: 91 e8 20 00 restore %g0, 0, %o0 40029e0c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40029e0c: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( block_table ); 40029e10: 80 a6 20 00 cmp %i0, 0 40029e14: 02 80 00 16 be 40029e6c 40029e18: 80 a6 60 00 cmp %i1, 0 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 40029e20: d0 06 00 00 ld [ %i0 ], %o0 40029e24: a0 10 00 08 mov %o0, %l0 40029e28: a2 10 20 00 clr %l1 if ( b[i] ) { 40029e2c: d0 04 00 00 ld [ %l0 ], %o0 40029e30: 80 a2 20 00 cmp %o0, 0 40029e34: 02 80 00 05 be 40029e48 40029e38: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40029e3c: 7f ff ff 25 call 40029ad0 40029e40: 01 00 00 00 nop b[i] = 0; 40029e44: c0 24 00 00 clr [ %l0 ] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 40029e50: a0 04 20 04 add %l0, 4, %l0 40029e54: d0 06 00 00 ld [ %i0 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 40029e58: 7f ff ff 1e call 40029ad0 40029e5c: 01 00 00 00 nop *block_table = 0; 40029e60: c0 26 00 00 clr [ %i0 ] } 40029e64: 81 c7 e0 08 ret 40029e68: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 40029e6c: 11 10 01 25 sethi %hi(0x40049400), %o0 <== NOT EXECUTED 40029e70: 15 10 01 26 sethi %hi(0x40049800), %o2 <== NOT EXECUTED 40029e74: 17 10 01 25 sethi %hi(0x40049400), %o3 <== NOT EXECUTED 40029e78: 90 12 22 b0 or %o0, 0x2b0, %o0 <== NOT EXECUTED 40029e7c: 94 12 a0 20 or %o2, 0x20, %o2 <== NOT EXECUTED 40029e80: 96 12 e3 38 or %o3, 0x338, %o3 <== NOT EXECUTED 40029e84: 7f ff 71 6e call 4000643c <__assert_func> <== NOT EXECUTED 40029e88: 92 10 21 b1 mov 0x1b1, %o1 <== NOT EXECUTED 40029e8c: 01 00 00 00 nop 4002a330 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 4002a330: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4002a334: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 * 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 ) 4002a338: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4002a33c: 80 a0 40 19 cmp %g1, %i1 4002a340: 06 80 00 0c bl 4002a370 4002a344: 92 10 00 19 mov %i1, %o1 * 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; 4002a348: f2 24 20 4c st %i1, [ %l0 + 0x4c ] iop->size = the_jnode->info.file.size; 4002a34c: f2 26 20 04 st %i1, [ %i0 + 4 ] IMFS_update_atime( the_jnode ); 4002a350: 90 07 bf f0 add %fp, -16, %o0 4002a354: 7f ff 71 91 call 40006998 4002a358: 92 10 20 00 clr %o1 4002a35c: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002a360: 90 10 20 00 clr %o0 4002a364: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 4002a368: 81 c7 e0 08 ret 4002a36c: 91 e8 00 08 restore %g0, %o0, %o0 * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) return IMFS_memfile_extend( the_jnode, length ); 4002a370: 7f ff ff 9b call 4002a1dc <== NOT EXECUTED 4002a374: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 4002a378: 81 c7 e0 08 ret <== NOT EXECUTED 4002a37c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4002a380 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 4002a380: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4002a384: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 4002a388: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4002a38c: 80 a0 60 06 cmp %g1, 6 4002a390: 12 80 00 0a bne 4002a3b8 4002a394: a2 10 00 18 mov %i0, %l1 if (iop->offset > the_jnode->info.linearfile.size) 4002a398: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 4002a39c: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4002a3a0: 80 a6 00 08 cmp %i0, %o0 <== NOT EXECUTED 4002a3a4: 04 80 00 14 ble 4002a3f4 <== NOT EXECUTED 4002a3a8: 01 00 00 00 nop <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 4002a3ac: d0 24 60 08 st %o0, [ %l1 + 8 ] <== NOT EXECUTED 4002a3b0: 81 c7 e0 08 ret <== NOT EXECUTED 4002a3b4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4002a3b8: d2 06 20 08 ld [ %i0 + 8 ], %o1 4002a3bc: 7f ff ff 88 call 4002a1dc 4002a3c0: 90 10 00 10 mov %l0, %o0 4002a3c4: 80 a2 20 00 cmp %o0, 0 4002a3c8: 12 80 00 07 bne 4002a3e4 4002a3cc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 4002a3d0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4002a3d4: f0 06 20 08 ld [ %i0 + 8 ], %i0 4002a3d8: c2 24 60 04 st %g1, [ %l1 + 4 ] } return iop->offset; } 4002a3dc: 81 c7 e0 08 ret 4002a3e0: 81 e8 00 00 restore 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 ); 4002a3e4: 40 00 24 ed call 40033798 <__errno> <== NOT EXECUTED 4002a3e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a3ec: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4002a3f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002a3f4: 81 c7 e0 08 ret <== NOT EXECUTED 4002a3f8: 81 e8 00 00 restore <== NOT EXECUTED 4002a6bc : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4002a6bc: 9d e3 bf 98 save %sp, -104, %sp the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4002a6c0: c4 06 20 0c ld [ %i0 + 0xc ], %g2 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4002a6c4: a2 10 00 18 mov %i0, %l1 the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4002a6c8: 80 88 a2 04 btst 0x204, %g2 4002a6cc: 02 80 00 06 be 4002a6e4 4002a6d0: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 4002a6d4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4002a6d8: 80 a0 60 06 cmp %g1, 6 4002a6dc: 22 80 00 0b be,a 4002a708 4002a6e0: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4002a6e4: 80 88 a2 00 btst 0x200, %g2 4002a6e8: 02 80 00 04 be 4002a6f8 4002a6ec: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 iop->offset = the_jnode->info.file.size; 4002a6f0: c2 24 60 08 st %g1, [ %l1 + 8 ] iop->size = the_jnode->info.file.size; 4002a6f4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4002a6f8: b0 10 20 00 clr %i0 4002a6fc: c2 24 60 04 st %g1, [ %l1 + 4 ] return 0; } 4002a700: 81 c7 e0 08 ret 4002a704: 81 e8 00 00 restore * 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; const unsigned char *buffer = the_jnode->info.linearfile.direct; 4002a708: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 4002a70c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 4002a710: c0 24 20 54 clr [ %l0 + 0x54 ] <== NOT EXECUTED && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 4002a714: c0 24 20 4c clr [ %l0 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; 4002a718: c0 24 20 58 clr [ %l0 + 0x58 ] <== NOT EXECUTED uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; the_jnode->info.file.indirect = 0; 4002a71c: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 4002a720: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 4002a724: 12 80 00 08 bne 4002a744 <== NOT EXECUTED 4002a728: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 4002a72c: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4002a730: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 4002a734: 02 bf ff f1 be 4002a6f8 <== NOT EXECUTED 4002a738: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED iop->offset = the_jnode->info.file.size; 4002a73c: 10 bf ff ee b 4002a6f4 <== NOT EXECUTED 4002a740: c2 24 60 08 st %g1, [ %l1 + 8 ] <== 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) 4002a744: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002a748: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002a74c: 7f ff ff 2c call 4002a3fc <== NOT EXECUTED 4002a750: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002a754: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4002a758: 02 bf ff ea be 4002a700 <== NOT EXECUTED 4002a75c: 01 00 00 00 nop <== NOT EXECUTED 4002a760: 10 bf ff f4 b 4002a730 <== NOT EXECUTED 4002a764: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED 4002aa38 : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4002aa38: 82 10 00 09 mov %o1, %g1 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; return IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); 4002aa3c: d2 02 20 08 ld [ %o0 + 8 ], %o1 4002aa40: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4002aa44: 96 10 00 0a mov %o2, %o3 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; return IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); 4002aa48: 94 10 00 01 mov %g1, %o2 4002aa4c: 82 13 c0 00 mov %o7, %g1 4002aa50: 7f ff ff 46 call 4002a768 4002aa54: 9e 10 40 00 mov %g1, %o7 4002aa58: 01 00 00 00 nop <== NOT EXECUTED 4002a0b4 : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4002a0b4: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4002a0b8: f0 06 00 00 ld [ %i0 ], %i0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4002a0bc: c2 06 20 08 ld [ %i0 + 8 ], %g1 4002a0c0: 80 a0 60 00 cmp %g1, 0 4002a0c4: 22 80 00 06 be,a 4002a0dc 4002a0c8: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 4002a0cc: 7f ff f1 36 call 400265a4 <_Chain_Extract> 4002a0d0: 90 10 00 18 mov %i0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4002a0d4: c0 26 20 08 clr [ %i0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4002a0d8: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4002a0dc: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4002a0e0: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4002a0e4: 90 07 bf f0 add %fp, -16, %o0 4002a0e8: 7f ff 72 2c call 40006998 4002a0ec: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] 4002a0f0: c2 07 bf f0 ld [ %fp + -16 ], %g1 return memfile_check_rmnod( the_jnode ); 4002a0f4: 90 10 00 18 mov %i0, %o0 4002a0f8: 7f ff ff d6 call 4002a050 4002a0fc: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } 4002a100: 81 c7 e0 08 ret 4002a104: 91 e8 00 08 restore %g0, %o0, %o0 4000a890 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000a890: 13 10 00 63 sethi %hi(0x40018c00), %o1 4000a894: 15 10 00 69 sethi %hi(0x4001a400), %o2 4000a898: 92 12 62 68 or %o1, 0x268, %o1 4000a89c: 94 12 a2 c8 or %o2, 0x2c8, %o2 4000a8a0: 96 10 00 0a mov %o2, %o3 4000a8a4: 82 13 c0 00 mov %o7, %g1 4000a8a8: 40 00 02 92 call 4000b2f0 4000a8ac: 9e 10 40 00 mov %g1, %o7 4000a8b0: 01 00 00 00 nop <== NOT EXECUTED 400034a0 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 400034a0: 9d e3 bf 80 save %sp, -128, %sp 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) ) ) 400034a4: 03 00 00 3c sethi %hi(0xf000), %g1 400034a8: b3 2e 60 10 sll %i1, 0x10, %i1 400034ac: b3 36 60 10 srl %i1, 0x10, %i1 400034b0: 84 8e 40 01 andcc %i1, %g1, %g2 400034b4: 02 80 00 4e be 400035ec 400034b8: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) 400034bc: 80 a0 80 01 cmp %g2, %g1 400034c0: 02 80 00 18 be 40003520 400034c4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400034c8: c2 4e 00 00 ldsb [ %i0 ], %g1 400034cc: 80 a0 60 2f cmp %g1, 0x2f 400034d0: 02 80 00 1a be 40003538 400034d4: 80 a0 60 5c cmp %g1, 0x5c 400034d8: 02 80 00 18 be 40003538 400034dc: 80 a0 60 00 cmp %g1, 0 400034e0: 02 80 00 17 be 4000353c 400034e4: 03 10 00 68 sethi %hi(0x4001a000), %g1 400034e8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 ! 4001a01c 400034ec: 88 10 20 00 clr %g4 400034f0: c2 00 e0 04 ld [ %g3 + 4 ], %g1 400034f4: c2 27 bf e4 st %g1, [ %fp + -28 ] 400034f8: c4 00 e0 08 ld [ %g3 + 8 ], %g2 400034fc: c4 27 bf e8 st %g2, [ %fp + -24 ] 40003500: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40003504: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 40003508: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 4000350c: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 40003510: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003514: 80 a0 60 00 cmp %g1, 0 40003518: 12 80 00 17 bne 40003574 4000351c: c4 27 bf f0 st %g2, [ %fp + -16 ] if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003520: 40 00 2d 0b call 4000e94c <__errno> 40003524: b0 10 3f ff mov -1, %i0 40003528: 82 10 20 86 mov 0x86, %g1 4000352c: c2 22 00 00 st %g1, [ %o0 ] 40003530: 81 c7 e0 08 ret 40003534: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40003538: 03 10 00 68 sethi %hi(0x4001a000), %g1 4000353c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 ! 4001a01c 40003540: 88 10 20 01 mov 1, %g4 40003544: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40003548: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000354c: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40003550: c4 27 bf e8 st %g2, [ %fp + -24 ] 40003554: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40003558: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 4000355c: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40003560: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 40003564: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003568: 80 a0 60 00 cmp %g1, 0 4000356c: 02 bf ff ed be 40003520 40003570: c4 27 bf f0 st %g2, [ %fp + -16 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 40003574: 90 06 00 04 add %i0, %g4, %o0 40003578: a0 07 bf e4 add %fp, -28, %l0 4000357c: 94 07 bf f4 add %fp, -12, %o2 40003580: 92 10 00 10 mov %l0, %o1 40003584: 9f c0 40 00 call %g1 40003588: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 4000358c: 80 a2 20 00 cmp %o0, 0 40003590: 12 bf ff e8 bne 40003530 40003594: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 40003598: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 4000359c: 80 a0 a0 00 cmp %g2, 0 400035a0: 02 80 00 19 be 40003604 400035a4: d0 07 bf f4 ld [ %fp + -12 ], %o0 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 ); 400035a8: 92 10 00 19 mov %i1, %o1 400035ac: 94 10 00 1a mov %i2, %o2 400035b0: 96 10 00 1b mov %i3, %o3 400035b4: 9f c0 80 00 call %g2 400035b8: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 400035bc: c2 07 bf ec ld [ %fp + -20 ], %g1 400035c0: 80 a0 60 00 cmp %g1, 0 400035c4: 02 bf ff db be 40003530 400035c8: b0 10 00 08 mov %o0, %i0 400035cc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400035d0: 80 a0 60 00 cmp %g1, 0 400035d4: 02 80 00 0a be 400035fc 400035d8: 01 00 00 00 nop 400035dc: 9f c0 40 00 call %g1 400035e0: 90 10 00 10 mov %l0, %o0 return result; } 400035e4: 81 c7 e0 08 ret 400035e8: 81 e8 00 00 restore 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 ); 400035ec: 40 00 2c d8 call 4000e94c <__errno> <== NOT EXECUTED 400035f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400035f4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400035f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400035fc: 81 c7 e0 08 ret 40003600: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 40003604: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003608: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000360c: 02 bf ff c5 be 40003520 <== NOT EXECUTED 40003610: 01 00 00 00 nop <== NOT EXECUTED 40003614: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003618: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000361c: 30 bf ff c1 b,a 40003520 <== NOT EXECUTED 4000bf9c : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 4000bf9c: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 4000bfa0: 80 a6 60 00 cmp %i1, 0 4000bfa4: 02 80 00 a1 be 4000c228 4000bfa8: a4 10 00 18 mov %i0, %l2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4000bfac: 80 a6 a0 01 cmp %i2, 1 4000bfb0: 18 80 00 9e bgu 4000c228 4000bfb4: 01 00 00 00 nop errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 4000bfb8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000bfbc: 80 a0 60 00 cmp %g1, 0 4000bfc0: 02 80 00 35 be 4000c094 4000bfc4: 80 a6 e0 00 cmp %i3, 0 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 4000bfc8: 02 80 00 05 be 4000bfdc 4000bfcc: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 4000bfd0: 40 00 0f 81 call 4000fdd4 <== NOT EXECUTED 4000bfd4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000bfd8: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4000bfdc: 7f ff ff 9f call 4000be58 4000bfe0: 01 00 00 00 nop if ( !temp_mt_entry ) { 4000bfe4: a0 92 20 00 orcc %o0, 0, %l0 4000bfe8: 02 80 00 96 be 4000c240 4000bfec: a2 10 00 10 mov %l0, %l1 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 4000bff0: f4 24 20 28 st %i2, [ %l0 + 0x28 ] if ( device ) { 4000bff4: 80 a6 e0 00 cmp %i3, 0 4000bff8: 02 80 00 4b be 4000c124 4000bffc: e0 24 20 24 st %l0, [ %l0 + 0x24 ] temp_mt_entry->dev = 4000c000: 90 04 20 64 add %l0, 0x64, %o0 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 4000c004: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000c008: 40 00 0f 51 call 4000fd4c <== NOT EXECUTED 4000c00c: d0 24 20 60 st %o0, [ %l0 + 0x60 ] <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 4000c010: 80 a7 20 00 cmp %i4, 0 4000c014: 02 80 00 29 be 4000c0b8 4000c018: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 4000c01c: b6 07 bf e8 add %fp, -24, %i3 4000c020: 92 10 20 07 mov 7, %o1 4000c024: 94 10 00 1b mov %i3, %o2 4000c028: 7f ff dc 5d call 4000319c 4000c02c: 96 10 20 01 mov 1, %o3 4000c030: 80 a2 3f ff cmp %o0, -1 4000c034: 02 80 00 1c be 4000c0a4 4000c038: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 4000c03c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000c040: 80 a0 60 00 cmp %g1, 0 4000c044: 02 80 00 6d be 4000c1f8 4000c048: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4000c04c: 9f c0 40 00 call %g1 4000c050: 90 10 00 1b mov %i3, %o0 4000c054: 80 a2 20 01 cmp %o0, 1 4000c058: 02 80 00 35 be 4000c12c 4000c05c: 03 10 00 6c sethi %hi(0x4001b000), %g1 errno = ENOTDIR; 4000c060: 40 00 0a 3b call 4000e94c <__errno> 4000c064: 01 00 00 00 nop 4000c068: 82 10 20 14 mov 0x14, %g1 ! 14 4000c06c: c2 22 00 00 st %g1, [ %o0 ] return 0; cleanup_and_bail: free( temp_mt_entry ); 4000c070: 90 10 00 10 mov %l0, %o0 4000c074: 7f ff fd fa call 4000b85c 4000c078: b8 10 00 1b mov %i3, %i4 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000c07c: c2 07 20 08 ld [ %i4 + 8 ], %g1 4000c080: 80 a0 60 00 cmp %g1, 0 4000c084: 32 80 00 62 bne,a 4000c20c 4000c088: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 return -1; } 4000c08c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c090: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 4000c094: 40 00 0a 2e call 4000e94c <__errno> <== NOT EXECUTED 4000c098: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000c09c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000c0a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000c0a4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000c0a8: 7f ff fd ed call 4000b85c <== NOT EXECUTED 4000c0ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000c0b0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c0b4: 81 e8 00 00 restore <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4000c0b8: c0 24 20 18 clr [ %l0 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 4000c0bc: c0 24 20 1c clr [ %l0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 4000c0c0: c0 24 20 20 clr [ %l0 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 4000c0c4: c0 24 20 08 clr [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 4000c0c8: c0 24 20 0c clr [ %l0 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 4000c0cc: c0 24 20 10 clr [ %l0 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 4000c0d0: c0 24 20 14 clr [ %l0 + 0x14 ] 4000c0d4: b8 10 20 00 clr %i4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4000c0d8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000c0dc: 9f c0 40 00 call %g1 4000c0e0: 90 10 00 10 mov %l0, %o0 4000c0e4: 80 a2 20 00 cmp %o0, 0 4000c0e8: 02 80 00 35 be 4000c1bc 4000c0ec: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4000c0f0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4000c0f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c0f8: 02 80 00 04 be 4000c108 <== NOT EXECUTED 4000c0fc: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000c100: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c104: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000c108: 7f ff fd d5 call 4000b85c <== NOT EXECUTED 4000c10c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( loc_to_free ) 4000c110: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4000c114: 32 bf ff db bne,a 4000c080 <== NOT EXECUTED 4000c118: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 4000c11c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c120: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0; 4000c124: 10 bf ff bb b 4000c010 4000c128: c0 24 20 60 clr [ %l0 + 0x60 ] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000c12c: c4 00 60 04 ld [ %g1 + 4 ], %g2 4000c130: 82 10 60 04 or %g1, 4, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000c134: 88 00 60 04 add %g1, 4, %g4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000c138: 80 a0 80 04 cmp %g2, %g4 4000c13c: 02 80 00 0e be 4000c174 4000c140: c6 07 bf e8 ld [ %fp + -24 ], %g3 the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 4000c144: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 4000c148: 80 a0 40 03 cmp %g1, %g3 4000c14c: 32 80 00 07 bne,a 4000c168 4000c150: c4 00 80 00 ld [ %g2 ], %g2 4000c154: 30 80 00 24 b,a 4000c1e4 <== NOT EXECUTED 4000c158: 80 a0 40 03 cmp %g1, %g3 4000c15c: 02 80 00 22 be 4000c1e4 4000c160: 01 00 00 00 nop * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 4000c164: c4 00 80 00 ld [ %g2 ], %g2 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000c168: 80 a0 80 04 cmp %g2, %g4 4000c16c: 32 bf ff fb bne,a 4000c158 4000c170: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 4000c174: c2 07 bf f0 ld [ %fp + -16 ], %g1 * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; 4000c178: c6 24 20 08 st %g3, [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = loc.handlers; 4000c17c: c4 07 bf ec ld [ %fp + -20 ], %g2 temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000c180: c6 07 bf f4 ld [ %fp + -12 ], %g3 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 4000c184: c8 00 60 20 ld [ %g1 + 0x20 ], %g4 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; 4000c188: c4 24 20 0c st %g2, [ %l0 + 0xc ] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000c18c: c6 24 20 14 st %g3, [ %l0 + 0x14 ] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 4000c190: 80 a1 20 00 cmp %g4, 0 4000c194: 02 80 00 19 be 4000c1f8 4000c198: c2 24 20 10 st %g1, [ %l0 + 0x10 ] errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 4000c19c: 90 10 00 10 mov %l0, %o0 4000c1a0: 9f c1 00 00 call %g4 4000c1a4: b8 10 00 1b mov %i3, %i4 4000c1a8: 80 a2 20 00 cmp %o0, 0 4000c1ac: 22 bf ff cc be,a 4000c0dc 4000c1b0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return 0; cleanup_and_bail: free( temp_mt_entry ); 4000c1b4: 10 bf ff b0 b 4000c074 <== NOT EXECUTED 4000c1b8: 90 10 00 10 mov %l0, %o0 <== 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 ); 4000c1bc: 11 10 00 6c sethi %hi(0x4001b000), %o0 4000c1c0: 92 10 00 10 mov %l0, %o1 4000c1c4: 7f ff ec bc call 400074b4 <_Chain_Append> 4000c1c8: 90 12 20 04 or %o0, 4, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 4000c1cc: 80 a4 a0 00 cmp %l2, 0 4000c1d0: 02 bf ff b8 be 4000c0b0 4000c1d4: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 4000c1d8: e0 24 80 00 st %l0, [ %l2 ] 4000c1dc: 81 c7 e0 08 ret 4000c1e0: 81 e8 00 00 restore /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 4000c1e4: 40 00 09 da call 4000e94c <__errno> 4000c1e8: 01 00 00 00 nop 4000c1ec: 82 10 20 10 mov 0x10, %g1 ! 10 4000c1f0: 10 bf ff a0 b 4000c070 4000c1f4: c2 22 00 00 st %g1, [ %o0 ] * 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; 4000c1f8: 40 00 09 d5 call 4000e94c <__errno> <== NOT EXECUTED 4000c1fc: 01 00 00 00 nop <== NOT EXECUTED 4000c200: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000c204: 10 bf ff 9b b 4000c070 <== NOT EXECUTED 4000c208: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000c20c: 80 a0 60 00 cmp %g1, 0 4000c210: 02 bf ff a8 be 4000c0b0 4000c214: b0 10 3f ff mov -1, %i0 4000c218: 9f c0 40 00 call %g1 4000c21c: 90 10 00 1c mov %i4, %o0 4000c220: 81 c7 e0 08 ret 4000c224: 81 e8 00 00 restore * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 4000c228: 40 00 09 c9 call 4000e94c <__errno> 4000c22c: b0 10 3f ff mov -1, %i0 4000c230: 82 10 20 16 mov 0x16, %g1 4000c234: c2 22 00 00 st %g1, [ %o0 ] 4000c238: 81 c7 e0 08 ret 4000c23c: 81 e8 00 00 restore if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 4000c240: 40 00 09 c3 call 4000e94c <__errno> <== NOT EXECUTED 4000c244: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000c248: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000c24c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c250: 81 c7 e0 08 ret <== NOT EXECUTED 4000c254: 81 e8 00 00 restore <== NOT EXECUTED 4000af98 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000af98: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000af9c: 90 10 00 1c mov %i4, %o0 4000afa0: 40 00 00 4c call 4000b0d0 <_POSIX_Absolute_timeout_to_ticks> 4000afa4: 92 07 bf f4 add %fp, -12, %o1 4000afa8: 80 a2 20 02 cmp %o0, 2 4000afac: 18 80 00 03 bgu 4000afb8 4000afb0: 98 10 20 01 mov 1, %o4 4000afb4: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000afb8: da 07 bf f4 ld [ %fp + -12 ], %o5 4000afbc: 90 10 00 18 mov %i0, %o0 4000afc0: 92 10 00 19 mov %i1, %o1 4000afc4: 94 10 00 1a mov %i2, %o2 4000afc8: 7f ff ff 21 call 4000ac4c <_POSIX_Message_queue_Receive_support> 4000afcc: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 4000afd0: 81 c7 e0 08 ret 4000afd4: 91 e8 00 08 restore %g0, %o0, %o0 4000afd8 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000afd8: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000afdc: 90 10 00 1c mov %i4, %o0 4000afe0: 40 00 00 3c call 4000b0d0 <_POSIX_Absolute_timeout_to_ticks> 4000afe4: 92 07 bf f4 add %fp, -12, %o1 4000afe8: 80 a2 20 02 cmp %o0, 2 4000afec: 18 80 00 03 bgu 4000aff8 4000aff0: 98 10 20 01 mov 1, %o4 4000aff4: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000aff8: da 07 bf f4 ld [ %fp + -12 ], %o5 4000affc: 90 10 00 18 mov %i0, %o0 4000b000: 92 10 00 19 mov %i1, %o1 4000b004: 94 10 00 1a mov %i2, %o2 4000b008: 7f ff ff 65 call 4000ad9c <_POSIX_Message_queue_Send_support> 4000b00c: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 4000b010: 81 c7 e0 08 ret 4000b014: 91 e8 00 08 restore %g0, %o0, %o0 400036a8 : */ int newlib_free_buffers( FILE *fp ) { 400036a8: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 400036ac: 40 00 2d 89 call 4000ecd0 400036b0: 90 10 00 18 mov %i0, %o0 400036b4: 80 a2 20 02 cmp %o0, 2 400036b8: 28 80 00 06 bleu,a 400036d0 400036bc: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 400036c0: 40 00 2c fb call 4000eaac <== NOT EXECUTED 400036c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 400036c8: 81 c7 e0 08 ret 400036cc: 91 e8 20 00 restore %g0, 0, %o0 { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 400036d0: 80 88 60 80 btst 0x80, %g1 400036d4: 02 bf ff fd be 400036c8 400036d8: 01 00 00 00 nop free( fp->_bf._base ); 400036dc: 40 00 20 60 call 4000b85c 400036e0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 400036e4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 400036e8: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 400036ec: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 400036f0: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 400036f4: c2 36 20 0c sth %g1, [ %i0 + 0xc ] break; default: fclose(fp); } return 0; } 400036f8: 81 c7 e0 08 ret 400036fc: 91 e8 20 00 restore %g0, 0, %o0 40003958 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 40003958: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 4000395c: 05 10 00 79 sethi %hi(0x4001e400), %g2 40003960: c2 48 a3 64 ldsb [ %g2 + 0x364 ], %g1 ! 4001e764 40003964: 80 a0 60 00 cmp %g1, 0 40003968: 02 80 00 04 be 40003978 4000396c: 82 10 20 01 mov 1, %g1 NULL_major = major; } return RTEMS_SUCCESSFUL; } 40003970: 81 c7 e0 08 ret 40003974: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 40003978: 11 10 00 6f sethi %hi(0x4001bc00), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 4000397c: c2 28 a3 64 stb %g1, [ %g2 + 0x364 ] status = rtems_io_register_name( 40003980: 90 12 23 d0 or %o0, 0x3d0, %o0 40003984: 92 10 00 18 mov %i0, %o1 40003988: 40 00 00 4e call 40003ac0 4000398c: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40003990: 80 a2 20 00 cmp %o0, 0 40003994: 12 80 00 05 bne 400039a8 40003998: 03 10 00 7a sethi %hi(0x4001e800), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 4000399c: f0 20 62 38 st %i0, [ %g1 + 0x238 ] ! 4001ea38 } return RTEMS_SUCCESSFUL; } 400039a0: 81 c7 e0 08 ret 400039a4: 91 e8 20 00 restore %g0, 0, %o0 major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 400039a8: 40 00 10 ff call 40007da4 <== NOT EXECUTED 400039ac: 01 00 00 00 nop 400039b0: 01 00 00 00 nop 40003934 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 40003934: 80 a2 a0 00 cmp %o2, 0 40003938: 02 80 00 04 be 40003948 4000393c: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 40003940: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 40003944: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 40003948: 81 c3 e0 08 retl 4000394c: 90 10 20 00 clr %o0 4000391c : int open( const char *pathname, int flags, ... ) { 4000391c: 9d e3 bf 80 save %sp, -128, %sp eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); 40003920: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40003924: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40003928: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4000392c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40003930: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40003934: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40003938: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 4000393c: 02 80 00 03 be 40003948 40003940: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40003944: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 40003948: 82 07 a0 50 add %fp, 0x50, %g1 4000394c: f4 07 a0 4c ld [ %fp + 0x4c ], %i2 40003950: c2 27 bf f4 st %g1, [ %fp + -12 ] * 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(); 40003954: 40 00 20 cf call 4000bc90 40003958: b8 10 20 17 mov 0x17, %i4 if ( iop == 0 ) { 4000395c: ba 92 20 00 orcc %o0, 0, %i5 40003960: 02 80 00 3b be 40003a4c 40003964: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40003968: b6 07 bf e4 add %fp, -28, %i3 4000396c: 90 10 00 18 mov %i0, %o0 40003970: 94 10 00 1b mov %i3, %o2 40003974: 7f ff fe 0a call 4000319c 40003978: 96 10 20 01 mov 1, %o3 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 4000397c: 80 a2 3f ff cmp %o0, -1 40003980: 02 80 00 4d be 40003ab4 40003984: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 40003988: b8 10 20 11 mov 0x11, %i4 4000398c: 80 a0 6a 00 cmp %g1, 0xa00 40003990: 02 80 00 69 be 40003b34 40003994: a0 10 00 1b mov %i3, %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003998: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; 4000399c: c4 07 bf e4 ld [ %fp + -28 ], %g2 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 400039a0: c2 27 60 30 st %g1, [ %i5 + 0x30 ] iop->file_info = loc.node_access; 400039a4: c4 27 60 2c st %g2, [ %i5 + 0x2c ] iop->flags |= rtems_libio_fcntl_flags( flags ); 400039a8: e0 07 60 0c ld [ %i5 + 0xc ], %l0 400039ac: 40 00 20 f7 call 4000bd88 400039b0: 90 10 00 19 mov %i1, %o0 iop->pathinfo = loc; 400039b4: c2 07 bf e4 ld [ %fp + -28 ], %g1 if ( !iop->handlers->open_h ) { 400039b8: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 400039bc: c2 27 60 10 st %g1, [ %i5 + 0x10 ] 400039c0: c2 07 bf e8 ld [ %fp + -24 ], %g1 if ( !iop->handlers->open_h ) { 400039c4: c4 00 80 00 ld [ %g2 ], %g2 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 400039c8: c2 27 60 14 st %g1, [ %i5 + 0x14 ] 400039cc: c2 07 bf ec ld [ %fp + -20 ], %g1 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 400039d0: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 400039d4: c2 27 60 18 st %g1, [ %i5 + 0x18 ] 400039d8: c2 07 bf f0 ld [ %fp + -16 ], %g1 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 400039dc: d0 27 60 0c st %o0, [ %i5 + 0xc ] iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 400039e0: 80 a0 a0 00 cmp %g2, 0 400039e4: 02 80 00 52 be 40003b2c 400039e8: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 400039ec: 92 10 00 18 mov %i0, %o1 400039f0: 96 10 00 1a mov %i2, %o3 400039f4: 90 10 00 1d mov %i5, %o0 400039f8: 94 10 00 19 mov %i1, %o2 400039fc: 9f c0 80 00 call %g2 40003a00: a0 10 00 1b mov %i3, %l0 if ( rc ) 40003a04: 80 a2 20 00 cmp %o0, 0 40003a08: 02 80 00 16 be 40003a60 40003a0c: b8 10 00 08 mov %o0, %i4 done: va_end(ap); if ( rc ) { if ( iop ) rtems_libio_free( iop ); 40003a10: 40 00 20 89 call 4000bc34 40003a14: 90 10 00 1d mov %i5, %o0 if ( loc_to_free ) 40003a18: 80 a4 20 00 cmp %l0, 0 40003a1c: 02 80 00 0c be 40003a4c 40003a20: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40003a24: c2 04 20 08 ld [ %l0 + 8 ], %g1 40003a28: 80 a0 60 00 cmp %g1, 0 40003a2c: 02 80 00 08 be 40003a4c 40003a30: 01 00 00 00 nop 40003a34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003a38: 80 a0 60 00 cmp %g1, 0 40003a3c: 02 80 00 04 be 40003a4c 40003a40: 01 00 00 00 nop 40003a44: 9f c0 40 00 call %g1 40003a48: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( rc ); 40003a4c: 40 00 2b c0 call 4000e94c <__errno> 40003a50: b0 10 3f ff mov -1, %i0 40003a54: f8 22 00 00 st %i4, [ %o0 ] 40003a58: 81 c7 e0 08 ret 40003a5c: 81 e8 00 00 restore 40003a60: 03 10 00 6a sethi %hi(0x4001a800), %g1 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40003a64: 80 8e 64 00 btst 0x400, %i1 40003a68: 12 80 00 40 bne 40003b68 40003a6c: a0 10 60 6c or %g1, 0x6c, %l0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003a70: c6 04 00 00 ld [ %l0 ], %g3 40003a74: 86 27 40 03 sub %i5, %g3, %g3 40003a78: 87 38 e0 02 sra %g3, 2, %g3 40003a7c: 89 28 e0 02 sll %g3, 2, %g4 40003a80: 85 28 e0 06 sll %g3, 6, %g2 40003a84: 84 20 80 04 sub %g2, %g4, %g2 40003a88: 83 28 a0 06 sll %g2, 6, %g1 40003a8c: 82 20 40 02 sub %g1, %g2, %g1 40003a90: 89 28 60 0c sll %g1, 0xc, %g4 40003a94: 82 00 40 04 add %g1, %g4, %g1 40003a98: 82 00 40 03 add %g1, %g3, %g1 40003a9c: 83 28 60 04 sll %g1, 4, %g1 40003aa0: 82 20 40 03 sub %g1, %g3, %g1 40003aa4: 83 28 60 02 sll %g1, 2, %g1 40003aa8: b0 20 c0 01 sub %g3, %g1, %i0 } 40003aac: 81 c7 e0 08 ret 40003ab0: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( pathname, eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 40003ab4: 40 00 2b a6 call 4000e94c <__errno> 40003ab8: 01 00 00 00 nop 40003abc: c2 02 00 00 ld [ %o0 ], %g1 40003ac0: 80 a0 60 02 cmp %g1, 2 40003ac4: 12 80 00 20 bne 40003b44 40003ac8: 80 8e 62 00 btst 0x200, %i1 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 40003acc: b8 10 20 02 mov 2, %i4 40003ad0: 02 80 00 19 be 40003b34 40003ad4: a0 10 20 00 clr %l0 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 40003ad8: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40003adc: 90 10 00 18 mov %i0, %o0 40003ae0: 92 16 80 09 or %i2, %o1, %o1 40003ae4: 94 10 20 00 clr %o2 40003ae8: 93 2a 60 10 sll %o1, 0x10, %o1 40003aec: 96 10 20 00 clr %o3 40003af0: 7f ff fe 6c call 400034a0 40003af4: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 40003af8: 80 a2 20 00 cmp %o0, 0 40003afc: 12 80 00 12 bne 40003b44 40003b00: 90 10 00 18 mov %i0, %o0 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true ); 40003b04: 92 10 20 00 clr %o1 40003b08: 94 10 00 1b mov %i3, %o2 40003b0c: 96 10 20 01 mov 1, %o3 40003b10: 7f ff fd a3 call 4000319c 40003b14: b8 10 20 0d mov 0xd, %i4 if ( status != 0 ) { /* The file did not exist */ 40003b18: 80 a2 20 00 cmp %o0, 0 40003b1c: 12 80 00 06 bne 40003b34 40003b20: a0 10 20 00 clr %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003b24: 10 bf ff 9e b 4000399c 40003b28: c2 07 bf e8 ld [ %fp + -24 ], %g1 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003b2c: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED 40003b30: b8 10 20 86 mov 0x86, %i4 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 40003b34: 80 a7 60 00 cmp %i5, 0 40003b38: 02 bf ff b9 be 40003a1c 40003b3c: 80 a4 20 00 cmp %l0, 0 40003b40: 30 bf ff b4 b,a 40003a10 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 40003b44: 40 00 2b 82 call 4000e94c <__errno> 40003b48: 01 00 00 00 nop 40003b4c: f8 02 00 00 ld [ %o0 ], %i4 40003b50: 03 10 00 6a sethi %hi(0x4001a800), %g1 */ done: va_end(ap); if ( rc ) { 40003b54: 80 a7 20 00 cmp %i4, 0 40003b58: 02 bf ff c6 be 40003a70 40003b5c: a0 10 60 6c or %g1, 0x6c, %l0 40003b60: 10 bf ff f5 b 40003b34 40003b64: a0 10 20 00 clr %l0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 40003b68: c4 00 60 6c ld [ %g1 + 0x6c ], %g2 40003b6c: 92 10 20 00 clr %o1 40003b70: 84 27 40 02 sub %i5, %g2, %g2 40003b74: 85 38 a0 02 sra %g2, 2, %g2 40003b78: 87 28 a0 02 sll %g2, 2, %g3 40003b7c: 83 28 a0 06 sll %g2, 6, %g1 40003b80: 82 20 40 03 sub %g1, %g3, %g1 40003b84: 91 28 60 06 sll %g1, 6, %o0 40003b88: 90 22 00 01 sub %o0, %g1, %o0 40003b8c: 87 2a 20 0c sll %o0, 0xc, %g3 40003b90: 90 02 00 03 add %o0, %g3, %o0 40003b94: 90 02 00 02 add %o0, %g2, %o0 40003b98: 91 2a 20 04 sll %o0, 4, %o0 40003b9c: 90 22 00 02 sub %o0, %g2, %o0 40003ba0: 91 2a 20 02 sll %o0, 2, %o0 40003ba4: 40 00 1f 59 call 4000b908 40003ba8: 90 20 80 08 sub %g2, %o0, %o0 if ( rc ) { 40003bac: b8 92 20 00 orcc %o0, 0, %i4 40003bb0: 22 bf ff b1 be,a 40003a74 40003bb4: c6 04 00 00 ld [ %l0 ], %g3 if(errno) rc = errno; 40003bb8: 40 00 2b 65 call 4000e94c <__errno> <== NOT EXECUTED 40003bbc: 01 00 00 00 nop <== NOT EXECUTED 40003bc0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40003bc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003bc8: 12 80 00 15 bne 40003c1c <== NOT EXECUTED 40003bcc: 01 00 00 00 nop <== NOT EXECUTED close( iop - rtems_libio_iops ); 40003bd0: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 40003bd4: 84 27 40 02 sub %i5, %g2, %g2 <== NOT EXECUTED 40003bd8: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 40003bdc: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 40003be0: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 40003be4: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40003be8: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 40003bec: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 40003bf0: 87 2a 20 0c sll %o0, 0xc, %g3 <== NOT EXECUTED 40003bf4: ba 10 20 00 clr %i5 <== NOT EXECUTED 40003bf8: 90 02 00 03 add %o0, %g3, %o0 <== NOT EXECUTED 40003bfc: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 40003c00: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 40003c04: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40003c08: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40003c0c: 40 00 1e e3 call 4000b798 <== NOT EXECUTED 40003c10: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED 40003c14: 10 bf ff d0 b 40003b54 <== NOT EXECUTED 40003c18: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 40003c1c: 40 00 2b 4c call 4000e94c <__errno> <== NOT EXECUTED 40003c20: 01 00 00 00 nop <== NOT EXECUTED 40003c24: 10 bf ff eb b 40003bd0 <== NOT EXECUTED 40003c28: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED 400038a8 : /* * This is a replaceable stub */ void open_dev_console(void) { 400038a8: 9d e3 bf 98 save %sp, -104, %sp int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 400038ac: 21 10 00 62 sethi %hi(0x40018800), %l0 400038b0: 92 10 20 00 clr %o1 400038b4: 90 14 21 68 or %l0, 0x168, %o0 400038b8: 40 00 00 19 call 4000391c 400038bc: 94 10 20 00 clr %o2 400038c0: 80 a2 3f ff cmp %o0, -1 400038c4: 02 80 00 0e be 400038fc 400038c8: 90 14 21 68 or %l0, 0x168, %o0 /* * 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) 400038cc: 92 10 20 01 mov 1, %o1 400038d0: 40 00 00 13 call 4000391c 400038d4: 94 10 20 00 clr %o2 400038d8: 80 a2 3f ff cmp %o0, -1 400038dc: 02 80 00 0c be 4000390c 400038e0: 92 10 20 01 mov 1, %o1 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 400038e4: 90 14 21 68 or %l0, 0x168, %o0 400038e8: 40 00 00 0d call 4000391c 400038ec: 94 10 20 00 clr %o2 400038f0: 80 a2 3f ff cmp %o0, -1 400038f4: 02 80 00 04 be 40003904 400038f8: 11 14 d5 11 sethi %hi(0x53544400), %o0 400038fc: 81 c7 e0 08 ret 40003900: 81 e8 00 00 restore rtems_fatal_error_occurred( error_code | '2' ); 40003904: 40 00 0d d8 call 40007064 <== NOT EXECUTED 40003908: 90 12 20 32 or %o0, 0x32, %o0 <== 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( error_code | '1' ); 4000390c: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED 40003910: 40 00 0d d5 call 40007064 <== NOT EXECUTED 40003914: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <== NOT EXECUTED 40003918: 01 00 00 00 nop 400240b0 : * open a directory. */ DIR * opendir( const char *name ) { 400240b0: 9d e3 bf 98 save %sp, -104, %sp register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 400240b4: 92 10 20 00 clr %o1 400240b8: 90 10 00 18 mov %i0, %o0 400240bc: 7f ff 8e 06 call 400078d4 400240c0: b0 10 20 00 clr %i0 400240c4: 80 a2 3f ff cmp %o0, -1 400240c8: 02 80 00 17 be 40024124 400240cc: a0 10 00 08 mov %o0, %l0 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 400240d0: 92 10 20 02 mov 2, %o1 400240d4: 40 00 33 24 call 40030d64 400240d8: 94 10 20 01 mov 1, %o2 400240dc: 80 a2 3f ff cmp %o0, -1 400240e0: 02 80 00 14 be 40024130 400240e4: 90 10 00 10 mov %l0, %o0 400240e8: 7f ff 8b a5 call 40006f7c 400240ec: 90 10 20 18 mov 0x18, %o0 400240f0: b0 92 20 00 orcc %o0, 0, %i0 400240f4: 02 80 00 0f be 40024130 400240f8: 90 10 00 10 mov %l0, %o0 * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 400240fc: 7f ff 8b a0 call 40006f7c 40024100: 90 10 22 00 mov 0x200, %o0 dirp->dd_len = 512; 40024104: 82 10 22 00 mov 0x200, %g1 * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 40024108: d0 26 20 0c st %o0, [ %i0 + 0xc ] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 4002410c: 80 a2 20 00 cmp %o0, 0 40024110: 02 80 00 07 be 4002412c 40024114: c2 26 20 10 st %g1, [ %i0 + 0x10 ] close (fd); return NULL; } dirp->dd_fd = fd; 40024118: e0 26 00 00 st %l0, [ %i0 ] dirp->dd_loc = 0; 4002411c: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_seek = 0; 40024120: c0 26 20 14 clr [ %i0 + 0x14 ] /* * Set up seek point for rewinddir. */ return dirp; } 40024124: 81 c7 e0 08 ret 40024128: 81 e8 00 00 restore */ dirp->dd_buf = malloc (512); dirp->dd_len = 512; if (dirp->dd_buf == NULL) { close (fd); 4002412c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40024130: 7f ff 89 30 call 400065f0 <== NOT EXECUTED 40024134: b0 10 20 00 clr %i0 <== NOT EXECUTED 40024138: 81 c7 e0 08 ret <== NOT EXECUTED 4002413c: 81 e8 00 00 restore <== NOT EXECUTED 40004878 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 40004878: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 4000487c: c6 06 60 34 ld [ %i1 + 0x34 ], %g3 40004880: 80 88 e0 01 btst 1, %g3 40004884: 02 80 00 10 be 400048c4 40004888: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 4000488c: b0 0e 20 ff and %i0, 0xff, %i0 40004890: 80 a6 20 09 cmp %i0, 9 40004894: 22 80 00 28 be,a 40004934 40004898: c8 06 60 28 ld [ %i1 + 0x28 ], %g4 4000489c: 18 80 00 10 bgu 400048dc 400048a0: 80 a6 20 0a cmp %i0, 0xa 400048a4: 80 a6 20 08 cmp %i0, 8 <== NOT EXECUTED 400048a8: 12 80 00 11 bne 400048ec <== NOT EXECUTED 400048ac: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 400048b0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 400048b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400048b8: 04 80 00 03 ble 400048c4 <== NOT EXECUTED 400048bc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->column--; 400048c0: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 400048c4: 94 10 00 19 mov %i1, %o2 400048c8: 90 07 a0 44 add %fp, 0x44, %o0 400048cc: 7f ff ff 9d call 40004740 400048d0: 92 10 20 01 mov 1, %o1 400048d4: 81 c7 e0 08 ret 400048d8: 81 e8 00 00 restore oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 400048dc: 02 80 00 24 be 4000496c 400048e0: 80 a6 20 0d cmp %i0, 0xd 400048e4: 02 80 00 2f be 400049a0 400048e8: 80 88 e0 02 btst 2, %g3 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 400048ec: 02 80 00 08 be 4000490c 400048f0: 07 10 00 68 sethi %hi(0x4001a000), %g3 c = toupper(c); 400048f4: c4 00 e0 b0 ld [ %g3 + 0xb0 ], %g2 ! 4001a0b0 <__ctype_ptr> <== NOT EXECUTED 400048f8: c2 08 80 18 ldub [ %g2 + %i0 ], %g1 <== NOT EXECUTED 400048fc: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004900: 32 80 00 02 bne,a 40004908 <== NOT EXECUTED 40004904: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 40004908: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 4000490c: c2 00 e0 b0 ld [ %g3 + 0xb0 ], %g1 40004910: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 40004914: c6 08 40 02 ldub [ %g1 + %g2 ], %g3 40004918: 80 88 e0 20 btst 0x20, %g3 4000491c: 12 bf ff eb bne 400048c8 40004920: 94 10 00 19 mov %i1, %o2 tty->column++; 40004924: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 40004928: 82 00 60 01 inc %g1 4000492c: 10 bf ff e7 b 400048c8 40004930: c2 26 60 28 st %g1, [ %i1 + 0x28 ] tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004934: 05 00 00 06 sethi %hi(0x1800), %g2 40004938: 82 08 c0 02 and %g3, %g2, %g1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 4000493c: 86 09 20 07 and %g4, 7, %g3 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004940: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40004944: 82 10 20 08 mov 8, %g1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004948: 02 80 00 25 be 400049dc 4000494c: 92 20 40 03 sub %g1, %g3, %o1 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40004950: 82 02 40 04 add %o1, %g4, %g1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004954: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40004958: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 4000495c: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40004960: 7f ff ff 78 call 40004740 <== NOT EXECUTED 40004964: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004968: 30 80 00 23 b,a 400049f4 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 4000496c: 80 88 e0 20 btst 0x20, %g3 40004970: 32 80 00 02 bne,a 40004978 40004974: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 40004978: 80 88 e0 04 btst 4, %g3 4000497c: 02 bf ff d3 be 400048c8 40004980: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40004984: 11 10 00 63 sethi %hi(0x40018c00), %o0 40004988: 92 10 20 01 mov 1, %o1 4000498c: 90 12 20 60 or %o0, 0x60, %o0 40004990: 7f ff ff 6c call 40004740 40004994: 94 10 00 19 mov %i1, %o2 tty->column = 0; 40004998: 10 bf ff cb b 400048c4 4000499c: c0 26 60 28 clr [ %i1 + 0x28 ] } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 400049a0: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 400049a4: 02 80 00 06 be 400049bc <== NOT EXECUTED 400049a8: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 400049ac: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 400049b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400049b4: 02 bf ff c8 be 400048d4 <== NOT EXECUTED 400049b8: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 400049bc: 22 bf ff c2 be,a 400048c4 <== NOT EXECUTED 400049c0: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 400049c4: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 400049c8: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 400049cc: 02 bf ff be be 400048c4 <== NOT EXECUTED 400049d0: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 400049d4: 10 bf ff bc b 400048c4 <== NOT EXECUTED 400049d8: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 400049dc: 82 02 40 04 add %o1, %g4, %g1 rtems_termios_puts ( " ", i, tty); 400049e0: 94 10 00 19 mov %i1, %o2 break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 400049e4: c2 26 60 28 st %g1, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 400049e8: 11 10 00 63 sethi %hi(0x40018c00), %o0 400049ec: 7f ff ff 55 call 40004740 400049f0: 90 12 20 68 or %o0, 0x68, %o0 ! 40018c68 <__func__.4894+0x268> 400049f4: 81 c7 e0 08 ret 400049f8: 81 e8 00 00 restore 40006604 : */ void pthread_cleanup_pop( int execute ) { 40006604: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006608: 09 10 00 60 sethi %hi(0x40018000), %g4 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 ]; 4000660c: 05 10 00 60 sethi %hi(0x40018000), %g2 40006610: c2 01 20 d0 ld [ %g4 + 0xd0 ], %g1 40006614: c6 00 a1 90 ld [ %g2 + 0x190 ], %g3 40006618: 82 00 60 01 inc %g1 4000661c: e0 00 e1 60 ld [ %g3 + 0x160 ], %l0 40006620: c2 21 20 d0 st %g1, [ %g4 + 0xd0 ] */ void pthread_cleanup_pop( int execute ) { 40006624: a4 10 00 18 mov %i0, %l2 * 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 ); 40006628: 7f ff ef 8e call 40002460 4000662c: 01 00 00 00 nop 40006630: b0 10 00 08 mov %o0, %i0 if ( _Chain_Is_empty( handler_stack ) ) { 40006634: c2 04 20 d8 ld [ %l0 + 0xd8 ], %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40006638: a0 04 20 dc add %l0, 0xdc, %l0 4000663c: 80 a0 40 10 cmp %g1, %l0 40006640: 02 80 00 18 be 400066a0 40006644: 01 00 00 00 nop _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 40006648: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000664c: c4 04 00 00 ld [ %l0 ], %g2 previous = the_node->previous; 40006650: c2 04 20 04 ld [ %l0 + 4 ], %g1 next->previous = previous; previous->next = next; 40006654: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 40006658: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4000665c: 7f ff ef 85 call 40002470 40006660: 01 00 00 00 nop tmp_handler = *handler; _Workspace_Free( handler ); 40006664: 90 10 00 10 mov %l0, %o0 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); tmp_handler = *handler; 40006668: e2 04 20 0c ld [ %l0 + 0xc ], %l1 _Workspace_Free( handler ); 4000666c: 40 00 13 ce call 4000b5a4 <_Workspace_Free> 40006670: e0 04 20 08 ld [ %l0 + 8 ], %l0 _Thread_Enable_dispatch(); 40006674: 40 00 0e 42 call 40009f7c <_Thread_Enable_dispatch> 40006678: 01 00 00 00 nop if ( execute ) 4000667c: 80 a4 a0 00 cmp %l2, 0 40006680: 12 80 00 04 bne 40006690 40006684: 01 00 00 00 nop 40006688: 81 c7 e0 08 ret <== NOT EXECUTED 4000668c: 81 e8 00 00 restore <== NOT EXECUTED (*tmp_handler.routine)( tmp_handler.arg ); 40006690: 9f c4 00 00 call %l0 40006694: 90 10 00 11 mov %l1, %o0 40006698: 81 c7 e0 08 ret 4000669c: 81 e8 00 00 restore _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 400066a0: 40 00 0e 37 call 40009f7c <_Thread_Enable_dispatch> 400066a4: 01 00 00 00 nop _ISR_Enable( level ); 400066a8: 7f ff ef 72 call 40002470 400066ac: 81 e8 00 00 restore 400066b0: 01 00 00 00 nop 400076fc : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 400076fc: 9d e3 bf 60 save %sp, -160, %sp 40007700: aa 10 00 18 mov %i0, %l5 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 40007704: 80 a6 a0 00 cmp %i2, 0 40007708: 02 80 00 6f be 400078c4 4000770c: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40007710: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40007714: 80 a6 60 00 cmp %i1, 0 40007718: 02 80 00 03 be 40007724 4000771c: a2 10 63 28 or %g1, 0x328, %l1 40007720: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 40007724: c2 04 40 00 ld [ %l1 ], %g1 40007728: 80 a0 60 00 cmp %g1, 0 4000772c: 22 80 00 66 be,a 400078c4 40007730: b0 10 20 16 mov 0x16, %i0 * 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) ) 40007734: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007738: 80 a0 60 00 cmp %g1, 0 4000773c: 02 80 00 07 be 40007758 40007740: 03 10 00 77 sethi %hi(0x4001dc00), %g1 40007744: c4 04 60 08 ld [ %l1 + 8 ], %g2 40007748: c6 00 63 40 ld [ %g1 + 0x340 ], %g3 4000774c: 80 a0 80 03 cmp %g2, %g3 40007750: 2a 80 00 5d bcs,a 400078c4 40007754: b0 10 20 16 mov 0x16, %i0 * 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 ) { 40007758: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 4000775c: 80 a0 60 01 cmp %g1, 1 40007760: 02 80 00 5b be 400078cc 40007764: 80 a0 60 02 cmp %g1, 2 40007768: 22 80 00 04 be,a 40007778 4000776c: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 40007770: 81 c7 e0 08 ret 40007774: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 40007778: f2 04 60 14 ld [ %l1 + 0x14 ], %i1 schedparam = the_attr->schedparam; 4000777c: c4 27 bf e0 st %g2, [ %fp + -32 ] 40007780: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 40007784: c2 27 bf e4 st %g1, [ %fp + -28 ] 40007788: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000778c: c4 27 bf e8 st %g2, [ %fp + -24 ] 40007790: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 40007794: c2 27 bf ec st %g1, [ %fp + -20 ] 40007798: c4 04 60 28 ld [ %l1 + 0x28 ], %g2 4000779c: c4 27 bf f0 st %g2, [ %fp + -16 ] 400077a0: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 400077a4: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 400077a8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 400077ac: 80 a0 60 00 cmp %g1, 0 400077b0: 12 80 00 45 bne 400078c4 400077b4: b0 10 20 86 mov 0x86, %i0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 400077b8: e8 07 bf e0 ld [ %fp + -32 ], %l4 400077bc: 82 05 3f ff add %l4, -1, %g1 400077c0: 80 a0 60 fd cmp %g1, 0xfd 400077c4: 18 bf ff eb bgu 40007770 400077c8: 80 a6 60 01 cmp %i1, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400077cc: 02 80 00 54 be 4000791c 400077d0: a6 10 20 00 clr %l3 400077d4: 04 80 00 7c ble 400079c4 400077d8: 80 a6 60 02 cmp %i1, 2 400077dc: 02 80 00 4d be 40007910 400077e0: 80 a6 60 03 cmp %i1, 3 400077e4: 32 80 00 38 bne,a 400078c4 400077e8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) < 400077ec: 40 00 11 ab call 4000be98 <_Timespec_To_ticks> 400077f0: 90 07 bf e8 add %fp, -24, %o0 400077f4: a0 10 00 08 mov %o0, %l0 400077f8: 40 00 11 a8 call 4000be98 <_Timespec_To_ticks> 400077fc: 90 07 bf f0 add %fp, -16, %o0 40007800: 80 a4 00 08 cmp %l0, %o0 40007804: 0a 80 00 30 bcs 400078c4 40007808: b0 10 20 16 mov 0x16, %i0 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 4000780c: c2 07 bf e4 ld [ %fp + -28 ], %g1 40007810: 82 00 7f ff add %g1, -1, %g1 40007814: 80 a0 60 fd cmp %g1, 0xfd 40007818: 18 80 00 2b bgu 400078c4 4000781c: a6 10 20 03 mov 3, %l3 40007820: 03 10 00 1f sethi %hi(0x40007c00), %g1 40007824: a0 10 61 84 or %g1, 0x184, %l0 ! 40007d84 <_POSIX_Threads_Sporadic_budget_callout> #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 40007828: 2d 10 00 7b sethi %hi(0x4001ec00), %l6 4000782c: d0 05 a2 78 ld [ %l6 + 0x278 ], %o0 ! 4001ee78 <_RTEMS_Allocator_Mutex> 40007830: 40 00 07 56 call 40009588 <_API_Mutex_Lock> 40007834: 31 10 00 7c sethi %hi(0x4001f000), %i0 * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 40007838: 40 00 09 e1 call 40009fbc <_Objects_Allocate> 4000783c: 90 16 20 50 or %i0, 0x50, %o0 ! 4001f050 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 40007840: a4 92 20 00 orcc %o0, 0, %l2 40007844: 02 80 00 1d be 400078b8 40007848: 03 10 00 77 sethi %hi(0x4001dc00), %g1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 4000784c: c6 04 60 08 ld [ %l1 + 8 ], %g3 40007850: c4 00 63 40 ld [ %g1 + 0x340 ], %g2 40007854: c0 27 bf dc clr [ %fp + -36 ] 40007858: 97 28 a0 01 sll %g2, 1, %o3 4000785c: 80 a2 c0 03 cmp %o3, %g3 40007860: 1a 80 00 03 bcc 4000786c 40007864: d4 04 60 04 ld [ %l1 + 4 ], %o2 40007868: 96 10 00 03 mov %g3, %o3 4000786c: 82 07 bf dc add %fp, -36, %g1 40007870: e6 23 a0 60 st %l3, [ %sp + 0x60 ] 40007874: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 40007878: c0 23 a0 68 clr [ %sp + 0x68 ] 4000787c: 9a 10 20 ff mov 0xff, %o5 40007880: a6 10 20 01 mov 1, %l3 40007884: 9a 23 40 14 sub %o5, %l4, %o5 40007888: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 4000788c: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 40007890: 90 16 20 50 or %i0, 0x50, %o0 40007894: 92 10 00 12 mov %l2, %o1 40007898: 40 00 0d ba call 4000af80 <_Thread_Initialize> 4000789c: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 400078a0: 80 8a 20 ff btst 0xff, %o0 400078a4: 12 80 00 20 bne 40007924 400078a8: 11 10 00 7c sethi %hi(0x4001f000), %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 400078ac: 92 10 00 12 mov %l2, %o1 400078b0: 40 00 0a be call 4000a3a8 <_Objects_Free> 400078b4: 90 12 20 50 or %o0, 0x50, %o0 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400078b8: d0 05 a2 78 ld [ %l6 + 0x278 ], %o0 400078bc: 40 00 07 49 call 400095e0 <_API_Mutex_Unlock> 400078c0: b0 10 20 0b mov 0xb, %i0 400078c4: 81 c7 e0 08 ret 400078c8: 81 e8 00 00 restore * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400078cc: 03 10 00 7b sethi %hi(0x4001ec00), %g1 400078d0: c4 00 62 80 ld [ %g1 + 0x280 ], %g2 ! 4001ee80 <_Thread_Executing> 400078d4: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 400078d8: c8 00 e0 80 ld [ %g3 + 0x80 ], %g4 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 400078dc: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1 schedparam = api->schedparam; 400078e0: c8 27 bf e0 st %g4, [ %fp + -32 ] 400078e4: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 400078e8: c2 27 bf e4 st %g1, [ %fp + -28 ] 400078ec: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 400078f0: c4 27 bf e8 st %g2, [ %fp + -24 ] 400078f4: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 400078f8: c2 27 bf ec st %g1, [ %fp + -20 ] 400078fc: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 40007900: c4 27 bf f0 st %g2, [ %fp + -16 ] 40007904: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 40007908: 10 bf ff a8 b 400077a8 4000790c: c2 27 bf f4 st %g1, [ %fp + -12 ] */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 40007910: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 40007914: 10 bf ff c5 b 40007828 <== NOT EXECUTED 40007918: a0 10 20 00 clr %l0 <== NOT EXECUTED 4000791c: 10 bf ff c3 b 40007828 40007920: a0 10 20 00 clr %l0 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40007924: e0 04 a1 60 ld [ %l2 + 0x160 ], %l0 api->Attributes = *the_attr; 40007928: 92 10 00 11 mov %l1, %o1 4000792c: 94 10 20 38 mov 0x38, %o2 40007930: 40 00 25 d4 call 40011080 40007934: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 40007938: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; 4000793c: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 40007940: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007944: c2 07 bf e0 ld [ %fp + -32 ], %g1 * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 40007948: e6 2c a0 75 stb %l3, [ %l2 + 0x75 ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4000794c: c2 24 20 80 st %g1, [ %l0 + 0x80 ] 40007950: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007954: 94 10 00 1a mov %i2, %o2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007958: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 4000795c: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007960: 96 10 00 1b mov %i3, %o3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007964: c2 24 20 88 st %g1, [ %l0 + 0x88 ] 40007968: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 4000796c: 90 10 00 12 mov %l2, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007970: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40007974: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007978: 92 10 20 01 mov 1, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4000797c: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 40007980: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007984: 98 10 20 00 clr %o4 40007988: 40 00 10 86 call 4000bba0 <_Thread_Start> 4000798c: c2 24 20 94 st %g1, [ %l0 + 0x94 ] start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 40007990: 80 a6 60 03 cmp %i1, 3 40007994: 02 80 00 19 be 400079f8 40007998: a2 10 00 08 mov %o0, %l1 * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 4000799c: 80 8c 60 ff btst 0xff, %l1 400079a0: 12 80 00 0f bne 400079dc 400079a4: 90 16 20 50 or %i0, 0x50, %o0 400079a8: 40 00 0a 80 call 4000a3a8 <_Objects_Free> <== NOT EXECUTED 400079ac: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400079b0: d0 05 a2 78 ld [ %l6 + 0x278 ], %o0 <== NOT EXECUTED 400079b4: 40 00 07 0b call 400095e0 <_API_Mutex_Unlock> <== NOT EXECUTED 400079b8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 400079bc: 81 c7 e0 08 ret <== NOT EXECUTED 400079c0: 81 e8 00 00 restore <== NOT EXECUTED */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400079c4: 80 a6 60 00 cmp %i1, 0 400079c8: a6 10 20 01 mov 1, %l3 400079cc: 02 bf ff 97 be 40007828 400079d0: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 400079d4: 81 c7 e0 08 ret 400079d8: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400079dc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 _RTEMS_Unlock_allocator(); 400079e0: d0 05 a2 78 ld [ %l6 + 0x278 ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400079e4: c2 25 40 00 st %g1, [ %l5 ] _RTEMS_Unlock_allocator(); 400079e8: 40 00 06 fe call 400095e0 <_API_Mutex_Unlock> 400079ec: b0 10 20 00 clr %i0 400079f0: 81 c7 e0 08 ret 400079f4: 81 e8 00 00 restore arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 400079f8: 40 00 11 28 call 4000be98 <_Timespec_To_ticks> 400079fc: 90 04 20 88 add %l0, 0x88, %o0 40007a00: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007a04: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007a08: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007a0c: 40 00 12 38 call 4000c2ec <_Watchdog_Insert> 40007a10: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 4001eea0 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 40007a14: 10 bf ff e3 b 400079a0 40007a18: 80 8c 60 ff btst 0xff, %l1 40006650 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 40006650: 9d e3 bf 98 save %sp, -104, %sp 40006654: 05 10 00 5c sethi %hi(0x40017000), %g2 40006658: c2 00 a2 e0 ld [ %g2 + 0x2e0 ], %g1 ! 400172e0 <_Thread_Dispatch_disable_level> 4000665c: 82 00 60 01 inc %g1 40006660: c2 20 a2 e0 st %g1, [ %g2 + 0x2e0 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 40006664: 29 10 00 5d sethi %hi(0x40017400), %l4 40006668: 40 00 09 d4 call 40008db8 <_Objects_Allocate> 4000666c: 90 15 23 34 or %l4, 0x334, %o0 ! 40017734 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 40006670: a4 92 20 00 orcc %o0, 0, %l2 40006674: 02 80 00 2b be 40006720 40006678: 03 10 00 5c sethi %hi(0x40017000), %g1 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 4000667c: f2 24 a0 14 st %i1, [ %l2 + 0x14 ] 40006680: a2 10 00 12 mov %l2, %l1 40006684: a6 10 62 40 or %g1, 0x240, %l3 40006688: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 4000668c: 83 2e 60 02 sll %i1, 2, %g1 40006690: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 40006694: 80 a0 60 00 cmp %g1, 0 40006698: 22 80 00 0e be,a 400066d0 4000669c: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 400066a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 400066a4: c2 10 a0 10 lduh [ %g2 + 0x10 ], %g1 400066a8: 82 00 60 01 inc %g1 400066ac: a1 28 60 02 sll %g1, 2, %l0 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 400066b0: 40 00 13 24 call 4000b340 <_Workspace_Allocate> 400066b4: 90 10 00 10 mov %l0, %o0 if ( !table ) { 400066b8: 82 92 20 00 orcc %o0, 0, %g1 400066bc: 02 80 00 1d be 40006730 400066c0: 94 10 00 10 mov %l0, %o2 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 400066c4: c2 24 60 1c st %g1, [ %l1 + 0x1c ] memset( table, '\0', bytes_to_allocate ); 400066c8: 40 00 26 c5 call 400101dc 400066cc: 92 10 20 00 clr %o1 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 400066d0: b2 06 60 01 inc %i1 * 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; the_api <= OBJECTS_APIS_LAST; 400066d4: 80 a6 60 05 cmp %i1, 5 400066d8: 12 bf ff ed bne 4000668c 400066dc: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400066e0: c4 04 a0 08 ld [ %l2 + 8 ], %g2 400066e4: 82 15 23 34 or %l4, 0x334, %g1 400066e8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400066ec: 03 00 00 3f sethi %hi(0xfc00), %g1 400066f0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400066f4: 82 08 80 01 and %g2, %g1, %g1 400066f8: 83 28 60 02 sll %g1, 2, %g1 400066fc: e4 20 c0 01 st %l2, [ %g3 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 40006700: c0 24 a0 0c clr [ %l2 + 0xc ] } } the_key->is_active = TRUE; 40006704: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 40006708: c4 26 00 00 st %g2, [ %i0 ] } } the_key->is_active = TRUE; 4000670c: c2 2c a0 10 stb %g1, [ %l2 + 0x10 ] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); 40006710: 40 00 0d 4b call 40009c3c <_Thread_Enable_dispatch> 40006714: b0 10 20 00 clr %i0 return 0; } 40006718: 81 c7 e0 08 ret 4000671c: 81 e8 00 00 restore _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 40006720: 40 00 0d 47 call 40009c3c <_Thread_Enable_dispatch> 40006724: b0 10 20 0b mov 0xb, %i0 40006728: 81 c7 e0 08 ret 4000672c: 81 e8 00 00 restore bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 40006730: a0 86 7f ff addcc %i1, -1, %l0 40006734: 02 80 00 0a be 4000675c 40006738: 82 06 60 05 add %i1, 5, %g1 4000673c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40006740: b2 04 80 01 add %l2, %g1, %i1 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 40006744: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 40006748: 40 00 12 f7 call 4000b324 <_Workspace_Free> <== NOT EXECUTED 4000674c: b2 06 7f fc add %i1, -4, %i1 <== NOT EXECUTED bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 40006750: a0 84 3f ff addcc %l0, -1, %l0 <== NOT EXECUTED 40006754: 32 bf ff fd bne,a 40006748 <== NOT EXECUTED 40006758: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 4000675c: 90 15 23 34 or %l4, 0x334, %o0 40006760: 92 10 00 12 mov %l2, %o1 40006764: 40 00 0a 90 call 400091a4 <_Objects_Free> 40006768: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 4000676c: 40 00 0d 34 call 40009c3c <_Thread_Enable_dispatch> 40006770: 01 00 00 00 nop 40006774: 81 c7 e0 08 ret 40006778: 81 e8 00 00 restore 4000677c : */ int pthread_key_delete( pthread_key_t key ) { 4000677c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 40006780: 23 10 00 5d sethi %hi(0x40017400), %l1 40006784: 92 10 00 18 mov %i0, %o1 40006788: 94 07 bf f4 add %fp, -12, %o2 4000678c: 40 00 0a f3 call 40009358 <_Objects_Get> 40006790: 90 14 63 34 or %l1, 0x334, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006794: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006798: a0 10 00 08 mov %o0, %l0 4000679c: 80 a0 60 00 cmp %g1, 0 400067a0: 12 80 00 23 bne 4000682c 400067a4: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 400067a8: 90 14 63 34 or %l1, 0x334, %o0 400067ac: 40 00 09 af call 40008e68 <_Objects_Close> 400067b0: 92 10 00 10 mov %l0, %o1 the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 400067b4: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 400067b8: 80 a2 20 00 cmp %o0, 0 400067bc: 02 80 00 04 be 400067cc 400067c0: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 400067c4: 40 00 12 d8 call 4000b324 <_Workspace_Free> 400067c8: 01 00 00 00 nop the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 400067cc: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 400067d0: 80 a2 20 00 cmp %o0, 0 400067d4: 22 80 00 05 be,a 400067e8 400067d8: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400067dc: 40 00 12 d2 call 4000b324 <_Workspace_Free> 400067e0: 01 00 00 00 nop the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 400067e4: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 400067e8: 80 a2 20 00 cmp %o0, 0 400067ec: 22 80 00 05 be,a 40006800 400067f0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400067f4: 40 00 12 cc call 4000b324 <_Workspace_Free> 400067f8: 01 00 00 00 nop the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 400067fc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40006800: 80 a2 20 00 cmp %o0, 0 40006804: 22 80 00 05 be,a 40006818 40006808: 90 14 63 34 or %l1, 0x334, %o0 _Workspace_Free( the_key->Values[ the_api ] ); 4000680c: 40 00 12 c6 call 4000b324 <_Workspace_Free> <== NOT EXECUTED 40006810: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 40006814: 90 14 63 34 or %l1, 0x334, %o0 <== NOT EXECUTED 40006818: 92 10 00 10 mov %l0, %o1 4000681c: 40 00 0a 62 call 400091a4 <_Objects_Free> 40006820: b0 10 20 00 clr %i0 * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 40006824: 40 00 0d 06 call 40009c3c <_Thread_Enable_dispatch> 40006828: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 4000682c: 81 c7 e0 08 ret 40006830: 81 e8 00 00 restore 40025604 : int pthread_kill( pthread_t thread, int sig ) { 40025604: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 40025608: 80 a6 60 00 cmp %i1, 0 4002560c: 02 80 00 2f be 400256c8 40025610: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40025614: a0 06 7f ff add %i1, -1, %l0 40025618: 80 a4 20 1f cmp %l0, 0x1f 4002561c: 18 80 00 2b bgu 400256c8 40025620: 11 10 00 af sethi %hi(0x4002bc00), %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40025624: 94 07 bf f4 add %fp, -12, %o2 40025628: 7f ff a4 b9 call 4000e90c <_Objects_Get> 4002562c: 90 12 21 d0 or %o0, 0x1d0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40025630: c2 07 bf f4 ld [ %fp + -12 ], %g1 40025634: 80 a0 60 00 cmp %g1, 0 40025638: 12 80 00 2a bne 400256e0 4002563c: b0 10 00 08 mov %o0, %i0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40025640: 87 2e 60 02 sll %i1, 2, %g3 40025644: 85 2e 60 04 sll %i1, 4, %g2 40025648: 03 10 00 b0 sethi %hi(0x4002c000), %g1 4002564c: 84 20 80 03 sub %g2, %g3, %g2 40025650: 82 10 61 3c or %g1, 0x13c, %g1 40025654: 82 00 40 02 add %g1, %g2, %g1 40025658: c6 00 60 08 ld [ %g1 + 8 ], %g3 4002565c: 80 a0 e0 01 cmp %g3, 1 40025660: 02 80 00 14 be 400256b0 40025664: c8 02 21 60 ld [ %o0 + 0x160 ], %g4 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40025668: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4002566c: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40025670: b2 10 20 01 mov 1, %i1 40025674: 83 2e 40 10 sll %i1, %l0, %g1 40025678: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 4002567c: 94 10 20 00 clr %o2 40025680: 7f ff ff 90 call 400254c0 <_POSIX_signals_Unblock_thread> 40025684: c4 21 20 c8 st %g2, [ %g4 + 0xc8 ] the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40025688: 03 10 00 ae sethi %hi(0x4002b800), %g1 4002568c: c4 00 63 9c ld [ %g1 + 0x39c ], %g2 ! 4002bb9c <_ISR_Nest_level> 40025690: 80 a0 a0 00 cmp %g2, 0 40025694: 02 80 00 07 be 400256b0 40025698: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 4002569c: 03 10 00 ae sethi %hi(0x4002b800), %g1 400256a0: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4002bbc0 <_Thread_Executing> 400256a4: 80 a6 00 02 cmp %i0, %g2 400256a8: 02 80 00 06 be 400256c0 400256ac: 03 10 00 af sethi %hi(0x4002bc00), %g1 _ISR_Signals_to_thread_executing = TRUE; } _Thread_Enable_dispatch(); 400256b0: 7f ff a7 16 call 4000f308 <_Thread_Enable_dispatch> 400256b4: b0 10 20 00 clr %i0 400256b8: 81 c7 e0 08 ret 400256bc: 81 e8 00 00 restore (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; 400256c0: 10 bf ff fc b 400256b0 <== NOT EXECUTED 400256c4: f2 28 60 58 stb %i1, [ %g1 + 0x58 ] <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 400256c8: 7f ff cf ad call 4001957c <__errno> 400256cc: b0 10 3f ff mov -1, %i0 400256d0: 82 10 20 16 mov 0x16, %g1 400256d4: c2 22 00 00 st %g1, [ %o0 ] 400256d8: 81 c7 e0 08 ret 400256dc: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 400256e0: 7f ff cf a7 call 4001957c <__errno> 400256e4: b0 10 3f ff mov -1, %i0 400256e8: 82 10 20 03 mov 3, %g1 400256ec: c2 22 00 00 st %g1, [ %o0 ] } 400256f0: 81 c7 e0 08 ret 400256f4: 81 e8 00 00 restore 400084c4 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 400084c4: 9d e3 bf 98 save %sp, -104, %sp #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 400084c8: 03 10 00 61 sethi %hi(0x40018400), %g1 400084cc: 80 a6 60 00 cmp %i1, 0 400084d0: 02 80 00 03 be 400084dc 400084d4: a0 10 63 4c or %g1, 0x34c, %l0 400084d8: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 400084dc: 80 a6 20 00 cmp %i0, 0 400084e0: 02 80 00 17 be 4000853c 400084e4: 01 00 00 00 nop break; } } #endif if ( !the_attr->is_initialized ) 400084e8: c2 04 00 00 ld [ %l0 ], %g1 400084ec: 80 a0 60 00 cmp %g1, 0 400084f0: 02 80 00 13 be 4000853c 400084f4: 01 00 00 00 nop /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 400084f8: c2 04 20 04 ld [ %l0 + 4 ], %g1 400084fc: 80 a0 60 00 cmp %g1, 0 40008500: 12 80 00 4d bne 40008634 40008504: 11 10 00 61 sethi %hi(0x40018400), %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40008508: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000850c: 80 a0 60 01 cmp %g1, 1 40008510: 02 80 00 37 be 400085ec 40008514: 80 a0 60 02 cmp %g1, 2 40008518: 02 80 00 3c be 40008608 4000851c: 80 a0 60 00 cmp %g1, 0 40008520: 12 80 00 07 bne 4000853c 40008524: a2 10 20 00 clr %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 40008528: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000852c: 82 00 7f ff add %g1, -1, %g1 40008530: 80 a0 60 fd cmp %g1, 0xfd 40008534: 08 80 00 04 bleu 40008544 40008538: 05 10 00 68 sethi %hi(0x4001a000), %g2 *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 4000853c: 81 c7 e0 08 ret 40008540: 91 e8 20 16 restore %g0, 0x16, %o0 40008544: c2 00 a3 e0 ld [ %g2 + 0x3e0 ], %g1 40008548: 82 00 60 01 inc %g1 4000854c: c2 20 a3 e0 st %g1, [ %g2 + 0x3e0 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 40008550: 25 10 00 69 sethi %hi(0x4001a400), %l2 40008554: 40 00 0a 8e call 4000af8c <_Objects_Allocate> 40008558: 90 14 a3 b0 or %l2, 0x3b0, %o0 ! 4001a7b0 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 4000855c: b2 92 20 00 orcc %o0, 0, %i1 40008560: 02 80 00 31 be 40008624 40008564: 01 00 00 00 nop _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 40008568: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000856c: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 40008570: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40008574: 80 a0 a0 00 cmp %g2, 0 40008578: 32 80 00 04 bne,a 40008588 4000857c: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 40008580: 82 10 20 01 mov 1, %g1 40008584: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 40008588: c6 04 20 08 ld [ %l0 + 8 ], %g3 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 4000858c: 84 10 20 01 mov 1, %g2 the_mutex_attr->priority_ceiling = 40008590: 82 10 20 ff mov 0xff, %g1 40008594: 82 20 40 03 sub %g1, %g3, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 40008598: 92 06 60 54 add %i1, 0x54, %o1 4000859c: 94 10 20 01 mov 1, %o2 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 400085a0: c4 2e 60 58 stb %g2, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 400085a4: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 400085a8: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 400085ac: 40 00 08 36 call 4000a684 <_CORE_mutex_Initialize> 400085b0: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400085b4: c4 06 60 08 ld [ %i1 + 8 ], %g2 400085b8: 82 14 a3 b0 or %l2, 0x3b0, %g1 400085bc: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400085c0: 03 00 00 3f sethi %hi(0xfc00), %g1 400085c4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400085c8: 82 08 80 01 and %g2, %g1, %g1 400085cc: 83 28 60 02 sll %g1, 2, %g1 400085d0: f2 20 c0 01 st %i1, [ %g3 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 400085d4: c0 26 60 0c clr [ %i1 + 0xc ] CORE_MUTEX_UNLOCKED ); _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 400085d8: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 400085dc: 40 00 0e 0d call 4000be10 <_Thread_Enable_dispatch> 400085e0: b0 10 20 00 clr %i0 400085e4: 81 c7 e0 08 ret 400085e8: 81 e8 00 00 restore break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 400085ec: c2 04 20 08 ld [ %l0 + 8 ], %g1 400085f0: 82 00 7f ff add %g1, -1, %g1 400085f4: 80 a0 60 fd cmp %g1, 0xfd 400085f8: 18 bf ff d1 bgu 4000853c 400085fc: a2 10 20 02 mov 2, %l1 40008600: 10 bf ff d1 b 40008544 40008604: 05 10 00 68 sethi %hi(0x4001a000), %g2 40008608: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000860c: 82 00 7f ff add %g1, -1, %g1 40008610: 80 a0 60 fd cmp %g1, 0xfd 40008614: 18 bf ff ca bgu 4000853c 40008618: a2 10 20 03 mov 3, %l1 4000861c: 10 bf ff ca b 40008544 40008620: 05 10 00 68 sethi %hi(0x4001a000), %g2 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 40008624: 40 00 0d fb call 4000be10 <_Thread_Enable_dispatch> 40008628: b0 10 20 0b mov 0xb, %i0 4000862c: 81 c7 e0 08 ret 40008630: 81 e8 00 00 restore /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 40008634: 15 10 00 61 sethi %hi(0x40018400), %o2 <== NOT EXECUTED 40008638: 17 10 00 61 sethi %hi(0x40018400), %o3 <== NOT EXECUTED 4000863c: 90 12 23 60 or %o0, 0x360, %o0 <== NOT EXECUTED 40008640: 94 12 a3 e0 or %o2, 0x3e0, %o2 <== NOT EXECUTED 40008644: 96 12 e3 a8 or %o3, 0x3a8, %o3 <== NOT EXECUTED 40008648: 7f ff f2 a4 call 400050d8 <__assert_func> <== NOT EXECUTED 4000864c: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED 40008650: 01 00 00 00 nop 400086c4 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 400086c4: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 400086c8: 80 a6 a0 00 cmp %i2, 0 400086cc: 02 80 00 06 be 400086e4 400086d0: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 400086d4: 82 06 7f ff add %i1, -1, %g1 400086d8: 80 a0 60 fd cmp %g1, 0xfd 400086dc: 08 80 00 04 bleu 400086ec 400086e0: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 400086e4: 81 c7 e0 08 ret 400086e8: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 400086ec: 7f ff ff da call 40008654 400086f0: 90 10 00 18 mov %i0, %o0 if ( status ) 400086f4: b0 92 20 00 orcc %o0, 0, %i0 400086f8: 12 80 00 14 bne 40008748 400086fc: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 40008700: 7f ff ff 46 call 40008418 <_POSIX_Mutex_Get> 40008704: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40008708: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000870c: 80 a0 60 00 cmp %g1, 0 40008710: 32 80 00 0e bne,a 40008748 40008714: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008718: c2 02 20 60 ld [ %o0 + 0x60 ], %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 4000871c: d2 02 20 08 ld [ %o0 + 8 ], %o1 the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008720: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40008724: 86 20 80 19 sub %g2, %i1, %g3 the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008728: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 4000872c: c6 22 20 60 st %g3, [ %o0 + 0x60 ] the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008730: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40008734: 94 10 20 00 clr %o2 40008738: 40 00 08 5e call 4000a8b0 <_CORE_mutex_Surrender> 4000873c: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 40008740: 40 00 0d b4 call 4000be10 <_Thread_Enable_dispatch> 40008744: 01 00 00 00 nop 40008748: 81 c7 e0 08 ret 4000874c: 81 e8 00 00 restore 40008750 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 40008750: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 40008754: 90 10 00 19 mov %i1, %o0 40008758: 40 00 00 2f call 40008814 <_POSIX_Absolute_timeout_to_ticks> 4000875c: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 40008760: 80 a2 20 02 cmp %o0, 2 40008764: 08 80 00 05 bleu 40008778 40008768: d4 07 bf f4 ld [ %fp + -12 ], %o2 4000876c: 80 a2 20 03 cmp %o0, 3 40008770: 02 80 00 07 be 4000878c 40008774: 90 10 00 18 mov %i0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40008778: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000877c: 7f ff ff bc call 4000866c <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 40008780: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40008784: 81 c7 e0 08 ret <== NOT EXECUTED 40008788: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 4000878c: 7f ff ff b8 call 4000866c <_POSIX_Mutex_Lock_support> 40008790: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40008794: 81 c7 e0 08 ret 40008798: 91 e8 00 08 restore %g0, %o0, %o0 40007e58 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 40007e58: 9d e3 bf 90 save %sp, -112, %sp if ( !once_control || !init_routine ) 40007e5c: a0 96 20 00 orcc %i0, 0, %l0 40007e60: 02 80 00 0a be 40007e88 40007e64: 80 a6 60 00 cmp %i1, 0 40007e68: 02 80 00 08 be 40007e88 40007e6c: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 40007e70: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007e74: 80 a0 60 00 cmp %g1, 0 40007e78: 02 80 00 06 be 40007e90 40007e7c: b0 10 20 00 clr %i0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 40007e80: 81 c7 e0 08 ret 40007e84: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 40007e88: 81 c7 e0 08 ret 40007e8c: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 40007e90: b0 07 bf f4 add %fp, -12, %i0 40007e94: 90 10 21 00 mov 0x100, %o0 40007e98: 92 10 21 00 mov 0x100, %o1 40007e9c: 40 00 03 ba call 40008d84 40007ea0: 94 10 00 18 mov %i0, %o2 if ( !once_control->init_executed ) { 40007ea4: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007ea8: 80 a0 60 00 cmp %g1, 0 40007eac: 02 80 00 09 be 40007ed0 40007eb0: 82 10 20 01 mov 1, %g1 once_control->is_initialized = TRUE; once_control->init_executed = TRUE; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 40007eb4: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40007eb8: 94 10 00 18 mov %i0, %o2 40007ebc: 92 10 21 00 mov 0x100, %o1 40007ec0: 40 00 03 b1 call 40008d84 40007ec4: b0 10 20 00 clr %i0 } return 0; } 40007ec8: 81 c7 e0 08 ret 40007ecc: 81 e8 00 00 restore 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; once_control->init_executed = TRUE; 40007ed0: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 40007ed4: 9f c6 40 00 call %i1 40007ed8: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 40007edc: 10 bf ff f7 b 40007eb8 40007ee0: d0 07 bf f4 ld [ %fp + -12 ], %o0 40007160 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 40007160: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 40007164: 80 a6 20 00 cmp %i0, 0 40007168: 02 80 00 26 be 40007200 4000716c: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40007170: 80 a6 60 00 cmp %i1, 0 40007174: 22 80 00 29 be,a 40007218 40007178: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 4000717c: c2 04 00 00 ld [ %l0 ], %g1 40007180: 80 a0 60 00 cmp %g1, 0 40007184: 02 80 00 1f be 40007200 40007188: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 4000718c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007190: 80 a0 60 00 cmp %g1, 0 40007194: 12 80 00 1b bne 40007200 40007198: 05 10 00 75 sethi %hi(0x4001d400), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000719c: c2 00 a1 20 ld [ %g2 + 0x120 ], %g1 ! 4001d520 <_Thread_Dispatch_disable_level> 400071a0: 82 00 60 01 inc %g1 400071a4: c2 20 a1 20 st %g1, [ %g2 + 0x120 ] * 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 *) 400071a8: 33 10 00 75 sethi %hi(0x4001d400), %i1 400071ac: 40 00 0b 03 call 40009db8 <_Objects_Allocate> 400071b0: 90 16 63 70 or %i1, 0x370, %o0 ! 4001d770 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 400071b4: a0 92 20 00 orcc %o0, 0, %l0 400071b8: 02 80 00 14 be 40007208 400071bc: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 400071c0: 40 00 09 03 call 400095cc <_CORE_RWLock_Initialize> 400071c4: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400071c8: c4 04 20 08 ld [ %l0 + 8 ], %g2 400071cc: 82 16 63 70 or %i1, 0x370, %g1 400071d0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400071d4: 03 00 00 3f sethi %hi(0xfc00), %g1 400071d8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400071dc: 82 08 80 01 and %g2, %g1, %g1 400071e0: 83 28 60 02 sll %g1, 2, %g1 400071e4: e0 20 c0 01 st %l0, [ %g3 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 400071e8: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 400071ec: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 400071f0: 40 00 0e 93 call 4000ac3c <_Thread_Enable_dispatch> 400071f4: b0 10 20 00 clr %i0 400071f8: 81 c7 e0 08 ret 400071fc: 81 e8 00 00 restore return 0; } 40007200: 81 c7 e0 08 ret 40007204: 91 e8 20 16 restore %g0, 0x16, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 40007208: 40 00 0e 8d call 4000ac3c <_Thread_Enable_dispatch> 4000720c: b0 10 20 0b mov 0xb, %i0 40007210: 81 c7 e0 08 ret 40007214: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 40007218: 40 00 02 b5 call 40007cec <== NOT EXECUTED 4000721c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40007220: 10 bf ff d8 b 40007180 <== NOT EXECUTED 40007224: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40007298 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40007298: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4000729c: 80 a6 20 00 cmp %i0, 0 400072a0: 02 80 00 11 be 400072e4 400072a4: 90 10 00 19 mov %i1, %o0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 400072a8: 92 07 bf f0 add %fp, -16, %o1 400072ac: 40 00 1d 6f call 4000e868 <_POSIX_Absolute_timeout_to_ticks> 400072b0: a0 10 20 00 clr %l0 switch (status) { 400072b4: 80 a2 20 02 cmp %o0, 2 400072b8: 18 80 00 0e bgu 400072f0 400072bc: b2 10 00 08 mov %o0, %i1 400072c0: d2 06 00 00 ld [ %i0 ], %o1 400072c4: 11 10 00 75 sethi %hi(0x4001d400), %o0 400072c8: 94 07 bf f4 add %fp, -12, %o2 400072cc: 40 00 0c 23 call 4000a358 <_Objects_Get> 400072d0: 90 12 23 70 or %o0, 0x370, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400072d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400072d8: 80 a0 60 00 cmp %g1, 0 400072dc: 22 80 00 11 be,a 40007320 400072e0: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 400072e4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 400072e8: 81 c7 e0 08 ret 400072ec: 91 e8 00 08 restore %g0, %o0, %o0 * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); switch (status) { 400072f0: 80 a2 20 03 cmp %o0, 3 400072f4: 12 bf ff f4 bne 400072c4 400072f8: d2 06 00 00 ld [ %i0 ], %o1 400072fc: 11 10 00 75 sethi %hi(0x4001d400), %o0 40007300: 94 07 bf f4 add %fp, -12, %o2 40007304: 40 00 0c 15 call 4000a358 <_Objects_Get> 40007308: 90 12 23 70 or %o0, 0x370, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000730c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007310: 80 a0 60 00 cmp %g1, 0 40007314: 12 bf ff f4 bne 400072e4 40007318: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 4000731c: d2 06 00 00 ld [ %i0 ], %o1 40007320: d6 07 bf f0 ld [ %fp + -16 ], %o3 40007324: a0 0c 20 ff and %l0, 0xff, %l0 40007328: 90 02 20 10 add %o0, 0x10, %o0 4000732c: 94 10 00 10 mov %l0, %o2 40007330: 40 00 08 b2 call 400095f8 <_CORE_RWLock_Obtain_for_reading> 40007334: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40007338: 40 00 0e 41 call 4000ac3c <_Thread_Enable_dispatch> 4000733c: 01 00 00 00 nop 40007340: 03 10 00 75 sethi %hi(0x4001d400), %g1 if ( !do_wait && 40007344: 80 a4 20 00 cmp %l0, 0 40007348: 12 80 00 0f bne 40007384 4000734c: 86 10 61 e0 or %g1, 0x1e0, %g3 40007350: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40007354: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001d5e0 <_Thread_Executing> <== NOT EXECUTED 40007358: 86 10 61 e0 or %g1, 0x1e0, %g3 <== NOT EXECUTED 4000735c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 40007360: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007364: 32 80 00 09 bne,a 40007388 <== NOT EXECUTED 40007368: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000736c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40007370: 02 bf ff de be 400072e8 <== NOT EXECUTED 40007374: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007378: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 4000737c: 08 bf ff db bleu 400072e8 <== NOT EXECUTED 40007380: 90 10 20 74 mov 0x74, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007384: c2 00 c0 00 ld [ %g3 ], %g1 40007388: 40 00 00 44 call 40007498 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000738c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40007390: 81 c7 e0 08 ret 40007394: 91 e8 00 08 restore %g0, %o0, %o0 40007398 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40007398: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; bool do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 4000739c: 80 a6 20 00 cmp %i0, 0 400073a0: 02 80 00 11 be 400073e4 400073a4: 90 10 00 19 mov %i1, %o0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 400073a8: 92 07 bf f0 add %fp, -16, %o1 400073ac: 40 00 1d 2f call 4000e868 <_POSIX_Absolute_timeout_to_ticks> 400073b0: a0 10 20 00 clr %l0 switch (status) { 400073b4: 80 a2 20 02 cmp %o0, 2 400073b8: 18 80 00 0e bgu 400073f0 400073bc: b2 10 00 08 mov %o0, %i1 400073c0: d2 06 00 00 ld [ %i0 ], %o1 400073c4: 11 10 00 75 sethi %hi(0x4001d400), %o0 400073c8: 94 07 bf f4 add %fp, -12, %o2 400073cc: 40 00 0b e3 call 4000a358 <_Objects_Get> 400073d0: 90 12 23 70 or %o0, 0x370, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400073d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400073d8: 80 a0 60 00 cmp %g1, 0 400073dc: 22 80 00 11 be,a 40007420 400073e0: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 400073e4: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 400073e8: 81 c7 e0 08 ret 400073ec: 91 e8 00 08 restore %g0, %o0, %o0 * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); switch (status) { 400073f0: 80 a2 20 03 cmp %o0, 3 400073f4: 12 bf ff f4 bne 400073c4 400073f8: d2 06 00 00 ld [ %i0 ], %o1 400073fc: 11 10 00 75 sethi %hi(0x4001d400), %o0 40007400: 94 07 bf f4 add %fp, -12, %o2 40007404: 40 00 0b d5 call 4000a358 <_Objects_Get> 40007408: 90 12 23 70 or %o0, 0x370, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000740c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007410: 80 a0 60 00 cmp %g1, 0 40007414: 12 bf ff f4 bne 400073e4 40007418: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 4000741c: d2 06 00 00 ld [ %i0 ], %o1 40007420: d6 07 bf f0 ld [ %fp + -16 ], %o3 40007424: a0 0c 20 ff and %l0, 0xff, %l0 40007428: 90 02 20 10 add %o0, 0x10, %o0 4000742c: 94 10 00 10 mov %l0, %o2 40007430: 40 00 08 a7 call 400096cc <_CORE_RWLock_Obtain_for_writing> 40007434: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40007438: 40 00 0e 01 call 4000ac3c <_Thread_Enable_dispatch> 4000743c: 01 00 00 00 nop 40007440: 03 10 00 75 sethi %hi(0x4001d400), %g1 if ( !do_wait && 40007444: 80 a4 20 00 cmp %l0, 0 40007448: 12 80 00 0f bne 40007484 4000744c: 86 10 61 e0 or %g1, 0x1e0, %g3 40007450: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40007454: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001d5e0 <_Thread_Executing> <== NOT EXECUTED 40007458: 86 10 61 e0 or %g1, 0x1e0, %g3 <== NOT EXECUTED 4000745c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 40007460: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007464: 32 80 00 09 bne,a 40007488 <== NOT EXECUTED 40007468: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000746c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40007470: 02 bf ff de be 400073e8 <== NOT EXECUTED 40007474: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007478: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 4000747c: 08 bf ff db bleu 400073e8 <== NOT EXECUTED 40007480: 90 10 20 74 mov 0x74, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007484: c2 00 c0 00 ld [ %g3 ], %g1 40007488: 40 00 00 04 call 40007498 <_POSIX_RWLock_Translate_core_RWLock_return_code> 4000748c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40007490: 81 c7 e0 08 ret 40007494: 91 e8 00 08 restore %g0, %o0, %o0 400068b8 : int pthread_setcancelstate( int state, int *oldstate ) { 400068b8: 9d e3 bf 98 save %sp, -104, %sp * 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() ) 400068bc: 03 10 00 5c sethi %hi(0x40017000), %g1 400068c0: c4 00 63 bc ld [ %g1 + 0x3bc ], %g2 ! 400173bc <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 400068c4: 88 10 00 18 mov %i0, %g4 * 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() ) 400068c8: 80 a0 a0 00 cmp %g2, 0 400068cc: 12 80 00 1a bne 40006934 400068d0: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 400068d4: 80 a6 60 00 cmp %i1, 0 400068d8: 02 80 00 04 be 400068e8 400068dc: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 400068e0: 08 80 00 04 bleu 400068f0 400068e4: 07 10 00 5c sethi %hi(0x40017000), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 400068e8: 81 c7 e0 08 ret <== NOT EXECUTED 400068ec: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400068f0: 31 10 00 5c sethi %hi(0x40017000), %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400068f4: c2 00 e3 20 ld [ %g3 + 0x320 ], %g1 400068f8: c4 06 23 e0 ld [ %i0 + 0x3e0 ], %g2 400068fc: 82 00 60 01 inc %g1 40006900: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40006904: c2 20 e3 20 st %g1, [ %g3 + 0x320 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40006908: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000690c: 80 a1 20 00 cmp %g4, 0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40006910: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006914: 12 80 00 06 bne 4000692c 40006918: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 4000691c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40006920: 80 a0 60 01 cmp %g1, 1 40006924: 22 80 00 06 be,a 4000693c 40006928: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 4000692c: 40 00 0b 4f call 40009668 <_Thread_Enable_dispatch> 40006930: b0 10 20 00 clr %i0 40006934: 81 c7 e0 08 ret 40006938: 81 e8 00 00 restore _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000693c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006940: 02 bf ff fb be 4000692c <== NOT EXECUTED 40006944: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40006948: 40 00 0b 48 call 40009668 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000694c: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40006950: d0 06 23 e0 ld [ %i0 + 0x3e0 ], %o0 <== NOT EXECUTED 40006954: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40006958: 7f ff fe ca call 40006480 <_POSIX_Thread_Exit> <== NOT EXECUTED 4000695c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006960: 81 c7 e0 08 ret <== NOT EXECUTED 40006964: 81 e8 00 00 restore <== NOT EXECUTED 40006968 : int pthread_setcanceltype( int type, int *oldtype ) { 40006968: 9d e3 bf 98 save %sp, -104, %sp * 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() ) 4000696c: 03 10 00 5c sethi %hi(0x40017000), %g1 40006970: c4 00 63 bc ld [ %g1 + 0x3bc ], %g2 ! 400173bc <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 40006974: 88 10 00 18 mov %i0, %g4 * 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() ) 40006978: 80 a0 a0 00 cmp %g2, 0 4000697c: 12 80 00 1a bne 400069e4 40006980: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 40006984: 80 a6 60 00 cmp %i1, 0 40006988: 02 80 00 04 be 40006998 4000698c: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 40006990: 08 80 00 04 bleu 400069a0 40006994: 07 10 00 5c sethi %hi(0x40017000), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 40006998: 81 c7 e0 08 ret <== NOT EXECUTED 4000699c: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400069a0: 31 10 00 5c sethi %hi(0x40017000), %i0 400069a4: c2 00 e3 20 ld [ %g3 + 0x320 ], %g1 400069a8: c4 06 23 e0 ld [ %i0 + 0x3e0 ], %g2 400069ac: 82 00 60 01 inc %g1 400069b0: c2 20 e3 20 st %g1, [ %g3 + 0x320 ] 400069b4: c6 00 a1 60 ld [ %g2 + 0x160 ], %g3 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 400069b8: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 400069bc: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400069c0: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 400069c4: 80 a0 a0 00 cmp %g2, 0 400069c8: 12 80 00 05 bne 400069dc 400069cc: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ] 400069d0: 80 a1 20 01 cmp %g4, 1 400069d4: 22 80 00 06 be,a 400069ec 400069d8: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 400069dc: 40 00 0b 23 call 40009668 <_Thread_Enable_dispatch> 400069e0: b0 10 20 00 clr %i0 400069e4: 81 c7 e0 08 ret 400069e8: 81 e8 00 00 restore _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 400069ec: 80 a0 60 00 cmp %g1, 0 400069f0: 02 bf ff fb be 400069dc 400069f4: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 400069f8: 40 00 0b 1c call 40009668 <_Thread_Enable_dispatch> <== NOT EXECUTED 400069fc: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40006a00: d0 06 23 e0 ld [ %i0 + 0x3e0 ], %o0 <== NOT EXECUTED 40006a04: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40006a08: 7f ff fe 9e call 40006480 <_POSIX_Thread_Exit> <== NOT EXECUTED 40006a0c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006a10: 81 c7 e0 08 ret <== NOT EXECUTED 40006a14: 81 e8 00 00 restore <== NOT EXECUTED 4000908c : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 4000908c: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 40009090: 80 a6 a0 00 cmp %i2, 0 40009094: 22 80 00 41 be,a 40009198 40009098: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4000909c: c2 06 80 00 ld [ %i2 ], %g1 400090a0: 82 00 7f ff add %g1, -1, %g1 400090a4: 80 a0 60 fd cmp %g1, 0xfd 400090a8: 18 80 00 0a bgu 400090d0 400090ac: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400090b0: 02 80 00 0a be 400090d8 400090b4: a4 10 20 00 clr %l2 400090b8: 04 80 00 4d ble 400091ec 400090bc: 80 a6 60 02 cmp %i1, 2 400090c0: 02 80 00 48 be 400091e0 400090c4: 80 a6 60 03 cmp %i1, 3 400090c8: 02 80 00 36 be 400091a0 400090cc: 01 00 00 00 nop case OBJECTS_ERROR: break; } return ESRCH; } 400090d0: 81 c7 e0 08 ret 400090d4: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400090d8: a6 10 20 00 clr %l3 400090dc: 92 10 00 18 mov %i0, %o1 400090e0: 11 10 00 69 sethi %hi(0x4001a400), %o0 400090e4: 94 07 bf f4 add %fp, -12, %o2 400090e8: 40 00 09 11 call 4000b52c <_Objects_Get> 400090ec: 90 12 22 70 or %o0, 0x270, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400090f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400090f4: a2 10 00 08 mov %o0, %l1 400090f8: 80 a0 60 00 cmp %g1, 0 400090fc: 12 80 00 27 bne 40009198 40009100: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40009104: e0 02 21 60 ld [ %o0 + 0x160 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40009108: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 4000910c: 80 a0 60 03 cmp %g1, 3 40009110: 02 80 00 46 be 40009228 40009114: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 40009118: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 4000911c: c6 06 80 00 ld [ %i2 ], %g3 the_thread->budget_algorithm = budget_algorithm; 40009120: e4 24 60 7c st %l2, [ %l1 + 0x7c ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40009124: c6 24 20 80 st %g3, [ %l0 + 0x80 ] 40009128: c2 06 a0 04 ld [ %i2 + 4 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 4000912c: e6 24 60 80 st %l3, [ %l1 + 0x80 ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40009130: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 40009134: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009138: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 4000913c: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 40009140: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 40009144: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40009148: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 4000914c: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 40009150: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009154: 06 80 00 0f bl 40009190 40009158: c2 24 20 94 st %g1, [ %l0 + 0x94 ] 4000915c: 80 a6 60 02 cmp %i1, 2 40009160: 14 80 00 29 bg 40009204 40009164: 80 a6 60 03 cmp %i1, 3 40009168: c6 04 20 80 ld [ %l0 + 0x80 ], %g3 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 4000916c: 03 10 00 68 sethi %hi(0x4001a000), %g1 40009170: c4 00 63 38 ld [ %g1 + 0x338 ], %g2 ! 4001a338 <_Thread_Ticks_per_timeslice> 40009174: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40009178: 90 10 00 11 mov %l1, %o0 4000917c: 92 22 40 03 sub %o1, %g3, %o1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40009180: c4 24 60 78 st %g2, [ %l1 + 0x78 ] the_thread->real_priority = 40009184: d2 24 60 18 st %o1, [ %l1 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40009188: 40 00 09 a8 call 4000b828 <_Thread_Change_priority> 4000918c: 94 10 20 01 mov 1, %o2 _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 40009190: 40 00 0b 20 call 4000be10 <_Thread_Enable_dispatch> 40009194: b0 10 20 00 clr %i0 40009198: 81 c7 e0 08 ret 4000919c: 81 e8 00 00 restore case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 400091a0: 40 00 0f 19 call 4000ce04 <_Timespec_To_ticks> 400091a4: 90 06 a0 08 add %i2, 8, %o0 400091a8: a0 10 00 08 mov %o0, %l0 400091ac: 40 00 0f 16 call 4000ce04 <_Timespec_To_ticks> 400091b0: 90 06 a0 10 add %i2, 0x10, %o0 400091b4: 80 a4 00 08 cmp %l0, %o0 400091b8: 2a bf ff f8 bcs,a 40009198 400091bc: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 400091c0: c2 06 a0 04 ld [ %i2 + 4 ], %g1 400091c4: 82 00 7f ff add %g1, -1, %g1 400091c8: 80 a0 60 fd cmp %g1, 0xfd 400091cc: 18 bf ff c1 bgu 400090d0 400091d0: 03 10 00 23 sethi %hi(0x40008c00), %g1 400091d4: a4 10 20 03 mov 3, %l2 400091d8: 10 bf ff c1 b 400090dc 400091dc: a6 10 63 a8 or %g1, 0x3a8, %l3 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 400091e0: a4 10 20 02 mov 2, %l2 400091e4: 10 bf ff be b 400090dc 400091e8: a6 10 20 00 clr %l3 400091ec: 80 a6 60 00 cmp %i1, 0 400091f0: a4 10 20 01 mov 1, %l2 400091f4: 02 bf ff ba be 400090dc 400091f8: a6 10 20 00 clr %l3 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 400091fc: 81 c7 e0 08 ret 40009200: 91 e8 20 16 restore %g0, 0x16, %o0 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009204: 12 bf ff e3 bne 40009190 40009208: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 4000920c: c6 24 20 98 st %g3, [ %l0 + 0x98 ] _Watchdog_Remove( &api->Sporadic_timer ); 40009210: 40 00 10 7d call 4000d404 <_Watchdog_Remove> 40009214: 90 04 20 9c add %l0, 0x9c, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 40009218: 92 10 00 11 mov %l1, %o1 4000921c: 7f ff ff 77 call 40008ff8 <_POSIX_Threads_Sporadic_budget_TSR> 40009220: 90 10 20 00 clr %o0 40009224: 30 bf ff db b,a 40009190 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 40009228: 40 00 10 77 call 4000d404 <_Watchdog_Remove> 4000922c: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40009230: 10 bf ff bb b 4000911c 40009234: f2 24 20 7c st %i1, [ %l0 + 0x7c ] 40006a3c : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 40006a3c: 9d e3 bf 98 save %sp, -104, %sp * 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() ) 40006a40: 03 10 00 5c sethi %hi(0x40017000), %g1 40006a44: c4 00 63 bc ld [ %g1 + 0x3bc ], %g2 ! 400173bc <_ISR_Nest_level> 40006a48: 80 a0 a0 00 cmp %g2, 0 40006a4c: 12 80 00 15 bne 40006aa0 40006a50: 07 10 00 5c sethi %hi(0x40017000), %g3 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006a54: 33 10 00 5c sethi %hi(0x40017000), %i1 40006a58: c2 00 e3 20 ld [ %g3 + 0x320 ], %g1 40006a5c: c4 06 63 e0 ld [ %i1 + 0x3e0 ], %g2 40006a60: 82 00 60 01 inc %g1 40006a64: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40006a68: c2 20 e3 20 st %g1, [ %g3 + 0x320 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006a6c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 40006a70: 80 a0 60 00 cmp %g1, 0 40006a74: 12 80 00 0d bne 40006aa8 40006a78: 01 00 00 00 nop 40006a7c: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40006a80: 80 a0 60 00 cmp %g1, 0 40006a84: 02 80 00 09 be 40006aa8 40006a88: 01 00 00 00 nop thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40006a8c: 40 00 0a f7 call 40009668 <_Thread_Enable_dispatch> 40006a90: 01 00 00 00 nop if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40006a94: f0 06 63 e0 ld [ %i1 + 0x3e0 ], %i0 40006a98: 7f ff fe 7a call 40006480 <_POSIX_Thread_Exit> 40006a9c: 93 e8 3f ff restore %g0, -1, %o1 40006aa0: 81 c7 e0 08 ret <== NOT EXECUTED 40006aa4: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40006aa8: 40 00 0a f0 call 40009668 <_Thread_Enable_dispatch> 40006aac: 81 e8 00 00 restore 40006ab0: 01 00 00 00 nop <== NOT EXECUTED 40017e48 : ssize_t read( int fd, void *buffer, size_t count ) { 40017e48: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40017e4c: 03 10 00 66 sethi %hi(0x40019800), %g1 40017e50: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 40019af8 ssize_t read( int fd, void *buffer, size_t count ) { 40017e54: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40017e58: 80 a6 00 02 cmp %i0, %g2 40017e5c: 1a 80 00 24 bcc 40017eec 40017e60: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40017e64: 03 10 00 6a sethi %hi(0x4001a800), %g1 40017e68: c6 00 60 6c ld [ %g1 + 0x6c ], %g3 ! 4001a86c 40017e6c: 85 2e 20 02 sll %i0, 2, %g2 40017e70: 83 2e 20 04 sll %i0, 4, %g1 40017e74: 82 20 40 02 sub %g1, %g2, %g1 40017e78: 82 00 40 18 add %g1, %i0, %g1 40017e7c: 83 28 60 02 sll %g1, 2, %g1 40017e80: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 40017e84: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40017e88: 80 88 61 00 btst 0x100, %g1 40017e8c: 02 80 00 18 be 40017eec 40017e90: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 40017e94: 02 80 00 1c be 40017f04 40017e98: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40017e9c: 02 80 00 12 be 40017ee4 40017ea0: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40017ea4: 80 88 60 02 btst 2, %g1 40017ea8: 02 80 00 17 be 40017f04 40017eac: 01 00 00 00 nop /* * Now process the read(). */ if ( !iop->handlers->read_h ) 40017eb0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40017eb4: c2 00 60 08 ld [ %g1 + 8 ], %g1 40017eb8: 80 a0 60 00 cmp %g1, 0 40017ebc: 02 80 00 18 be 40017f1c 40017ec0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 40017ec4: 9f c0 40 00 call %g1 40017ec8: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 40017ecc: 80 a2 20 00 cmp %o0, 0 40017ed0: 04 80 00 05 ble 40017ee4 40017ed4: 01 00 00 00 nop iop->offset += rc; 40017ed8: c2 06 20 08 ld [ %i0 + 8 ], %g1 40017edc: 82 00 40 08 add %g1, %o0, %g1 40017ee0: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 40017ee4: 81 c7 e0 08 ret 40017ee8: 91 e8 00 08 restore %g0, %o0, %o0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 40017eec: 7f ff da 98 call 4000e94c <__errno> <== NOT EXECUTED 40017ef0: 01 00 00 00 nop <== NOT EXECUTED 40017ef4: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40017ef8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017efc: 10 bf ff fa b 40017ee4 <== NOT EXECUTED 40017f00: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40017f04: 7f ff da 92 call 4000e94c <__errno> <== NOT EXECUTED 40017f08: 01 00 00 00 nop <== NOT EXECUTED 40017f0c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40017f10: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017f14: 10 bf ff f4 b 40017ee4 <== NOT EXECUTED 40017f18: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40017f1c: 7f ff da 8c call 4000e94c <__errno> <== NOT EXECUTED 40017f20: 01 00 00 00 nop <== NOT EXECUTED 40017f24: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40017f28: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40017f2c: 10 bf ff ee b 40017ee4 <== NOT EXECUTED 40017f30: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400243b8 : /* * get next entry in a directory. */ struct dirent * readdir( DIR *dirp ) { 400243b8: 9d e3 bf 98 save %sp, -104, %sp register struct dirent *dp; if ( !dirp ) 400243bc: 80 a6 20 00 cmp %i0, 0 400243c0: 02 80 00 29 be 40024464 400243c4: 88 10 20 00 clr %g4 400243c8: d2 06 20 0c ld [ %i0 + 0xc ], %o1 return NULL; for (;;) { if (dirp->dd_loc == 0) { 400243cc: c4 06 20 04 ld [ %i0 + 4 ], %g2 400243d0: 80 a0 a0 00 cmp %g2, 0 400243d4: 22 80 00 1b be,a 40024440 400243d8: d0 06 00 00 ld [ %i0 ], %o0 dirp->dd_len); if (dirp->dd_size <= 0) return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 400243dc: c2 06 20 08 ld [ %i0 + 8 ], %g1 400243e0: 80 a0 40 02 cmp %g1, %g2 400243e4: 24 bf ff fa ble,a 400243cc 400243e8: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_loc = 0; continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 400243ec: 88 02 40 02 add %o1, %g2, %g4 if ((intptr_t)dp & 03) /* bogus pointer check */ 400243f0: 80 89 20 03 btst 3, %g4 400243f4: 32 80 00 1c bne,a 40024464 400243f8: 88 10 20 00 clr %g4 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 400243fc: c6 11 20 08 lduh [ %g4 + 8 ], %g3 40024400: 80 a0 e0 00 cmp %g3, 0 40024404: 02 80 00 17 be 40024460 40024408: 9a 00 80 03 add %g2, %g3, %o5 4002440c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40024410: 82 00 60 01 inc %g1 40024414: 82 20 40 02 sub %g1, %g2, %g1 40024418: 80 a0 c0 01 cmp %g3, %g1 4002441c: 34 80 00 12 bg,a 40024464 40024420: 88 10 20 00 clr %g4 <== NOT EXECUTED dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; 40024424: da 26 20 04 st %o5, [ %i0 + 4 ] if (dp->d_ino == 0) 40024428: c2 01 00 00 ld [ %g4 ], %g1 4002442c: 80 a0 60 00 cmp %g1, 0 40024430: 22 bf ff e8 be,a 400243d0 40024434: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED continue; return (dp); } } 40024438: 81 c7 e0 08 ret 4002443c: 91 e8 00 04 restore %g0, %g4, %o0 if ( !dirp ) return NULL; for (;;) { if (dirp->dd_loc == 0) { dirp->dd_size = getdents (dirp->dd_fd, 40024440: 40 00 32 e2 call 40030fc8 40024444: d4 06 20 10 ld [ %i0 + 0x10 ], %o2 dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 40024448: 80 a2 20 00 cmp %o0, 0 4002444c: 04 80 00 05 ble 40024460 40024450: d0 26 20 08 st %o0, [ %i0 + 8 ] 40024454: c4 06 20 04 ld [ %i0 + 4 ], %g2 40024458: 10 bf ff e1 b 400243dc 4002445c: d2 06 20 0c ld [ %i0 + 0xc ], %o1 return NULL; if (dp->d_reclen <= 0 || dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; if (dp->d_ino == 0) 40024460: 88 10 20 00 clr %g4 continue; return (dp); } } 40024464: 81 c7 e0 08 ret 40024468: 91 e8 00 04 restore %g0, %g4, %o0 4002446c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 4002446c: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40024470: 80 a6 60 00 cmp %i1, 0 40024474: 02 80 00 27 be 40024510 40024478: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 4002447c: a0 07 bf e8 add %fp, -24, %l0 40024480: 92 10 20 00 clr %o1 40024484: 94 10 00 10 mov %l0, %o2 40024488: 96 10 20 00 clr %o3 4002448c: 7f ff 88 ba call 40006774 40024490: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40024494: 80 a2 20 00 cmp %o0, 0 40024498: 12 80 00 1c bne 40024508 4002449c: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 400244a0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 400244a4: 80 a0 60 00 cmp %g1, 0 400244a8: 22 80 00 31 be,a 4002456c 400244ac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== 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 ){ 400244b0: 9f c0 40 00 call %g1 400244b4: 90 10 00 10 mov %l0, %o0 400244b8: 80 a2 20 04 cmp %o0, 4 400244bc: 12 80 00 1b bne 40024528 400244c0: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 400244c4: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 400244c8: 80 a0 60 00 cmp %g1, 0 400244cc: 02 80 00 27 be 40024568 400244d0: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 400244d4: 94 10 00 1a mov %i2, %o2 400244d8: 9f c0 40 00 call %g1 400244dc: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 400244e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 400244e4: 80 a0 60 00 cmp %g1, 0 400244e8: 02 80 00 08 be 40024508 400244ec: b0 10 00 08 mov %o0, %i0 400244f0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400244f4: 80 a0 60 00 cmp %g1, 0 400244f8: 02 80 00 26 be 40024590 400244fc: 01 00 00 00 nop 40024500: 9f c0 40 00 call %g1 40024504: 90 10 00 10 mov %l0, %o0 return result; } 40024508: 81 c7 e0 08 ret 4002450c: 81 e8 00 00 restore { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 40024510: 40 00 3c a2 call 40033798 <__errno> <== NOT EXECUTED 40024514: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40024518: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4002451c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024520: 81 c7 e0 08 ret <== NOT EXECUTED 40024524: 81 e8 00 00 restore <== 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 ); 40024528: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002452c: 80 a0 60 00 cmp %g1, 0 40024530: 02 80 00 08 be 40024550 40024534: 01 00 00 00 nop 40024538: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002453c: 80 a0 60 00 cmp %g1, 0 40024540: 02 80 00 04 be 40024550 40024544: 01 00 00 00 nop 40024548: 9f c0 40 00 call %g1 4002454c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40024550: 40 00 3c 92 call 40033798 <__errno> 40024554: b0 10 3f ff mov -1, %i0 40024558: 82 10 20 16 mov 0x16, %g1 4002455c: c2 22 00 00 st %g1, [ %o0 ] 40024560: 81 c7 e0 08 ret 40024564: 81 e8 00 00 restore } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 40024568: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4002456c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024570: 02 80 00 04 be 40024580 <== NOT EXECUTED 40024574: 01 00 00 00 nop <== NOT EXECUTED 40024578: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002457c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40024580: 40 00 3c 86 call 40033798 <__errno> <== NOT EXECUTED 40024584: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40024588: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4002458c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024590: 81 c7 e0 08 ret <== NOT EXECUTED 40024594: 81 e8 00 00 restore <== NOT EXECUTED 40017fb8 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 40017fb8: 9d e3 bf 90 save %sp, -112, %sp 40017fbc: 03 10 00 6a sethi %hi(0x4001a800), %g1 40017fc0: a2 10 60 d0 or %g1, 0xd0, %l1 ! 4001a8d0 40017fc4: c4 04 60 10 ld [ %l1 + 0x10 ], %g2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40017fc8: 03 10 00 6a sethi %hi(0x4001a800), %g1 40017fcc: c6 00 63 e4 ld [ %g1 + 0x3e4 ], %g3 ! 4001abe4 <_System_state_Current> { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 40017fd0: 84 00 a0 01 inc %g2 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40017fd4: 80 a0 e0 03 cmp %g3, 3 40017fd8: 02 80 00 3b be 400180c4 40017fdc: c4 24 60 10 st %g2, [ %l1 + 0x10 ] } /* * Continue with realloc(). */ if ( !ptr ) 40017fe0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40017fe4: 02 80 00 13 be 40018030 40017fe8: 80 a6 60 00 cmp %i1, 0 return malloc( size ); if ( !size ) { 40017fec: 02 80 00 2b be 40018098 40017ff0: 21 10 00 6a sethi %hi(0x4001a800), %l0 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 40017ff4: 92 10 00 18 mov %i0, %o1 40017ff8: 90 14 20 78 or %l0, 0x78, %o0 40017ffc: 40 00 00 78 call 400181dc <_Protected_heap_Get_block_size> 40018000: 94 07 bf f4 add %fp, -12, %o2 40018004: 80 8a 20 ff btst 0xff, %o0 40018008: 02 80 00 29 be 400180ac 4001800c: 90 14 20 78 or %l0, 0x78, %o0 #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 ) ) { 40018010: 92 10 00 18 mov %i0, %o1 40018014: 40 00 00 7f call 40018210 <_Protected_heap_Resize_block> 40018018: 94 10 00 19 mov %i1, %o2 4001801c: 80 8a 20 ff btst 0xff, %o0 40018020: 02 80 00 08 be 40018040 40018024: 01 00 00 00 nop memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 40018028: 81 c7 e0 08 ret 4001802c: 81 e8 00 00 restore /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 40018030: 7f ff cf 8a call 4000be58 <== NOT EXECUTED 40018034: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40018038: 81 c7 e0 08 ret <== NOT EXECUTED 4001803c: 91 e8 00 08 restore %g0, %o0, %o0 <== 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 ); 40018040: 7f ff cf 86 call 4000be58 40018044: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 40018048: c2 04 60 04 ld [ %l1 + 4 ], %g1 * 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 ); 4001804c: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 40018050: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 40018054: 80 a2 20 00 cmp %o0, 0 40018058: 02 80 00 24 be 400180e8 4001805c: c2 24 60 04 st %g1, [ %l1 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 40018060: c2 07 bf f4 ld [ %fp + -12 ], %g1 40018064: 80 a6 40 01 cmp %i1, %g1 40018068: 08 80 00 03 bleu 40018074 4001806c: 90 10 00 19 mov %i1, %o0 40018070: 90 10 00 01 mov %g1, %o0 40018074: 94 10 00 08 mov %o0, %o2 40018078: 92 10 00 18 mov %i0, %o1 4001807c: 7f ff dc 26 call 4000f114 40018080: 90 10 00 10 mov %l0, %o0 free( ptr ); 40018084: 90 10 00 18 mov %i0, %o0 40018088: 7f ff cd f5 call 4000b85c 4001808c: b0 10 00 10 mov %l0, %i0 40018090: 81 c7 e0 08 ret 40018094: 81 e8 00 00 restore */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 40018098: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001809c: 7f ff cd f0 call 4000b85c <== NOT EXECUTED 400180a0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400180a4: 81 c7 e0 08 ret <== NOT EXECUTED 400180a8: 81 e8 00 00 restore <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 400180ac: 7f ff da 28 call 4000e94c <__errno> 400180b0: b0 10 20 00 clr %i0 400180b4: 82 10 20 16 mov 0x16, %g1 400180b8: c2 22 00 00 st %g1, [ %o0 ] 400180bc: 81 c7 e0 08 ret 400180c0: 81 e8 00 00 restore /* * 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) 400180c4: 03 10 00 6a sethi %hi(0x4001a800), %g1 400180c8: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001aa40 <_Thread_Dispatch_disable_level> 400180cc: 80 a0 a0 00 cmp %g2, 0 400180d0: 12 80 00 06 bne 400180e8 400180d4: 03 10 00 6a sethi %hi(0x4001a800), %g1 return (void *) 0; if (_ISR_Nest_level > 0) 400180d8: c4 00 62 dc ld [ %g1 + 0x2dc ], %g2 ! 4001aadc <_ISR_Nest_level> 400180dc: 80 a0 a0 00 cmp %g2, 0 400180e0: 02 bf ff c1 be 40017fe4 400180e4: 80 a6 20 00 cmp %i0, 0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 400180e8: 81 c7 e0 08 ret <== NOT EXECUTED 400180ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400246d0 : #include int rmdir( const char *pathname ) { 400246d0: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 400246d4: 92 10 20 00 clr %o1 400246d8: 90 10 00 18 mov %i0, %o0 400246dc: a0 07 bf e8 add %fp, -24, %l0 400246e0: 96 10 20 00 clr %o3 400246e4: 7f ff 88 24 call 40006774 400246e8: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 400246ec: 80 a2 20 00 cmp %o0, 0 400246f0: 02 80 00 04 be 40024700 400246f4: 90 10 20 02 mov 2, %o0 result = (*loc.handlers->rmnod_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 400246f8: 81 c7 e0 08 ret 400246fc: 91 e8 3f ff restore %g0, -1, %o0 result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40024700: 7f ff 87 ed call 400066b4 40024704: 92 10 00 10 mov %l0, %o1 if (result != 0) { 40024708: 80 a2 20 00 cmp %o0, 0 4002470c: 12 80 00 2d bne 400247c0 40024710: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40024714: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40024718: 80 a0 60 00 cmp %g1, 0 4002471c: 22 80 00 35 be,a 400247f0 40024720: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 40024724: 9f c0 40 00 call %g1 40024728: 90 10 00 10 mov %l0, %o0 4002472c: 80 a2 20 01 cmp %o0, 1 40024730: 12 80 00 14 bne 40024780 40024734: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40024738: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 4002473c: 80 a0 60 00 cmp %g1, 0 40024740: 22 80 00 37 be,a 4002481c 40024744: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); 40024748: 9f c0 40 00 call %g1 4002474c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40024750: c2 07 bf f0 ld [ %fp + -16 ], %g1 40024754: 80 a0 60 00 cmp %g1, 0 40024758: 02 80 00 08 be 40024778 4002475c: b0 10 00 08 mov %o0, %i0 40024760: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40024764: 80 a0 60 00 cmp %g1, 0 40024768: 02 80 00 2b be 40024814 4002476c: 01 00 00 00 nop 40024770: 9f c0 40 00 call %g1 40024774: 90 10 00 10 mov %l0, %o0 40024778: 81 c7 e0 08 ret 4002477c: 81 e8 00 00 restore 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 ); 40024780: c2 07 bf f0 ld [ %fp + -16 ], %g1 40024784: 80 a0 60 00 cmp %g1, 0 40024788: 02 80 00 08 be 400247a8 4002478c: 01 00 00 00 nop 40024790: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40024794: 80 a0 60 00 cmp %g1, 0 40024798: 02 80 00 04 be 400247a8 4002479c: 01 00 00 00 nop 400247a0: 9f c0 40 00 call %g1 400247a4: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400247a8: 40 00 3b fc call 40033798 <__errno> 400247ac: b0 10 3f ff mov -1, %i0 400247b0: 82 10 20 14 mov 0x14, %g1 400247b4: c2 22 00 00 st %g1, [ %o0 ] 400247b8: 81 c7 e0 08 ret 400247bc: 81 e8 00 00 restore if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0) { rtems_filesystem_freenode( &loc ); 400247c0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400247c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400247c8: 02 bf ff ec be 40024778 <== NOT EXECUTED 400247cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400247d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400247d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400247d8: 02 bf ff e8 be 40024778 <== NOT EXECUTED 400247dc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400247e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400247e4: 01 00 00 00 nop <== NOT EXECUTED 400247e8: 81 c7 e0 08 ret <== NOT EXECUTED 400247ec: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 400247f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400247f4: 02 80 00 04 be 40024804 <== NOT EXECUTED 400247f8: 01 00 00 00 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 400247fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40024800: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40024804: 40 00 3b e5 call 40033798 <__errno> <== NOT EXECUTED 40024808: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002480c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40024810: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024814: 81 c7 e0 08 ret <== NOT EXECUTED 40024818: 81 e8 00 00 restore <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 4002481c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024820: 02 bf ff f9 be 40024804 <== NOT EXECUTED 40024824: 01 00 00 00 nop <== NOT EXECUTED 40024828: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002482c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024830: 12 bf ff f3 bne 400247fc <== NOT EXECUTED 40024834: 01 00 00 00 nop <== NOT EXECUTED 40024838: 30 bf ff f3 b,a 40024804 <== NOT EXECUTED 400187b4 : const char * rtems_assoc_name_bad( uint32_t bad_value ) { 400187b4: 11 10 00 aa sethi %hi(0x4002a800), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 400187b8: 81 c3 e0 08 retl <== NOT EXECUTED 400187bc: 90 12 22 30 or %o0, 0x230, %o0 ! 4002aa30 <== NOT EXECUTED 40013b90 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40013b90: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 40013b94: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40013b98: 40 00 00 0b call 40013bc4 <== NOT EXECUTED 40013b9c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 40013ba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40013ba4: 02 80 00 05 be 40013bb8 <== NOT EXECUTED 40013ba8: 01 00 00 00 nop <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 40013bac: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED 40013bb0: 81 c7 e0 08 ret <== NOT EXECUTED 40013bb4: 81 e8 00 00 restore <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 40013bb8: 40 00 12 ff call 400187b4 <== NOT EXECUTED 40013bbc: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40013bc0: 01 00 00 00 nop 4000e85c : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000e85c: 9d e3 bf 98 save %sp, -104, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000e860: d0 06 00 00 ld [ %i0 ], %o0 4000e864: 80 a2 20 00 cmp %o0, 0 4000e868: 02 80 00 1d be 4000e8dc 4000e86c: 13 10 00 64 sethi %hi(0x40019000), %o1 4000e870: 40 00 05 07 call 4000fc8c 4000e874: 92 12 63 f0 or %o1, 0x3f0, %o1 ! 400193f0 <__func__.5615+0x18> 4000e878: 80 a2 20 00 cmp %o0, 0 4000e87c: 02 80 00 11 be 4000e8c0 4000e880: 86 10 20 00 clr %g3 default_ap = ap++; for ( ; ap->name; ap++) if (ap->local_value == local_value) 4000e884: c2 06 20 04 ld [ %i0 + 4 ], %g1 4000e888: 80 a0 40 19 cmp %g1, %i1 4000e88c: 32 80 00 07 bne,a 4000e8a8 4000e890: b0 06 20 0c add %i0, 0xc, %i0 4000e894: 30 80 00 14 b,a 4000e8e4 4000e898: 80 a0 40 19 cmp %g1, %i1 4000e89c: 02 80 00 12 be 4000e8e4 4000e8a0: 01 00 00 00 nop const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000e8a4: b0 06 20 0c add %i0, 0xc, %i0 4000e8a8: c2 06 00 00 ld [ %i0 ], %g1 4000e8ac: 80 a0 60 00 cmp %g1, 0 4000e8b0: 32 bf ff fa bne,a 4000e898 4000e8b4: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (ap->local_value == local_value) return ap; return default_ap; } 4000e8b8: 81 c7 e0 08 ret 4000e8bc: 91 e8 00 03 restore %g0, %g3, %o0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000e8c0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000e8c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e8c8: 02 80 00 07 be 4000e8e4 <== NOT EXECUTED 4000e8cc: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED 4000e8d0: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED 4000e8d4: 10 bf ff ec b 4000e884 <== NOT EXECUTED 4000e8d8: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000e8dc: 81 c7 e0 08 ret <== NOT EXECUTED 4000e8e0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000e8e4: 81 c7 e0 08 ret 4000e8e8: 81 e8 00 00 restore 4000de80 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000de80: 9d e3 bf 98 save %sp, -104, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000de84: d0 06 00 00 ld [ %i0 ], %o0 4000de88: 80 a2 20 00 cmp %o0, 0 4000de8c: 02 80 00 1d be 4000df00 4000de90: 13 10 00 64 sethi %hi(0x40019000), %o1 4000de94: 40 00 07 7e call 4000fc8c 4000de98: 92 12 63 f0 or %o1, 0x3f0, %o1 ! 400193f0 <__func__.5615+0x18> 4000de9c: 80 a2 20 00 cmp %o0, 0 4000dea0: 02 80 00 11 be 4000dee4 4000dea4: 86 10 20 00 clr %g3 default_ap = ap++; for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 4000dea8: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000deac: 80 a0 40 19 cmp %g1, %i1 4000deb0: 32 80 00 07 bne,a 4000decc 4000deb4: b0 06 20 0c add %i0, 0xc, %i0 4000deb8: 30 80 00 14 b,a 4000df08 4000debc: 80 a0 40 19 cmp %g1, %i1 4000dec0: 02 80 00 12 be 4000df08 4000dec4: 01 00 00 00 nop const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000dec8: b0 06 20 0c add %i0, 0xc, %i0 4000decc: c2 06 00 00 ld [ %i0 ], %g1 4000ded0: 80 a0 60 00 cmp %g1, 0 4000ded4: 32 bf ff fa bne,a 4000debc 4000ded8: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000dedc: 81 c7 e0 08 ret 4000dee0: 91 e8 00 03 restore %g0, %g3, %o0 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000dee4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000dee8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000deec: 02 80 00 07 be 4000df08 <== NOT EXECUTED 4000def0: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED 4000def4: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED 4000def8: 10 bf ff ec b 4000dea8 <== NOT EXECUTED 4000defc: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000df00: 81 c7 e0 08 ret <== NOT EXECUTED 4000df04: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000df08: 81 c7 e0 08 ret 4000df0c: 81 e8 00 00 restore 4000df10 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000df10: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000df14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000df18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000df1c: 40 00 02 50 call 4000e85c <== NOT EXECUTED 4000df20: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000df24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000df28: 32 80 00 02 bne,a 4000df30 <== NOT EXECUTED 4000df2c: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000df30: 81 c7 e0 08 ret <== NOT EXECUTED 4000df34: 81 e8 00 00 restore <== NOT EXECUTED 40003bb4 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003bb4: 9d e3 bf 60 save %sp, -160, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40003bb8: 80 a6 60 00 cmp %i1, 0 40003bbc: 02 80 00 6e be 40003d74 40003bc0: 01 00 00 00 nop * 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. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _TOD_Get_uptime( &uptime ); 40003bc4: 40 00 15 2e call 4000907c <_TOD_Get_uptime> 40003bc8: 90 07 bf e8 add %fp, -24, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40003bcc: 92 07 bf e8 add %fp, -24, %o1 40003bd0: b4 07 bf e0 add %fp, -32, %i2 40003bd4: 11 10 00 9e sethi %hi(0x40027800), %o0 40003bd8: 94 10 00 1a mov %i2, %o2 40003bdc: 40 00 1f 80 call 4000b9dc <_Timespec_Subtract> 40003be0: 90 12 22 38 or %o0, 0x238, %o0 } } } #endif (*print)( context, "CPU Usage by thread\n" 40003be4: 90 10 00 18 mov %i0, %o0 40003be8: 13 10 00 72 sethi %hi(0x4001c800), %o1 40003bec: 9f c6 40 00 call %i1 40003bf0: 92 12 62 10 or %o1, 0x210, %o1 ! 4001ca10 <__func__.4894+0x1f8> 40003bf4: 03 10 00 9c sethi %hi(0x40027000), %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003bf8: 05 10 00 72 sethi %hi(0x4001c800), %g2 } } } #endif (*print)( context, "CPU Usage by thread\n" 40003bfc: a6 10 63 e4 or %g1, 0x3e4, %l3 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 40003c00: b6 10 a2 58 or %g2, 0x258, %i3 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003c04: 03 10 00 9d sethi %hi(0x40027400), %g1 /* * Print the information */ (*print)( context, 40003c08: 05 10 00 72 sethi %hi(0x4001c800), %g2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003c0c: a8 07 bf c0 add %fp, -64, %l4 /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003c10: b8 10 61 40 or %g1, 0x140, %i4 /* * Print the information */ (*print)( context, 40003c14: ba 10 a2 70 or %g2, 0x270, %i5 40003c18: aa 07 bf d8 add %fp, -40, %l5 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003c1c: ae 07 bf f4 add %fp, -12, %l7 40003c20: ac 07 bf f0 add %fp, -16, %l6 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40003c24: c2 04 c0 00 ld [ %l3 ], %g1 40003c28: 80 a0 60 00 cmp %g1, 0 40003c2c: 22 80 00 44 be,a 40003d3c 40003c30: a6 04 e0 04 add %l3, 4, %l3 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40003c34: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( information ) { 40003c38: 80 a4 a0 00 cmp %l2, 0 40003c3c: 22 80 00 40 be,a 40003d3c 40003c40: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40003c44: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 40003c48: 86 90 60 00 orcc %g1, 0, %g3 40003c4c: 02 80 00 3b be 40003d38 40003c50: a2 10 20 01 mov 1, %l1 the_thread = (Thread_Control *)information->local_table[ i ]; 40003c54: 10 80 00 17 b 40003cb0 40003c58: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003c5c: 96 10 00 16 mov %l6, %o3 40003c60: 90 10 00 15 mov %l5, %o0 40003c64: 40 00 1e cb call 4000b790 <_Timespec_Divide> 40003c68: 92 10 00 1a mov %i2, %o1 /* * Print the information */ (*print)( context, 40003c6c: d0 07 bf dc ld [ %fp + -36 ], %o0 40003c70: 40 00 54 ec call 40019020 <.udiv> 40003c74: 92 10 23 e8 mov 0x3e8, %o1 40003c78: d4 07 bf d8 ld [ %fp + -40 ], %o2 40003c7c: d8 07 bf f4 ld [ %fp + -12 ], %o4 40003c80: da 07 bf f0 ld [ %fp + -16 ], %o5 40003c84: 96 10 00 08 mov %o0, %o3 40003c88: 92 10 00 1d mov %i5, %o1 40003c8c: 9f c6 40 00 call %i1 40003c90: 90 10 00 18 mov %i0, %o0 40003c94: c6 14 a0 10 lduh [ %l2 + 0x10 ], %g3 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++ ) { 40003c98: 83 28 e0 10 sll %g3, 0x10, %g1 40003c9c: 83 30 60 10 srl %g1, 0x10, %g1 40003ca0: 80 a0 40 11 cmp %g1, %l1 40003ca4: 2a 80 00 26 bcs,a 40003d3c 40003ca8: a6 04 e0 04 add %l3, 4, %l3 the_thread = (Thread_Control *)information->local_table[ i ]; 40003cac: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 40003cb0: 83 2c 60 02 sll %l1, 2, %g1 40003cb4: e0 00 80 01 ld [ %g2 + %g1 ], %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003cb8: 94 10 00 14 mov %l4, %o2 40003cbc: 92 10 20 0d mov 0xd, %o1 information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 40003cc0: 80 a4 20 00 cmp %l0, 0 40003cc4: 02 bf ff f5 be 40003c98 40003cc8: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003ccc: 40 00 0f 7e call 40007ac4 40003cd0: d0 04 20 08 ld [ %l0 + 8 ], %o0 (*print)( 40003cd4: d4 04 20 08 ld [ %l0 + 8 ], %o2 40003cd8: 90 10 00 18 mov %i0, %o0 40003cdc: 92 10 00 1b mov %i3, %o1 40003ce0: 9f c6 40 00 call %i1 40003ce4: 96 10 00 14 mov %l4, %o3 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40003ce8: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003cec: c6 07 00 00 ld [ %i4 ], %g3 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40003cf0: c4 27 bf d8 st %g2, [ %fp + -40 ] 40003cf4: c2 04 20 88 ld [ %l0 + 0x88 ], %g1 40003cf8: c2 27 bf dc st %g1, [ %fp + -36 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003cfc: c4 00 e0 08 ld [ %g3 + 8 ], %g2 40003d00: c2 04 20 08 ld [ %l0 + 8 ], %g1 40003d04: 80 a0 80 01 cmp %g2, %g1 40003d08: 32 bf ff d5 bne,a 40003c5c 40003d0c: 94 10 00 17 mov %l7, %o2 struct timespec used; _Timespec_Subtract( 40003d10: 92 07 bf e8 add %fp, -24, %o1 40003d14: 94 07 bf d0 add %fp, -48, %o2 40003d18: 11 10 00 9d sethi %hi(0x40027400), %o0 40003d1c: 40 00 1f 30 call 4000b9dc <_Timespec_Subtract> 40003d20: 90 12 21 48 or %o0, 0x148, %o0 ! 40027548 <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 40003d24: 90 10 00 15 mov %l5, %o0 40003d28: 40 00 1e 80 call 4000b728 <_Timespec_Add_to> 40003d2c: 92 07 bf d0 add %fp, -48, %o1 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003d30: 10 bf ff cb b 40003c5c 40003d34: 94 10 00 17 mov %l7, %o2 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++ ) { 40003d38: a6 04 e0 04 add %l3, 4, %l3 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40003d3c: 03 10 00 9c sethi %hi(0x40027000), %g1 40003d40: 82 10 63 f4 or %g1, 0x3f4, %g1 ! 400273f4 <_Objects_Information_table+0x14> 40003d44: 80 a4 c0 01 cmp %l3, %g1 40003d48: 32 bf ff b8 bne,a 40003c28 40003d4c: c2 04 c0 00 ld [ %l3 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 40003d50: d0 07 bf e4 ld [ %fp + -28 ], %o0 40003d54: 40 00 54 b3 call 40019020 <.udiv> 40003d58: 92 10 23 e8 mov 0x3e8, %o1 40003d5c: d4 07 bf e0 ld [ %fp + -32 ], %o2 40003d60: 96 10 00 08 mov %o0, %o3 40003d64: 13 10 00 72 sethi %hi(0x4001c800), %o1 40003d68: 90 10 00 18 mov %i0, %o0 40003d6c: 9f c6 40 00 call %i1 40003d70: 92 12 62 88 or %o1, 0x288, %o1 40003d74: 81 c7 e0 08 ret 40003d78: 81 e8 00 00 restore 4000da38 : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 4000da38: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) 4000da3c: 11 10 00 64 sethi %hi(0x40019000), %o0 <== NOT EXECUTED 4000da40: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000da44: 40 00 01 33 call 4000df10 <== NOT EXECUTED 4000da48: 90 12 22 d4 or %o0, 0x2d4, %o0 <== NOT EXECUTED 4000da4c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000da50: 02 80 00 05 be 4000da64 <== NOT EXECUTED 4000da54: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000da58: 40 00 03 bd call 4000e94c <__errno> <== NOT EXECUTED 4000da5c: 01 00 00 00 nop <== NOT EXECUTED 4000da60: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000da64: 81 c7 e0 08 ret <== NOT EXECUTED 4000da68: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40008fbc : int rtems_error( int error_flag, const char *printf_format, ... ) { 40008fbc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40008fc0: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 40008fc4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008fc8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008fcc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008fd0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 40008fd4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008fd8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008fdc: 7f ff ff 71 call 40008da0 <== NOT EXECUTED 40008fe0: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40008fe4: 81 c7 e0 08 ret <== NOT EXECUTED 40008fe8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400030dc : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 400030dc: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 400030e0: 80 a6 60 00 cmp %i1, 0 400030e4: 02 80 00 28 be 40003184 400030e8: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 400030ec: c8 06 60 08 ld [ %i1 + 8 ], %g4 400030f0: da 01 00 00 ld [ %g4 ], %o5 400030f4: 80 a3 60 00 cmp %o5, 0 400030f8: 02 80 00 1d be 4000316c 400030fc: 11 10 00 63 sethi %hi(0x40018c00), %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 40003100: c6 06 60 0c ld [ %i1 + 0xc ], %g3 40003104: c2 06 40 00 ld [ %i1 ], %g1 40003108: c4 06 60 04 ld [ %i1 + 4 ], %g2 4000310c: c2 27 bf e8 st %g1, [ %fp + -24 ] 40003110: c4 27 bf ec st %g2, [ %fp + -20 ] 40003114: c8 27 bf f0 st %g4, [ %fp + -16 ] 40003118: c6 27 bf f4 st %g3, [ %fp + -12 ] result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 4000311c: b2 07 bf e8 add %fp, -24, %i1 40003120: 90 12 20 38 or %o0, 0x38, %o0 40003124: 9f c3 40 00 call %o5 40003128: 94 10 00 19 mov %i1, %o2 if (result != 0){ 4000312c: b0 92 20 00 orcc %o0, 0, %i0 40003130: 12 80 00 0d bne 40003164 40003134: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; } rtems_filesystem_freenode( &parent ); 40003138: 80 a0 60 00 cmp %g1, 0 4000313c: 02 80 00 16 be 40003194 40003140: 01 00 00 00 nop 40003144: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003148: 80 a0 60 00 cmp %g1, 0 4000314c: 02 80 00 12 be 40003194 40003150: 01 00 00 00 nop 40003154: 9f c0 40 00 call %g1 40003158: 90 10 00 19 mov %i1, %o0 return result; } 4000315c: 81 c7 e0 08 ret 40003160: 81 e8 00 00 restore if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 40003164: 81 c7 e0 08 ret <== NOT EXECUTED 40003168: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000316c: 40 00 2d f8 call 4000e94c <__errno> <== NOT EXECUTED 40003170: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003174: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003178: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000317c: 81 c7 e0 08 ret <== NOT EXECUTED 40003180: 81 e8 00 00 restore <== NOT EXECUTED { rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40003184: 40 00 2d f2 call 4000e94c <__errno> <== NOT EXECUTED 40003188: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000318c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40003190: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003194: 81 c7 e0 08 ret <== NOT EXECUTED 40003198: 81 e8 00 00 restore <== NOT EXECUTED 4000319c : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 4000319c: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 400031a0: 80 a6 20 00 cmp %i0, 0 400031a4: 02 80 00 50 be 400032e4 400031a8: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 400031ac: 02 80 00 54 be 400032fc 400031b0: 01 00 00 00 nop /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 400031b4: c2 4e 00 00 ldsb [ %i0 ], %g1 400031b8: 80 a0 60 2f cmp %g1, 0x2f 400031bc: 02 80 00 06 be 400031d4 400031c0: 80 a0 60 5c cmp %g1, 0x5c 400031c4: 02 80 00 04 be 400031d4 400031c8: 80 a0 60 00 cmp %g1, 0 400031cc: 12 80 00 27 bne 40003268 400031d0: 03 10 00 68 sethi %hi(0x4001a000), %g1 400031d4: 03 10 00 68 sethi %hi(0x4001a000), %g1 400031d8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 ! 4001a01c 400031dc: 88 10 20 01 mov 1, %g4 400031e0: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 400031e4: c2 26 80 00 st %g1, [ %i2 ] 400031e8: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 400031ec: c4 26 a0 04 st %g2, [ %i2 + 4 ] 400031f0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 400031f4: c2 26 a0 08 st %g1, [ %i2 + 8 ] 400031f8: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 400031fc: c4 26 a0 0c st %g2, [ %i2 + 0xc ] if ( !pathloc->ops->evalpath_h ) 40003200: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40003204: c2 00 40 00 ld [ %g1 ], %g1 40003208: 80 a0 60 00 cmp %g1, 0 4000320c: 02 80 00 30 be 400032cc 40003210: 90 06 00 04 add %i0, %g4, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 40003214: 92 10 00 19 mov %i1, %o1 40003218: 9f c0 40 00 call %g1 4000321c: 94 10 00 1a mov %i2, %o2 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 40003220: b0 92 20 00 orcc %o0, 0, %i0 40003224: 12 80 00 0f bne 40003260 40003228: 80 a6 e0 00 cmp %i3, 0 4000322c: 02 80 00 38 be 4000330c 40003230: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40003234: c4 06 a0 08 ld [ %i2 + 8 ], %g2 40003238: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000323c: 80 a0 60 00 cmp %g1, 0 40003240: 22 80 00 1e be,a 400032b8 40003244: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 40003248: 9f c0 40 00 call %g1 4000324c: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 40003250: 90 02 3f fd add %o0, -3, %o0 40003254: 80 a2 20 01 cmp %o0, 1 40003258: 28 80 00 0f bleu,a 40003294 4000325c: c4 06 a0 08 ld [ %i2 + 8 ], %g2 } } return result; } 40003260: 81 c7 e0 08 ret 40003264: 81 e8 00 00 restore /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40003268: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 4000326c: 88 10 20 00 clr %g4 40003270: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40003274: c2 26 80 00 st %g1, [ %i2 ] 40003278: c4 00 e0 08 ld [ %g3 + 8 ], %g2 4000327c: c4 26 a0 04 st %g2, [ %i2 + 4 ] 40003280: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40003284: c2 26 a0 08 st %g1, [ %i2 + 8 ] 40003288: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 4000328c: 10 bf ff dd b 40003200 40003290: c4 26 a0 0c st %g2, [ %i2 + 0xc ] type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 40003294: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40003298: 80 a0 60 00 cmp %g1, 0 4000329c: 02 80 00 06 be 400032b4 400032a0: 90 10 00 1a mov %i2, %o0 * 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 ); 400032a4: 9f c0 40 00 call %g1 400032a8: 92 10 00 19 mov %i1, %o1 } } return result; } 400032ac: 81 c7 e0 08 ret 400032b0: 91 e8 00 08 restore %g0, %o0, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 400032b4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400032b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400032bc: 02 80 00 04 be 400032cc <== NOT EXECUTED 400032c0: 01 00 00 00 nop <== NOT EXECUTED 400032c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400032c8: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400032cc: 40 00 2d a0 call 4000e94c <__errno> <== NOT EXECUTED 400032d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400032d4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400032d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400032dc: 81 c7 e0 08 ret <== NOT EXECUTED 400032e0: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 400032e4: 40 00 2d 9a call 4000e94c <__errno> 400032e8: b0 10 3f ff mov -1, %i0 400032ec: 82 10 20 0e mov 0xe, %g1 400032f0: c2 22 00 00 st %g1, [ %o0 ] 400032f4: 81 c7 e0 08 ret 400032f8: 81 e8 00 00 restore if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400032fc: 40 00 2d 94 call 4000e94c <__errno> <== NOT EXECUTED 40003300: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003304: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 40003308: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000330c: 81 c7 e0 08 ret 40003310: 81 e8 00 00 restore 4000b608 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 4000b608: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 4000b60c: 25 10 00 68 sethi %hi(0x4001a000), %l2 4000b610: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 ! 4001a01c 4000b614: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 4000b618: 40 00 02 59 call 4000bf7c 4000b61c: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 4000b620: 03 10 00 62 sethi %hi(0x40018800), %g1 4000b624: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 ! 4001881c 4000b628: 80 a0 a0 00 cmp %g2, 0 4000b62c: 02 80 00 3d be 4000b720 4000b630: 03 10 00 66 sethi %hi(0x40019800), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4000b634: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 40019b00 status = mount( 4000b638: 90 07 bf f4 add %fp, -12, %o0 4000b63c: d8 00 a0 0c ld [ %g2 + 0xc ], %o4 4000b640: d2 00 80 00 ld [ %g2 ], %o1 4000b644: d4 00 a0 04 ld [ %g2 + 4 ], %o2 4000b648: 40 00 02 55 call 4000bf9c 4000b64c: d6 00 a0 08 ld [ %g2 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4000b650: 80 a2 3f ff cmp %o0, -1 4000b654: 02 80 00 36 be 4000b72c 4000b658: c8 07 bf f4 ld [ %fp + -12 ], %g4 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4000b65c: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000b660: c4 01 20 18 ld [ %g4 + 0x18 ], %g2 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4000b664: c0 30 60 26 clrh [ %g1 + 0x26 ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000b668: c4 20 60 14 st %g2, [ %g1 + 0x14 ] 4000b66c: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b670: a0 07 bf e4 add %fp, -28, %l0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000b674: c6 20 60 18 st %g3, [ %g1 + 0x18 ] 4000b678: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b67c: 23 10 00 63 sethi %hi(0x40018c00), %l1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000b680: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4000b684: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b688: 92 10 20 00 clr %o1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000b68c: c6 20 60 20 st %g3, [ %g1 + 0x20 ] /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b690: 94 10 00 10 mov %l0, %o2 4000b694: 96 10 20 00 clr %o3 4000b698: 7f ff de c1 call 4000319c 4000b69c: 90 14 63 a8 or %l1, 0x3a8, %o0 rtems_filesystem_root = loc; 4000b6a0: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 4000b6a4: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b6a8: 94 10 00 10 mov %l0, %o2 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000b6ac: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 4000b6b0: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b6b4: 92 10 20 00 clr %o1 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000b6b8: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 4000b6bc: c2 07 bf ec ld [ %fp + -20 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b6c0: 96 10 20 00 clr %o3 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000b6c4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 4000b6c8: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000b6cc: 90 14 63 a8 or %l1, 0x3a8, %o0 4000b6d0: 7f ff de b3 call 4000319c 4000b6d4: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 4000b6d8: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000b6dc: c6 04 a0 1c ld [ %l2 + 0x1c ], %g3 * * 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); 4000b6e0: 11 10 00 63 sethi %hi(0x40018c00), %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000b6e4: c2 20 e0 04 st %g1, [ %g3 + 4 ] 4000b6e8: c2 07 bf e8 ld [ %fp + -24 ], %g1 * * 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); 4000b6ec: 90 12 23 b0 or %o0, 0x3b0, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000b6f0: c2 20 e0 08 st %g1, [ %g3 + 8 ] 4000b6f4: c2 07 bf ec ld [ %fp + -20 ], %g1 * * 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); 4000b6f8: 92 10 21 ff mov 0x1ff, %o1 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000b6fc: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 4000b700: c4 07 bf f0 ld [ %fp + -16 ], %g2 * * 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); 4000b704: 40 00 02 14 call 4000bf54 4000b708: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] if ( status != 0 ) 4000b70c: 80 a2 20 00 cmp %o0, 0 4000b710: 12 80 00 0a bne 4000b738 4000b714: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 4000b718: 81 c7 e0 08 ret 4000b71c: 81 e8 00 00 restore /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 4000b720: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000b724: 7f ff ee 50 call 40007064 <== NOT EXECUTED 4000b728: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <== NOT EXECUTED status = mount( &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); 4000b72c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000b730: 7f ff ee 4d call 40007064 <== NOT EXECUTED 4000b734: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) rtems_fatal_error_occurred( 0xABCD0003 ); 4000b738: 7f ff ee 4b call 40007064 <== NOT EXECUTED 4000b73c: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED 4000b740: 01 00 00 00 nop 40024cb4 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 40024cb4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40024cb8: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 40024cbc: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 40024cc0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 40024cc4: 81 c3 e0 08 retl <== NOT EXECUTED 40024cc8: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40002f40 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40002f40: 9d e3 bf 88 save %sp, -120, %sp <== 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, 0x00, &loc, true ); 40002f44: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002f48: a2 07 bf e8 add %fp, -24, %l1 <== NOT EXECUTED 40002f4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002f50: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40002f54: 40 00 00 92 call 4000319c <== NOT EXECUTED 40002f58: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002f5c: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== 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, 0x00, &loc, true ); 40002f60: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002f64: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40002f68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f6c: 02 80 00 28 be 4000300c <== NOT EXECUTED 40002f70: e4 07 bf e8 ld [ %fp + -24 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } node_type = (*loc.ops->node_type_h)( &loc ); 40002f74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f78: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40002f7c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40002f80: 02 80 00 0e be 40002fb8 <== NOT EXECUTED 40002f84: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002f88: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40002f8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f90: 02 80 00 2b be 4000303c <== NOT EXECUTED 40002f94: 01 00 00 00 nop <== NOT EXECUTED 40002f98: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002f9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002fa0: 02 80 00 27 be 4000303c <== NOT EXECUTED 40002fa4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40002fa8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002fac: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED 40002fb0: 81 c7 e0 08 ret <== NOT EXECUTED 40002fb4: 81 e8 00 00 restore <== 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 ) { 40002fb8: 12 bf ff f5 bne 40002f8c <== NOT EXECUTED 40002fbc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 40002fc0: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 40002fc4: 40 00 33 84 call 4000fdd4 <== NOT EXECUTED 40002fc8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002fcc: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40002fd0: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40002fd4: c6 07 bf f0 ld [ %fp + -16 ], %g3 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); device_info->major = the_jnode->info.device.major; 40002fd8: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40002fdc: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002fe0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40002fe4: 02 80 00 18 be 40003044 <== NOT EXECUTED 40002fe8: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40002fec: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 40002ff0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002ff4: 02 80 00 14 be 40003044 <== NOT EXECUTED 40002ff8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40002ffc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003000: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003004: 81 c7 e0 08 ret <== NOT EXECUTED 40003008: 81 e8 00 00 restore <== NOT EXECUTED result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true ); the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 4000300c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40003010: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003014: 02 80 00 04 be 40003024 <== NOT EXECUTED 40003018: 01 00 00 00 nop <== NOT EXECUTED 4000301c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003020: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003024: 40 00 2e 4a call 4000e94c <__errno> <== NOT EXECUTED 40003028: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000302c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40003030: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003034: 81 c7 e0 08 ret <== NOT EXECUTED 40003038: 81 e8 00 00 restore <== 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 ); 4000303c: 81 c7 e0 08 ret <== NOT EXECUTED 40003040: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 40003044: 81 c7 e0 08 ret <== NOT EXECUTED 40003048: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000807c : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 4000807c: 9a 92 60 00 orcc %o1, 0, %o5 40008080: 02 80 00 4d be 400081b4 40008084: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40008088: 02 80 00 4c be 400081b8 4000808c: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40008090: c2 03 40 00 ld [ %o5 ], %g1 40008094: 80 a0 60 00 cmp %g1, 0 40008098: 22 80 00 44 be,a 400081a8 4000809c: c2 03 60 04 ld [ %o5 + 4 ], %g1 *registered_major = 0; /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 400080a0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 400080a4: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 400080a8: c8 00 62 70 ld [ %g1 + 0x270 ], %g4 400080ac: 80 a1 00 08 cmp %g4, %o0 400080b0: 08 80 00 39 bleu 40008194 400080b4: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 400080b8: 80 a2 20 00 cmp %o0, 0 400080bc: 12 80 00 29 bne 40008160 400080c0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 400080c4: 90 81 3f ff addcc %g4, -1, %o0 400080c8: 02 80 00 35 be 4000819c 400080cc: 05 10 00 7b sethi %hi(0x4001ec00), %g2 400080d0: c6 00 a2 74 ld [ %g2 + 0x274 ], %g3 ! 4001ee74 <_IO_Driver_address_table> 400080d4: 85 29 20 03 sll %g4, 3, %g2 400080d8: 83 29 20 05 sll %g4, 5, %g1 400080dc: 82 20 40 02 sub %g1, %g2, %g1 400080e0: 82 00 7f e8 add %g1, -24, %g1 400080e4: 10 80 00 05 b 400080f8 400080e8: 84 00 c0 01 add %g3, %g1, %g2 400080ec: 90 82 3f ff addcc %o0, -1, %o0 400080f0: 02 80 00 2b be 4000819c 400080f4: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 400080f8: c2 00 80 00 ld [ %g2 ], %g1 400080fc: 80 a0 60 00 cmp %g1, 0 40008100: 12 bf ff fb bne 400080ec 40008104: 88 10 00 02 mov %g2, %g4 40008108: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000810c: 80 a0 60 00 cmp %g1, 0 40008110: 32 bf ff f8 bne,a 400080f0 40008114: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008118: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 4000811c: d0 22 80 00 st %o0, [ %o2 ] if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008120: c2 21 00 00 st %g1, [ %g4 ] 40008124: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008128: 92 10 20 00 clr %o1 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 4000812c: c4 21 20 04 st %g2, [ %g4 + 4 ] 40008130: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008134: 94 10 20 00 clr %o2 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008138: c2 21 20 08 st %g1, [ %g4 + 8 ] 4000813c: c4 03 60 0c ld [ %o5 + 0xc ], %g2 40008140: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40008144: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 40008148: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 4000814c: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 40008150: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008154: 82 13 c0 00 mov %o7, %g1 40008158: 7f ff ff 48 call 40007e78 4000815c: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40008160: c8 00 62 74 ld [ %g1 + 0x274 ], %g4 40008164: 85 2a 20 03 sll %o0, 3, %g2 40008168: 83 2a 20 05 sll %o0, 5, %g1 4000816c: 82 20 40 02 sub %g1, %g2, %g1 40008170: c6 01 00 01 ld [ %g4 + %g1 ], %g3 40008174: 80 a0 e0 00 cmp %g3, 0 40008178: 12 80 00 06 bne 40008190 4000817c: 88 01 00 01 add %g4, %g1, %g4 40008180: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 40008184: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008188: 22 bf ff e5 be,a 4000811c <== NOT EXECUTED 4000818c: c2 03 40 00 ld [ %o5 ], %g1 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40008190: 82 10 20 0c mov 0xc, %g1 } 40008194: 81 c3 e0 08 retl 40008198: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 4000819c: 82 10 20 05 mov 5, %g1 } 400081a0: 81 c3 e0 08 retl 400081a4: 90 10 00 01 mov %g1, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 400081a8: 80 a0 60 00 cmp %g1, 0 400081ac: 12 bf ff be bne 400080a4 400081b0: 03 10 00 7b sethi %hi(0x4001ec00), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 400081b4: 82 10 20 09 mov 9, %g1 } 400081b8: 81 c3 e0 08 retl 400081bc: 90 10 00 01 mov %g1, %o0 40009538 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40009538: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 4000953c: 80 a6 20 00 cmp %i0, 0 40009540: 02 80 00 23 be 400095cc 40009544: 03 10 00 9c sethi %hi(0x40027000), %g1 return; 40009548: a4 10 63 e4 or %g1, 0x3e4, %l2 ! 400273e4 <_Objects_Information_table+0x4> 4000954c: a6 04 a0 10 add %l2, 0x10, %l3 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40009550: c2 04 80 00 ld [ %l2 ], %g1 40009554: 80 a0 60 00 cmp %g1, 0 40009558: 22 80 00 1a be,a 400095c0 4000955c: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40009560: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40009564: 80 a4 60 00 cmp %l1, 0 40009568: 22 80 00 16 be,a 400095c0 4000956c: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40009570: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40009574: 86 90 60 00 orcc %g1, 0, %g3 40009578: 22 80 00 12 be,a 400095c0 4000957c: a4 04 a0 04 add %l2, 4, %l2 40009580: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 40009584: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40009588: 83 2c 20 02 sll %l0, 2, %g1 4000958c: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 40009590: 80 a2 20 00 cmp %o0, 0 40009594: 02 80 00 05 be 400095a8 40009598: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 4000959c: 9f c6 00 00 call %i0 400095a0: 01 00 00 00 nop 400095a4: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 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++ ) { 400095a8: 83 28 e0 10 sll %g3, 0x10, %g1 400095ac: 83 30 60 10 srl %g1, 0x10, %g1 400095b0: 80 a0 40 10 cmp %g1, %l0 400095b4: 3a bf ff f5 bcc,a 40009588 400095b8: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 400095bc: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 400095c0: 80 a4 80 13 cmp %l2, %l3 400095c4: 32 bf ff e4 bne,a 40009554 400095c8: c2 04 80 00 ld [ %l2 ], %g1 400095cc: 81 c7 e0 08 ret 400095d0: 81 e8 00 00 restore 4000bc90 : * 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 ) { 4000bc90: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_t *iop, *next; rtems_status_code rc; rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4000bc94: 23 10 00 6a sethi %hi(0x4001a800), %l1 4000bc98: d0 04 60 74 ld [ %l1 + 0x74 ], %o0 ! 4001a874 4000bc9c: 92 10 20 00 clr %o1 4000bca0: 7f ff eb 2e call 40006958 4000bca4: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000bca8: 21 10 00 6a sethi %hi(0x4001a800), %l0 4000bcac: c4 04 20 70 ld [ %l0 + 0x70 ], %g2 ! 4001a870 4000bcb0: 80 a0 a0 00 cmp %g2, 0 4000bcb4: 12 80 00 07 bne 4000bcd0 4000bcb8: 03 10 00 6a sethi %hi(0x4001a800), %g1 } failed: iop = 0; done: 4000bcbc: b0 10 20 00 clr %i0 rtems_semaphore_release( rtems_libio_semaphore ); 4000bcc0: 7f ff eb 6e call 40006a78 4000bcc4: d0 04 60 74 ld [ %l1 + 0x74 ], %o0 return iop; } 4000bcc8: 81 c7 e0 08 ret 4000bccc: 81 e8 00 00 restore rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 4000bcd0: c6 00 60 6c ld [ %g1 + 0x6c ], %g3 4000bcd4: 92 10 20 01 mov 1, %o1 4000bcd8: 86 20 80 03 sub %g2, %g3, %g3 4000bcdc: 87 38 e0 02 sra %g3, 2, %g3 4000bce0: 83 28 e0 02 sll %g3, 2, %g1 4000bce4: 85 28 e0 06 sll %g3, 6, %g2 4000bce8: 84 20 80 01 sub %g2, %g1, %g2 4000bcec: 83 28 a0 06 sll %g2, 6, %g1 4000bcf0: 82 20 40 02 sub %g1, %g2, %g1 4000bcf4: 85 28 60 0c sll %g1, 0xc, %g2 4000bcf8: 82 00 40 02 add %g1, %g2, %g1 4000bcfc: 82 00 40 03 add %g1, %g3, %g1 4000bd00: 83 28 60 04 sll %g1, 4, %g1 4000bd04: 82 20 40 03 sub %g1, %g3, %g1 4000bd08: 83 28 60 02 sll %g1, 2, %g1 4000bd0c: 86 20 c0 01 sub %g3, %g1, %g3 4000bd10: 94 10 20 54 mov 0x54, %o2 4000bd14: 96 10 20 00 clr %o3 4000bd18: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000bd1c: 98 07 bf f4 add %fp, -12, %o4 4000bd20: 90 12 21 00 or %o0, 0x100, %o0 4000bd24: 7f ff ea 66 call 400066bc 4000bd28: 90 10 c0 08 or %g3, %o0, %o0 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 4000bd2c: 80 a2 20 00 cmp %o0, 0 4000bd30: 32 bf ff e4 bne,a 4000bcc0 4000bd34: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000bd38: f0 04 20 70 ld [ %l0 + 0x70 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4000bd3c: 84 10 21 00 mov 0x100, %g2 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000bd40: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000bd44: c0 26 20 20 clr [ %i0 + 0x20 ] 4000bd48: c0 26 00 00 clr [ %i0 ] 4000bd4c: c0 26 20 04 clr [ %i0 + 4 ] 4000bd50: c0 26 20 08 clr [ %i0 + 8 ] 4000bd54: c0 26 20 10 clr [ %i0 + 0x10 ] 4000bd58: c0 26 20 14 clr [ %i0 + 0x14 ] 4000bd5c: c0 26 20 18 clr [ %i0 + 0x18 ] 4000bd60: c0 26 20 1c clr [ %i0 + 0x1c ] 4000bd64: c0 26 20 24 clr [ %i0 + 0x24 ] 4000bd68: c0 26 20 2c clr [ %i0 + 0x2c ] 4000bd6c: c0 26 20 30 clr [ %i0 + 0x30 ] 4000bd70: c0 26 20 28 clr [ %i0 + 0x28 ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4000bd74: c2 24 20 70 st %g1, [ %l0 + 0x70 ] goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000bd78: c2 07 bf f4 ld [ %fp + -12 ], %g1 if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 4000bd7c: c4 26 20 0c st %g2, [ %i0 + 0xc ] iop->sem = sema; 4000bd80: 10 bf ff d0 b 4000bcc0 4000bd84: c2 26 20 20 st %g1, [ %i0 + 0x20 ] 40003314 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 40003314: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 40003318: 21 10 00 66 sethi %hi(0x40019800), %l0 4000331c: d0 04 22 f8 ld [ %l0 + 0x2f8 ], %o0 ! 40019af8 40003320: 80 a2 20 00 cmp %o0, 0 40003324: 22 80 00 1e be,a 4000339c 40003328: 11 13 10 92 sethi %hi(0x4c424800), %o0 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 4000332c: 40 00 21 06 call 4000b744 40003330: 92 10 20 34 mov 0x34, %o1 40003334: 03 10 00 6a sethi %hi(0x4001a800), %g1 40003338: d0 20 60 6c st %o0, [ %g1 + 0x6c ] ! 4001a86c sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 4000333c: 80 a2 20 00 cmp %o0, 0 40003340: 02 80 00 23 be 400033cc 40003344: 84 10 00 08 mov %o0, %g2 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40003348: c8 04 22 f8 ld [ %l0 + 0x2f8 ], %g4 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); iop = rtems_libio_iop_freelist = rtems_libio_iops; 4000334c: 03 10 00 6a sethi %hi(0x4001a800), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 40003350: 80 a1 20 01 cmp %g4, 1 40003354: 02 80 00 10 be 40003394 40003358: d0 20 60 70 st %o0, [ %g1 + 0x70 ] 4000335c: 82 02 20 34 add %o0, 0x34, %g1 40003360: 86 10 20 01 mov 1, %g3 iop->data1 = iop + 1; 40003364: c2 20 7f f4 st %g1, [ %g1 + -12 ] 40003368: 86 00 e0 01 inc %g3 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 < (rtems_libio_number_iops - 1) ; i++, iop++) 4000336c: 80 a0 c0 04 cmp %g3, %g4 40003370: 12 bf ff fd bne 40003364 40003374: 82 00 60 34 add %g1, 0x34, %g1 40003378: 85 28 e0 02 sll %g3, 2, %g2 4000337c: 83 28 e0 04 sll %g3, 4, %g1 40003380: 82 20 40 02 sub %g1, %g2, %g1 40003384: 82 00 40 03 add %g1, %g3, %g1 40003388: 83 28 60 02 sll %g1, 2, %g1 4000338c: 82 00 7f cc add %g1, -52, %g1 40003390: 84 02 00 01 add %o0, %g1, %g2 iop->data1 = iop + 1; iop->data1 = NULL; 40003394: c0 20 a0 28 clr [ %g2 + 0x28 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 40003398: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000339c: 92 10 20 01 mov 1, %o1 400033a0: 90 12 21 4f or %o0, 0x14f, %o0 400033a4: 94 10 20 54 mov 0x54, %o2 400033a8: 96 10 20 00 clr %o3 400033ac: 19 10 00 6a sethi %hi(0x4001a800), %o4 400033b0: 40 00 0c c3 call 400066bc 400033b4: 98 13 20 74 or %o4, 0x74, %o4 ! 4001a874 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 400033b8: 80 a2 20 00 cmp %o0, 0 400033bc: 12 80 00 06 bne 400033d4 400033c0: 01 00 00 00 nop /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 400033c4: 40 00 20 91 call 4000b608 400033c8: 81 e8 00 00 restore 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); 400033cc: 40 00 0f 26 call 40007064 <== NOT EXECUTED 400033d0: 90 10 20 1a mov 0x1a, %o0 <== 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 ); 400033d4: 40 00 0f 24 call 40007064 <== NOT EXECUTED 400033d8: 01 00 00 00 nop 400033dc: 01 00 00 00 nop 4002426c : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 4002426c: 9d e3 bf 80 save %sp, -128, %sp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 40024270: 90 10 20 00 clr %o0 40024274: 92 10 20 00 clr %o1 40024278: 40 00 06 ec call 40025e28 4002427c: 94 07 bf f4 add %fp, -12, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 40024280: b0 92 20 00 orcc %o0, 0, %i0 40024284: 12 80 00 37 bne 40024360 40024288: 25 10 01 32 sethi %hi(0x4004c800), %l2 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 4002428c: c4 04 a3 44 ld [ %l2 + 0x344 ], %g2 ! 4004cb44 40024290: 03 10 01 86 sethi %hi(0x40061800), %g1 40024294: a6 10 62 9c or %g1, 0x29c, %l3 ! 40061a9c 40024298: 80 a0 80 13 cmp %g2, %l3 4002429c: 02 80 00 33 be 40024368 400242a0: a2 14 a3 44 or %l2, 0x344, %l1 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 400242a4: d0 04 a3 44 ld [ %l2 + 0x344 ], %o0 400242a8: 92 10 00 13 mov %l3, %o1 400242ac: 40 00 47 28 call 40035f4c 400242b0: 94 10 20 40 mov 0x40, %o2 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400242b4: 03 10 01 84 sethi %hi(0x40061000), %g1 400242b8: c8 00 62 a8 ld [ %g1 + 0x2a8 ], %g4 ! 400612a8 } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 400242bc: c4 04 a3 44 ld [ %l2 + 0x344 ], %g2 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400242c0: c2 01 20 18 ld [ %g4 + 0x18 ], %g1 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 400242c4: a2 07 bf e4 add %fp, -28, %l1 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400242c8: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 400242cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400242d0: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 400242d4: c2 20 80 00 st %g1, [ %g2 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400242d8: c6 20 a0 18 st %g3, [ %g2 + 0x18 ] 400242dc: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 400242e0: 21 10 01 1b sethi %hi(0x40046c00), %l0 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400242e4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 400242e8: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 400242ec: 92 10 20 00 clr %o1 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 400242f0: c6 20 a0 20 st %g3, [ %g2 + 0x20 ] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 400242f4: 94 10 00 11 mov %l1, %o2 400242f8: 96 10 20 00 clr %o3 400242fc: 7f ff 89 1e call 40006774 40024300: 90 14 23 e0 or %l0, 0x3e0, %o0 rtems_filesystem_root = loc; 40024304: c4 04 a3 44 ld [ %l2 + 0x344 ], %g2 40024308: c2 07 bf e4 ld [ %fp + -28 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4002430c: 90 14 23 e0 or %l0, 0x3e0, %o0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 40024310: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 40024314: c2 07 bf e8 ld [ %fp + -24 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40024318: 94 10 00 11 mov %l1, %o2 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4002431c: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 40024320: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40024324: 92 10 20 00 clr %o1 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 40024328: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 4002432c: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40024330: 96 10 20 00 clr %o3 40024334: 7f ff 89 10 call 40006774 40024338: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 4002433c: c2 07 bf e4 ld [ %fp + -28 ], %g1 40024340: c6 04 a3 44 ld [ %l2 + 0x344 ], %g3 40024344: c2 20 e0 04 st %g1, [ %g3 + 4 ] 40024348: c4 07 bf e8 ld [ %fp + -24 ], %g2 4002434c: c4 20 e0 08 st %g2, [ %g3 + 8 ] 40024350: c2 07 bf ec ld [ %fp + -20 ], %g1 40024354: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 40024358: c4 07 bf f0 ld [ %fp + -16 ], %g2 4002435c: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] return RTEMS_SUCCESSFUL; } 40024360: 81 c7 e0 08 ret 40024364: 81 e8 00 00 restore 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)); 40024368: 7f ff 8b 05 call 40006f7c 4002436c: 90 10 20 40 mov 0x40, %o0 if (!tmp) 40024370: a0 92 20 00 orcc %o0, 0, %l0 40024374: 02 80 00 0b be 400243a0 40024378: 92 10 00 11 mov %l1, %o1 #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); 4002437c: 90 10 20 00 clr %o0 40024380: 15 10 00 90 sethi %hi(0x40024000), %o2 40024384: 40 00 07 c0 call 40026284 40024388: 94 12 a1 40 or %o2, 0x140, %o2 ! 40024140 if (sc != RTEMS_SUCCESSFUL) { 4002438c: 82 92 20 00 orcc %o0, 0, %g1 40024390: 32 80 00 06 bne,a 400243a8 40024394: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 40024398: 10 bf ff c3 b 400242a4 4002439c: e0 24 a3 44 st %l0, [ %l2 + 0x344 ] 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) 400243a0: 81 c7 e0 08 ret <== NOT EXECUTED 400243a4: 91 e8 20 1a restore %g0, 0x1a, %o0 <== 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); 400243a8: 7f ff 89 51 call 400068ec <== NOT EXECUTED 400243ac: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 400243b0: 81 c7 e0 08 ret <== NOT EXECUTED 400243b4: 81 e8 00 00 restore <== NOT EXECUTED 400241b8 : * 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) { 400241b8: 9d e3 bf 90 save %sp, -112, %sp <== 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); 400241bc: 90 10 20 00 clr %o0 <== NOT EXECUTED 400241c0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400241c4: 40 00 07 19 call 40025e28 <== NOT EXECUTED 400241c8: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 400241cc: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 400241d0: 12 80 00 13 bne 4002421c <== NOT EXECUTED 400241d4: 25 10 01 32 sethi %hi(0x4004c800), %l2 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 400241d8: e2 04 a3 44 ld [ %l2 + 0x344 ], %l1 ! 4004cb44 <== NOT EXECUTED 400241dc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400241e0: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED 400241e4: 86 14 a3 44 or %l2, 0x344, %g3 <== NOT EXECUTED 400241e8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400241ec: 02 80 00 0e be 40024224 <== NOT EXECUTED 400241f0: a0 10 00 03 mov %g3, %l0 <== 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, 400241f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400241f8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400241fc: 40 00 08 7d call 400263f0 <== NOT EXECUTED 40024200: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 40024204: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40024208: 02 80 00 10 be 40024248 <== NOT EXECUTED 4002420c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 40024210: 03 10 01 86 sethi %hi(0x40061800), %g1 <== NOT EXECUTED 40024214: 82 10 62 9c or %g1, 0x29c, %g1 ! 40061a9c <== NOT EXECUTED 40024218: c2 24 a3 44 st %g1, [ %l2 + 0x344 ] <== NOT EXECUTED return sc; } 4002421c: 81 c7 e0 08 ret <== NOT EXECUTED 40024220: 91 e8 00 02 restore %g0, %g2, %o0 <== 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); 40024224: 40 00 08 49 call 40026348 <== NOT EXECUTED 40024228: 92 10 00 03 mov %g3, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4002422c: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40024230: 12 bf ff fb bne 4002421c <== NOT EXECUTED 40024234: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 40024238: 7f ff ff c2 call 40024140 <== NOT EXECUTED 4002423c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 40024240: 10 bf ff ee b 400241f8 <== NOT EXECUTED 40024244: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED (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); 40024248: 15 10 00 90 sethi %hi(0x40024000), %o2 <== NOT EXECUTED 4002424c: 40 00 08 0e call 40026284 <== NOT EXECUTED 40024250: 94 12 a1 40 or %o2, 0x140, %o2 ! 40024140 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40024254: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40024258: 12 bf ff ef bne 40024214 <== NOT EXECUTED 4002425c: 03 10 01 86 sethi %hi(0x40061800), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40024260: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40024264: 10 bf ff ee b 4002421c <== NOT EXECUTED 40024268: c2 24 a3 44 st %g1, [ %l2 + 0x344 ] <== NOT EXECUTED 40007078 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 40007078: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 4000707c: 11 10 01 84 sethi %hi(0x40061000), %o0 <== NOT EXECUTED 40007080: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40007084: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED 40007088: 40 00 16 96 call 4000cae0 <_Protected_heap_Get_block_size> <== NOT EXECUTED 4000708c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40007090: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 40007094: 02 80 00 08 be 400070b4 <== NOT EXECUTED 40007098: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 4000709c: 03 10 01 84 sethi %hi(0x40061000), %g1 <== NOT EXECUTED 400070a0: 82 10 62 78 or %g1, 0x278, %g1 ! 40061278 <== NOT EXECUTED 400070a4: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4 <== NOT EXECUTED 400070a8: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 400070ac: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 400070b0: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 400070b4: 81 c7 e0 08 ret <== NOT EXECUTED 400070b8: 81 e8 00 00 restore <== NOT EXECUTED 400070bc : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 400070bc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED size_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 400070c0: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 400070c4: 02 80 00 13 be 40007110 <== NOT EXECUTED 400070c8: 11 10 01 84 sethi %hi(0x40061000), %o0 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 400070cc: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); 400070d0: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 400070d4: 40 00 16 83 call 4000cae0 <_Protected_heap_Get_block_size> <== NOT EXECUTED 400070d8: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 400070dc: 03 10 01 84 sethi %hi(0x40061000), %g1 <== NOT EXECUTED 400070e0: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 400070e4: 96 10 62 78 or %g1, 0x278, %o3 <== NOT EXECUTED 400070e8: d8 1a e0 20 ldd [ %o3 + 0x20 ], %o4 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 400070ec: c2 02 e0 2c ld [ %o3 + 0x2c ], %g1 <== NOT EXECUTED if (current_depth > s->max_depth) 400070f0: c8 02 e0 18 ld [ %o3 + 0x18 ], %g4 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 400070f4: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 400070f8: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 400070fc: c4 3a e0 20 std %g2, [ %o3 + 0x20 ] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 40007100: 86 20 c0 01 sub %g3, %g1, %g3 <== NOT EXECUTED if (current_depth > s->max_depth) 40007104: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 40007108: 38 80 00 02 bgu,a 40007110 <== NOT EXECUTED 4000710c: c6 22 e0 18 st %g3, [ %o3 + 0x18 ] <== NOT EXECUTED 40007110: 81 c7 e0 08 ret <== NOT EXECUTED 40007114: 81 e8 00 00 restore <== NOT EXECUTED 40007118 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40007118: 03 10 01 84 sethi %hi(0x40061000), %g1 <== NOT EXECUTED 4000711c: c0 20 62 78 clr [ %g1 + 0x278 ] ! 40061278 <== NOT EXECUTED 40007120: c0 20 62 7c clr [ %g1 + 0x27c ] <== NOT EXECUTED 40007124: 82 10 62 78 or %g1, 0x278, %g1 <== NOT EXECUTED 40007128: c0 20 60 28 clr [ %g1 + 0x28 ] <== NOT EXECUTED 4000712c: c0 20 60 2c clr [ %g1 + 0x2c ] <== NOT EXECUTED 40007130: c0 20 60 08 clr [ %g1 + 8 ] <== NOT EXECUTED 40007134: c0 20 60 0c clr [ %g1 + 0xc ] <== NOT EXECUTED 40007138: c0 20 60 10 clr [ %g1 + 0x10 ] <== NOT EXECUTED 4000713c: c0 20 60 14 clr [ %g1 + 0x14 ] <== NOT EXECUTED 40007140: c0 20 60 18 clr [ %g1 + 0x18 ] <== NOT EXECUTED 40007144: c0 20 60 1c clr [ %g1 + 0x1c ] <== NOT EXECUTED 40007148: c0 20 60 20 clr [ %g1 + 0x20 ] <== NOT EXECUTED } 4000714c: 81 c3 e0 08 retl <== NOT EXECUTED 40007150: c0 20 60 24 clr [ %g1 + 0x24 ] <== NOT EXECUTED 40006c48 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40006c48: 9d e3 bf 98 save %sp, -104, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 40006c4c: a0 96 20 00 orcc %i0, 0, %l0 40006c50: 02 80 00 1f be 40006ccc 40006c54: 03 10 00 84 sethi %hi(0x40021000), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40006c58: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 40021064 <_System_state_Current> 40006c5c: 80 a0 a0 03 cmp %g2, 3 40006c60: 02 80 00 16 be 40006cb8 40006c64: c0 24 00 00 clr [ %l0 ] /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 40006c68: 7f ff fb 7e call 40005a60 40006c6c: b0 10 20 0c mov 0xc, %i0 /* * Perform the aligned allocation requested */ return_this = _Protected_heap_Allocate_aligned( 40006c70: 92 10 00 1a mov %i2, %o1 40006c74: 94 10 00 19 mov %i1, %o2 40006c78: 11 10 00 83 sethi %hi(0x40020c00), %o0 40006c7c: 40 00 14 0a call 4000bca4 <_Protected_heap_Allocate_aligned> 40006c80: 90 12 20 f0 or %o0, 0xf0, %o0 ! 40020cf0 &RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 40006c84: b4 92 20 00 orcc %o0, 0, %i2 40006c88: 02 80 00 12 be 40006cd0 40006c8c: 03 10 00 81 sethi %hi(0x40020400), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 40006c90: c2 00 61 44 ld [ %g1 + 0x144 ], %g1 ! 40020544 40006c94: 80 a0 60 00 cmp %g1, 0 40006c98: 22 80 00 06 be,a 40006cb0 40006c9c: f4 24 00 00 st %i2, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 40006ca0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40006ca4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006ca8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED */ if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; 40006cac: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED 40006cb0: 81 c7 e0 08 ret 40006cb4: 91 e8 20 00 restore %g0, 0, %o0 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40006cb8: 7f ff fb 50 call 400059f8 40006cbc: 01 00 00 00 nop 40006cc0: 80 8a 20 ff btst 0xff, %o0 40006cc4: 12 bf ff e9 bne 40006c68 40006cc8: 01 00 00 00 nop if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif *pointer = return_this; return 0; 40006ccc: b0 10 20 16 mov 0x16, %i0 ! 16 } 40006cd0: 81 c7 e0 08 ret 40006cd4: 81 e8 00 00 restore 40008f88 : void rtems_panic( const char *printf_format, ... ) { 40008f88: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40008f8c: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40008f90: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 40008f94: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40008f98: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40008f9c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40008fa0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40008fa4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40008fa8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008fac: 7f ff ff 7d call 40008da0 <== NOT EXECUTED 40008fb0: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 40008fb4: 81 c7 e0 08 ret <== NOT EXECUTED 40008fb8: 81 e8 00 00 restore <== NOT EXECUTED 40007ae4 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 40007ae4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 40007ae8: 11 10 00 7e sethi %hi(0x4001f800), %o0 40007aec: 92 10 00 18 mov %i0, %o1 40007af0: 90 12 21 84 or %o0, 0x184, %o0 40007af4: 40 00 09 4e call 4000a02c <_Objects_Get> 40007af8: 94 07 bf f4 add %fp, -12, %o2 rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40007afc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b00: 80 a0 60 00 cmp %g1, 0 40007b04: 02 80 00 04 be 40007b14 40007b08: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007b0c: 81 c7 e0 08 ret 40007b10: 91 e8 20 04 restore %g0, 4, %o0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40007b14: 25 10 00 7e sethi %hi(0x4001f800), %l2 40007b18: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40007b1c: c2 04 a3 c0 ld [ %l2 + 0x3c0 ], %g1 40007b20: 80 a0 80 01 cmp %g2, %g1 40007b24: 02 80 00 06 be 40007b3c 40007b28: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 40007b2c: 40 00 0b a7 call 4000a9c8 <_Thread_Enable_dispatch> 40007b30: b0 10 20 17 mov 0x17, %i0 40007b34: 81 c7 e0 08 ret 40007b38: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40007b3c: 12 80 00 0f bne 40007b78 40007b40: 01 00 00 00 nop switch ( the_period->state ) { 40007b44: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40007b48: 80 a0 60 00 cmp %g1, 0 40007b4c: 02 80 00 07 be 40007b68 40007b50: b0 10 20 0b mov 0xb, %i0 40007b54: 82 00 7f fd add %g1, -3, %g1 40007b58: 80 a0 60 01 cmp %g1, 1 40007b5c: 18 80 00 03 bgu 40007b68 40007b60: b0 10 20 00 clr %i0 40007b64: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40007b68: 40 00 0b 98 call 4000a9c8 <_Thread_Enable_dispatch> 40007b6c: 01 00 00 00 nop 40007b70: 81 c7 e0 08 ret 40007b74: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40007b78: 7f ff ec 39 call 40002c5c 40007b7c: 01 00 00 00 nop 40007b80: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40007b84: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40007b88: 80 a4 e0 02 cmp %l3, 2 40007b8c: 02 80 00 1a be 40007bf4 40007b90: 80 a4 e0 04 cmp %l3, 4 40007b94: 02 80 00 32 be 40007c5c 40007b98: 80 a4 e0 00 cmp %l3, 0 40007b9c: 12 bf ff dc bne 40007b0c 40007ba0: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 40007ba4: 7f ff ec 32 call 40002c6c 40007ba8: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40007bac: 7f ff ff 58 call 4000790c <_Rate_monotonic_Initiate_statistics> 40007bb0: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007bb4: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007bb8: 03 10 00 1f sethi %hi(0x40007c00), %g1 40007bbc: 82 10 63 b8 or %g1, 0x3b8, %g1 ! 40007fb8 <_Rate_monotonic_Timeout> the_watchdog->id = id; 40007bc0: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007bc4: 92 04 60 10 add %l1, 0x10, %o1 40007bc8: 11 10 00 7e sethi %hi(0x4001f800), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007bcc: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007bd0: 90 12 23 e0 or %o0, 0x3e0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007bd4: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40007bd8: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40007bdc: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); the_period->state = RATE_MONOTONIC_ACTIVE; 40007be0: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007be4: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007be8: 40 00 10 ef call 4000bfa4 <_Watchdog_Insert> 40007bec: b0 10 20 00 clr %i0 40007bf0: 30 bf ff de b,a 40007b68 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 40007bf4: 7f ff ff 62 call 4000797c <_Rate_monotonic_Update_statistics> 40007bf8: 90 10 00 11 mov %l1, %o0 /* * 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; 40007bfc: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40007c00: f2 24 60 4c st %i1, [ %l1 + 0x4c ] /* * 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; 40007c04: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40007c08: 7f ff ec 19 call 40002c6c 40007c0c: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40007c10: c2 04 a3 c0 ld [ %l2 + 0x3c0 ], %g1 40007c14: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007c18: 90 10 00 01 mov %g1, %o0 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 40007c1c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007c20: 40 00 0d ff call 4000b41c <_Thread_Set_state> 40007c24: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40007c28: 7f ff ec 0d call 40002c5c 40007c2c: 01 00 00 00 nop local_state = the_period->state; 40007c30: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007c34: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40007c38: 7f ff ec 0d call 40002c6c 40007c3c: 01 00 00 00 nop /* * 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 ) 40007c40: 80 a4 20 03 cmp %l0, 3 40007c44: 02 80 00 17 be 40007ca0 40007c48: d0 04 a3 c0 ld [ %l2 + 0x3c0 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 40007c4c: 40 00 0b 5f call 4000a9c8 <_Thread_Enable_dispatch> 40007c50: b0 10 20 00 clr %i0 40007c54: 81 c7 e0 08 ret 40007c58: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40007c5c: 7f ff ff 48 call 4000797c <_Rate_monotonic_Update_statistics> 40007c60: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40007c64: 7f ff ec 02 call 40002c6c 40007c68: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007c6c: 82 10 20 02 mov 2, %g1 40007c70: 92 04 60 10 add %l1, 0x10, %o1 40007c74: 11 10 00 7e sethi %hi(0x4001f800), %o0 40007c78: 90 12 23 e0 or %o0, 0x3e0, %o0 ! 4001fbe0 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007c7c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40007c80: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40007c84: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007c88: 40 00 10 c7 call 4000bfa4 <_Watchdog_Insert> 40007c8c: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40007c90: 40 00 0b 4e call 4000a9c8 <_Thread_Enable_dispatch> 40007c94: 01 00 00 00 nop 40007c98: 81 c7 e0 08 ret 40007c9c: 81 e8 00 00 restore /* * 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 ); 40007ca0: 40 00 0a 4d call 4000a5d4 <_Thread_Clear_state> <== NOT EXECUTED 40007ca4: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40007ca8: 30 bf ff e9 b,a 40007c4c <== NOT EXECUTED 40025a04 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40025a04: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 40025a08: 80 a6 60 00 cmp %i1, 0 40025a0c: 02 80 00 4a be 40025b34 40025a10: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40025a14: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a18: 9f c6 40 00 call %i1 40025a1c: 92 12 61 30 or %o1, 0x130, %o1 ! 40049530 <_POSIX_Threads_Default_attributes+0x38> #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40025a20: 90 10 00 18 mov %i0, %o0 40025a24: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a28: 9f c6 40 00 call %i1 40025a2c: 92 12 61 50 or %o1, 0x150, %o1 ! 40049550 <_POSIX_Threads_Default_attributes+0x58> #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 40025a30: 90 10 00 18 mov %i0, %o0 40025a34: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a38: 9f c6 40 00 call %i1 40025a3c: 92 12 61 78 or %o1, 0x178, %o1 ! 40049578 <_POSIX_Threads_Default_attributes+0x80> Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40025a40: 90 10 00 18 mov %i0, %o0 40025a44: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a48: 9f c6 40 00 call %i1 40025a4c: 92 12 61 a0 or %o1, 0x1a0, %o1 ! 400495a0 <_POSIX_Threads_Default_attributes+0xa8> #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 40025a50: 90 10 00 18 mov %i0, %o0 40025a54: 13 10 01 25 sethi %hi(0x40049400), %o1 40025a58: 9f c6 40 00 call %i1 40025a5c: 92 12 61 f0 or %o1, 0x1f0, %o1 ! 400495f0 <_POSIX_Threads_Default_attributes+0xf8> /* * 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 ; 40025a60: 03 10 01 87 sethi %hi(0x40061c00), %g1 40025a64: a6 10 63 bc or %g1, 0x3bc, %l3 ! 40061fbc <_Rate_monotonic_Information> 40025a68: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 40025a6c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40025a70: 80 a4 80 01 cmp %l2, %g1 40025a74: 18 80 00 30 bgu 40025b34 40025a78: 03 10 01 25 sethi %hi(0x40049400), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40025a7c: 05 10 01 26 sethi %hi(0x40049800), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40025a80: b6 10 62 40 or %g1, 0x240, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40025a84: b8 10 a2 48 or %g2, 0x248, %i4 40025a88: a8 07 bf 98 add %fp, -104, %l4 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 40025a8c: ae 07 bf d0 add %fp, -48, %l7 40025a90: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40025a94: ba 07 bf b0 add %fp, -80, %i5 40025a98: aa 07 bf e8 add %fp, -24, %l5 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40025a9c: 10 80 00 06 b 40025ab4 40025aa0: b4 07 bf c8 add %fp, -56, %i2 * 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++ ) { 40025aa4: a4 04 a0 01 inc %l2 /* * 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 ; 40025aa8: 80 a0 40 12 cmp %g1, %l2 40025aac: 0a 80 00 22 bcs 40025b34 40025ab0: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 40025ab4: 90 10 00 12 mov %l2, %o0 40025ab8: 40 00 2e e3 call 40031644 40025abc: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 40025ac0: 80 a2 20 00 cmp %o0, 0 40025ac4: 32 bf ff f8 bne,a 40025aa4 40025ac8: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 40025acc: 92 10 00 17 mov %l7, %o1 40025ad0: 40 00 2e f2 call 40031698 40025ad4: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 40025ad8: d0 07 bf d0 ld [ %fp + -48 ], %o0 40025adc: 80 a2 20 00 cmp %o0, 0 40025ae0: 12 80 00 4b bne 40025c0c 40025ae4: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40025ae8: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 40025aec: 94 10 00 12 mov %l2, %o2 40025af0: 92 10 00 1b mov %i3, %o1 40025af4: 96 10 00 16 mov %l6, %o3 40025af8: 9f c6 40 00 call %i1 40025afc: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40025b00: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40025b04: 94 10 00 15 mov %l5, %o2 40025b08: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40025b0c: 80 a0 60 00 cmp %g1, 0 40025b10: 12 80 00 0b bne 40025b3c 40025b14: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 40025b18: 9f c6 40 00 call %i1 40025b1c: 90 10 00 18 mov %i0, %o0 /* * 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 ; 40025b20: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 40025b24: a4 04 a0 01 inc %l2 /* * 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 ; 40025b28: 80 a0 40 12 cmp %g1, %l2 40025b2c: 1a bf ff e3 bcc 40025ab8 40025b30: 90 10 00 12 mov %l2, %o0 40025b34: 81 c7 e0 08 ret 40025b38: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40025b3c: 40 00 05 fd call 40027330 <_Timespec_Divide_by_integer> 40025b40: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 40025b44: d0 07 bf a4 ld [ %fp + -92 ], %o0 40025b48: 40 00 78 86 call 40043d60 <.div> 40025b4c: 92 10 23 e8 mov 0x3e8, %o1 40025b50: a2 10 00 08 mov %o0, %l1 40025b54: d0 07 bf ac ld [ %fp + -84 ], %o0 40025b58: 40 00 78 82 call 40043d60 <.div> 40025b5c: 92 10 23 e8 mov 0x3e8, %o1 40025b60: c2 07 bf e8 ld [ %fp + -24 ], %g1 40025b64: a0 10 00 08 mov %o0, %l0 40025b68: d0 07 bf ec ld [ %fp + -20 ], %o0 40025b6c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40025b70: 40 00 78 7c call 40043d60 <.div> 40025b74: 92 10 23 e8 mov 0x3e8, %o1 40025b78: d8 07 bf a8 ld [ %fp + -88 ], %o4 40025b7c: d4 07 bf a0 ld [ %fp + -96 ], %o2 40025b80: 96 10 00 11 mov %l1, %o3 40025b84: 9a 10 00 10 mov %l0, %o5 40025b88: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40025b8c: 13 10 01 25 sethi %hi(0x40049400), %o1 40025b90: 90 10 00 18 mov %i0, %o0 40025b94: 9f c6 40 00 call %i1 40025b98: 92 12 62 58 or %o1, 0x258, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40025b9c: d2 07 bf 98 ld [ %fp + -104 ], %o1 40025ba0: 94 10 00 15 mov %l5, %o2 40025ba4: 40 00 05 e3 call 40027330 <_Timespec_Divide_by_integer> 40025ba8: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 40025bac: d0 07 bf bc ld [ %fp + -68 ], %o0 40025bb0: 40 00 78 6c call 40043d60 <.div> 40025bb4: 92 10 23 e8 mov 0x3e8, %o1 40025bb8: a2 10 00 08 mov %o0, %l1 40025bbc: d0 07 bf c4 ld [ %fp + -60 ], %o0 40025bc0: 40 00 78 68 call 40043d60 <.div> 40025bc4: 92 10 23 e8 mov 0x3e8, %o1 40025bc8: c2 07 bf e8 ld [ %fp + -24 ], %g1 40025bcc: a0 10 00 08 mov %o0, %l0 40025bd0: d0 07 bf ec ld [ %fp + -20 ], %o0 40025bd4: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40025bd8: 40 00 78 62 call 40043d60 <.div> 40025bdc: 92 10 23 e8 mov 0x3e8, %o1 40025be0: d4 07 bf b8 ld [ %fp + -72 ], %o2 40025be4: d8 07 bf c0 ld [ %fp + -64 ], %o4 40025be8: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40025bec: 96 10 00 11 mov %l1, %o3 40025bf0: 9a 10 00 10 mov %l0, %o5 40025bf4: 90 10 00 18 mov %i0, %o0 40025bf8: 13 10 01 25 sethi %hi(0x40049400), %o1 40025bfc: 9f c6 40 00 call %i1 40025c00: 92 12 62 78 or %o1, 0x278, %o1 ! 40049678 <_POSIX_Threads_Default_attributes+0x180> /* * 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 ; 40025c04: 10 bf ff a8 b 40025aa4 40025c08: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 40025c0c: 94 10 00 16 mov %l6, %o2 40025c10: 7f ff 93 72 call 4000a9d8 40025c14: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40025c18: 10 bf ff b5 b 40025aec 40025c1c: d8 1f bf 98 ldd [ %fp + -104 ], %o4 40011240 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 40011240: 9d e3 bf 90 save %sp, -112, %sp 40011244: a0 10 00 18 mov %i0, %l0 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 40011248: 80 a6 60 00 cmp %i1, 0 4001124c: 02 80 00 28 be 400112ec 40011250: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40011254: 23 10 00 d2 sethi %hi(0x40034800), %l1 40011258: 40 00 09 38 call 40013738 <_API_Mutex_Lock> 4001125c: d0 04 62 38 ld [ %l1 + 0x238 ], %o0 ! 40034a38 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40011260: 92 10 00 10 mov %l0, %o1 40011264: 11 10 00 d1 sethi %hi(0x40034400), %o0 40011268: 94 07 bf f0 add %fp, -16, %o2 4001126c: 40 00 10 4f call 400153a8 <_Objects_Get_no_protection> 40011270: 90 12 23 bc or %o0, 0x3bc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011274: c2 07 bf f0 ld [ %fp + -16 ], %g1 40011278: 80 a0 60 00 cmp %g1, 0 4001127c: 12 80 00 16 bne 400112d4 40011280: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40011284: 92 10 00 19 mov %i1, %o1 40011288: 94 10 00 1a mov %i2, %o2 4001128c: 90 02 20 68 add %o0, 0x68, %o0 40011290: 96 07 bf f4 add %fp, -12, %o3 40011294: 40 00 0c 6e call 4001444c <_Heap_Extend> 40011298: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4001129c: 80 a2 20 01 cmp %o0, 1 400112a0: 02 80 00 11 be 400112e4 400112a4: 01 00 00 00 nop 400112a8: 1a 80 00 13 bcc 400112f4 400112ac: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112b0: c6 07 bf f4 ld [ %fp + -12 ], %g3 400112b4: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 400112b8: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112bc: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 400112c0: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 400112c4: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 400112c8: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 400112cc: 10 80 00 06 b 400112e4 400112d0: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 400112d4: 80 a0 60 01 cmp %g1, 1 400112d8: 02 80 00 03 be 400112e4 400112dc: b0 10 20 04 mov 4, %i0 switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 400112e0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 400112e4: 40 00 09 2b call 40013790 <_API_Mutex_Unlock> 400112e8: d0 04 62 38 ld [ %l1 + 0x238 ], %o0 return return_status; } 400112ec: 81 c7 e0 08 ret 400112f0: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 400112f4: 12 bf ff fb bne 400112e0 400112f8: b0 10 20 18 mov 0x18, %i0 400112fc: 30 bf ff fa b,a 400112e4 400115fc : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 400115fc: 9d e3 bf 88 save %sp, -120, %sp uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 40011600: 80 a6 e0 00 cmp %i3, 0 40011604: 02 80 00 2e be 400116bc 40011608: 21 10 00 d2 sethi %hi(0x40034800), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 4001160c: 40 00 08 4b call 40013738 <_API_Mutex_Lock> 40011610: d0 04 22 38 ld [ %l0 + 0x238 ], %o0 ! 40034a38 <_RTEMS_Allocator_Mutex> 40011614: 92 10 00 18 mov %i0, %o1 40011618: 11 10 00 d1 sethi %hi(0x40034400), %o0 4001161c: 94 07 bf f0 add %fp, -16, %o2 40011620: 40 00 0f 62 call 400153a8 <_Objects_Get_no_protection> 40011624: 90 12 23 bc or %o0, 0x3bc, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011628: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001162c: 80 a0 60 00 cmp %g1, 0 40011630: 12 80 00 14 bne 40011680 40011634: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 40011638: 94 10 00 1a mov %i2, %o2 4001163c: 92 10 00 19 mov %i1, %o1 40011640: 90 02 20 68 add %o0, 0x68, %o0 40011644: 96 07 bf ec add %fp, -20, %o3 40011648: 40 00 0d 0b call 40014a74 <_Heap_Resize_block> 4001164c: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 40011650: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 40011654: b4 92 20 00 orcc %o0, 0, %i2 40011658: 12 80 00 13 bne 400116a4 4001165c: c2 26 c0 00 st %g1, [ %i3 ] 40011660: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011668: 12 80 00 17 bne 400116c4 <== NOT EXECUTED 4001166c: d0 04 22 38 ld [ %l0 + 0x238 ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 40011670: 40 00 08 48 call 40013790 <_API_Mutex_Unlock> <== NOT EXECUTED 40011674: b0 10 20 00 clr %i0 <== NOT EXECUTED 40011678: 81 c7 e0 08 ret <== NOT EXECUTED 4001167c: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011680: d0 04 22 38 ld [ %l0 + 0x238 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011684: 82 18 60 01 xor %g1, 1, %g1 40011688: 80 a0 00 01 cmp %g0, %g1 4001168c: 84 40 3f ff addx %g0, -1, %g2 40011690: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40011694: 40 00 08 3f call 40013790 <_API_Mutex_Unlock> 40011698: b0 06 20 19 add %i0, 0x19, %i0 4001169c: 81 c7 e0 08 ret 400116a0: 81 e8 00 00 restore _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 400116a4: d0 04 22 38 ld [ %l0 + 0x238 ], %o0 400116a8: 40 00 08 3a call 40013790 <_API_Mutex_Unlock> 400116ac: b0 10 20 0d mov 0xd, %i0 return 400116b0: 80 a6 a0 01 cmp %i2, 1 400116b4: 02 80 00 07 be 400116d0 400116b8: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 400116bc: 81 c7 e0 08 ret 400116c0: 91 e8 20 09 restore %g0, 9, %o0 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 400116c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400116c8: 40 00 22 d1 call 4001a20c <_Region_Process_queue> <== NOT EXECUTED 400116cc: b0 10 20 00 clr %i0 <== NOT EXECUTED 400116d0: 81 c7 e0 08 ret <== NOT EXECUTED 400116d4: 81 e8 00 00 restore <== NOT EXECUTED 400066bc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 400066bc: 9d e3 bf 80 save %sp, -128, %sp register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 400066c0: a4 96 20 00 orcc %i0, 0, %l2 400066c4: 02 80 00 33 be 40006790 400066c8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400066cc: 80 a7 20 00 cmp %i4, 0 400066d0: 02 80 00 30 be 40006790 400066d4: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 400066d8: 82 8e a0 c0 andcc %i2, 0xc0, %g1 400066dc: 12 80 00 2f bne 40006798 400066e0: a0 0e a0 30 and %i2, 0x30, %l0 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 ) ) 400066e4: 80 a4 20 00 cmp %l0, 0 400066e8: 02 80 00 04 be 400066f8 400066ec: 80 a6 60 01 cmp %i1, 1 400066f0: 18 80 00 28 bgu 40006790 400066f4: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400066f8: 05 10 00 6a sethi %hi(0x4001a800), %g2 400066fc: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001aa40 <_Thread_Dispatch_disable_level> 40006700: 82 00 60 01 inc %g1 40006704: c2 20 a2 40 st %g1, [ %g2 + 0x240 ] * 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 ); 40006708: 31 10 00 6a sethi %hi(0x4001a800), %i0 4000670c: 40 00 05 94 call 40007d5c <_Objects_Allocate> 40006710: 90 16 21 0c or %i0, 0x10c, %o0 ! 4001a90c <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40006714: a2 92 20 00 orcc %o0, 0, %l1 40006718: 02 80 00 4e be 40006850 4000671c: 80 a4 20 00 cmp %l0, 0 * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 40006720: 02 80 00 2c be 400067d0 40006724: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40006728: 80 8e a0 40 btst 0x40, %i2 4000672c: 02 80 00 44 be 4000683c 40006730: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40006734: 82 10 20 02 mov 2, %g1 40006738: c2 27 bf e8 st %g1, [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 4000673c: 80 a4 20 10 cmp %l0, 0x10 40006740: 02 80 00 48 be 40006860 40006744: 82 10 20 02 mov 2, %g1 the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 40006748: c0 2f bf e4 clrb [ %fp + -28 ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 4000674c: c2 27 bf e0 st %g1, [ %fp + -32 ] the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 40006750: 82 1e 60 01 xor %i1, 1, %g1 40006754: 80 a0 00 01 cmp %g0, %g1 } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 40006758: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 4000675c: 94 60 3f ff subx %g0, -1, %o2 40006760: 90 04 60 14 add %l1, 0x14, %o0 40006764: 40 00 03 64 call 400074f4 <_CORE_mutex_Initialize> 40006768: 92 07 bf e0 add %fp, -32, %o1 &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 4000676c: 80 a2 20 06 cmp %o0, 6 40006770: 32 80 00 26 bne,a 40006808 40006774: c4 04 60 08 ld [ %l1 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40006778: 90 16 21 0c or %i0, 0x10c, %o0 <== NOT EXECUTED 4000677c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40006780: 40 00 06 72 call 40008148 <_Objects_Free> <== NOT EXECUTED 40006784: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 40006788: 40 00 09 44 call 40008c98 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000678c: 01 00 00 00 nop <== NOT EXECUTED 40006790: 81 c7 e0 08 ret 40006794: 81 e8 00 00 restore #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40006798: 80 a4 20 10 cmp %l0, 0x10 4000679c: 02 80 00 06 be 400067b4 400067a0: 80 a4 20 20 cmp %l0, 0x20 400067a4: 02 80 00 05 be 400067b8 400067a8: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400067ac: 81 c7 e0 08 ret 400067b0: 91 e8 20 0b restore %g0, 0xb, %o0 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 400067b4: 80 8e a0 04 btst 4, %i2 400067b8: 02 bf ff fd be 400067ac 400067bc: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 400067c0: 12 bf ff ca bne 400066e8 400067c4: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 400067c8: 81 c7 e0 08 ret 400067cc: 91 e8 20 0b restore %g0, 0xb, %o0 _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 400067d0: 80 8e a0 04 btst 4, %i2 400067d4: 22 80 00 04 be,a 400067e4 400067d8: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 400067dc: 82 10 20 01 mov 1, %g1 400067e0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400067e4: 82 10 3f ff mov -1, %g1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 400067e8: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 400067ec: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 400067f0: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400067f4: c2 27 bf f0 st %g1, [ %fp + -16 ] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 400067f8: 90 04 60 14 add %l1, 0x14, %o0 400067fc: 40 00 04 29 call 400078a0 <_CORE_semaphore_Initialize> 40006800: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40006804: c4 04 60 08 ld [ %l1 + 8 ], %g2 40006808: 82 16 21 0c or %i0, 0x10c, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000680c: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40006810: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40006814: c4 27 00 00 st %g2, [ %i4 ] 40006818: 03 00 00 3f sethi %hi(0xfc00), %g1 4000681c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006820: 84 08 80 01 and %g2, %g1, %g2 40006824: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40006828: b0 10 20 00 clr %i0 4000682c: 40 00 09 1b call 40008c98 <_Thread_Enable_dispatch> 40006830: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 40006834: 81 c7 e0 08 ret 40006838: 81 e8 00 00 restore if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4000683c: 02 80 00 0f be 40006878 40006840: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40006844: 82 10 20 03 mov 3, %g1 40006848: 10 bf ff bd b 4000673c 4000684c: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 40006850: 40 00 09 12 call 40008c98 <_Thread_Enable_dispatch> 40006854: b0 10 20 05 mov 5, %i0 40006858: 81 c7 e0 08 ret 4000685c: 81 e8 00 00 restore if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40006860: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006864: 80 a0 60 01 cmp %g1, 1 40006868: 18 80 00 09 bgu 4000688c 4000686c: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40006870: 10 bf ff b8 b 40006750 40006874: c0 2f bf e4 clrb [ %fp + -28 ] if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 40006878: 22 bf ff b1 be,a 4000673c 4000687c: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40006880: 82 10 20 01 mov 1, %g1 40006884: 10 bf ff ae b 4000673c 40006888: c2 27 bf e8 st %g1, [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 4000688c: 80 a0 60 03 cmp %g1, 3 40006890: 18 bf ff b1 bgu 40006754 40006894: 82 1e 60 01 xor %i1, 1, %g1 case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 40006898: 82 10 20 01 mov 1, %g1 4000689c: 10 bf ff ad b 40006750 400068a0: c2 2f bf e4 stb %g1, [ %fp + -28 ] 40025d88 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 40025d88: 9d e3 bf 90 save %sp, -112, %sp 40025d8c: 11 10 01 84 sethi %hi(0x40061000), %o0 40025d90: 92 10 00 18 mov %i0, %o1 40025d94: 90 12 22 c0 or %o0, 0x2c0, %o0 40025d98: 7f ff 9a 92 call 4000c7e0 <_Objects_Get> 40025d9c: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40025da0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40025da4: 80 a0 60 00 cmp %g1, 0 40025da8: 12 80 00 0b bne 40025dd4 40025dac: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40025db0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40025db4: 80 88 60 30 btst 0x30, %g1 40025db8: 12 80 00 09 bne 40025ddc 40025dbc: 90 02 20 14 add %o0, 0x14, %o0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 40025dc0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40025dc4: 7f ff 97 79 call 4000bba8 <_CORE_semaphore_Flush> <== NOT EXECUTED 40025dc8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 40025dcc: 7f ff 9c ef call 4000d188 <_Thread_Enable_dispatch> 40025dd0: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40025dd4: 81 c7 e0 08 ret 40025dd8: 81 e8 00 00 restore the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 40025ddc: 92 10 20 00 clr %o1 40025de0: 7f ff 96 87 call 4000b7fc <_CORE_mutex_Flush> 40025de4: 94 10 20 01 mov 1, %o2 40025de8: 30 bf ff f9 b,a 40025dcc 40017f84 : */ void rtems_shutdown_executive( uint32_t result ) { 40017f84: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 40017f88: 05 10 00 6a sethi %hi(0x4001a800), %g2 40017f8c: c2 00 a3 e4 ld [ %g2 + 0x3e4 ], %g1 ! 4001abe4 <_System_state_Current> 40017f90: 80 a0 60 04 cmp %g1, 4 40017f94: 02 80 00 07 be 40017fb0 40017f98: 82 10 20 04 mov 4, %g1 Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 40017f9c: 13 10 00 6a sethi %hi(0x4001a800), %o1 40017fa0: c2 20 a3 e4 st %g1, [ %g2 + 0x3e4 ] 40017fa4: 92 12 61 b8 or %o1, 0x1b8, %o1 40017fa8: 7f ff c8 d8 call 4000a308 <_CPU_Context_switch> 40017fac: 90 07 bf 70 add %fp, -144, %o0 40017fb0: 81 c7 e0 08 ret <== NOT EXECUTED 40017fb4: 81 e8 00 00 restore <== NOT EXECUTED 40005248 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 40005248: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 4000524c: 21 10 01 85 sethi %hi(0x40061400), %l0 <== NOT EXECUTED 40005250: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 ! 400614b0 <_Thread_Executing> <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40005254: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 <== NOT EXECUTED 40005258: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED 4000525c: 0a 80 00 07 bcs 40005278 <== NOT EXECUTED 40005260: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005264: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 40005268: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 4000526c: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED 40005270: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 40005274: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 40005278: 03 10 01 38 sethi %hi(0x4004e000), %g1 <== NOT EXECUTED 4000527c: c4 00 60 68 ld [ %g1 + 0x68 ], %g2 ! 4004e068 <== NOT EXECUTED 40005280: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005284: 12 80 00 0d bne 400052b8 <== NOT EXECUTED 40005288: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 4000528c: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED 40005290: 02 80 00 05 be 400052a4 <== NOT EXECUTED 40005294: 92 08 60 ff and %g1, 0xff, %o1 <== NOT EXECUTED 40005298: 92 88 60 ff andcc %g1, 0xff, %o1 <== NOT EXECUTED 4000529c: 12 80 00 05 bne 400052b0 <== NOT EXECUTED 400052a0: b0 10 20 00 clr %i0 <== NOT EXECUTED return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 400052a4: d0 04 20 b0 ld [ %l0 + 0xb0 ], %o0 <== NOT EXECUTED 400052a8: 7f ff ff cf call 400051e4 <== NOT EXECUTED 400052ac: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 400052b0: 81 c7 e0 08 ret <== NOT EXECUTED 400052b4: 81 e8 00 00 restore <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 400052b8: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 400052bc: 13 10 01 84 sethi %hi(0x40061000), %o1 <== NOT EXECUTED 400052c0: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 400052c4: 40 00 c2 f4 call 40035e94 <== NOT EXECUTED 400052c8: 92 12 61 ec or %o1, 0x1ec, %o1 <== NOT EXECUTED 400052cc: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 400052d0: 10 bf ff ef b 4000528c <== NOT EXECUTED 400052d4: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 400051c8 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 400051c8: 13 10 00 20 sethi %hi(0x40008000), %o1 <== NOT EXECUTED 400051cc: 90 10 20 00 clr %o0 <== NOT EXECUTED 400051d0: 92 12 60 b4 or %o1, 0xb4, %o1 <== NOT EXECUTED 400051d4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400051d8: 7f ff ff e6 call 40005170 <== NOT EXECUTED 400051dc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400051e0: 01 00 00 00 nop 40005170 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40005170: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED print_context = context; 40005174: 23 10 01 38 sethi %hi(0x4004e000), %l1 <== NOT EXECUTED print_handler = print; 40005178: 21 10 01 38 sethi %hi(0x4004e000), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 4000517c: f0 24 60 6c st %i0, [ %l1 + 0x6c ] <== NOT EXECUTED print_handler = print; 40005180: f2 24 20 70 st %i1, [ %l0 + 0x70 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 40005184: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40005188: 13 10 01 1a sethi %hi(0x40046800), %o1 <== NOT EXECUTED 4000518c: 9f c6 40 00 call %i1 <== NOT EXECUTED 40005190: 92 12 61 10 or %o1, 0x110, %o1 ! 40046910 <__func__.4894+0x250> <== NOT EXECUTED (*print)( context, 40005194: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40005198: 13 10 01 1a sethi %hi(0x40046800), %o1 <== NOT EXECUTED 4000519c: 9f c6 40 00 call %i1 <== NOT EXECUTED 400051a0: 92 12 61 28 or %o1, 0x128, %o1 ! 40046928 <__func__.4894+0x268> <== 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 ); 400051a4: 11 10 00 14 sethi %hi(0x40005000), %o0 <== NOT EXECUTED 400051a8: 40 00 1b b3 call 4000c074 <== NOT EXECUTED 400051ac: 90 12 20 18 or %o0, 0x18, %o0 ! 40005018 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 400051b0: 7f ff ff 9a call 40005018 <== NOT EXECUTED 400051b4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 400051b8: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED print_handler = NULL; 400051bc: c0 24 20 70 clr [ %l0 + 0x70 ] <== NOT EXECUTED } 400051c0: 81 c7 e0 08 ret <== NOT EXECUTED 400051c4: 81 e8 00 00 restore <== NOT EXECUTED 400052d8 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 400052d8: 9d e3 bf 98 save %sp, -104, %sp 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; 400052dc: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 400052e0: 80 a7 80 02 cmp %fp, %g2 400052e4: 0a 80 00 07 bcs 40005300 400052e8: 90 00 a0 08 add %g2, 8, %o0 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 400052ec: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 400052f0: 82 00 80 01 add %g2, %g1, %g1 400052f4: 80 a7 80 01 cmp %fp, %g1 400052f8: 28 80 00 0b bleu,a 40005324 400052fc: 13 10 01 84 sethi %hi(0x40061000), %o1 /* * 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, 40005300: 13 10 01 84 sethi %hi(0x40061000), %o1 <== NOT EXECUTED 40005304: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40005308: 40 00 c2 e3 call 40035e94 <== NOT EXECUTED 4000530c: 92 12 61 ec or %o1, 0x1ec, %o1 <== NOT EXECUTED 40005310: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40005314: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 40005318: b2 08 60 01 and %g1, 1, %i1 <== NOT EXECUTED 4000531c: 7f ff ff b2 call 400051e4 <== NOT EXECUTED 40005320: 81 e8 00 00 restore <== 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, 40005324: 94 10 20 10 mov 0x10, %o2 40005328: 40 00 c2 db call 40035e94 4000532c: 92 12 61 ec or %o1, 0x1ec, %o1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 40005330: 80 a2 20 00 cmp %o0, 0 40005334: 12 bf ff f9 bne 40005318 40005338: 82 10 20 00 clr %g1 4000533c: 81 c7 e0 08 ret 40005340: 81 e8 00 00 restore 40008d84 : const char * rtems_status_text( rtems_status_code status ) { 40008d84: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 40008d88: 11 10 00 9b sethi %hi(0x40026c00), %o0 <== NOT EXECUTED 40008d8c: 90 12 22 b0 or %o0, 0x2b0, %o0 ! 40026eb0 <== NOT EXECUTED 40008d90: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40008d94: 40 00 2b 7f call 40013b90 <== NOT EXECUTED 40008d98: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40008d9c: 01 00 00 00 nop 400089bc : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400089bc: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 400089c0: 03 10 00 82 sethi %hi(0x40020800), %g1 400089c4: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 400208b8 <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400089c8: 90 10 00 18 mov %i0, %o0 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) 400089cc: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 400089d0: c4 08 60 04 ldub [ %g1 + 4 ], %g2 400089d4: 80 a0 a0 00 cmp %g2, 0 400089d8: 02 80 00 1c be 40008a48 400089dc: b0 10 20 16 mov 0x16, %i0 /* * 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 ) 400089e0: 80 a6 60 0f cmp %i1, 0xf 400089e4: 18 80 00 19 bgu 40008a48 400089e8: b0 10 20 0a mov 0xa, %i0 400089ec: 03 10 00 82 sethi %hi(0x40020800), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 400089f0: 80 a2 20 00 cmp %o0, 0 400089f4: 02 80 00 17 be 40008a50 400089f8: 86 10 60 e0 or %g1, 0xe0, %g3 400089fc: 03 10 00 82 sethi %hi(0x40020800), %g1 40008a00: c4 00 60 e0 ld [ %g1 + 0xe0 ], %g2 ! 400208e0 <_Thread_Executing> 40008a04: 86 10 60 e0 or %g1, 0xe0, %g3 40008a08: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008a0c: 80 a2 00 01 cmp %o0, %g1 40008a10: 22 80 00 11 be,a 40008a54 40008a14: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); 40008a18: 40 00 08 6a call 4000abc0 <_Thread_Get> 40008a1c: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40008a20: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008a24: 80 a0 60 00 cmp %g1, 0 40008a28: 12 80 00 08 bne 40008a48 40008a2c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40008a30: c4 02 21 5c ld [ %o0 + 0x15c ], %g2 40008a34: 82 06 60 08 add %i1, 8, %g1 40008a38: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 40008a3c: b0 10 20 00 clr %i0 40008a40: 40 00 08 52 call 4000ab88 <_Thread_Enable_dispatch> 40008a44: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40008a48: 81 c7 e0 08 ret 40008a4c: 81 e8 00 00 restore */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40008a50: c2 00 c0 00 ld [ %g3 ], %g1 40008a54: 84 06 60 08 add %i1, 8, %g2 40008a58: c6 00 61 5c ld [ %g1 + 0x15c ], %g3 40008a5c: 85 28 a0 02 sll %g2, 2, %g2 40008a60: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 40008a64: 81 c7 e0 08 ret 40008a68: 91 e8 20 00 restore %g0, 0, %o0 4000414c : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 4000414c: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40004150: 05 10 00 68 sethi %hi(0x4001a000), %g2 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40004154: d0 20 60 0c st %o0, [ %g1 + 0xc ] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40004158: d2 20 a0 10 st %o1, [ %g2 + 0x10 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 4000415c: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40004160: 90 10 20 00 clr %o0 <== NOT EXECUTED 40004164: 81 c3 e0 08 retl <== NOT EXECUTED 40004168: d4 20 60 14 st %o2, [ %g1 + 0x14 ] <== NOT EXECUTED 40005888 : } } rtems_status_code rtems_termios_close (void *arg) { 40005888: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4000588c: 23 10 00 6a sethi %hi(0x4001a800), %l1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005890: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005894: d0 04 61 00 ld [ %l1 + 0x100 ], %o0 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005898: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4000589c: 92 10 20 00 clr %o1 400058a0: 40 00 04 2e call 40006958 400058a4: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 400058a8: 80 a2 20 00 cmp %o0, 0 400058ac: 12 80 00 52 bne 400059f4 400058b0: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 400058b4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400058b8: 82 00 7f ff add %g1, -1, %g1 400058bc: 80 a0 60 00 cmp %g1, 0 400058c0: 12 80 00 3a bne 400059a8 400058c4: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400058c8: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 400058cc: 03 10 00 69 sethi %hi(0x4001a400), %g1 400058d0: 85 28 a0 05 sll %g2, 5, %g2 400058d4: 82 10 61 bc or %g1, 0x1bc, %g1 400058d8: 82 00 40 02 add %g1, %g2, %g1 400058dc: c2 00 60 04 ld [ %g1 + 4 ], %g1 400058e0: 80 a0 60 00 cmp %g1, 0 400058e4: 02 80 00 46 be 400059fc 400058e8: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400058ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400058f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 400058f4: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 400058f8: 80 a0 60 02 cmp %g1, 2 400058fc: 22 80 00 33 be,a 400059c8 40005900: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 40005904: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 40005908: 80 a0 60 00 cmp %g1, 0 4000590c: 22 80 00 07 be,a 40005928 40005910: c4 04 00 00 ld [ %l0 ], %g2 (*tty->device.lastClose)(tty->major, tty->minor, arg); 40005914: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 40005918: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 4000591c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005920: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40005924: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 40005928: 80 a0 a0 00 cmp %g2, 0 4000592c: 22 80 00 38 be,a 40005a0c 40005930: c4 04 20 04 ld [ %l0 + 4 ], %g2 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 40005934: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 40005938: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 4000593c: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 40005940: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005944: 22 80 00 39 be,a 40005a28 <== NOT EXECUTED 40005948: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 4000594c: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40005950: 40 00 03 d5 call 400068a4 40005954: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 40005958: 40 00 03 d3 call 400068a4 4000595c: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40005960: 40 00 03 d1 call 400068a4 40005964: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 40005968: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 4000596c: 80 a0 60 00 cmp %g1, 0 40005970: 02 80 00 13 be 400059bc 40005974: 01 00 00 00 nop 40005978: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 4000597c: 80 a0 60 02 cmp %g1, 2 40005980: 02 80 00 0f be 400059bc 40005984: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 40005988: 40 00 17 b5 call 4000b85c 4000598c: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40005990: 40 00 17 b3 call 4000b85c 40005994: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40005998: 40 00 17 b1 call 4000b85c 4000599c: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 400059a0: 40 00 17 af call 4000b85c 400059a4: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 400059a8: d0 04 61 00 ld [ %l1 + 0x100 ], %o0 400059ac: 40 00 04 33 call 40006a78 400059b0: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 400059b4: 81 c7 e0 08 ret 400059b8: 81 e8 00 00 restore 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); 400059bc: 40 00 03 ba call 400068a4 <== NOT EXECUTED 400059c0: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 400059c4: 30 bf ff f1 b,a 40005988 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 400059c8: 40 00 02 90 call 40006408 <== NOT EXECUTED 400059cc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 400059d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400059d4: 12 80 00 08 bne 400059f4 <== NOT EXECUTED 400059d8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 400059dc: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 400059e0: 40 00 02 8a call 40006408 <== NOT EXECUTED 400059e4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 400059e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400059ec: 22 bf ff c7 be,a 40005908 <== NOT EXECUTED 400059f0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400059f4: 40 00 05 9c call 40007064 <== NOT EXECUTED 400059f8: 01 00 00 00 nop <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 400059fc: 7f ff fd 6e call 40004fb4 40005a00: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40005a04: 10 bf ff bd b 400058f8 40005a08: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 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; 40005a0c: 03 10 00 6a sethi %hi(0x4001a800), %g1 if ( rtems_termios_ttyTail != NULL ) { 40005a10: 80 a0 a0 00 cmp %g2, 0 40005a14: 02 80 00 0a be 40005a3c 40005a18: c4 20 61 04 st %g2, [ %g1 + 0x104 ] rtems_termios_ttyTail->forw = NULL; 40005a1c: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED 40005a20: 10 bf ff c7 b 4000593c <== NOT EXECUTED 40005a24: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { 40005a28: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005a2c: 02 bf ff c9 be 40005950 <== NOT EXECUTED 40005a30: c4 20 61 08 st %g2, [ %g1 + 0x108 ] <== NOT EXECUTED rtems_termios_ttyHead->back = NULL; 40005a34: 10 bf ff c7 b 40005950 <== NOT EXECUTED 40005a38: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 40005a3c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40005a40: 10 bf ff c4 b 40005950 40005a44: c0 20 61 08 clr [ %g1 + 0x108 ] ! 4001a908 40004380 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40004380: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40004384: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004388: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4000438c: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 40004390: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004394: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40004398: 02 80 00 10 be 400043d8 <== NOT EXECUTED 4000439c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 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 ) { 400043a0: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400043a4: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 400043a8: 12 80 00 0a bne 400043d0 <== NOT EXECUTED 400043ac: 03 10 00 69 sethi %hi(0x4001a400), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400043b0: c2 00 62 70 ld [ %g1 + 0x270 ], %g1 ! 4001a670 <== NOT EXECUTED 400043b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400043b8: 02 80 00 04 be 400043c8 <== NOT EXECUTED 400043bc: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 400043c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400043c4: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 400043c8: 81 c7 e0 08 ret <== NOT EXECUTED 400043cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 400043d0: 7f ff ff 6d call 40004184 <== NOT EXECUTED 400043d4: 81 e8 00 00 restore <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 400043d8: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400043dc: 40 00 08 0b call 40006408 <== NOT EXECUTED 400043e0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 400043e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400043e8: 02 bf ff f8 be 400043c8 <== NOT EXECUTED 400043ec: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400043f0: 40 00 0b 1d call 40007064 <== NOT EXECUTED 400043f4: 01 00 00 00 nop 400043f8: 01 00 00 00 nop 400043fc : * 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) { 400043fc: 9d e3 bf 98 save %sp, -104, %sp <== 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) { 40004400: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40004404: 05 10 00 69 sethi %hi(0x4001a400), %g2 <== NOT EXECUTED 40004408: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 4000440c: a2 10 a1 bc or %g2, 0x1bc, %l1 <== NOT EXECUTED 40004410: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40004414: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED 40004418: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000441c: 02 80 00 22 be 400044a4 <== NOT EXECUTED 40004420: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED while (len--) { 40004424: 22 80 00 0f be,a 40004460 <== NOT EXECUTED 40004428: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 4000442c: 10 80 00 05 b 40004440 <== NOT EXECUTED 40004430: a0 10 20 00 clr %l0 <== NOT EXECUTED 40004434: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004438: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 4000443c: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40004440: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED 40004444: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004448: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000444c: a0 04 20 01 inc %l0 <== 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--) { 40004450: 80 a4 00 1a cmp %l0, %i2 <== NOT EXECUTED 40004454: 32 bf ff f8 bne,a 40004434 <== NOT EXECUTED 40004458: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4000445c: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 40004460: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004464: 12 80 00 0e bne 4000449c <== NOT EXECUTED 40004468: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000446c: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40004470: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004474: 02 80 00 0a be 4000449c <== NOT EXECUTED 40004478: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4000447c: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40004480: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004484: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40004488: a6 10 20 00 clr %l3 <== NOT EXECUTED 4000448c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004490: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 40004494: 81 c7 e0 08 ret <== NOT EXECUTED 40004498: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED 4000449c: 81 c7 e0 08 ret <== NOT EXECUTED 400044a0: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400044a4: b4 06 bf ff add %i2, -1, %i2 <== 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, 400044a8: ac 06 20 4a add %i0, 0x4a, %l6 <== 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); 400044ac: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED 400044b0: a6 10 20 00 clr %l3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400044b4: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 400044b8: 02 80 00 1c be 40004528 <== NOT EXECUTED 400044bc: a2 10 20 00 clr %l1 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 400044c0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400044c4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400044c8: 02 80 00 0b be 400044f4 <== NOT EXECUTED 400044cc: e4 0e 40 00 ldub [ %i1 ], %l2 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 400044d0: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 400044d4: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED 400044d8: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 400044dc: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 400044e0: 02 80 00 64 be 40004670 <== NOT EXECUTED 400044e4: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 400044e8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400044ec: 02 80 00 68 be 4000468c <== NOT EXECUTED 400044f0: 01 00 00 00 nop <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 400044f4: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 400044f8: 02 80 00 24 be 40004588 <== NOT EXECUTED 400044fc: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 40004500: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004504: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 40004508: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 4000450c: 02 80 00 0f be 40004548 <== NOT EXECUTED 40004510: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004514: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40004518: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 4000451c: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40004520: 12 bf ff e8 bne 400044c0 <== NOT EXECUTED 40004524: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40004528: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 4000452c: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40004530: 82 00 40 13 add %g1, %l3, %g1 <== NOT EXECUTED 40004534: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40004538: 40 00 09 50 call 40006a78 <== NOT EXECUTED 4000453c: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED return dropped; } 40004540: 81 c7 e0 08 ret <== NOT EXECUTED 40004544: 81 e8 00 00 restore <== NOT EXECUTED } if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); 40004548: 7f ff f6 38 call 40001e28 <== NOT EXECUTED 4000454c: 01 00 00 00 nop <== NOT EXECUTED 40004550: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40004554: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004558: c4 06 20 94 ld [ %i0 + 0x94 ], %g2 <== NOT EXECUTED if (flow_rcv) { /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 4000455c: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40004560: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004564: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004568: 12 80 00 53 bne 400046b4 <== NOT EXECUTED 4000456c: 01 00 00 00 nop <== 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); 40004570: a2 10 20 01 mov 1, %l1 ! 1 <== NOT EXECUTED 40004574: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004578: 7f ff f6 30 call 40001e38 <== NOT EXECUTED 4000457c: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40004580: 10 bf ff e7 b 4000451c <== NOT EXECUTED 40004584: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40004588: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 4000458c: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40004590: 40 00 45 6b call 40015b3c <.urem> <== NOT EXECUTED 40004594: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40004598: 7f ff f6 24 call 40001e28 <== NOT EXECUTED 4000459c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400045a0: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 400045a4: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 400045a8: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 400045ac: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 400045b0: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 400045b4: 40 00 45 62 call 40015b3c <.urem> <== NOT EXECUTED 400045b8: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 400045bc: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 400045c0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400045c4: 08 80 00 13 bleu 40004610 <== NOT EXECUTED 400045c8: 01 00 00 00 nop <== NOT EXECUTED 400045cc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400045d0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400045d4: 12 80 00 0f bne 40004610 <== NOT EXECUTED 400045d8: 01 00 00 00 nop <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 400045dc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400045e0: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 400045e4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400045e8: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED 400045ec: 84 08 a4 02 and %g2, 0x402, %g2 <== NOT EXECUTED 400045f0: 80 a0 a4 00 cmp %g2, 0x400 <== NOT EXECUTED 400045f4: 02 80 00 38 be 400046d4 <== NOT EXECUTED 400045f8: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 400045fc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004600: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 40004604: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 40004608: 02 80 00 44 be 40004718 <== NOT EXECUTED 4000460c: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 40004610: 7f ff f6 0a call 40001e38 <== NOT EXECUTED 40004614: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40004618: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 4000461c: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 40004620: 22 80 00 1f be,a 4000469c <== NOT EXECUTED 40004624: a6 04 e0 01 inc %l3 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 40004628: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED 4000462c: e4 28 40 10 stb %l2, [ %g1 + %l0 ] <== NOT EXECUTED tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40004630: c4 06 20 e4 ld [ %i0 + 0xe4 ], %g2 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 40004634: e0 26 20 60 st %l0, [ %i0 + 0x60 ] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40004638: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000463c: 32 bf ff b7 bne,a 40004518 <== NOT EXECUTED 40004640: b2 06 60 01 inc %i1 <== NOT EXECUTED 40004644: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40004648: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000464c: 22 bf ff b3 be,a 40004518 <== NOT EXECUTED 40004650: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004654: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40004658: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000465c: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40004660: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004664: b2 06 60 01 inc %i1 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 40004668: 10 bf ff ac b 40004518 <== NOT EXECUTED 4000466c: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== 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]) { 40004670: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40004674: 02 80 00 0c be 400046a4 <== NOT EXECUTED 40004678: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4000467c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004680: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 40004684: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40004688: 30 bf ff 9e b,a 40004500 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4000468c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004690: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 40004694: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40004698: 30 bf ff 9a b,a 40004500 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4000469c: 10 bf ff 9f b 40004518 <== NOT EXECUTED 400046a0: b2 06 60 01 inc %i1 <== 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; 400046a4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400046a8: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED 400046ac: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 400046b0: 30 bf ff 94 b,a 40004500 <== 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, 400046b4: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 400046b8: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 400046bc: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400046c0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400046c4: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 400046c8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400046cc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400046d0: 30 bf ff a8 b,a 40004570 <== 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) || 400046d4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400046d8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400046dc: 12 80 00 06 bne 400046f4 <== NOT EXECUTED 400046e0: 01 00 00 00 nop <== NOT EXECUTED 400046e4: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 400046e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400046ec: 12 bf ff c9 bne 40004610 <== NOT EXECUTED 400046f0: 01 00 00 00 nop <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 400046f4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400046f8: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400046fc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED == (FL_MDXOF ) ){ 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; 40004700: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004704: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED == (FL_MDXOF ) ){ 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; 40004708: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000470c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004710: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004714: 30 bf ff bf b,a 40004610 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40004718: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4000471c: c4 06 20 ac ld [ %i0 + 0xac ], %g2 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 40004720: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 40004724: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40004728: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000472c: 02 bf ff b9 be 40004610 <== NOT EXECUTED 40004730: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40004734: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004738: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 4000473c: 30 bf ff b5 b,a 40004610 <== NOT EXECUTED 400040fc : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 400040fc: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40004100: 03 10 00 6a sethi %hi(0x4001a800), %g1 40004104: c4 00 61 00 ld [ %g1 + 0x100 ], %g2 ! 4001a900 40004108: 80 a0 a0 00 cmp %g2, 0 4000410c: 02 80 00 04 be 4000411c 40004110: 98 10 61 00 or %g1, 0x100, %o4 40004114: 81 c7 e0 08 ret 40004118: 81 e8 00 00 restore sc = rtems_semaphore_create ( 4000411c: 11 15 14 9b sethi %hi(0x54526c00), %o0 40004120: 92 10 20 01 mov 1, %o1 40004124: 90 12 21 69 or %o0, 0x169, %o0 40004128: 94 10 20 54 mov 0x54, %o2 4000412c: 40 00 09 64 call 400066bc 40004130: 96 10 20 00 clr %o3 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) 40004134: 80 a2 20 00 cmp %o0, 0 40004138: 02 bf ff f7 be 40004114 4000413c: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40004140: 40 00 0b c9 call 40007064 <== NOT EXECUTED 40004144: 01 00 00 00 nop 40004148: 01 00 00 00 nop 40005474 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40005474: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005478: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 4000547c: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005480: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40005484: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005488: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 4000548c: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005490: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005494: 40 00 05 31 call 40006958 <== NOT EXECUTED 40005498: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 4000549c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400054a0: 32 80 00 12 bne,a 400054e8 <== NOT EXECUTED 400054a4: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 400054a8: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED 400054ac: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 400054b0: 22 80 00 27 be,a 4000554c <== NOT EXECUTED 400054b4: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 400054b8: 18 80 00 0e bgu 400054f0 <== NOT EXECUTED 400054bc: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 400054c0: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 400054c4: 22 80 00 61 be,a 40005648 <== NOT EXECUTED 400054c8: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 400054cc: 08 80 00 4c bleu 400055fc <== NOT EXECUTED 400054d0: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 400054d4: 7f ff fe b8 call 40004fb4 <== NOT EXECUTED 400054d8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 400054dc: 40 00 05 67 call 40006a78 <== NOT EXECUTED 400054e0: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 400054e4: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 400054e8: 81 c7 e0 08 ret <== NOT EXECUTED 400054ec: 81 e8 00 00 restore <== 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) { 400054f0: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 400054f4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400054f8: 02 80 00 48 be 40005618 <== NOT EXECUTED 400054fc: 01 00 00 00 nop <== NOT EXECUTED 40005500: 18 80 00 1b bgu 4000556c <== NOT EXECUTED 40005504: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 40005508: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 4000550c: 22 80 00 14 be,a 4000555c <== NOT EXECUTED 40005510: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40005514: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED 40005518: 03 10 00 69 sethi %hi(0x4001a400), %g1 <== NOT EXECUTED 4000551c: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40005520: 82 10 61 bc or %g1, 0x1bc, %g1 <== NOT EXECUTED 40005524: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40005528: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4000552c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005530: 02 bf ff eb be 400054dc <== NOT EXECUTED 40005534: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40005538: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000553c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005540: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40005544: 10 bf ff e6 b 400054dc <== NOT EXECUTED 40005548: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 4000554c: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 40005550: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 40005554: 10 bf ff e2 b 400054dc <== NOT EXECUTED 40005558: c4 24 60 e0 st %g2, [ %l1 + 0xe0 ] <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 4000555c: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 40005560: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 40005564: 10 bf ff de b 400054dc <== NOT EXECUTED 40005568: c4 24 60 d8 st %g2, [ %l1 + 0xd8 ] <== 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) { 4000556c: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 40005570: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005574: 02 80 00 1e be 400055ec <== NOT EXECUTED 40005578: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 4000557c: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 40005580: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005584: 32 bf ff e5 bne,a 40005518 <== NOT EXECUTED 40005588: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 4000558c: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 40005590: 05 10 00 69 sethi %hi(0x4001a400), %g2 <== NOT EXECUTED 40005594: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40005598: a0 10 a1 bc or %g2, 0x1bc, %l0 <== NOT EXECUTED 4000559c: 82 04 00 01 add %l0, %g1, %g1 <== NOT EXECUTED 400055a0: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400055a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400055a8: 22 80 00 06 be,a 400055c0 <== NOT EXECUTED 400055ac: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400055b0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400055b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400055b8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 400055bc: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 400055c0: c0 24 60 d0 clr [ %l1 + 0xd0 ] <== NOT EXECUTED * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { sc = rtems_termios_linesw[tty->t_line].l_close(tty); } tty->t_line=*(int*)(args->buffer); 400055c4: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 400055c8: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED 400055cc: c2 04 00 02 ld [ %l0 + %g2 ], %g1 <== NOT EXECUTED 400055d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400055d4: 02 bf ff c2 be 400054dc <== NOT EXECUTED 400055d8: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 400055dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400055e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400055e4: 10 bf ff be b 400054dc <== NOT EXECUTED 400055e8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 400055ec: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 400055f0: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 400055f4: 10 bf ff ba b 400054dc <== NOT EXECUTED 400055f8: c2 20 80 00 st %g1, [ %g2 ] <== 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) { 400055fc: 32 bf ff c7 bne,a 40005518 <== NOT EXECUTED 40005600: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 40005604: d0 04 a0 08 ld [ %l2 + 8 ], %o0 <== NOT EXECUTED 40005608: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 4000560c: 40 00 26 c2 call 4000f114 <== NOT EXECUTED 40005610: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40005614: 30 bf ff b2 b,a 400054dc <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40005618: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 4000561c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40005620: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 40005624: 0c 80 00 82 bneg 4000582c <== NOT EXECUTED 40005628: 01 00 00 00 nop <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 4000562c: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 40005630: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 40005634: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 40005638: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000563c: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 40005640: 10 bf ff a7 b 400054dc <== NOT EXECUTED 40005644: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 40005648: a6 04 60 30 add %l1, 0x30, %l3 <== NOT EXECUTED 4000564c: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40005650: 40 00 26 b1 call 4000f114 <== NOT EXECUTED 40005654: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 40005658: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000565c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40005660: 02 80 00 19 be 400056c4 <== NOT EXECUTED 40005664: 01 00 00 00 nop <== NOT EXECUTED 40005668: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 4000566c: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40005670: 12 80 00 15 bne 400056c4 <== NOT EXECUTED 40005674: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 40005678: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000567c: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 40005680: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 40005684: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 40005688: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 4000568c: 02 80 00 0e be 400056c4 <== NOT EXECUTED 40005690: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40005694: 7f ff f1 e5 call 40001e28 <== NOT EXECUTED 40005698: 01 00 00 00 nop <== NOT EXECUTED 4000569c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400056a0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400056a4: c4 04 60 94 ld [ %l1 + 0x94 ], %g2 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 400056a8: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 400056ac: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400056b0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400056b4: 12 80 00 6d bne 40005868 <== NOT EXECUTED 400056b8: 01 00 00 00 nop <== 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); 400056bc: 7f ff f1 df call 40001e38 <== NOT EXECUTED 400056c0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 400056c4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400056c8: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 400056cc: 02 80 00 0c be 400056fc <== NOT EXECUTED 400056d0: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 400056d4: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 400056d8: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400056dc: 12 80 00 08 bne 400056fc <== NOT EXECUTED 400056e0: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 400056e4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400056e8: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 400056ec: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 400056f0: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 400056f4: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED 400056f8: c4 24 60 b8 st %g2, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 400056fc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005700: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40005704: 12 80 00 22 bne 4000578c <== NOT EXECUTED 40005708: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== 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) { 4000570c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40005710: 06 80 00 4a bl 40005838 <== NOT EXECUTED 40005714: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40005718: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 4000571c: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 40005720: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40005724: 02 80 00 06 be 4000573c <== NOT EXECUTED 40005728: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 4000572c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005730: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 40005734: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 40005738: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED 4000573c: 22 80 00 06 be,a 40005754 <== NOT EXECUTED 40005740: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40005744: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005748: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 4000574c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED 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) { 40005750: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 40005754: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40005758: 02 80 00 23 be 400057e4 <== NOT EXECUTED 4000575c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005760: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40005764: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40005768: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 4000576c: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 40005770: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005774: 02 bf ff 5a be 400054dc <== NOT EXECUTED 40005778: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 4000577c: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40005780: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005784: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40005788: 30 bf ff 55 b,a 400054dc <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 4000578c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40005790: 06 80 00 2a bl 40005838 <== NOT EXECUTED 40005794: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 40005798: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000579c: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 400057a0: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 400057a4: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 400057a8: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 400057ac: 02 80 00 09 be 400057d0 <== NOT EXECUTED 400057b0: 01 00 00 00 nop <== NOT EXECUTED 400057b4: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 400057b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400057bc: 02 80 00 05 be 400057d0 <== NOT EXECUTED 400057c0: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400057c4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400057c8: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 400057cc: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400057d0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400057d4: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400057d8: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== 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) { 400057dc: 10 bf ff cd b 40005710 <== NOT EXECUTED 400057e0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 400057e4: 40 00 01 ff call 40005fe0 <== NOT EXECUTED 400057e8: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 400057ec: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 400057f0: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 400057f4: 40 00 3f ec call 400157a4 <.umul> <== NOT EXECUTED 400057f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400057fc: 40 00 40 24 call 4001588c <.udiv> <== NOT EXECUTED 40005800: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 40005804: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40005808: 02 80 00 11 be 4000584c <== NOT EXECUTED 4000580c: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40005810: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005814: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40005818: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000581c: 12 bf ff d3 bne 40005768 <== NOT EXECUTED 40005820: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40005824: 10 bf ff d2 b 4000576c <== NOT EXECUTED 40005828: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 4000582c: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 40005830: 10 bf ff 7f b 4000562c <== NOT EXECUTED 40005834: 88 01 00 01 add %g4, %g1, %g4 <== 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; 40005838: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000583c: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40005840: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40005844: 10 bf ff b6 b 4000571c <== NOT EXECUTED 40005848: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 4000584c: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED 40005850: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005854: 32 bf ff c4 bne,a 40005764 <== NOT EXECUTED 40005858: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 4000585c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40005860: 10 bf ff c3 b 4000576c <== NOT EXECUTED 40005864: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== 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, 40005868: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 4000586c: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 40005870: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 40005874: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40005878: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 4000587c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40005880: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40005884: 30 bf ff 8e b,a 400056bc <== NOT EXECUTED 40005a48 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 40005a48: 9d e3 bf 98 save %sp, -104, %sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 40005a4c: 29 10 00 6a sethi %hi(0x4001a800), %l4 40005a50: d0 05 21 00 ld [ %l4 + 0x100 ], %o0 ! 4001a900 40005a54: 92 10 20 00 clr %o1 40005a58: 40 00 03 c0 call 40006958 40005a5c: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40005a60: a4 92 20 00 orcc %o0, 0, %l2 40005a64: 32 80 00 29 bne,a 40005b08 40005a68: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40005a6c: 27 10 00 6a sethi %hi(0x4001a800), %l3 40005a70: e0 04 e1 08 ld [ %l3 + 0x108 ], %l0 ! 4001a908 40005a74: 80 a4 20 00 cmp %l0, 0 40005a78: 32 80 00 08 bne,a 40005a98 40005a7c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005a80: 10 80 00 24 b 40005b10 40005a84: 90 10 20 01 mov 1, %o0 */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40005a88: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40005a8c: 02 80 00 21 be 40005b10 <== NOT EXECUTED 40005a90: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 40005a94: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40005a98: 80 a0 40 18 cmp %g1, %i0 40005a9c: 32 bf ff fb bne,a 40005a88 40005aa0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 40005aa4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40005aa8: 80 a0 40 19 cmp %g1, %i1 40005aac: 32 bf ff f7 bne,a 40005a88 40005ab0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 40005ab4: c2 04 20 08 ld [ %l0 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40005ab8: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 40005abc: 86 00 60 01 add %g1, 1, %g3 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40005ac0: e0 20 a0 28 st %l0, [ %g2 + 0x28 ] if (!tty->refcount++) { 40005ac4: 80 a0 60 00 cmp %g1, 0 40005ac8: 12 80 00 0d bne 40005afc 40005acc: c6 24 20 08 st %g3, [ %l0 + 8 ] if (tty->device.firstOpen) 40005ad0: c2 04 20 98 ld [ %l0 + 0x98 ], %g1 40005ad4: 80 a0 60 00 cmp %g1, 0 40005ad8: 02 80 00 05 be 40005aec 40005adc: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 40005ae0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40005ae4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005ae8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005aec: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005af0: 80 a0 60 02 cmp %g1, 2 40005af4: 22 80 00 a0 be,a 40005d74 40005af8: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 40005afc: 40 00 03 df call 40006a78 40005b00: d0 05 21 00 ld [ %l4 + 0x100 ], %o0 return RTEMS_SUCCESSFUL; } 40005b04: b0 10 00 12 mov %l2, %i0 40005b08: 81 c7 e0 08 ret 40005b0c: 81 e8 00 00 restore static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005b10: 40 00 17 0d call 4000b744 40005b14: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 40005b18: a2 92 20 00 orcc %o0, 0, %l1 40005b1c: 02 80 00 a8 be 40005dbc 40005b20: a0 10 00 11 mov %l1, %l0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40005b24: 03 10 00 68 sethi %hi(0x4001a000), %g1 40005b28: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 ! 4001a010 40005b2c: c4 24 60 64 st %g2, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40005b30: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 40005b34: 40 00 18 c9 call 4000be58 40005b38: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 40005b3c: 80 a2 20 00 cmp %o0, 0 40005b40: 02 80 00 9d be 40005db4 40005b44: d0 24 60 58 st %o0, [ %l1 + 0x58 ] return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40005b48: 03 10 00 68 sethi %hi(0x4001a000), %g1 40005b4c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 ! 4001a014 40005b50: c4 24 60 88 st %g2, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40005b54: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 40005b58: 40 00 18 c0 call 4000be58 40005b5c: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40005b60: 80 a2 20 00 cmp %o0, 0 40005b64: 02 80 00 9b be 40005dd0 40005b68: d0 24 60 7c st %o0, [ %l1 + 0x7c ] return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40005b6c: 03 10 00 68 sethi %hi(0x4001a000), %g1 40005b70: 40 00 18 ba call 4000be58 40005b74: d0 00 60 0c ld [ %g1 + 0xc ], %o0 ! 4001a00c if (tty->cbuf == NULL) { 40005b78: 80 a2 20 00 cmp %o0, 0 40005b7c: 02 80 00 ab be 40005e28 40005b80: d0 24 60 1c st %o0, [ %l1 + 0x1c ] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005b84: c2 04 e1 08 ld [ %l3 + 0x108 ], %g1 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 40005b88: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40005b8c: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40005b90: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40005b94: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 40005b98: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005b9c: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40005ba0: 80 a0 60 00 cmp %g1, 0 40005ba4: 02 80 00 03 be 40005bb0 40005ba8: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 40005bac: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40005bb0: 05 10 00 6a sethi %hi(0x4001a800), %g2 40005bb4: c2 00 a1 04 ld [ %g2 + 0x104 ], %g1 ! 4001a904 40005bb8: 80 a0 60 00 cmp %g1, 0 40005bbc: 02 80 00 b8 be 40005e9c 40005bc0: e2 24 e1 08 st %l1, [ %l3 + 0x108 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40005bc4: 27 10 00 68 sethi %hi(0x4001a000), %l3 40005bc8: c2 4c e0 18 ldsb [ %l3 + 0x18 ], %g1 ! 4001a018 40005bcc: 11 15 14 9a sethi %hi(0x54526800), %o0 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 40005bd0: f2 24 60 10 st %i1, [ %l1 + 0x10 ] tty->major = major; 40005bd4: f0 24 60 0c st %i0, [ %l1 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40005bd8: 90 12 21 00 or %o0, 0x100, %o0 40005bdc: 92 10 20 01 mov 1, %o1 40005be0: 90 10 40 08 or %g1, %o0, %o0 40005be4: 94 10 20 54 mov 0x54, %o2 40005be8: 96 10 20 00 clr %o3 40005bec: 40 00 02 b4 call 400066bc 40005bf0: 98 04 60 14 add %l1, 0x14, %o4 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) 40005bf4: 80 a2 20 00 cmp %o0, 0 40005bf8: 12 80 00 6d bne 40005dac 40005bfc: c2 4c e0 18 ldsb [ %l3 + 0x18 ], %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40005c00: 11 15 14 9b sethi %hi(0x54526c00), %o0 40005c04: 92 10 20 01 mov 1, %o1 40005c08: 90 12 23 00 or %o0, 0x300, %o0 40005c0c: 94 10 20 54 mov 0x54, %o2 40005c10: 90 10 40 08 or %g1, %o0, %o0 40005c14: 96 10 20 00 clr %o3 40005c18: 40 00 02 a9 call 400066bc 40005c1c: 98 04 60 18 add %l1, 0x18, %o4 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) 40005c20: 80 a2 20 00 cmp %o0, 0 40005c24: 12 80 00 62 bne 40005dac 40005c28: c2 4c e0 18 ldsb [ %l3 + 0x18 ], %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 40005c2c: 11 15 14 9e sethi %hi(0x54527800), %o0 40005c30: 92 10 20 00 clr %o1 40005c34: 90 10 40 08 or %g1, %o0, %o0 40005c38: 94 10 20 20 mov 0x20, %o2 40005c3c: 96 10 20 00 clr %o3 40005c40: 40 00 02 9f call 400066bc 40005c44: 98 04 60 8c add %l1, 0x8c, %o4 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 40005c48: 80 a2 20 00 cmp %o0, 0 40005c4c: 12 80 00 58 bne 40005dac 40005c50: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40005c54: c0 24 60 94 clr [ %l1 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 40005c58: 90 04 60 98 add %l1, 0x98, %o0 40005c5c: 40 00 25 2e call 4000f114 40005c60: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005c64: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40005c68: 80 a0 60 02 cmp %g1, 2 40005c6c: 02 80 00 74 be 40005e3c 40005c70: c2 4c e0 18 ldsb [ %l3 + 0x18 ], %g1 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 40005c74: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 40005c78: 80 a0 60 00 cmp %g1, 0 40005c7c: 02 80 00 5e be 40005df4 40005c80: c2 4c e0 18 ldsb [ %l3 + 0x18 ], %g1 40005c84: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40005c88: 80 a0 60 02 cmp %g1, 2 40005c8c: 02 80 00 5a be 40005df4 40005c90: c2 4c e0 18 ldsb [ %l3 + 0x18 ], %g1 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 40005c94: c0 24 60 b8 clr [ %l1 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40005c98: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 40005c9c: c8 0c e0 18 ldub [ %l3 + 0x18 ], %g4 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 40005ca0: 83 30 60 01 srl %g1, 1, %g1 40005ca4: c2 24 60 bc st %g1, [ %l1 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40005ca8: 03 00 00 09 sethi %hi(0x2400), %g1 40005cac: 82 10 61 02 or %g1, 0x102, %g1 ! 2502 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40005cb0: 05 00 00 06 sethi %hi(0x1800), %g2 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40005cb4: c2 24 60 30 st %g1, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40005cb8: 84 10 a0 05 or %g2, 5, %g2 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40005cbc: 03 00 00 20 sethi %hi(0x8000), %g1 40005cc0: 82 10 62 3b or %g1, 0x23b, %g1 ! 823b /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40005cc4: c4 24 60 34 st %g2, [ %l1 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40005cc8: c2 24 60 3c st %g1, [ %l1 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 40005ccc: 84 10 20 03 mov 3, %g2 tty->termios.c_cc[VQUIT] = '\034'; 40005cd0: 82 10 20 1c mov 0x1c, %g1 tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 40005cd4: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40005cd8: c2 2c 60 42 stb %g1, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40005cdc: 84 10 20 7f mov 0x7f, %g2 tty->termios.c_cc[VKILL] = '\025'; 40005ce0: 82 10 20 15 mov 0x15, %g1 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 40005ce4: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40005ce8: c2 2c 60 44 stb %g1, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40005cec: 84 10 20 04 mov 4, %g2 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40005cf0: 82 10 20 11 mov 0x11, %g1 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 40005cf4: da 04 60 64 ld [ %l1 + 0x64 ], %o5 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; 40005cf8: c4 2c 60 45 stb %g2, [ %l1 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40005cfc: c2 2c 60 49 stb %g1, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 40005d00: 84 10 20 13 mov 0x13, %g2 tty->termios.c_cc[VSUSP] = '\032'; 40005d04: 82 10 20 1a mov 0x1a, %g1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40005d08: 86 10 28 bd mov 0x8bd, %g3 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 40005d0c: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40005d10: c2 2c 60 4b stb %g1, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 40005d14: 84 10 20 12 mov 0x12, %g2 tty->termios.c_cc[VDISCARD] = '\017'; 40005d18: 82 10 20 0f mov 0xf, %g1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40005d1c: c6 24 60 38 st %g3, [ %l1 + 0x38 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 40005d20: c4 2c 60 4d stb %g2, [ %l1 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40005d24: c2 2c 60 4e stb %g1, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40005d28: 84 10 20 17 mov 0x17, %g2 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 40005d2c: c0 2c 60 4c clrb [ %l1 + 0x4c ] tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 40005d30: c4 2c 60 4f stb %g2, [ %l1 + 0x4f ] tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; 40005d34: c0 2c 60 51 clrb [ %l1 + 0x51 ] tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 40005d38: 86 10 20 16 mov 0x16, %g3 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 40005d3c: 83 2b 60 01 sll %o5, 1, %g1 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 40005d40: c6 2c 60 50 stb %g3, [ %l1 + 0x50 ] tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 40005d44: 82 00 40 0d add %g1, %o5, %g1 40005d48: 83 30 60 02 srl %g1, 2, %g1 40005d4c: c2 24 60 c0 st %g1, [ %l1 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 40005d50: 84 01 20 01 add %g4, 1, %g2 40005d54: 89 29 20 18 sll %g4, 0x18, %g4 40005d58: 89 39 20 18 sra %g4, 0x18, %g4 40005d5c: 80 a1 20 7a cmp %g4, 0x7a 40005d60: 12 bf ff 55 bne 40005ab4 40005d64: c4 2c e0 18 stb %g2, [ %l3 + 0x18 ] c = 'a'; 40005d68: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 40005d6c: 10 bf ff 52 b 40005ab4 <== NOT EXECUTED 40005d70: c2 2c e0 18 stb %g1, [ %l3 + 0x18 ] <== NOT EXECUTED (*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, 40005d74: 13 10 00 17 sethi %hi(0x40005c00), %o1 <== NOT EXECUTED 40005d78: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40005d7c: 40 00 04 14 call 40006dcc <== NOT EXECUTED 40005d80: 92 12 63 3c or %o1, 0x33c, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005d84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005d88: 12 80 00 09 bne 40005dac <== NOT EXECUTED 40005d8c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 40005d90: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40005d94: 13 10 00 17 sethi %hi(0x40005c00), %o1 <== NOT EXECUTED 40005d98: 40 00 04 0d call 40006dcc <== NOT EXECUTED 40005d9c: 92 12 62 a4 or %o1, 0x2a4, %o1 ! 40005ea4 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005da0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005da4: 02 bf ff 56 be 40005afc <== NOT EXECUTED 40005da8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005dac: 40 00 04 ae call 40007064 <== NOT EXECUTED 40005db0: 01 00 00 00 nop <== 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); 40005db4: 40 00 16 aa call 4000b85c <== NOT EXECUTED 40005db8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005dbc: d0 05 21 00 ld [ %l4 + 0x100 ], %o0 <== NOT EXECUTED 40005dc0: 40 00 03 2e call 40006a78 <== NOT EXECUTED 40005dc4: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 40005dc8: 81 c7 e0 08 ret <== NOT EXECUTED 40005dcc: 91 e8 00 12 restore %g0, %l2, %o0 <== 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)); 40005dd0: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40005dd4: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); 40005dd8: 40 00 16 a1 call 4000b85c <== NOT EXECUTED 40005ddc: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED free(tty); 40005de0: 40 00 16 9f call 4000b85c <== NOT EXECUTED 40005de4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005de8: 40 00 03 24 call 40006a78 <== NOT EXECUTED 40005dec: d0 05 21 00 ld [ %l4 + 0x100 ], %o0 <== NOT EXECUTED 40005df0: 30 bf ff 46 b,a 40005b08 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 40005df4: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 40005df8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005dfc: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 40005e00: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40005e04: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40005e08: 96 10 20 00 clr %o3 <== NOT EXECUTED 40005e0c: 40 00 02 2c call 400066bc <== NOT EXECUTED 40005e10: 98 04 60 68 add %l1, 0x68, %o4 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 40005e14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005e18: 02 bf ff 9f be 40005c94 <== NOT EXECUTED 40005e1c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40005e20: 40 00 04 91 call 40007064 <== NOT EXECUTED 40005e24: 01 00 00 00 nop <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 40005e28: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 40005e2c: 40 00 16 8c call 4000b85c <== NOT EXECUTED 40005e30: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40005e34: 10 bf ff e9 b 40005dd8 <== NOT EXECUTED 40005e38: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 40005e3c: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 40005e40: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40005e44: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40005e48: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005e4c: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005e50: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005e54: 40 00 03 34 call 40006b24 <== NOT EXECUTED 40005e58: 9a 04 60 c8 add %l1, 0xc8, %o5 <== 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) 40005e5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005e60: 12 bf ff d3 bne 40005dac <== NOT EXECUTED 40005e64: c2 4c e0 18 ldsb [ %l3 + 0x18 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 40005e68: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 40005e6c: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40005e70: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40005e74: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40005e78: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40005e7c: 98 10 20 00 clr %o4 <== NOT EXECUTED 40005e80: 40 00 03 29 call 40006b24 <== NOT EXECUTED 40005e84: 9a 04 60 c4 add %l1, 0xc4, %o5 <== 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) 40005e88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005e8c: 22 bf ff 7b be,a 40005c78 <== NOT EXECUTED 40005e90: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40005e94: 40 00 04 74 call 40007064 <== NOT EXECUTED 40005e98: 01 00 00 00 nop <== 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; 40005e9c: 10 bf ff 4a b 40005bc4 40005ea0: e2 20 a1 04 st %l1, [ %g2 + 0x104 ] 40004740 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40004740: 9d e3 bf 98 save %sp, -104, %sp const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 40004744: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40004748: 92 10 00 18 mov %i0, %o1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 4000474c: 80 a0 60 00 cmp %g1, 0 40004750: 02 80 00 44 be 40004860 40004754: a6 10 00 18 mov %i0, %l3 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 40004758: e4 06 a0 80 ld [ %i2 + 0x80 ], %l2 <== NOT EXECUTED while (len) { 4000475c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004760: 02 80 00 44 be 40004870 <== NOT EXECUTED 40004764: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 40004768: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 4000476c: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 40004770: 40 00 44 f3 call 40015b3c <.urem> <== NOT EXECUTED 40004774: 90 04 a0 01 add %l2, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40004778: 7f ff f5 ac call 40001e28 <== NOT EXECUTED 4000477c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40004780: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 40004784: e0 06 a0 84 ld [ %i2 + 0x84 ], %l0 <== NOT EXECUTED 40004788: 80 a4 00 12 cmp %l0, %l2 <== NOT EXECUTED 4000478c: 12 80 00 13 bne 400047d8 <== NOT EXECUTED 40004790: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40004794: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40004798: 7f ff f5 a8 call 40001e38 <== NOT EXECUTED 4000479c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 400047a0: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 400047a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400047a8: 40 00 08 6c call 40006958 <== NOT EXECUTED 400047ac: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 400047b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400047b4: 12 80 00 20 bne 40004834 <== NOT EXECUTED 400047b8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 400047bc: 7f ff f5 9b call 40001e28 <== NOT EXECUTED 400047c0: 01 00 00 00 nop <== NOT EXECUTED 400047c4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED * 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) { 400047c8: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 400047cc: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 400047d0: 22 bf ff f2 be,a 40004798 <== NOT EXECUTED 400047d4: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; 400047d8: c8 06 a0 80 ld [ %i2 + 0x80 ], %g4 <== NOT EXECUTED 400047dc: c4 0c c0 00 ldub [ %l3 ], %g2 <== NOT EXECUTED 400047e0: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 400047e4: c4 28 40 04 stb %g2, [ %g1 + %g4 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 400047e8: c6 06 a0 94 ld [ %i2 + 0x94 ], %g3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 400047ec: e4 26 a0 80 st %l2, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 400047f0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 400047f4: 12 80 00 0a bne 4000481c <== NOT EXECUTED 400047f8: 01 00 00 00 nop <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 400047fc: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40004800: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40004804: 02 80 00 0e be 4000483c <== NOT EXECUTED 40004808: 01 00 00 00 nop <== NOT EXECUTED (*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; 4000480c: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40004810: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 40004814: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 40004818: e8 26 a0 94 st %l4, [ %i2 + 0x94 ] <== NOT EXECUTED } rtems_interrupt_enable (level); 4000481c: 7f ff f5 87 call 40001e38 <== NOT EXECUTED 40004820: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 40004824: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED 40004828: 02 80 00 12 be 40004870 <== NOT EXECUTED 4000482c: a6 04 e0 01 inc %l3 <== NOT EXECUTED 40004830: 30 bf ff cf b,a 4000476c <== 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); 40004834: 40 00 0a 0c call 40007064 <== NOT EXECUTED 40004838: 01 00 00 00 nop <== NOT EXECUTED 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, 4000483c: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 40004840: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40004844: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 40004848: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 4000484c: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 40004850: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004854: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 40004858: 10 bf ff f1 b 4000481c <== NOT EXECUTED 4000485c: e8 26 a0 94 st %l4, [ %i2 + 0x94 ] <== 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); 40004860: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 40004864: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 40004868: 9f c0 40 00 call %g1 4000486c: 94 10 00 19 mov %i1, %o2 40004870: 81 c7 e0 08 ret 40004874: 81 e8 00 00 restore 40005048 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40005048: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4000504c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40005050: e4 06 20 0c ld [ %i0 + 0xc ], %l2 <== NOT EXECUTED rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005054: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 40005058: e6 06 20 08 ld [ %i0 + 8 ], %l3 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4000505c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40005060: ac 10 00 18 mov %i0, %l6 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005064: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005068: 40 00 06 3c call 40006958 <== NOT EXECUTED 4000506c: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40005070: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40005074: 12 80 00 10 bne 400050b4 <== NOT EXECUTED 40005078: 03 10 00 69 sethi %hi(0x4001a400), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 4000507c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40005080: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40005084: 82 10 61 bc or %g1, 0x1bc, %g1 <== NOT EXECUTED 40005088: 84 00 a0 08 add %g2, 8, %g2 <== NOT EXECUTED 4000508c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40005090: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005094: 02 80 00 0a be 400050bc <== NOT EXECUTED 40005098: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 4000509c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400050a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400050a4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 400050a8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 400050ac: 40 00 06 73 call 40006a78 <== NOT EXECUTED 400050b0: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 400050b4: 81 c7 e0 08 ret <== NOT EXECUTED 400050b8: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 400050bc: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 400050c0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400050c4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400050c8: 22 80 00 20 be,a 40005148 <== NOT EXECUTED 400050cc: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 400050d0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 400050d4: 22 80 00 16 be,a 4000512c <== NOT EXECUTED 400050d8: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED 400050dc: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED 400050e0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400050e4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400050e8: 26 80 00 09 bl,a 4000510c <== NOT EXECUTED 400050ec: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 400050f0: 10 80 00 0f b 4000512c <== NOT EXECUTED 400050f4: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 400050f8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400050fc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40005100: 24 80 00 0b ble,a 4000512c <== NOT EXECUTED 40005104: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40005108: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 4000510c: a4 84 bf ff addcc %l2, -1, %l2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40005110: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 <== NOT EXECUTED 40005114: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40005118: c4 2c c0 00 stb %g2, [ %l3 ] <== NOT EXECUTED 4000511c: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005120: 12 bf ff f6 bne 400050f8 <== NOT EXECUTED 40005124: a6 04 e0 01 inc %l3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40005128: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 4000512c: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40005130: 82 20 40 12 sub %g1, %l2, %g1 <== NOT EXECUTED 40005134: c2 25 a0 14 st %g1, [ %l6 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40005138: 40 00 06 50 call 40006a78 <== NOT EXECUTED 4000513c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40005140: 81 c7 e0 08 ret <== NOT EXECUTED 40005144: 81 e8 00 00 restore <== 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 40005148: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 4000514c: c2 24 20 2c st %g1, [ %l0 + 0x2c ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 40005150: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED 40005154: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 40005158: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000515c: 02 80 00 06 be 40005174 <== NOT EXECUTED 40005160: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 40005164: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40005168: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000516c: 22 80 00 69 be,a 40005310 <== NOT EXECUTED 40005170: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== 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; 40005174: e2 04 20 74 ld [ %l0 + 0x74 ], %l1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40005178: 03 10 00 68 sethi %hi(0x4001a000), %g1 <== 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, 4000517c: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40005180: aa 10 60 0c or %g1, 0xc, %l5 <== 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, 40005184: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40005188: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 4000518c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40005190: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005194: 02 80 00 3e be 4000528c <== NOT EXECUTED 40005198: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 4000519c: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED 400051a0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 400051a4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400051a8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400051ac: 16 80 00 38 bge 4000528c <== NOT EXECUTED 400051b0: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 400051b4: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 400051b8: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 400051bc: 40 00 42 60 call 40015b3c <.urem> <== NOT EXECUTED 400051c0: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 400051c4: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== NOT EXECUTED while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 400051c8: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 400051cc: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 400051d0: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 400051d4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400051d8: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 400051dc: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 400051e0: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 400051e4: 40 00 42 56 call 40015b3c <.urem> <== NOT EXECUTED 400051e8: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 400051ec: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 400051f0: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400051f4: 3a 80 00 18 bcc,a 40005254 <== NOT EXECUTED 400051f8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 400051fc: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005200: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40005204: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 40005208: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED 4000520c: 84 08 a2 02 and %g2, 0x202, %g2 <== NOT EXECUTED 40005210: 80 a0 a2 02 cmp %g2, 0x202 <== NOT EXECUTED 40005214: 22 80 00 31 be,a 400052d8 <== NOT EXECUTED 40005218: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== 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) { 4000521c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005220: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40005224: 22 80 00 0c be,a 40005254 <== NOT EXECUTED 40005228: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 4000522c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40005230: c4 04 20 b0 ld [ %l0 + 0xb0 ], %g2 <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { tty->flow_ctrl &= ~FL_IRTSOFF; 40005234: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40005238: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 4000523c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005240: 22 80 00 05 be,a 40005254 <== NOT EXECUTED 40005244: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40005248: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000524c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40005250: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40005254: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40005258: 02 80 00 17 be 400052b4 <== NOT EXECUTED 4000525c: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 40005260: 7f ff ff 0c call 40004e90 <== NOT EXECUTED 40005264: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40005268: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000526c: 32 80 00 02 bne,a 40005274 <== NOT EXECUTED 40005270: a8 10 20 00 clr %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40005274: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40005278: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000527c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005280: 12 bf ff c7 bne 4000519c <== NOT EXECUTED 40005284: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 40005288: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 4000528c: 02 bf ff 92 be 400050d4 <== NOT EXECUTED 40005290: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40005294: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40005298: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 4000529c: 40 00 05 af call 40006958 <== NOT EXECUTED 400052a0: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 400052a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400052a8: 02 bf ff b8 be 40005188 <== NOT EXECUTED 400052ac: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 400052b0: 30 bf ff 89 b,a 400050d4 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 400052b4: 7f ff fe f7 call 40004e90 <== NOT EXECUTED 400052b8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400052bc: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 400052c0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400052c4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400052c8: 06 bf ff eb bl 40005274 <== NOT EXECUTED 400052cc: 01 00 00 00 nop <== NOT EXECUTED 400052d0: 10 bf ff e9 b 40005274 <== NOT EXECUTED 400052d4: a8 10 20 00 clr %l4 ! 0 <== 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)) 400052d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400052dc: 22 80 00 07 be,a 400052f8 <== NOT EXECUTED 400052e0: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400052e4: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400052e8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400052ec: 02 bf ff cc be 4000521c <== NOT EXECUTED 400052f0: 01 00 00 00 nop <== 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, 400052f4: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400052f8: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400052fc: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40005300: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005304: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40005308: 10 bf ff d3 b 40005254 <== NOT EXECUTED 4000530c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40005310: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40005314: 12 80 00 37 bne 400053f0 <== NOT EXECUTED 40005318: 01 00 00 00 nop <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 4000531c: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40005320: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005324: 12 80 00 07 bne 40005340 <== NOT EXECUTED 40005328: a8 07 bf f4 add %fp, -12, %l4 <== NOT EXECUTED 4000532c: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40005330: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005334: 12 80 00 3f bne 40005430 <== NOT EXECUTED 40005338: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED else { siproc (n, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 4000533c: a8 07 bf f4 add %fp, -12, %l4 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40005340: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 40005344: 9f c0 80 00 call %g2 <== NOT EXECUTED 40005348: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 4000534c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005350: 36 80 00 16 bge,a 400053a8 <== NOT EXECUTED 40005354: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 40005358: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 4000535c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005360: 02 80 00 38 be 40005440 <== NOT EXECUTED 40005364: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 40005368: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000536c: 02 80 00 06 be 40005384 <== NOT EXECUTED 40005370: 01 00 00 00 nop <== NOT EXECUTED 40005374: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40005378: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000537c: 12 80 00 34 bne 4000544c <== NOT EXECUTED 40005380: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 40005384: 40 00 06 ad call 40006e38 <== NOT EXECUTED 40005388: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000538c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 40005390: 9f c0 80 00 call %g2 <== NOT EXECUTED 40005394: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40005398: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000539c: 26 bf ff f0 bl,a 4000535c <== NOT EXECUTED 400053a0: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 400053a4: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 400053a8: 7f ff fe ba call 40004e90 <== NOT EXECUTED 400053ac: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 400053b0: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 400053b4: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400053b8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400053bc: 16 bf ff 45 bge 400050d0 <== NOT EXECUTED 400053c0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 400053c4: 22 bf ff e0 be,a 40005344 <== NOT EXECUTED 400053c8: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED 400053cc: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 400053d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400053d4: 12 80 00 13 bne 40005420 <== NOT EXECUTED 400053d8: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 400053dc: 10 bf ff da b 40005344 <== NOT EXECUTED 400053e0: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); 400053e4: 40 00 06 95 call 40006e38 <== NOT EXECUTED 400053e8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 400053ec: c6 04 20 a0 ld [ %l0 + 0xa0 ], %g3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 400053f0: 9f c0 c0 00 call %g3 <== NOT EXECUTED 400053f4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 400053f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400053fc: 06 bf ff fa bl 400053e4 <== NOT EXECUTED 40005400: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40005404: 7f ff fe a3 call 40004e90 <== NOT EXECUTED 40005408: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000540c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005410: 12 bf ff 31 bne 400050d4 <== NOT EXECUTED 40005414: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40005418: 10 bf ff f6 b 400053f0 <== NOT EXECUTED 4000541c: c6 04 20 a0 ld [ %l0 + 0xa0 ], %g3 <== NOT EXECUTED else { siproc (n, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40005420: 40 00 02 f0 call 40005fe0 <== NOT EXECUTED 40005424: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40005428: 10 bf ff c7 b 40005344 <== NOT EXECUTED 4000542c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40005430: 40 00 02 ec call 40005fe0 <== NOT EXECUTED 40005434: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40005438: 10 bf ff c1 b 4000533c <== NOT EXECUTED 4000543c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40005440: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005444: 02 bf ff 23 be 400050d0 <== NOT EXECUTED 40005448: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 4000544c: 40 00 02 e5 call 40005fe0 <== NOT EXECUTED 40005450: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40005454: c6 04 20 54 ld [ %l0 + 0x54 ], %g3 <== NOT EXECUTED 40005458: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 4000545c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005460: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40005464: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40005468: 08 bf ff c7 bleu 40005384 <== NOT EXECUTED 4000546c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40005470: 30 bf ff 19 b,a 400050d4 <== NOT EXECUTED 40004184 : * 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) { 40004184: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 40004188: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000418c: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40004190: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40004194: 22 80 00 3e be,a 4000428c <== NOT EXECUTED 40004198: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 4000419c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400041a0: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 400041a4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400041a8: 22 80 00 49 be,a 400042cc <== NOT EXECUTED 400041ac: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 400041b0: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 400041b4: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 400041b8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400041bc: 22 80 00 2f be,a 40004278 <== NOT EXECUTED 400041c0: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 400041c4: 7f ff f7 19 call 40001e28 <== NOT EXECUTED 400041c8: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 400041cc: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 400041d0: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400041d4: 7f ff f7 19 call 40001e38 <== NOT EXECUTED 400041d8: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 400041dc: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 400041e0: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 400041e4: 40 00 46 56 call 40015b3c <.urem> <== NOT EXECUTED 400041e8: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 400041ec: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 400041f0: d0 26 20 84 st %o0, [ %i0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 400041f4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400041f8: 02 80 00 54 be 40004348 <== NOT EXECUTED 400041fc: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 40004200: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40004204: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40004208: 22 80 00 41 be,a 4000430c <== NOT EXECUTED 4000420c: c2 06 20 d4 ld [ %i0 + 0xd4 ], %g1 <== NOT EXECUTED 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)) 40004210: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004214: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40004218: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 4000421c: 02 80 00 4e be 40004354 <== NOT EXECUTED 40004220: 01 00 00 00 nop <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40004224: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40004228: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000422c: 08 80 00 41 bleu 40004330 <== NOT EXECUTED 40004230: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 40004234: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 40004238: a0 20 40 11 sub %g1, %l1, %l0 <== NOT EXECUTED 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)) { 4000423c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004240: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40004244: 32 80 00 02 bne,a 4000424c <== NOT EXECUTED 40004248: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 4000424c: d2 06 20 7c ld [ %i0 + 0x7c ], %o1 <== NOT EXECUTED 40004250: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 40004254: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40004258: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000425c: 92 02 40 11 add %o1, %l1, %o1 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40004260: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004264: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004268: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4000426c: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40004270: 81 c7 e0 08 ret <== NOT EXECUTED 40004274: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40004278: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000427c: 02 80 00 30 be 4000433c <== NOT EXECUTED 40004280: a0 10 20 00 clr %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 40004284: 81 c7 e0 08 ret <== NOT EXECUTED 40004288: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 4000428c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40004290: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 40004294: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004298: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 4000429c: 7f ff f6 e3 call 40001e28 <== NOT EXECUTED 400042a0: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400042a4: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400042a8: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400042ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400042b0: 84 10 a0 02 or %g2, 2, %g2 <== NOT EXECUTED /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400042b4: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400042b8: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400042bc: 7f ff f6 df call 40001e38 <== NOT EXECUTED 400042c0: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 400042c4: 81 c7 e0 08 ret <== NOT EXECUTED 400042c8: 91 e8 00 10 restore %g0, %l0, %o0 <== 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, 400042cc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400042d0: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED 400042d4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400042d8: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 400042dc: 7f ff f6 d3 call 40001e28 <== NOT EXECUTED 400042e0: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400042e4: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400042e8: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400042ec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400042f0: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400042f4: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400042f8: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400042fc: 7f ff f6 cf call 40001e38 <== NOT EXECUTED 40004300: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 40004304: 81 c7 e0 08 ret <== NOT EXECUTED 40004308: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 4000430c: c0 26 20 94 clr [ %i0 + 0x94 ] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 40004310: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004314: 02 bf ff d6 be 4000426c <== NOT EXECUTED 40004318: a0 10 20 00 clr %l0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 4000431c: d2 06 20 d8 ld [ %i0 + 0xd8 ], %o1 <== NOT EXECUTED 40004320: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004324: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40004328: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED 4000432c: 30 bf ff d1 b,a 40004270 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 40004330: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40004334: 10 bf ff c2 b 4000423c <== NOT EXECUTED 40004338: a0 20 40 11 sub %g1, %l1, %l0 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4000433c: 40 00 09 cf call 40006a78 <== NOT EXECUTED 40004340: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40004344: 30 bf ff d0 b,a 40004284 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40004348: 40 00 09 cc call 40006a78 <== NOT EXECUTED 4000434c: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40004350: 30 bf ff ac b,a 40004200 <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 40004354: 7f ff f6 b5 call 40001e28 <== NOT EXECUTED 40004358: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4000435c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40004360: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 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); tty->flow_ctrl |= FL_OSTOP; 40004364: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40004368: c4 26 20 94 st %g2, [ %i0 + 0x94 ] <== NOT EXECUTED 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); tty->flow_ctrl |= FL_OSTOP; 4000436c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40004370: 7f ff f6 b2 call 40001e38 <== NOT EXECUTED 40004374: a0 10 20 00 clr %l0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40004378: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED 4000437c: 30 bf ff bd b,a 40004270 <== NOT EXECUTED 40005f3c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40005f3c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 40005f40: a0 07 bf f0 add %fp, -16, %l0 <== NOT EXECUTED 40005f44: a2 07 bf f7 add %fp, -9, %l1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005f48: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005f4c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005f50: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005f54: 40 00 00 c3 call 40006260 <== NOT EXECUTED 40005f58: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 40005f5c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005f60: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005f64: 32 80 00 16 bne,a 40005fbc <== NOT EXECUTED 40005f68: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40005f6c: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED 40005f70: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005f74: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40005f78: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40005f7c: 02 bf ff f3 be 40005f48 <== NOT EXECUTED 40005f80: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40005f84: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40005f88: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40005f8c: 7f ff f9 1c call 400043fc <== NOT EXECUTED 40005f90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005f94: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005f98: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005f9c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005fa0: 40 00 00 b0 call 40006260 <== NOT EXECUTED 40005fa4: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 40005fa8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005fac: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005fb0: 22 bf ff f0 be,a 40005f70 <== NOT EXECUTED 40005fb4: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40005fb8: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40005fbc: 40 00 03 25 call 40006c50 <== NOT EXECUTED 40005fc0: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40005fc4: 10 bf ff e2 b 40005f4c <== NOT EXECUTED 40005fc8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 4000416c : void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty) { /* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT); 4000416c: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40004170: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004174: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40004178: 40 00 08 a4 call 40006408 <== NOT EXECUTED 4000417c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40004180: 01 00 00 00 nop 40005ea4 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40005ea4: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 40005ea8: 03 10 00 69 sethi %hi(0x4001a400), %g1 <== NOT EXECUTED 40005eac: a0 07 bf f4 add %fp, -12, %l0 <== NOT EXECUTED 40005eb0: a2 10 61 bc or %g1, 0x1bc, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005eb4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005eb8: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005ebc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005ec0: 40 00 00 e8 call 40006260 <== NOT EXECUTED 40005ec4: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 40005ec8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40005ecc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005ed0: 12 80 00 16 bne 40005f28 <== NOT EXECUTED 40005ed4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40005ed8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40005edc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40005ee0: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 40005ee4: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40005ee8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005eec: 02 80 00 04 be 40005efc <== NOT EXECUTED 40005ef0: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40005ef4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005ef8: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40005efc: 7f ff f8 a2 call 40004184 <== NOT EXECUTED 40005f00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005f04: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005f08: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005f0c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40005f10: 40 00 00 d4 call 40006260 <== NOT EXECUTED 40005f14: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 40005f18: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40005f1c: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005f20: 02 bf ff ee be 40005ed8 <== NOT EXECUTED 40005f24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 40005f28: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40005f2c: 40 00 03 49 call 40006c50 <== NOT EXECUTED 40005f30: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40005f34: 10 bf ff e1 b 40005eb8 <== NOT EXECUTED 40005f38: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004edc : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40004edc: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004ee0: c2 06 00 00 ld [ %i0 ], %g1 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40004ee4: a8 10 00 18 mov %i0, %l4 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40004ee8: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40004eec: 92 10 20 00 clr %o1 40004ef0: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 40004ef4: 40 00 06 99 call 40006958 40004ef8: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40004efc: b0 92 20 00 orcc %o0, 0, %i0 40004f00: 12 80 00 0f bne 40004f3c 40004f04: 03 10 00 69 sethi %hi(0x4001a400), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40004f08: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 40004f0c: 85 28 a0 05 sll %g2, 5, %g2 40004f10: 82 10 61 bc or %g1, 0x1bc, %g1 40004f14: 82 00 40 02 add %g1, %g2, %g1 40004f18: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40004f1c: 80 a0 60 00 cmp %g1, 0 40004f20: 02 80 00 13 be 40004f6c 40004f24: 92 10 00 14 mov %l4, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40004f28: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004f2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004f30: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40004f34: 40 00 06 d1 call 40006a78 <== NOT EXECUTED 40004f38: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED 40004f3c: 81 c7 e0 08 ret <== NOT EXECUTED 40004f40: 81 e8 00 00 restore <== NOT EXECUTED while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 40004f44: d0 05 20 08 ld [ %l4 + 8 ], %o0 <== NOT EXECUTED 40004f48: d2 05 20 0c ld [ %l4 + 0xc ], %o1 <== NOT EXECUTED 40004f4c: 7f ff fd fd call 40004740 <== NOT EXECUTED 40004f50: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40004f54: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED 40004f58: c2 25 20 14 st %g1, [ %l4 + 0x14 ] } rtems_semaphore_release (tty->osem); 40004f5c: 40 00 06 c7 call 40006a78 40004f60: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 return sc; } 40004f64: 81 c7 e0 08 ret 40004f68: 81 e8 00 00 restore 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) { 40004f6c: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 40004f70: 80 88 60 01 btst 1, %g1 40004f74: 02 bf ff f4 be 40004f44 40004f78: a0 10 20 00 clr %l0 uint32_t count = args->count; 40004f7c: e6 05 20 0c ld [ %l4 + 0xc ], %l3 char *buffer = args->buffer; 40004f80: e4 05 20 08 ld [ %l4 + 8 ], %l2 while (count--) 40004f84: 80 a4 e0 00 cmp %l3, 0 40004f88: 02 bf ff f4 be 40004f58 40004f8c: 82 10 20 00 clr %g1 oproc (*buffer++, tty); 40004f90: d0 0c 80 10 ldub [ %l2 + %l0 ], %o0 40004f94: 7f ff fe 39 call 40004878 40004f98: 92 10 00 11 mov %l1, %o1 40004f9c: a0 04 20 01 inc %l0 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 40004fa0: 80 a4 c0 10 cmp %l3, %l0 40004fa4: 32 bf ff fc bne,a 40004f94 40004fa8: d0 0c 80 10 ldub [ %l2 + %l0 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 40004fac: 10 bf ff eb b 40004f58 40004fb0: c2 05 20 0c ld [ %l4 + 0xc ], %g1 40007b4c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40007b4c: 9d e3 bf 90 save %sp, -112, %sp 40007b50: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40007b54: 80 a6 60 00 cmp %i1, 0 40007b58: 02 80 00 26 be 40007bf0 40007b5c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40007b60: 80 a6 a0 00 cmp %i2, 0 40007b64: 02 80 00 23 be 40007bf0 40007b68: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40007b6c: 11 10 00 61 sethi %hi(0x40018400), %o0 40007b70: 92 10 00 12 mov %l2, %o1 40007b74: 90 12 20 a4 or %o0, 0xa4, %o0 40007b78: 40 00 05 74 call 40009148 <_Objects_Get> 40007b7c: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40007b80: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b84: a0 10 00 08 mov %o0, %l0 40007b88: 80 a0 60 00 cmp %g1, 0 40007b8c: 12 80 00 19 bne 40007bf0 40007b90: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40007b94: a2 02 20 10 add %o0, 0x10, %l1 40007b98: 40 00 0c d2 call 4000aee0 <_Watchdog_Remove> 40007b9c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40007ba0: 7f ff ea 5c call 40002510 40007ba4: 01 00 00 00 nop /* * 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 ) { 40007ba8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40007bac: 80 a0 60 00 cmp %g1, 0 40007bb0: 12 80 00 12 bne 40007bf8 40007bb4: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007bb8: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 40007bbc: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40007bc0: f6 24 20 34 st %i3, [ %l0 + 0x34 ] /* * 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; 40007bc4: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007bc8: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 40007bcc: 7f ff ea 55 call 40002520 40007bd0: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007bd4: 92 10 00 11 mov %l1, %o1 40007bd8: 11 10 00 5f sethi %hi(0x40017c00), %o0 40007bdc: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 40017fb0 <_Watchdog_Ticks_chain> 40007be0: 40 00 0c 55 call 4000ad34 <_Watchdog_Insert> 40007be4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 40007be8: 40 00 07 91 call 40009a2c <_Thread_Enable_dispatch> 40007bec: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40007bf0: 81 c7 e0 08 ret 40007bf4: 81 e8 00 00 restore * 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 ); 40007bf8: 7f ff ea 4a call 40002520 <== NOT EXECUTED 40007bfc: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40007c00: 40 00 07 8b call 40009a2c <_Thread_Enable_dispatch> <== NOT EXECUTED 40007c04: 01 00 00 00 nop <== NOT EXECUTED 40007c08: 81 c7 e0 08 ret <== NOT EXECUTED 40007c0c: 81 e8 00 00 restore <== NOT EXECUTED 40012ae4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 40012ae4: 9d e3 bf 90 save %sp, -112, %sp 40012ae8: 92 96 20 00 orcc %i0, 0, %o1 40012aec: 12 80 00 05 bne 40012b00 40012af0: 03 10 00 bd sethi %hi(0x4002f400), %g1 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 40012af4: 90 10 20 13 mov 0x13, %o0 } return status; } 40012af8: 81 c7 e0 08 ret 40012afc: 91 e8 00 08 restore %g0, %o0, %o0 40012b00: c4 08 63 54 ldub [ %g1 + 0x354 ], %g2 40012b04: 80 a2 40 02 cmp %o1, %g2 40012b08: 18 80 00 56 bgu 40012c60 40012b0c: 80 a2 7f ff cmp %o1, -1 40012b10: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 40012b14: 05 10 00 d2 sethi %hi(0x40034800), %g2 40012b18: c2 00 a1 80 ld [ %g2 + 0x180 ], %g1 ! 40034980 <_Thread_Dispatch_disable_level> 40012b1c: 82 00 60 01 inc %g1 40012b20: c2 20 a1 80 st %g1, [ %g2 + 0x180 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40012b24: 23 10 00 c0 sethi %hi(0x40030000), %l1 initialized = true; 40012b28: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40012b2c: e0 0c 62 ac ldub [ %l1 + 0x2ac ], %l0 initialized = true; _Thread_Enable_dispatch(); 40012b30: 40 00 0c 97 call 40015d8c <_Thread_Enable_dispatch> 40012b34: c2 2c 62 ac stb %g1, [ %l1 + 0x2ac ] if ( tmpInitialized ) 40012b38: 80 a4 20 00 cmp %l0, 0 40012b3c: 12 bf ff ef bne 40012af8 40012b40: 90 10 20 0e mov 0xe, %o0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40012b44: 05 10 00 d2 sethi %hi(0x40034800), %g2 40012b48: 82 10 a0 9c or %g2, 0x9c, %g1 ! 4003489c <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012b4c: c2 20 60 08 st %g1, [ %g1 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40012b50: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40012b54: 82 00 60 04 add %g1, 4, %g1 * 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( 40012b58: 92 10 00 18 mov %i0, %o1 40012b5c: 94 10 00 19 mov %i1, %o2 40012b60: 19 00 00 20 sethi %hi(0x8000), %o4 40012b64: c2 20 a0 9c st %g1, [ %g2 + 0x9c ] 40012b68: 98 16 80 0c or %i2, %o4, %o4 40012b6c: 11 15 12 53 sethi %hi(0x54494c00), %o0 40012b70: 96 10 21 00 mov 0x100, %o3 40012b74: 90 12 21 45 or %o0, 0x145, %o0 40012b78: 7f ff fc 78 call 40011d58 40012b7c: 9a 07 bf f4 add %fp, -12, %o5 /* 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) { 40012b80: 80 a2 20 00 cmp %o0, 0 40012b84: 12 80 00 34 bne 40012c54 40012b88: 03 10 00 d2 sethi %hi(0x40034800), %g1 * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 40012b8c: d6 07 bf f4 ld [ %fp + -12 ], %o3 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 40012b90: 86 10 60 3c or %g1, 0x3c, %g3 40012b94: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 40012b98: 03 00 00 3f sethi %hi(0xfc00), %g1 40012b9c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40012ba0: 82 0a c0 01 and %o3, %g1, %g1 40012ba4: 80 a0 40 02 cmp %g1, %g2 40012ba8: 18 80 00 05 bgu 40012bbc 40012bac: 98 10 20 00 clr %o4 40012bb0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 40012bb4: 83 28 60 02 sll %g1, 2, %g1 40012bb8: d8 00 80 01 ld [ %g2 + %g1 ], %o4 40012bbc: 09 10 00 d2 sethi %hi(0x40034800), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012bc0: 1b 10 00 d2 sethi %hi(0x40034800), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40012bc4: 84 11 20 7c or %g4, 0x7c, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40012bc8: 82 13 60 90 or %o5, 0x90, %g1 40012bcc: c4 20 a0 08 st %g2, [ %g2 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40012bd0: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 40012bd4: c2 20 60 08 st %g1, [ %g1 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 40012bd8: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40012bdc: 84 00 a0 04 add %g2, 4, %g2 40012be0: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40012be4: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012be8: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012bec: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 40012bf0: c4 21 20 7c st %g2, [ %g4 + 0x7c ] 40012bf4: c2 23 60 90 st %g1, [ %o5 + 0x90 ] 40012bf8: 05 10 00 d4 sethi %hi(0x40035000), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40012bfc: 07 10 00 56 sethi %hi(0x40015800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c00: 03 10 00 d2 sethi %hi(0x40034800), %g1 the_watchdog->routine = routine; 40012c04: 86 10 e3 f4 or %g3, 0x3f4, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c08: 82 10 60 a8 or %g1, 0xa8, %g1 the_watchdog->routine = routine; 40012c0c: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40012c10: d8 20 a3 30 st %o4, [ %g2 + 0x330 ] 40012c14: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40012c18: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40012c1c: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40012c20: d6 20 60 20 st %o3, [ %g1 + 0x20 ] /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 40012c24: 05 10 00 4b sethi %hi(0x40012c00), %g2 40012c28: 03 10 00 d4 sethi %hi(0x40035000), %g1 40012c2c: 84 10 a0 70 or %g2, 0x70, %g2 /* * Start the timer server */ status = rtems_task_start( 40012c30: 90 10 00 0b mov %o3, %o0 /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 40012c34: c4 20 63 2c st %g2, [ %g1 + 0x32c ] /* * Start the timer server */ status = rtems_task_start( 40012c38: 13 10 00 4b sethi %hi(0x40012c00), %o1 40012c3c: 94 10 20 00 clr %o2 40012c40: 7f ff fd 9e call 400122b8 40012c44: 92 12 61 44 or %o1, 0x144, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40012c48: 80 a2 20 00 cmp %o0, 0 40012c4c: 02 bf ff ab be 40012af8 40012c50: 01 00 00 00 nop * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 40012c54: c0 2c 62 ac clrb [ %l1 + 0x2ac ] } return status; } 40012c58: 81 c7 e0 08 ret 40012c5c: 91 e8 00 08 restore %g0, %o0, %o0 * 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 ) 40012c60: 02 bf ff ad be 40012b14 40012c64: b0 10 20 00 clr %i0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 40012c68: 10 bf ff a4 b 40012af8 40012c6c: 90 10 20 13 mov 0x13, %o0 40012864 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 40012864: 9d e3 bf 90 save %sp, -112, %sp 40012868: 11 10 00 d4 sethi %hi(0x40035000), %o0 4001286c: 92 10 00 18 mov %i0, %o1 40012870: 90 12 22 ec or %o0, 0x2ec, %o0 40012874: 40 00 0a df call 400153f0 <_Objects_Get> 40012878: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001287c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012880: a0 10 00 08 mov %o0, %l0 40012884: 80 a0 60 00 cmp %g1, 0 40012888: 12 80 00 11 bne 400128cc 4001288c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 40012890: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40012894: 80 a0 60 01 cmp %g1, 1 40012898: 22 80 00 15 be,a 400128ec 4001289c: 31 10 00 d4 sethi %hi(0x40035000), %i0 400128a0: 1a 80 00 0d bcc 400128d4 400128a4: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 400128a8: a0 02 20 10 add %o0, 0x10, %l0 400128ac: 40 00 13 96 call 40017704 <_Watchdog_Remove> 400128b0: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 400128b4: 11 10 00 d2 sethi %hi(0x40034800), %o0 400128b8: 92 10 00 10 mov %l0, %o1 400128bc: 40 00 13 27 call 40017558 <_Watchdog_Insert> 400128c0: 90 12 22 60 or %o0, 0x260, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 400128c4: 40 00 0d 32 call 40015d8c <_Thread_Enable_dispatch> 400128c8: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400128cc: 81 c7 e0 08 ret 400128d0: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400128d4: 18 bf ff fc bgu 400128c4 400128d8: 01 00 00 00 nop (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 400128dc: 40 00 0d 2c call 40015d8c <_Thread_Enable_dispatch> 400128e0: b0 10 20 0b mov 0xb, %i0 ! b 400128e4: 81 c7 e0 08 ret 400128e8: 81 e8 00 00 restore case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 400128ec: c2 06 23 2c ld [ %i0 + 0x32c ], %g1 400128f0: 80 a0 60 00 cmp %g1, 0 400128f4: 02 80 00 08 be 40012914 400128f8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 400128fc: 40 00 13 82 call 40017704 <_Watchdog_Remove> 40012900: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 40012904: c2 06 23 2c ld [ %i0 + 0x32c ], %g1 40012908: 9f c0 40 00 call %g1 4001290c: 90 10 00 10 mov %l0, %o0 40012910: 30 bf ff ed b,a 400128c4 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 40012914: 40 00 0d 1e call 40015d8c <_Thread_Enable_dispatch> <== NOT EXECUTED 40012918: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 4001291c: 81 c7 e0 08 ret <== NOT EXECUTED 40012920: 81 e8 00 00 restore <== NOT EXECUTED 40012924 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012924: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012928: 03 10 00 d4 sethi %hi(0x40035000), %g1 4001292c: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 40035330 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40012930: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40012934: 80 a0 a0 00 cmp %g2, 0 40012938: 02 80 00 28 be 400129d8 4001293c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40012940: 80 a6 a0 00 cmp %i2, 0 40012944: 02 80 00 25 be 400129d8 40012948: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001294c: 80 a6 60 00 cmp %i1, 0 40012950: 02 80 00 22 be 400129d8 40012954: b0 10 20 0a mov 0xa, %i0 40012958: 11 10 00 d4 sethi %hi(0x40035000), %o0 4001295c: 92 10 00 11 mov %l1, %o1 40012960: 90 12 22 ec or %o0, 0x2ec, %o0 40012964: 40 00 0a a3 call 400153f0 <_Objects_Get> 40012968: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001296c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012970: a0 10 00 08 mov %o0, %l0 40012974: 80 a0 60 00 cmp %g1, 0 40012978: 12 80 00 18 bne 400129d8 4001297c: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40012980: 40 00 13 61 call 40017704 <_Watchdog_Remove> 40012984: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 40012988: 7f ff e2 4c call 4000b2b8 4001298c: 01 00 00 00 nop /* * 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 ) { 40012990: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40012994: 80 a0 60 00 cmp %g1, 0 40012998: 12 80 00 12 bne 400129e0 4001299c: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400129a0: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400129a4: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400129a8: f6 24 20 34 st %i3, [ %l0 + 0x34 ] * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 400129ac: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400129b0: c0 24 20 18 clr [ %l0 + 0x18 ] /* * 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; 400129b4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 400129b8: 7f ff e2 44 call 4000b2c8 400129bc: b0 10 20 00 clr %i0 /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 400129c0: 03 10 00 d4 sethi %hi(0x40035000), %g1 400129c4: c4 00 63 2c ld [ %g1 + 0x32c ], %g2 ! 4003532c <_Timer_Server_schedule_operation> 400129c8: 9f c0 80 00 call %g2 400129cc: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 400129d0: 40 00 0c ef call 40015d8c <_Thread_Enable_dispatch> 400129d4: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400129d8: 81 c7 e0 08 ret 400129dc: 81 e8 00 00 restore * 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 ); 400129e0: 7f ff e2 3a call 4000b2c8 <== NOT EXECUTED 400129e4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400129e8: 40 00 0c e9 call 40015d8c <_Thread_Enable_dispatch> <== NOT EXECUTED 400129ec: 01 00 00 00 nop <== NOT EXECUTED 400129f0: 81 c7 e0 08 ret <== NOT EXECUTED 400129f4: 81 e8 00 00 restore <== NOT EXECUTED 40008da0 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 40008da0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 40008da4: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 40008da8: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 40008dac: 02 80 00 10 be 40008dec <== NOT EXECUTED 40008db0: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40008db4: 07 10 00 ae sethi %hi(0x4002b800), %g3 <== NOT EXECUTED 40008db8: c4 00 e1 18 ld [ %g3 + 0x118 ], %g2 ! 4002b918 <== NOT EXECUTED 40008dbc: 82 00 a0 01 add %g2, 1, %g1 <== NOT EXECUTED 40008dc0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40008dc4: 02 80 00 06 be 40008ddc <== NOT EXECUTED 40008dc8: c2 20 e1 18 st %g1, [ %g3 + 0x118 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008dcc: 05 10 00 ae sethi %hi(0x4002b800), %g2 <== NOT EXECUTED 40008dd0: c2 00 a3 00 ld [ %g2 + 0x300 ], %g1 ! 4002bb00 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008dd4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008dd8: c2 20 a3 00 st %g1, [ %g2 + 0x300 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40008ddc: c2 00 e1 18 ld [ %g3 + 0x118 ], %g1 <== NOT EXECUTED 40008de0: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008de4: 34 80 00 3b bg,a 40008ed0 <== NOT EXECUTED 40008de8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40008dec: 25 10 00 aa sethi %hi(0x4002a800), %l2 <== NOT EXECUTED 40008df0: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 ! 4002aa60 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40008df4: a2 10 20 00 clr %l1 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40008df8: 40 00 42 b2 call 400198c0 <== NOT EXECUTED 40008dfc: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 40008e00: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40008e04: 05 10 00 00 sethi %hi(0x40000000), %g2 <== NOT EXECUTED 40008e08: 80 8c c0 02 btst %l3, %g2 <== NOT EXECUTED 40008e0c: 12 80 00 42 bne 40008f14 <== NOT EXECUTED 40008e10: a0 2c c0 01 andn %l3, %g1, %l0 <== 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); 40008e14: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== NOT EXECUTED 40008e18: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008e1c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008e20: 40 00 5b bd call 4001fd14 <== NOT EXECUTED 40008e24: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 40008e28: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40008e2c: 12 80 00 2b bne 40008ed8 <== NOT EXECUTED 40008e30: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 40008e34: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008e38: 02 80 00 12 be 40008e80 <== NOT EXECUTED 40008e3c: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40008e40: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008e44: 04 80 00 08 ble 40008e64 <== NOT EXECUTED 40008e48: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== NOT EXECUTED 40008e4c: 40 00 50 33 call 4001cf18 <== NOT EXECUTED 40008e50: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008e54: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40008e58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008e5c: 12 80 00 3b bne 40008f48 <== NOT EXECUTED 40008e60: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40008e64: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008e68: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008e6c: 92 12 63 50 or %o1, 0x350, %o1 <== NOT EXECUTED 40008e70: 40 00 43 ff call 40019e6c <== NOT EXECUTED 40008e74: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40008e78: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40008e7c: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== NOT EXECUTED 40008e80: 13 10 00 9c sethi %hi(0x40027000), %o1 <== NOT EXECUTED 40008e84: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008e88: 40 00 43 f9 call 40019e6c <== NOT EXECUTED 40008e8c: 92 12 63 d8 or %o1, 0x3d8, %o1 <== NOT EXECUTED (void) fflush(stderr); 40008e90: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== 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"); 40008e94: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 40008e98: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008e9c: 40 00 42 89 call 400198c0 <== NOT EXECUTED 40008ea0: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40008ea4: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40008ea8: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 40008eac: 02 80 00 09 be 40008ed0 <== NOT EXECUTED 40008eb0: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40008eb4: 02 80 00 2f be 40008f70 <== NOT EXECUTED 40008eb8: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40008ebc: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008ec0: 40 00 00 3f call 40008fbc <== NOT EXECUTED 40008ec4: 92 12 63 68 or %o1, 0x368, %o1 ! 40026b68 <== NOT EXECUTED _exit(local_errno); 40008ec8: 40 00 02 47 call 400097e4 <_exit> <== NOT EXECUTED 40008ecc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 40008ed0: 81 c7 e0 08 ret <== NOT EXECUTED 40008ed4: 81 e8 00 00 restore <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40008ed8: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 40008edc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40008ee0: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 40008ee4: 11 10 00 9b sethi %hi(0x40026c00), %o0 <== NOT EXECUTED 40008ee8: 40 00 2b 2a call 40013b90 <== NOT EXECUTED 40008eec: 90 12 22 b0 or %o0, 0x2b0, %o0 ! 40026eb0 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40008ef0: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 40008ef4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40008ef8: 92 12 63 30 or %o1, 0x330, %o1 <== NOT EXECUTED 40008efc: 40 00 43 dc call 40019e6c <== NOT EXECUTED 40008f00: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (local_errno) 40008f04: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40008f08: 02 bf ff dd be 40008e7c <== NOT EXECUTED 40008f0c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED 40008f10: 30 bf ff cd b,a 40008e44 <== 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; 40008f14: 40 00 41 9a call 4001957c <__errno> <== NOT EXECUTED 40008f18: 01 00 00 00 nop <== 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); 40008f1c: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== 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; 40008f20: e2 02 00 00 ld [ %o0 ], %l1 <== 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); 40008f24: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40008f28: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40008f2c: 40 00 5b 7a call 4001fd14 <== NOT EXECUTED 40008f30: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 40008f34: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40008f38: 02 bf ff bf be 40008e34 <== NOT EXECUTED 40008f3c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40008f40: 10 bf ff e7 b 40008edc <== NOT EXECUTED 40008f44: c2 04 a2 60 ld [ %l2 + 0x260 ], %g1 <== NOT EXECUTED if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 40008f48: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40008f4c: 40 00 4f f3 call 4001cf18 <== NOT EXECUTED 40008f50: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 40008f54: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008f58: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40008f5c: 92 12 63 40 or %o1, 0x340, %o1 <== NOT EXECUTED 40008f60: 40 00 43 c3 call 40019e6c <== NOT EXECUTED 40008f64: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40008f68: 10 bf ff c5 b 40008e7c <== NOT EXECUTED 40008f6c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 40008f70: 13 10 00 9a sethi %hi(0x40026800), %o1 <== NOT EXECUTED 40008f74: 40 00 00 12 call 40008fbc <== NOT EXECUTED 40008f78: 92 12 63 80 or %o1, 0x380, %o1 ! 40026b80 <== NOT EXECUTED abort(); 40008f7c: 40 00 41 72 call 40019544 <== NOT EXECUTED 40008f80: 01 00 00 00 nop 40008f84: 01 00 00 00 nop 400077e0 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 400077e0: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 400077e4: 80 a6 60 00 cmp %i1, 0 400077e8: 02 80 00 05 be 400077fc 400077ec: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 400077f0: 80 a6 20 00 cmp %i0, 0 400077f4: 12 80 00 04 bne 40007804 400077f8: 11 10 00 7d sethi %hi(0x4001f400), %o0 if (!ptr) return false; *pointer = ptr; return true; } 400077fc: 81 c7 e0 08 ret <== NOT EXECUTED 40007800: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 40007804: 40 00 05 fd call 40008ff8 <_Protected_heap_Allocate> 40007808: 90 12 22 04 or %o0, 0x204, %o0 if (!ptr) 4000780c: 80 a2 20 00 cmp %o0, 0 40007810: 02 bf ff fb be 400077fc 40007814: 01 00 00 00 nop return false; *pointer = ptr; 40007818: d0 26 40 00 st %o0, [ %i1 ] 4000781c: 81 c7 e0 08 ret 40007820: 91 e8 20 01 restore %g0, 1, %o0 400077c4 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 400077c4: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 400077c8: 11 10 00 7d sethi %hi(0x4001f400), %o0 <== NOT EXECUTED 400077cc: 90 12 22 04 or %o0, 0x204, %o0 ! 4001f604 <_Workspace_Area> <== NOT EXECUTED 400077d0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400077d4: 40 00 06 15 call 40009028 <_Protected_heap_Free> <== NOT EXECUTED 400077d8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400077dc: 01 00 00 00 nop 40007824 : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 40007824: 80 a2 20 00 cmp %o0, 0 40007828: 02 80 00 07 be 40007844 4000782c: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 40007830: 11 10 00 7d sethi %hi(0x4001f400), %o0 40007834: 90 12 22 04 or %o0, 0x204, %o0 ! 4001f604 <_Workspace_Area> 40007838: 82 13 c0 00 mov %o7, %g1 4000783c: 40 00 06 07 call 40009058 <_Protected_heap_Get_information> 40007840: 9e 10 40 00 mov %g1, %o7 } 40007844: 81 c3 e0 08 retl <== NOT EXECUTED 40007848: 01 00 00 00 nop 40022eb4 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40022eb4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40022eb8: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40022ebc: 05 10 01 36 sethi %hi(0x4004d800), %g2 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40022ec0: a6 10 63 ff or %g1, 0x3ff, %l3 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40022ec4: aa 10 a2 90 or %g2, 0x290, %l5 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40022ec8: 03 10 01 36 sethi %hi(0x4004d800), %g1 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40022ecc: a2 10 20 00 clr %l1 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40022ed0: a8 10 62 80 or %g1, 0x280, %l4 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40022ed4: a4 10 20 00 clr %l2 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40022ed8: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40022edc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40022ee0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022ee4: 06 80 00 23 bl 40022f70 <== NOT EXECUTED 40022ee8: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40022eec: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40022ef0: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 40022ef4: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') 40022ef8: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40022efc: 02 80 00 24 be 40022f8c <== NOT EXECUTED 40022f00: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED break; if (sign == 0) { 40022f04: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40022f08: 32 80 00 06 bne,a 40022f20 <== NOT EXECUTED 40022f0c: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 40022f10: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 40022f14: 02 80 00 2f be 40022fd0 <== NOT EXECUTED 40022f18: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40022f1c: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 40022f20: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 <== NOT EXECUTED 40022f24: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 40022f28: 02 80 00 28 be 40022fc8 <== NOT EXECUTED 40022f2c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 40022f30: 40 00 83 8a call 40043d58 <.udiv> <== NOT EXECUTED 40022f34: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40022f38: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 40022f3c: 18 80 00 23 bgu 40022fc8 <== NOT EXECUTED 40022f40: 01 00 00 00 nop <== NOT EXECUTED 40022f44: 02 80 00 1b be 40022fb0 <== NOT EXECUTED 40022f48: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 40022f4c: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 40022f50: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 40022f54: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40022f58: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40022f5c: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40022f60: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40022f64: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40022f68: 16 bf ff e1 bge 40022eec <== NOT EXECUTED 40022f6c: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40022f70: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 40022f74: 40 00 54 63 call 40038100 <__srget_r> <== NOT EXECUTED 40022f78: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40022f7c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 40022f80: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40022f84: 12 bf ff e1 bne 40022f08 <== NOT EXECUTED 40022f88: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 40022f8c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40022f90: 02 80 00 0e be 40022fc8 <== NOT EXECUTED 40022f94: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 40022f98: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40022f9c: 7f ff 80 91 call 400031e0 <.umul> <== NOT EXECUTED 40022fa0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40022fa4: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 40022fa8: 81 c7 e0 08 ret <== NOT EXECUTED 40022fac: 81 e8 00 00 restore <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 40022fb0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40022fb4: 40 00 84 15 call 40044008 <.urem> <== NOT EXECUTED 40022fb8: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40022fbc: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 40022fc0: 08 bf ff e4 bleu 40022f50 <== NOT EXECUTED 40022fc4: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 40022fc8: 81 c7 e0 08 ret <== NOT EXECUTED 40022fcc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 40022fd0: a6 04 e0 01 inc %l3 <== NOT EXECUTED 40022fd4: 10 bf ff c1 b 40022ed8 <== NOT EXECUTED 40022fd8: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 40022fdc : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 40022fdc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 40022fe0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40022fe4: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 40022fe8: 03 10 01 36 sethi %hi(0x4004d800), %g1 <== NOT EXECUTED 40022fec: 10 80 00 19 b 40023050 <== NOT EXECUTED 40022ff0: b2 10 62 90 or %g1, 0x290, %i1 ! 4004da90 <_impure_ptr> <== NOT EXECUTED 40022ff4: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40022ff8: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 40022ffc: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') { 40023000: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40023004: 02 80 00 1e be 4002307c <== NOT EXECUTED 40023008: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { 4002300c: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40023010: 02 80 00 28 be 400230b0 <== NOT EXECUTED 40023014: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) return 0; break; } if (c == EOF) 40023018: 02 80 00 29 be 400230bc <== NOT EXECUTED 4002301c: 01 00 00 00 nop <== NOT EXECUTED return 0; if (*nleft < 2) 40023020: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 40023024: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40023028: 08 80 00 25 bleu 400230bc <== NOT EXECUTED 4002302c: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; 40023030: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40023034: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 40023038: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 4002303c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40023040: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 40023044: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40023048: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 4002304c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 40023050: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40023054: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40023058: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002305c: 16 bf ff e6 bge 40022ff4 <== NOT EXECUTED 40023060: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40023064: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 40023068: 40 00 54 26 call 40038100 <__srget_r> <== NOT EXECUTED 4002306c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 40023070: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40023074: 12 bf ff e7 bne 40023010 <== NOT EXECUTED 40023078: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 4002307c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40023080: 12 80 00 0f bne 400230bc <== NOT EXECUTED 40023084: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 40023088: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4002308c: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 40023090: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 40023094: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40023098: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 4002309c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 400230a0: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 400230a4: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 400230a8: 81 c7 e0 08 ret <== NOT EXECUTED 400230ac: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 400230b0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 400230b4: 32 bf ff f6 bne,a 4002308c <== NOT EXECUTED 400230b8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 400230bc: 81 c7 e0 08 ret <== NOT EXECUTED 400230c0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40006918 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 40006918: 9d e3 bf 48 save %sp, -184, %sp struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 4000691c: 7f ff fd 47 call 40005e38 40006920: 90 10 00 18 mov %i0, %o0 40006924: a4 92 20 00 orcc %o0, 0, %l2 40006928: 02 80 00 4d be 40006a5c 4000692c: 92 10 3f ff mov -1, %o1 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 40006930: d0 04 80 00 ld [ %l2 ], %o0 40006934: ac 07 bf a8 add %fp, -88, %l6 40006938: 40 00 1e d7 call 4000e494 4000693c: 92 10 00 16 mov %l6, %o1 40006940: 80 a2 20 00 cmp %o0, 0 40006944: 06 80 00 56 bl 40006a9c 40006948: d0 07 bf c8 ld [ %fp + -56 ], %o0 /* * estimate the array size by taking the size of the directory file * and dividing it by a multiple of the minimum size entry. */ arraysz = (stb.st_size / 24); 4000694c: 40 00 3d ea call 400160f4 <.div> 40006950: 92 10 20 18 mov 0x18, %o1 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; 40006954: b0 10 20 00 clr %i0 /* * estimate the array size by taking the size of the directory file * and dividing it by a multiple of the minimum size entry. */ arraysz = (stb.st_size / 24); 40006958: a8 10 00 08 mov %o0, %l4 names = (struct dirent **)realloc((char *)names, arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; 4000695c: aa 10 20 01 mov 1, %l5 /* * estimate the array size by taking the size of the directory file * and dividing it by a multiple of the minimum size entry. */ arraysz = (stb.st_size / 24); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 40006960: 7f ff fb 17 call 400055bc 40006964: 91 2a 20 02 sll %o0, 2, %o0 if (names == NULL) 40006968: a6 92 20 00 orcc %o0, 0, %l3 4000696c: 02 80 00 4c be 40006a9c 40006970: 01 00 00 00 nop goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 40006974: 7f ff ff 4d call 400066a8 40006978: 90 10 00 12 mov %l2, %o0 4000697c: a0 92 20 00 orcc %o0, 0, %l0 40006980: 02 80 00 29 be 40006a24 40006984: 80 a6 a0 00 cmp %i2, 0 if (select != NULL && !(*select)(d)) 40006988: 22 80 00 08 be,a 400069a8 4000698c: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED 40006990: 9f c6 80 00 call %i2 40006994: 01 00 00 00 nop 40006998: 80 a2 20 00 cmp %o0, 0 4000699c: 02 bf ff f6 be 40006974 400069a0: 01 00 00 00 nop continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 400069a4: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 400069a8: 90 02 20 04 add %o0, 4, %o0 400069ac: 90 0a 3f fc and %o0, -4, %o0 400069b0: 7f ff fb 03 call 400055bc 400069b4: 90 02 20 0c add %o0, 0xc, %o0 if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 400069b8: 92 04 20 0c add %l0, 0xc, %o1 if (select != NULL && !(*select)(d)) continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 400069bc: a2 10 00 08 mov %o0, %l1 if (p == NULL) 400069c0: 80 a4 60 00 cmp %l1, 0 400069c4: 02 80 00 3b be 40006ab0 400069c8: 90 02 20 0c add %o0, 0xc, %o0 goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; 400069cc: c6 14 20 0a lduh [ %l0 + 0xa ], %g3 * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; 400069d0: c2 04 00 00 ld [ %l0 ], %g1 p->d_reclen = d->d_reclen; 400069d4: c4 14 20 08 lduh [ %l0 + 8 ], %g2 p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 400069d8: 95 28 e0 10 sll %g3, 0x10, %o2 * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; 400069dc: c2 24 40 00 st %g1, [ %l1 ] p->d_reclen = d->d_reclen; 400069e0: c4 34 60 08 sth %g2, [ %l1 + 8 ] p->d_namlen = d->d_namlen; 400069e4: c6 34 60 0a sth %g3, [ %l1 + 0xa ] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 400069e8: 95 32 a0 10 srl %o2, 0x10, %o2 400069ec: 40 00 35 b4 call 400140bc 400069f0: 94 02 a0 01 inc %o2 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 400069f4: b0 06 20 01 inc %i0 400069f8: 80 a6 00 14 cmp %i0, %l4 400069fc: 3a 80 00 1a bcc,a 40006a64 40006a00: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; 40006a04: 82 26 00 15 sub %i0, %l5, %g1 40006a08: 83 28 60 02 sll %g1, 2, %g1 arraysz = (stb.st_size / 24); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 40006a0c: 90 10 00 12 mov %l2, %o0 40006a10: 7f ff ff 26 call 400066a8 40006a14: e2 24 c0 01 st %l1, [ %l3 + %g1 ] 40006a18: a0 92 20 00 orcc %o0, 0, %l0 40006a1c: 12 bf ff db bne 40006988 40006a20: 80 a6 a0 00 cmp %i2, 0 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 40006a24: 7f ff f7 95 call 40004878 40006a28: 90 10 00 12 mov %l2, %o0 if (nitems && dcomp != NULL){ 40006a2c: 80 a6 20 00 cmp %i0, 0 40006a30: 22 80 00 0a be,a 40006a58 40006a34: e6 26 40 00 st %l3, [ %i1 ] <== NOT EXECUTED 40006a38: 80 a6 e0 00 cmp %i3, 0 40006a3c: 02 80 00 06 be 40006a54 40006a40: 96 10 00 1b mov %i3, %o3 qsort(names, nitems, sizeof(struct dirent *), 40006a44: 90 10 00 13 mov %l3, %o0 40006a48: 92 10 00 18 mov %i0, %o1 40006a4c: 40 00 32 94 call 4001349c 40006a50: 94 10 20 04 mov 4, %o2 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 40006a54: e6 26 40 00 st %l3, [ %i1 ] return(nitems); 40006a58: 92 10 00 18 mov %i0, %o1 free( names[i] ); free( names ); } return(-1); } 40006a5c: 81 c7 e0 08 ret 40006a60: 91 e8 00 09 restore %g0, %o1, %o0 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { if (fstat(dirp->dd_fd, &stb) < 0) 40006a64: 40 00 1e 8c call 4000e494 <== NOT EXECUTED 40006a68: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 40006a6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006a70: 06 80 00 10 bl 40006ab0 <== NOT EXECUTED 40006a74: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 40006a78: 40 00 3d 9f call 400160f4 <.div> <== NOT EXECUTED 40006a7c: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED 40006a80: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 40006a84: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40006a88: 40 00 1f 54 call 4000e7d8 <== NOT EXECUTED 40006a8c: 93 2d 20 02 sll %l4, 2, %o1 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 40006a90: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 40006a94: 12 bf ff dd bne 40006a08 <== NOT EXECUTED 40006a98: 82 26 00 15 sub %i0, %l5, %g1 <== NOT EXECUTED return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 40006a9c: 7f ff f7 77 call 40004878 40006aa0: 90 10 00 12 mov %l2, %o0 40006aa4: 92 10 3f ff mov -1, %o1 free( names[i] ); free( names ); } return(-1); } 40006aa8: 81 c7 e0 08 ret 40006aac: 91 e8 00 09 restore %g0, %o1, %o0 return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 40006ab0: 7f ff f7 72 call 40004878 <== NOT EXECUTED 40006ab4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( names ) { for (i=0; i < nitems; i++ ) 40006ab8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006abc: 02 80 00 0a be 40006ae4 <== NOT EXECUTED 40006ac0: 82 10 20 00 clr %g1 <== NOT EXECUTED 40006ac4: a0 10 20 00 clr %l0 <== NOT EXECUTED free( names[i] ); 40006ac8: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40006acc: d0 04 c0 01 ld [ %l3 + %g1 ], %o0 <== NOT EXECUTED 40006ad0: 7f ff f8 df call 40004e4c <== NOT EXECUTED 40006ad4: a0 04 20 01 inc %l0 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 40006ad8: 80 a6 00 10 cmp %i0, %l0 <== NOT EXECUTED 40006adc: 18 bf ff fb bgu 40006ac8 <== NOT EXECUTED 40006ae0: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED free( names[i] ); free( names ); 40006ae4: 7f ff f8 da call 40004e4c <== NOT EXECUTED 40006ae8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40006aec: 10 bf ff dc b 40006a5c <== NOT EXECUTED 40006af0: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 400230c4 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400230c4: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400230c8: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 400230cc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 400230d0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 400230d4: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 400230d8: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 400230dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400230e0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400230e4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 400230e8: 7f ff ff bd call 40022fdc <== NOT EXECUTED 400230ec: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 400230f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400230f4: 12 80 00 04 bne 40023104 <== NOT EXECUTED 400230f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 400230fc: 81 c7 e0 08 ret <== NOT EXECUTED 40023100: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40023104: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 40023108: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4002310c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40023110: 7f ff ff b3 call 40022fdc <== NOT EXECUTED 40023114: 98 10 20 00 clr %o4 <== NOT EXECUTED 40023118: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002311c: 02 bf ff f8 be 400230fc <== NOT EXECUTED 40023120: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023124: 7f ff ff 64 call 40022eb4 <== NOT EXECUTED 40023128: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 4002312c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023130: 02 bf ff f3 be 400230fc <== NOT EXECUTED 40023134: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023138: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4002313c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40023140: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 40023144: 7f ff ff a6 call 40022fdc <== NOT EXECUTED 40023148: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4002314c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023150: 02 bf ff eb be 400230fc <== NOT EXECUTED 40023154: da 07 bf f0 ld [ %fp + -16 ], %o5 <== NOT EXECUTED || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 40023158: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4002315c: 86 10 00 0d mov %o5, %g3 <== NOT EXECUTED if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 40023160: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40023164: c4 0b 40 00 ldub [ %o5 ], %g2 <== NOT EXECUTED 40023168: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 4002316c: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED 40023170: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023174: 02 80 00 0e be 400231ac <== NOT EXECUTED 40023178: 84 10 20 17 mov 0x17, %g2 <== NOT EXECUTED 4002317c: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40023180: c4 08 c0 00 ldub [ %g3 ], %g2 <== NOT EXECUTED if(*cp == ',') 40023184: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED memcount++; 40023188: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 4002318c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40023190: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED if(*cp == ',') memcount++; 40023194: 88 61 3f ff subx %g4, -1, %g4 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40023198: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002319c: 32 bf ff f9 bne,a 40023180 <== NOT EXECUTED 400231a0: 86 00 e0 01 inc %g3 <== NOT EXECUTED 400231a4: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 400231a8: 84 00 60 13 add %g1, 0x13, %g2 <== NOT EXECUTED } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 400231ac: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 <== NOT EXECUTED 400231b0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400231b4: 0a bf ff d2 bcs 400230fc <== NOT EXECUTED 400231b8: c2 07 a0 4c ld [ %fp + 0x4c ], %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 400231bc: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 400231c0: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 400231c4: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 400231c8: da 20 40 00 st %o5, [ %g1 ] <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 400231cc: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 400231d0: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 400231d4: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 400231d8: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED 400231dc: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 400231e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400231e4: 12 80 00 09 bne 40023208 <== NOT EXECUTED 400231e8: 84 10 20 04 mov 4, %g2 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 400231ec: 10 80 00 13 b 40023238 <== NOT EXECUTED 400231f0: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 400231f4: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED 400231f8: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 400231fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40023200: 02 80 00 0c be 40023230 <== NOT EXECUTED 40023204: 86 00 e0 01 inc %g3 <== NOT EXECUTED if(*cp == ',') { 40023208: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4002320c: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED 40023210: 32 bf ff fa bne,a 400231f8 <== NOT EXECUTED 40023214: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED *cp = '\0'; 40023218: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 4002321c: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 40023220: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 40023224: 88 01 20 01 inc %g4 <== NOT EXECUTED 40023228: 10 bf ff f3 b 400231f4 <== NOT EXECUTED 4002322c: c6 20 80 01 st %g3, [ %g2 + %g1 ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40023230: 85 29 20 02 sll %g4, 2, %g2 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 40023234: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED 40023238: c0 20 40 02 clr [ %g1 + %g2 ] <== NOT EXECUTED 4002323c: 81 c7 e0 08 ret <== NOT EXECUTED 40023240: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40023290 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40023290: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 40023294: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 40023298: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 4002329c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 400232a0: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 400232a4: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 400232a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400232ac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400232b0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 400232b4: 7f ff ff 4a call 40022fdc <== NOT EXECUTED 400232b8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 400232bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400232c0: 12 80 00 04 bne 400232d0 <== NOT EXECUTED 400232c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 400232c8: 81 c7 e0 08 ret <== NOT EXECUTED 400232cc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 400232d0: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 400232d4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 400232d8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 400232dc: 7f ff ff 40 call 40022fdc <== NOT EXECUTED 400232e0: 98 10 20 00 clr %o4 <== NOT EXECUTED 400232e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400232e8: 02 bf ff f8 be 400232c8 <== NOT EXECUTED 400232ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400232f0: 7f ff fe f1 call 40022eb4 <== NOT EXECUTED 400232f4: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 400232f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400232fc: 02 bf ff f3 be 400232c8 <== NOT EXECUTED 40023300: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023304: 7f ff fe ec call 40022eb4 <== NOT EXECUTED 40023308: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 4002330c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023310: 02 bf ff ee be 400232c8 <== NOT EXECUTED 40023314: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023318: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 4002331c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40023320: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40023324: 7f ff ff 2e call 40022fdc <== NOT EXECUTED 40023328: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002332c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023330: 02 bf ff e6 be 400232c8 <== NOT EXECUTED 40023334: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023338: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 4002333c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40023340: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40023344: 7f ff ff 26 call 40022fdc <== NOT EXECUTED 40023348: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002334c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023350: 02 bf ff de be 400232c8 <== NOT EXECUTED 40023354: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023358: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 4002335c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40023360: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40023364: 7f ff ff 1e call 40022fdc <== NOT EXECUTED 40023368: 98 10 20 00 clr %o4 <== NOT EXECUTED 4002336c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023370: 02 bf ff d6 be 400232c8 <== NOT EXECUTED 40023374: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40023378: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4002337c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40023380: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 40023384: 7f ff ff 16 call 40022fdc <== NOT EXECUTED 40023388: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4002338c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40023390: 02 bf ff ce be 400232c8 <== NOT EXECUTED 40023394: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED || !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; pwd->pw_gid = pwgid; 40023398: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED || !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; 4002339c: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 400233a0: c4 36 60 0a sth %g2, [ %i1 + 0xa ] <== NOT EXECUTED 400233a4: 81 c7 e0 08 ret <== NOT EXECUTED 400233a8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40008fd4 : */ int sem_destroy( sem_t *sem ) { 40008fd4: 9d e3 bf 90 save %sp, -112, %sp 40008fd8: d2 06 00 00 ld [ %i0 ], %o1 40008fdc: 11 10 00 85 sethi %hi(0x40021400), %o0 40008fe0: 94 07 bf f4 add %fp, -12, %o2 40008fe4: 40 00 09 78 call 4000b5c4 <_Objects_Get> 40008fe8: 90 12 20 f0 or %o0, 0xf0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40008fec: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008ff0: 80 a0 60 00 cmp %g1, 0 40008ff4: 22 80 00 08 be,a 40009014 40008ff8: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40008ffc: 40 00 24 f0 call 400123bc <__errno> 40009000: b0 10 3f ff mov -1, %i0 40009004: 82 10 20 16 mov 0x16, %g1 40009008: c2 22 00 00 st %g1, [ %o0 ] } 4000900c: 81 c7 e0 08 ret 40009010: 81 e8 00 00 restore case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40009014: 80 a0 60 00 cmp %g1, 0 40009018: 12 80 00 08 bne 40009038 4000901c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 40009020: 40 00 1c 1d call 40010094 <_POSIX_Semaphore_Delete> 40009024: b0 10 20 00 clr %i0 ! 0 _Thread_Enable_dispatch(); 40009028: 40 00 0b a0 call 4000bea8 <_Thread_Enable_dispatch> 4000902c: 01 00 00 00 nop 40009030: 81 c7 e0 08 ret 40009034: 81 e8 00 00 restore /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 40009038: 40 00 0b 9c call 4000bea8 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000903c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40009040: 40 00 24 df call 400123bc <__errno> <== NOT EXECUTED 40009044: 01 00 00 00 nop <== NOT EXECUTED 40009048: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000904c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009050: 81 c7 e0 08 ret <== NOT EXECUTED 40009054: 81 e8 00 00 restore <== NOT EXECUTED 400090ac : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 400090ac: 9d e3 bf 90 save %sp, -112, %sp 400090b0: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 400090b4: 80 a6 20 00 cmp %i0, 0 400090b8: 02 80 00 0c be 400090e8 400090bc: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 400090c0: 90 10 20 00 clr %o0 400090c4: 40 00 1b a8 call 4000ff64 <_POSIX_Semaphore_Create_support> 400090c8: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 400090cc: 80 a2 3f ff cmp %o0, -1 400090d0: 02 80 00 04 be 400090e0 400090d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 400090d8: c4 00 60 08 ld [ %g1 + 8 ], %g2 400090dc: c4 26 00 00 st %g2, [ %i0 ] return status; } 400090e0: 81 c7 e0 08 ret 400090e4: 91 e8 00 08 restore %g0, %o0, %o0 { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 400090e8: 40 00 24 b5 call 400123bc <__errno> <== NOT EXECUTED 400090ec: 01 00 00 00 nop <== NOT EXECUTED 400090f0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400090f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400090f8: 10 bf ff fa b 400090e0 <== NOT EXECUTED 400090fc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4000927c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 4000927c: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 40009280: 90 10 00 19 mov %i1, %o0 40009284: 40 00 18 c3 call 4000f590 <_POSIX_Absolute_timeout_to_ticks> 40009288: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 4000928c: 80 a2 20 02 cmp %o0, 2 40009290: 08 80 00 07 bleu 400092ac 40009294: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 40009298: 90 10 00 18 mov %i0, %o0 4000929c: 40 00 1b b2 call 40010164 <_POSIX_Semaphore_Wait_support> 400092a0: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 400092a4: 81 c7 e0 08 ret 400092a8: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 400092ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400092b0: 40 00 1b ad call 40010164 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 400092b4: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 400092b8: 81 c7 e0 08 ret <== NOT EXECUTED 400092bc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000937c : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 4000937c: 92 10 20 01 mov 1, %o1 40009380: 94 10 20 00 clr %o2 40009384: 82 13 c0 00 mov %o7, %g1 40009388: 40 00 1b 77 call 40010164 <_POSIX_Semaphore_Wait_support> 4000938c: 9e 10 40 00 mov %g1, %o7 40009390: 01 00 00 00 nop <== NOT EXECUTED 40022e50 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40022e50: 03 10 01 32 sethi %hi(0x4004c800), %g1 <== NOT EXECUTED 40022e54: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 4004cb44 <== NOT EXECUTED 40022e58: d0 30 a0 2a sth %o0, [ %g2 + 0x2a ] <== NOT EXECUTED return 0; } 40022e5c: 81 c3 e0 08 retl <== NOT EXECUTED 40022e60: 90 10 20 00 clr %o0 <== NOT EXECUTED 400234e4 : return NULL; return &grent; } void setgrent(void) { 400234e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 400234e8: 7f ff ff c4 call 400233f8 <== NOT EXECUTED 400234ec: 21 10 01 82 sethi %hi(0x40060800), %l0 <== NOT EXECUTED if (group_fp != NULL) 400234f0: d0 04 20 cc ld [ %l0 + 0xcc ], %o0 ! 400608cc <== NOT EXECUTED 400234f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400234f8: 22 80 00 05 be,a 4002350c <== NOT EXECUTED 400234fc: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED fclose(group_fp); 40023500: 40 00 40 fe call 400338f8 <== NOT EXECUTED 40023504: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 40023508: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED 4002350c: 13 10 01 2f sethi %hi(0x4004bc00), %o1 <== NOT EXECUTED 40023510: 90 12 22 80 or %o0, 0x280, %o0 <== NOT EXECUTED 40023514: 40 00 43 13 call 40034160 <== NOT EXECUTED 40023518: 92 12 60 80 or %o1, 0x80, %o1 <== NOT EXECUTED 4002351c: d0 24 20 cc st %o0, [ %l0 + 0xcc ] <== NOT EXECUTED } 40023520: 81 c7 e0 08 ret <== NOT EXECUTED 40023524: 81 e8 00 00 restore <== NOT EXECUTED 400236e8 : return NULL; return &pwent; } void setpwent(void) { 400236e8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 400236ec: 7f ff ff 43 call 400233f8 <== NOT EXECUTED 400236f0: 21 10 01 81 sethi %hi(0x40060400), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 400236f4: d0 04 23 e4 ld [ %l0 + 0x3e4 ], %o0 ! 400607e4 <== NOT EXECUTED 400236f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400236fc: 22 80 00 05 be,a 40023710 <== NOT EXECUTED 40023700: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED fclose(passwd_fp); 40023704: 40 00 40 7d call 400338f8 <== NOT EXECUTED 40023708: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4002370c: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED 40023710: 13 10 01 2f sethi %hi(0x4004bc00), %o1 <== NOT EXECUTED 40023714: 90 12 22 08 or %o0, 0x208, %o0 <== NOT EXECUTED 40023718: 40 00 42 92 call 40034160 <== NOT EXECUTED 4002371c: 92 12 60 80 or %o1, 0x80, %o1 <== NOT EXECUTED 40023720: d0 24 23 e4 st %o0, [ %l0 + 0x3e4 ] <== NOT EXECUTED } 40023724: 81 c7 e0 08 ret <== NOT EXECUTED 40023728: 81 e8 00 00 restore <== NOT EXECUTED 40006a34 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40006a34: 03 10 01 32 sethi %hi(0x4004c800), %g1 <== NOT EXECUTED 40006a38: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 4004cb44 <== NOT EXECUTED 40006a3c: d0 30 a0 28 sth %o0, [ %g2 + 0x28 ] <== NOT EXECUTED return 0; } 40006a40: 81 c3 e0 08 retl <== NOT EXECUTED 40006a44: 90 10 20 00 clr %o0 <== NOT EXECUTED 400091e0 : #include int sigsuspend( const sigset_t *sigmask ) { 400091e0: 9d e3 bf 90 save %sp, -112, %sp int status; POSIX_API_Control *api; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); 400091e4: 90 10 20 01 mov 1, %o0 400091e8: 92 10 00 18 mov %i0, %o1 400091ec: a0 07 bf f4 add %fp, -12, %l0 400091f0: 7f ff ff f1 call 400091b4 400091f4: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 400091f8: a2 07 bf f0 add %fp, -16, %l1 400091fc: 7f ff ff b7 call 400090d8 40009200: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 40009204: 90 10 00 11 mov %l1, %o0 40009208: 92 10 20 00 clr %o1 4000920c: 40 00 00 2e call 400092c4 40009210: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 40009214: 92 10 00 10 mov %l0, %o1 status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked ); (void) sigfillset( &all_signals ); status = sigtimedwait( &all_signals, NULL, NULL ); 40009218: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 4000921c: 94 10 20 00 clr %o2 40009220: 7f ff ff e5 call 400091b4 40009224: 90 10 20 00 clr %o0 /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) 40009228: 80 a4 7f ff cmp %l1, -1 4000922c: 12 80 00 05 bne 40009240 40009230: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 40009234: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009238: 81 c7 e0 08 ret <== NOT EXECUTED 4000923c: 81 e8 00 00 restore <== NOT EXECUTED /* * sigtimedwait() returns the signal number while sigsuspend() * is supposed to return -1 and EINTR when a signal is caught. */ if ( status != -1 ) rtems_set_errno_and_return_minus_one( EINTR ); 40009240: 40 00 23 f0 call 40012200 <__errno> 40009244: b0 10 3f ff mov -1, %i0 40009248: 82 10 20 04 mov 4, %g1 4000924c: c2 22 00 00 st %g1, [ %o0 ] 40009250: 81 c7 e0 08 ret 40009254: 81 e8 00 00 restore 40009494 : int sigwait( const sigset_t *set, int *sig ) { 40009494: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 40009498: 92 10 20 00 clr %o1 4000949c: 90 10 00 18 mov %i0, %o0 400094a0: 7f ff ff 89 call 400092c4 400094a4: 94 10 20 00 clr %o2 if ( status != -1 ) { 400094a8: 80 a2 3f ff cmp %o0, -1 400094ac: 02 80 00 07 be 400094c8 400094b0: 80 a6 60 00 cmp %i1, 0 if ( sig ) 400094b4: 02 80 00 03 be 400094c0 400094b8: b0 10 20 00 clr %i0 *sig = status; 400094bc: d0 26 40 00 st %o0, [ %i1 ] 400094c0: 81 c7 e0 08 ret 400094c4: 81 e8 00 00 restore return 0; } return errno; 400094c8: 40 00 23 4e call 40012200 <__errno> <== NOT EXECUTED 400094cc: 01 00 00 00 nop <== NOT EXECUTED 400094d0: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 400094d4: 81 c7 e0 08 ret <== NOT EXECUTED 400094d8: 81 e8 00 00 restore <== NOT EXECUTED 40004e90 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40004e90: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 40004e94: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004e98: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40004e9c: 32 80 00 05 bne,a 40004eb0 <== NOT EXECUTED 40004ea0: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== 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); 40004ea4: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 40004ea8: 7f ff ff 7d call 40004c9c <== NOT EXECUTED 40004eac: 81 e8 00 00 restore <== 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); 40004eb0: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004eb4: 40 00 06 a9 call 40006958 <== NOT EXECUTED 40004eb8: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40004ebc: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40004ec0: 7f ff ff 77 call 40004c9c <== NOT EXECUTED 40004ec4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004ec8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40004ecc: 40 00 06 eb call 40006a78 <== NOT EXECUTED 40004ed0: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40004ed4: 81 c7 e0 08 ret <== NOT EXECUTED 40004ed8: 81 e8 00 00 restore <== NOT EXECUTED 400081ec : int _STAT_NAME( const char *path, struct stat *buf ) { 400081ec: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 400081f0: 80 a6 60 00 cmp %i1, 0 400081f4: 02 80 00 32 be 400082bc 400081f8: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 400081fc: a0 07 bf e8 add %fp, -24, %l0 40008200: 92 10 20 00 clr %o1 40008204: 94 10 00 10 mov %l0, %o2 40008208: 96 10 20 01 mov 1, %o3 4000820c: 7f ff f9 5a call 40006774 40008210: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40008214: 80 a2 20 00 cmp %o0, 0 40008218: 12 80 00 27 bne 400082b4 4000821c: c4 07 bf ec ld [ %fp + -20 ], %g2 return -1; if ( !loc.handlers->fstat_h ){ 40008220: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 40008224: 80 a0 60 00 cmp %g1, 0 40008228: 02 80 00 2b be 400082d4 4000822c: 92 10 00 19 mov %i1, %o1 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40008230: c0 26 40 00 clr [ %i1 ] 40008234: c0 26 60 04 clr [ %i1 + 4 ] 40008238: c0 26 60 08 clr [ %i1 + 8 ] 4000823c: c0 26 60 0c clr [ %i1 + 0xc ] 40008240: c0 26 60 10 clr [ %i1 + 0x10 ] 40008244: c0 26 60 14 clr [ %i1 + 0x14 ] 40008248: c0 26 60 18 clr [ %i1 + 0x18 ] 4000824c: c0 26 60 1c clr [ %i1 + 0x1c ] 40008250: c0 26 60 20 clr [ %i1 + 0x20 ] 40008254: c0 26 60 24 clr [ %i1 + 0x24 ] 40008258: c0 26 60 28 clr [ %i1 + 0x28 ] 4000825c: c0 26 60 2c clr [ %i1 + 0x2c ] 40008260: c0 26 60 30 clr [ %i1 + 0x30 ] 40008264: c0 26 60 34 clr [ %i1 + 0x34 ] 40008268: c0 26 60 38 clr [ %i1 + 0x38 ] 4000826c: c0 26 60 3c clr [ %i1 + 0x3c ] 40008270: c0 26 60 40 clr [ %i1 + 0x40 ] 40008274: c0 26 60 44 clr [ %i1 + 0x44 ] 40008278: c0 26 60 48 clr [ %i1 + 0x48 ] 4000827c: c0 26 60 4c clr [ %i1 + 0x4c ] status = (*loc.handlers->fstat_h)( &loc, buf ); 40008280: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 40008284: 9f c0 40 00 call %g1 40008288: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4000828c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40008290: 80 a0 60 00 cmp %g1, 0 40008294: 02 80 00 08 be 400082b4 40008298: b0 10 00 08 mov %o0, %i0 4000829c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400082a0: 80 a0 60 00 cmp %g1, 0 400082a4: 02 80 00 1a be 4000830c 400082a8: 01 00 00 00 nop 400082ac: 9f c0 40 00 call %g1 400082b0: 90 10 00 10 mov %l0, %o0 return status; } 400082b4: 81 c7 e0 08 ret 400082b8: 81 e8 00 00 restore /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 400082bc: 40 00 ad 37 call 40033798 <__errno> 400082c0: b0 10 3f ff mov -1, %i0 400082c4: 82 10 20 0e mov 0xe, %g1 400082c8: c2 22 00 00 st %g1, [ %o0 ] 400082cc: 81 c7 e0 08 ret 400082d0: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 400082d4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400082d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400082dc: 02 80 00 08 be 400082fc <== NOT EXECUTED 400082e0: 01 00 00 00 nop <== NOT EXECUTED 400082e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400082e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400082ec: 02 80 00 04 be 400082fc <== NOT EXECUTED 400082f0: 01 00 00 00 nop <== NOT EXECUTED 400082f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400082f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400082fc: 40 00 ad 27 call 40033798 <__errno> <== NOT EXECUTED 40008300: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008304: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40008308: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000830c: 81 c7 e0 08 ret <== NOT EXECUTED 40008310: 81 e8 00 00 restore <== NOT EXECUTED 4002483c : int symlink( const char *actualpath, const char *sympath ) { 4002483c: 9d e3 bf 80 save %sp, -128, %sp rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 40024840: c2 4e 40 00 ldsb [ %i1 ], %g1 40024844: 80 a0 60 2f cmp %g1, 0x2f 40024848: 02 80 00 07 be 40024864 4002484c: a0 10 00 18 mov %i0, %l0 40024850: 80 a0 60 5c cmp %g1, 0x5c 40024854: 02 80 00 04 be 40024864 40024858: 80 a0 60 00 cmp %g1, 0 4002485c: 12 80 00 2b bne 40024908 40024860: 03 10 01 32 sethi %hi(0x4004c800), %g1 40024864: 03 10 01 32 sethi %hi(0x4004c800), %g1 40024868: c6 00 63 44 ld [ %g1 + 0x344 ], %g3 ! 4004cb44 4002486c: 88 10 20 01 mov 1, %g4 40024870: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40024874: c2 27 bf e4 st %g1, [ %fp + -28 ] 40024878: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 4002487c: c4 27 bf e8 st %g2, [ %fp + -24 ] 40024880: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40024884: c2 27 bf ec st %g1, [ %fp + -20 ] 40024888: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 4002488c: c4 27 bf f0 st %g2, [ %fp + -16 ] result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 40024890: c2 07 bf ec ld [ %fp + -20 ], %g1 40024894: 90 06 40 04 add %i1, %g4, %o0 40024898: c4 00 60 04 ld [ %g1 + 4 ], %g2 4002489c: b2 07 bf e4 add %fp, -28, %i1 400248a0: 94 07 bf f4 add %fp, -12, %o2 400248a4: 92 10 00 19 mov %i1, %o1 400248a8: 9f c0 80 00 call %g2 400248ac: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 400248b0: 80 a2 20 00 cmp %o0, 0 400248b4: 12 80 00 13 bne 40024900 400248b8: c4 07 bf ec ld [ %fp + -20 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 400248bc: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 400248c0: 80 a0 60 00 cmp %g1, 0 400248c4: 02 80 00 1c be 40024934 400248c8: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 400248cc: 92 10 00 10 mov %l0, %o1 400248d0: 9f c0 40 00 call %g1 400248d4: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 400248d8: c2 07 bf ec ld [ %fp + -20 ], %g1 400248dc: 80 a0 60 00 cmp %g1, 0 400248e0: 02 80 00 08 be 40024900 400248e4: b0 10 00 08 mov %o0, %i0 400248e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400248ec: 80 a0 60 00 cmp %g1, 0 400248f0: 02 80 00 1b be 4002495c 400248f4: 01 00 00 00 nop 400248f8: 9f c0 40 00 call %g1 400248fc: 90 10 00 19 mov %i1, %o0 return result; } 40024900: 81 c7 e0 08 ret 40024904: 81 e8 00 00 restore rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 40024908: c6 00 63 44 ld [ %g1 + 0x344 ], %g3 4002490c: 88 10 20 00 clr %g4 40024910: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40024914: c2 27 bf e4 st %g1, [ %fp + -28 ] 40024918: c4 00 e0 08 ld [ %g3 + 8 ], %g2 4002491c: c4 27 bf e8 st %g2, [ %fp + -24 ] 40024920: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40024924: c2 27 bf ec st %g1, [ %fp + -20 ] 40024928: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 4002492c: 10 bf ff d9 b 40024890 40024930: c4 27 bf f0 st %g2, [ %fp + -16 ] result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 40024934: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40024938: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002493c: 02 80 00 04 be 4002494c <== NOT EXECUTED 40024940: 01 00 00 00 nop <== NOT EXECUTED 40024944: 9f c0 40 00 call %g1 <== NOT EXECUTED 40024948: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002494c: 40 00 3b 93 call 40033798 <__errno> <== NOT EXECUTED 40024950: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40024954: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40024958: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4002495c: 81 c7 e0 08 ret <== NOT EXECUTED 40024960: 81 e8 00 00 restore <== NOT EXECUTED 40014798 : int tcgetattr( int fd, struct termios *tp ) { 40014798: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 4001479c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400147a0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400147a4: 40 00 10 35 call 40018878 <== NOT EXECUTED 400147a8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400147ac: 01 00 00 00 nop 400147b0 : int tcsetattr( int fd, int opt, struct termios *tp ) { 400147b0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 400147b4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400147b8: 02 80 00 10 be 400147f8 <== NOT EXECUTED 400147bc: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 400147c0: 02 80 00 08 be 400147e0 <== NOT EXECUTED 400147c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 400147c8: 40 00 13 6d call 4001957c <__errno> <== NOT EXECUTED 400147cc: 01 00 00 00 nop <== NOT EXECUTED 400147d0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400147d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 400147d8: 81 c7 e0 08 ret <== NOT EXECUTED 400147dc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 400147e0: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 400147e4: 40 00 10 25 call 40018878 <== NOT EXECUTED 400147e8: 94 10 20 00 clr %o2 <== NOT EXECUTED 400147ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400147f0: 06 bf ff fa bl 400147d8 <== NOT EXECUTED 400147f4: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 400147f8: 40 00 10 20 call 40018878 <== NOT EXECUTED 400147fc: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED 40014800: 01 00 00 00 nop 40006c64 : #include long telldir( DIR *dirp ) { 40006c64: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; if ( !dirp ) 40006c68: 80 a6 20 00 cmp %i0, 0 40006c6c: 02 80 00 1b be 40006cd8 40006c70: 03 10 00 65 sethi %hi(0x40019400), %g1 /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 40006c74: f0 06 00 00 ld [ %i0 ], %i0 40006c78: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40006c7c: 80 a6 00 02 cmp %i0, %g2 40006c80: 1a 80 00 0f bcc 40006cbc 40006c84: 11 10 00 61 sethi %hi(0x40018400), %o0 40006c88: 03 10 00 68 sethi %hi(0x4001a000), %g1 40006c8c: c6 00 62 0c ld [ %g1 + 0x20c ], %g3 ! 4001a20c 40006c90: 85 2e 20 02 sll %i0, 2, %g2 40006c94: 83 2e 20 04 sll %i0, 4, %g1 40006c98: 82 20 40 02 sub %g1, %g2, %g1 40006c9c: 82 00 40 18 add %g1, %i0, %g1 40006ca0: 83 28 60 02 sll %g1, 2, %g1 if (iop == NULL) 40006ca4: 86 80 c0 01 addcc %g3, %g1, %g3 40006ca8: 02 80 00 06 be 40006cc0 40006cac: 15 10 00 61 sethi %hi(0x40018400), %o2 assert(0); return (long)( iop->offset ); 40006cb0: f0 00 e0 08 ld [ %g3 + 8 ], %i0 } 40006cb4: 81 c7 e0 08 ret 40006cb8: 81 e8 00 00 restore */ iop = rtems_libio_iop( dirp->dd_fd ); if (iop == NULL) assert(0); 40006cbc: 15 10 00 61 sethi %hi(0x40018400), %o2 <== NOT EXECUTED 40006cc0: 17 10 00 60 sethi %hi(0x40018000), %o3 <== NOT EXECUTED 40006cc4: 90 12 22 58 or %o0, 0x258, %o0 <== NOT EXECUTED 40006cc8: 94 12 a2 a8 or %o2, 0x2a8, %o2 <== NOT EXECUTED 40006ccc: 96 12 e2 d8 or %o3, 0x2d8, %o3 <== NOT EXECUTED 40006cd0: 7f ff f6 78 call 400046b0 <__assert_func> <== NOT EXECUTED 40006cd4: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED ) { rtems_libio_t *iop; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 40006cd8: 40 00 2d 84 call 400122e8 <__errno> <== NOT EXECUTED 40006cdc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006ce0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40006ce4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006ce8: 81 c7 e0 08 ret <== NOT EXECUTED 40006cec: 81 e8 00 00 restore <== NOT EXECUTED 40008038 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 40008038: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 4000803c: 80 a6 a0 00 cmp %i2, 0 40008040: 02 80 00 54 be 40008190 40008044: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 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 ) || 40008048: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 4000804c: 82 10 61 ff or %g1, 0x1ff, %g1 40008050: 80 a0 80 01 cmp %g2, %g1 40008054: 18 80 00 4f bgu 40008190 40008058: 01 00 00 00 nop 4000805c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 40008060: 80 a0 80 01 cmp %g2, %g1 40008064: 18 80 00 4b bgu 40008190 40008068: 80 a0 a0 00 cmp %g2, 0 4000806c: 06 80 00 49 bl 40008190 40008070: 80 a6 60 04 cmp %i1, 4 ( 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 ) { 40008074: 02 80 00 04 be 40008084 40008078: 80 a6 60 00 cmp %i1, 0 4000807c: 12 80 00 45 bne 40008190 40008080: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 40008084: c2 06 80 00 ld [ %i2 ], %g1 40008088: c4 06 a0 04 ld [ %i2 + 4 ], %g2 4000808c: c6 06 a0 08 ld [ %i2 + 8 ], %g3 40008090: c8 06 a0 0c ld [ %i2 + 0xc ], %g4 40008094: c2 27 bf e4 st %g1, [ %fp + -28 ] 40008098: c4 27 bf e8 st %g2, [ %fp + -24 ] 4000809c: c6 27 bf ec st %g3, [ %fp + -20 ] /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 400080a0: 80 a6 60 04 cmp %i1, 4 400080a4: 02 80 00 5c be 40008214 400080a8: c8 27 bf f0 st %g4, [ %fp + -16 ] 400080ac: 92 10 00 18 mov %i0, %o1 400080b0: 11 10 00 7e sethi %hi(0x4001f800), %o0 400080b4: 94 07 bf f4 add %fp, -12, %o2 400080b8: 40 00 09 1f call 4000a534 <_Objects_Get> 400080bc: 90 12 23 70 or %o0, 0x370, %o0 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 400080c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400080c4: 80 a0 60 00 cmp %g1, 0 400080c8: 12 80 00 67 bne 40008264 400080cc: b2 10 00 08 mov %o0, %i1 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 ) { 400080d0: c2 07 bf ec ld [ %fp + -20 ], %g1 400080d4: 80 a0 60 00 cmp %g1, 0 400080d8: 12 80 00 05 bne 400080ec 400080dc: c2 07 bf f0 ld [ %fp + -16 ], %g1 400080e0: 80 a0 60 00 cmp %g1, 0 400080e4: 02 80 00 31 be 400081a8 400080e8: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 400080ec: 40 00 0f 4b call 4000be18 <_Timespec_To_ticks> 400080f0: 90 10 00 1a mov %i2, %o0 400080f4: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 400080f8: 40 00 0f 48 call 4000be18 <_Timespec_To_ticks> 400080fc: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 40008100: d4 06 60 08 ld [ %i1 + 8 ], %o2 return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); initial_period = _Timespec_To_ticks( &normalize.it_value ); 40008104: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 40008108: 17 10 00 20 sethi %hi(0x40008000), %o3 4000810c: 90 06 60 10 add %i1, 0x10, %o0 40008110: 96 12 e2 7c or %o3, 0x27c, %o3 40008114: 40 00 1b 93 call 4000ef60 <_POSIX_Timer_Insert_helper> 40008118: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 4000811c: 80 8a 20 ff btst 0xff, %o0 40008120: 02 80 00 18 be 40008180 40008124: 80 a6 e0 00 cmp %i3, 0 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 40008128: 02 80 00 0b be 40008154 4000812c: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 40008130: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 40008134: c2 26 c0 00 st %g1, [ %i3 ] 40008138: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 4000813c: c4 26 e0 04 st %g2, [ %i3 + 4 ] 40008140: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 40008144: c2 26 e0 08 st %g1, [ %i3 + 8 ] 40008148: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 4000814c: c4 26 e0 0c st %g2, [ %i3 + 0xc ] ptimer->timer_data = normalize; 40008150: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 40008154: 90 06 60 6c add %i1, 0x6c, %o0 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 40008158: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 4000815c: c4 07 bf e8 ld [ %fp + -24 ], %g2 40008160: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 40008164: c2 07 bf ec ld [ %fp + -20 ], %g1 40008168: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 4000816c: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 40008170: 82 10 20 03 mov 3, %g1 * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; 40008174: c4 26 60 60 st %g2, [ %i1 + 0x60 ] /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 40008178: 40 00 06 80 call 40009b78 <_TOD_Get> 4000817c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 40008180: 40 00 0b 26 call 4000ae18 <_Thread_Enable_dispatch> 40008184: b0 10 20 00 clr %i0 40008188: 81 c7 e0 08 ret 4000818c: 81 e8 00 00 restore /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40008190: 40 00 23 4f call 40010ecc <__errno> 40008194: b0 10 3f ff mov -1, %i0 40008198: 82 10 20 16 mov 0x16, %g1 4000819c: c2 22 00 00 st %g1, [ %o0 ] 400081a0: 81 c7 e0 08 ret 400081a4: 81 e8 00 00 restore 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 ); 400081a8: 40 00 10 6c call 4000c358 <_Watchdog_Remove> 400081ac: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 400081b0: 80 a6 e0 00 cmp %i3, 0 400081b4: 02 80 00 0b be 400081e0 400081b8: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 400081bc: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 <== NOT EXECUTED 400081c0: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 400081c4: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 <== NOT EXECUTED 400081c8: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 400081cc: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 <== NOT EXECUTED 400081d0: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 400081d4: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 <== NOT EXECUTED 400081d8: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 400081dc: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 400081e0: b0 10 20 00 clr %i0 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 400081e4: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 400081e8: c4 07 bf e8 ld [ %fp + -24 ], %g2 400081ec: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 400081f0: c2 07 bf ec ld [ %fp + -20 ], %g1 400081f4: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 400081f8: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 400081fc: 82 10 20 04 mov 4, %g1 (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = normalize; 40008200: c4 26 60 60 st %g2, [ %i1 + 0x60 ] /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; /* Returns with success */ _Thread_Enable_dispatch(); 40008204: 40 00 0b 05 call 4000ae18 <_Thread_Enable_dispatch> 40008208: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000820c: 81 c7 e0 08 ret 40008210: 81 e8 00 00 restore normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 40008214: b2 07 bf ec add %fp, -20, %i1 40008218: 21 10 00 7e sethi %hi(0x4001f800), %l0 4000821c: 92 10 00 19 mov %i1, %o1 40008220: 40 00 0e d6 call 4000bd78 <_Timespec_Greater_than> 40008224: 90 14 20 b0 or %l0, 0xb0, %o0 40008228: 80 8a 20 ff btst 0xff, %o0 4000822c: 12 bf ff d9 bne 40008190 40008230: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 40008234: 94 10 00 19 mov %i1, %o2 40008238: 40 00 0e e2 call 4000bdc0 <_Timespec_Subtract> 4000823c: 90 14 20 b0 or %l0, 0xb0, %o0 40008240: 92 10 00 18 mov %i0, %o1 40008244: 11 10 00 7e sethi %hi(0x4001f800), %o0 40008248: 94 07 bf f4 add %fp, -12, %o2 4000824c: 40 00 08 ba call 4000a534 <_Objects_Get> 40008250: 90 12 23 70 or %o0, 0x370, %o0 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 40008254: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008258: 80 a0 60 00 cmp %g1, 0 4000825c: 02 bf ff 9d be 400080d0 40008260: b2 10 00 08 mov %o0, %i1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40008264: 40 00 23 1a call 40010ecc <__errno> <== NOT EXECUTED 40008268: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000826c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40008270: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40008274: 81 c7 e0 08 ret <== NOT EXECUTED 40008278: 81 e8 00 00 restore <== NOT EXECUTED 40024aec : */ char *ttyname( int fd ) { 40024aec: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 40024af0: 21 10 01 32 sethi %hi(0x4004c800), %l0 <== NOT EXECUTED 40024af4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40024af8: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 40024afc: 92 14 23 48 or %l0, 0x348, %o1 <== NOT EXECUTED 40024b00: 7f ff ff ba call 400249e8 <== NOT EXECUTED 40024b04: b0 14 23 48 or %l0, 0x348, %i0 <== NOT EXECUTED 40024b08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40024b0c: 12 80 00 04 bne 40024b1c <== NOT EXECUTED 40024b10: 01 00 00 00 nop <== NOT EXECUTED return ttyname_buf; return NULL; } 40024b14: 81 c7 e0 08 ret <== NOT EXECUTED 40024b18: 81 e8 00 00 restore <== NOT EXECUTED 40024b1c: 81 c7 e0 08 ret <== NOT EXECUTED 40024b20: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400249e8 : int ttyname_r( int fd, char *name, size_t namesize ) { 400249e8: 9d e3 be d0 save %sp, -304, %sp <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 400249ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400249f0: 7f ff ff e3 call 4002497c <== NOT EXECUTED 400249f4: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 400249f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400249fc: 06 80 00 0d bl 40024a30 <== NOT EXECUTED 40024a00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 40024a04: 7f ff f7 3a call 400226ec <== NOT EXECUTED 40024a08: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 40024a0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40024a10: 12 80 00 08 bne 40024a30 <== NOT EXECUTED 40024a14: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 40024a18: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 40024a1c: 07 00 00 08 sethi %hi(0x2000), %g3 <== NOT EXECUTED 40024a20: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40024a24: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40024a28: 02 80 00 08 be 40024a48 <== NOT EXECUTED 40024a2c: 11 10 01 24 sethi %hi(0x40049000), %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) rtems_set_errno_and_return_minus_one(EBADF); 40024a30: 40 00 3b 5a call 40033798 <__errno> <== NOT EXECUTED 40024a34: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40024a38: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40024a3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024a40: 81 c7 e0 08 ret <== NOT EXECUTED 40024a44: 81 e8 00 00 restore <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40024a48: a0 06 60 05 add %i1, 5, %l0 <== NOT EXECUTED /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 40024a4c: 90 12 23 70 or %o0, 0x370, %o0 <== NOT EXECUTED 40024a50: 7f ff fd 98 call 400240b0 <== NOT EXECUTED 40024a54: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 40024a58: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40024a5c: 02 bf ff f5 be 40024a30 <== NOT EXECUTED 40024a60: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 40024a64: 7f ff fe 55 call 400243b8 <== NOT EXECUTED 40024a68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40024a6c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40024a70: 02 80 00 1a be 40024ad8 <== NOT EXECUTED 40024a74: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED { if (dirp->d_ino != sb.st_ino) 40024a78: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED 40024a7c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40024a80: 12 bf ff f9 bne 40024a64 <== NOT EXECUTED 40024a84: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40024a88: 40 00 4f f8 call 40038a68 <== NOT EXECUTED 40024a8c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 40024a90: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40024a94: 7f ff 8d d6 call 400081ec <== NOT EXECUTED 40024a98: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40024a9c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40024aa0: 12 bf ff f1 bne 40024a64 <== NOT EXECUTED 40024aa4: c4 07 bf 30 ld [ %fp + -208 ], %g2 <== NOT EXECUTED 40024aa8: c2 07 bf 80 ld [ %fp + -128 ], %g1 <== NOT EXECUTED 40024aac: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40024ab0: 12 bf ff ed bne 40024a64 <== NOT EXECUTED 40024ab4: c4 07 bf 34 ld [ %fp + -204 ], %g2 <== NOT EXECUTED 40024ab8: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 40024abc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40024ac0: 12 bf ff e9 bne 40024a64 <== NOT EXECUTED 40024ac4: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED 40024ac8: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 40024acc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40024ad0: 12 bf ff e5 bne 40024a64 <== NOT EXECUTED 40024ad4: 01 00 00 00 nop <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 40024ad8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40024adc: 40 00 30 14 call 40030b2c <== NOT EXECUTED 40024ae0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40024ae4: 81 c7 e0 08 ret <== NOT EXECUTED 40024ae8: 81 e8 00 00 restore <== NOT EXECUTED 40006560 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 40006560: 9d e3 bf 90 save %sp, -112, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 40006564: 03 10 00 5c sethi %hi(0x40017000), %g1 40006568: a2 10 62 3c or %g1, 0x23c, %l1 ! 4001723c <_POSIX_signals_Ualarm_timer> 4000656c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 40006570: 80 a0 a0 00 cmp %g2, 0 40006574: 02 80 00 3c be 40006664 40006578: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 4000657c: 40 00 10 9d call 4000a7f0 <_Watchdog_Remove> 40006580: 90 10 00 11 mov %l1, %o0 40006584: 90 02 3f fe add %o0, -2, %o0 40006588: 80 a2 20 01 cmp %o0, 1 4000658c: 08 80 00 07 bleu 400065a8 40006590: b0 10 20 00 clr %i0 /* * 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 ) { 40006594: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40006598: 12 80 00 1a bne 40006600 <== NOT EXECUTED 4000659c: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 400065a0: 81 c7 e0 08 ret 400065a4: 81 e8 00 00 restore * 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); 400065a8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400065ac: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 * 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); 400065b0: d0 04 60 14 ld [ %l1 + 0x14 ], %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400065b4: 92 07 bf f0 add %fp, -16, %o1 * 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); 400065b8: 90 02 00 01 add %o0, %g1, %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 400065bc: 40 00 0e f1 call 4000a180 <_Timespec_From_ticks> 400065c0: 90 22 00 02 sub %o0, %g2, %o0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400065c4: c4 07 bf f0 ld [ %fp + -16 ], %g2 remaining += tp.tv_nsec / 1000; 400065c8: d0 07 bf f4 ld [ %fp + -12 ], %o0 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400065cc: 87 28 a0 03 sll %g2, 3, %g3 400065d0: 83 28 a0 08 sll %g2, 8, %g1 400065d4: 82 20 40 03 sub %g1, %g3, %g1 remaining += tp.tv_nsec / 1000; 400065d8: 92 10 23 e8 mov 0x3e8, %o1 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400065dc: a1 28 60 06 sll %g1, 6, %l0 400065e0: a0 24 00 01 sub %l0, %g1, %l0 remaining += tp.tv_nsec / 1000; 400065e4: 40 00 34 a2 call 4001386c <.div> 400065e8: a0 04 00 02 add %l0, %g2, %l0 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 400065ec: a1 2c 20 06 sll %l0, 6, %l0 /* * 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 ) { 400065f0: 80 a4 a0 00 cmp %l2, 0 400065f4: 02 bf ff eb be 400065a0 400065f8: b0 02 00 10 add %o0, %l0, %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 400065fc: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 40006600: 90 10 00 12 mov %l2, %o0 40006604: 40 00 34 98 call 40013864 <.udiv> 40006608: 92 14 22 40 or %l0, 0x240, %o1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000660c: 92 14 22 40 or %l0, 0x240, %o1 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 40006610: d0 27 bf f0 st %o0, [ %fp + -16 ] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 40006614: 40 00 35 40 call 40013b14 <.urem> 40006618: 90 10 00 12 mov %l2, %o0 4000661c: 85 2a 20 02 sll %o0, 2, %g2 40006620: 83 2a 20 07 sll %o0, 7, %g1 40006624: 82 20 40 02 sub %g1, %g2, %g1 40006628: 82 00 40 08 add %g1, %o0, %g1 4000662c: 83 28 60 03 sll %g1, 3, %g1 ticks = _Timespec_To_ticks( &tp ); 40006630: a0 07 bf f0 add %fp, -16, %l0 */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 40006634: c2 27 bf f4 st %g1, [ %fp + -12 ] ticks = _Timespec_To_ticks( &tp ); 40006638: 40 00 0e fd call 4000a22c <_Timespec_To_ticks> 4000663c: 90 10 00 10 mov %l0, %o0 if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 40006640: 40 00 0e fb call 4000a22c <_Timespec_To_ticks> 40006644: 90 10 00 10 mov %l0, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006648: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000664c: d0 24 60 0c st %o0, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006650: 11 10 00 5d sethi %hi(0x40017400), %o0 40006654: 40 00 0f fc call 4000a644 <_Watchdog_Insert> 40006658: 90 12 20 80 or %o0, 0x80, %o0 ! 40017480 <_Watchdog_Ticks_chain> } return remaining; } 4000665c: 81 c7 e0 08 ret 40006660: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006664: 03 10 00 19 sethi %hi(0x40006400), %g1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40006668: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; 4000666c: 82 10 62 90 or %g1, 0x290, %g1 the_watchdog->id = id; 40006670: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 40006674: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40006678: c2 24 60 1c st %g1, [ %l1 + 0x1c ] /* * 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 ) { 4000667c: 80 a4 a0 00 cmp %l2, 0 40006680: 02 bf ff c8 be 400065a0 40006684: b0 10 20 00 clr %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 40006688: 10 bf ff de b 40006600 4000668c: 21 00 03 d0 sethi %hi(0xf4000), %l0 40024b3c : #include int unlink( const char *path ) { 40024b3c: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 40024b40: 92 10 20 00 clr %o1 40024b44: 90 10 00 18 mov %i0, %o0 40024b48: a0 07 bf e8 add %fp, -24, %l0 40024b4c: 96 10 20 00 clr %o3 40024b50: 7f ff 87 09 call 40006774 40024b54: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 40024b58: 80 a2 20 00 cmp %o0, 0 40024b5c: 02 80 00 04 be 40024b6c 40024b60: 90 10 20 02 mov 2, %o0 result = (*loc.ops->unlink_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 40024b64: 81 c7 e0 08 ret 40024b68: 91 e8 3f ff restore %g0, -1, %o0 result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40024b6c: 7f ff 86 d2 call 400066b4 40024b70: 92 10 00 10 mov %l0, %o1 if (result != 0 && errno != ENOTSUP) { 40024b74: 80 a2 20 00 cmp %o0, 0 40024b78: 12 80 00 1d bne 40024bec 40024b7c: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); return -1; } if ( !loc.ops->node_type_h ) { 40024b80: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40024b84: 80 a0 60 00 cmp %g1, 0 40024b88: 22 80 00 2b be,a 40024c34 40024b8c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 40024b90: 9f c0 40 00 call %g1 40024b94: 90 10 00 10 mov %l0, %o0 40024b98: 80 a2 20 01 cmp %o0, 1 40024b9c: 02 80 00 31 be 40024c60 40024ba0: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 40024ba4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40024ba8: 80 a0 60 00 cmp %g1, 0 40024bac: 22 80 00 22 be,a 40024c34 40024bb0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); 40024bb4: 9f c0 40 00 call %g1 40024bb8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40024bbc: c2 07 bf f0 ld [ %fp + -16 ], %g1 40024bc0: 80 a0 60 00 cmp %g1, 0 40024bc4: 02 80 00 08 be 40024be4 40024bc8: b0 10 00 08 mov %o0, %i0 40024bcc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40024bd0: 80 a0 60 00 cmp %g1, 0 40024bd4: 02 80 00 31 be 40024c98 40024bd8: 01 00 00 00 nop 40024bdc: 9f c0 40 00 call %g1 40024be0: 90 10 00 10 mov %l0, %o0 40024be4: 81 c7 e0 08 ret 40024be8: 81 e8 00 00 restore result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0 && errno != ENOTSUP) { 40024bec: 40 00 3a eb call 40033798 <__errno> <== NOT EXECUTED 40024bf0: 01 00 00 00 nop <== NOT EXECUTED 40024bf4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40024bf8: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 40024bfc: 02 bf ff e1 be 40024b80 <== NOT EXECUTED 40024c00: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40024c04: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40024c08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024c0c: 02 bf ff f6 be 40024be4 <== NOT EXECUTED 40024c10: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40024c14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40024c18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024c1c: 02 bf ff f2 be 40024be4 <== NOT EXECUTED 40024c20: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40024c24: 9f c0 40 00 call %g1 <== NOT EXECUTED 40024c28: 01 00 00 00 nop <== NOT EXECUTED 40024c2c: 81 c7 e0 08 ret <== NOT EXECUTED 40024c30: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 40024c34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024c38: 02 80 00 04 be 40024c48 <== NOT EXECUTED 40024c3c: 01 00 00 00 nop <== NOT EXECUTED 40024c40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40024c44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40024c48: 40 00 3a d4 call 40033798 <__errno> <== NOT EXECUTED 40024c4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40024c50: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40024c54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024c58: 81 c7 e0 08 ret <== NOT EXECUTED 40024c5c: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 40024c60: c2 07 bf f0 ld [ %fp + -16 ], %g1 40024c64: 80 a0 60 00 cmp %g1, 0 40024c68: 02 80 00 08 be 40024c88 40024c6c: 01 00 00 00 nop 40024c70: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40024c74: 80 a0 60 00 cmp %g1, 0 40024c78: 02 80 00 04 be 40024c88 40024c7c: 01 00 00 00 nop 40024c80: 9f c0 40 00 call %g1 40024c84: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EISDIR ); 40024c88: 40 00 3a c4 call 40033798 <__errno> 40024c8c: b0 10 3f ff mov -1, %i0 40024c90: 82 10 20 15 mov 0x15, %g1 40024c94: c2 22 00 00 st %g1, [ %o0 ] 40024c98: 81 c7 e0 08 ret 40024c9c: 81 e8 00 00 restore 40024d30 : */ int unmount( const char *path ) { 40024d30: 9d e3 bf 88 save %sp, -120, %sp * 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, 0x0, &loc, true ) ) 40024d34: 92 10 20 00 clr %o1 40024d38: 90 10 00 18 mov %i0, %o0 40024d3c: a0 07 bf e8 add %fp, -24, %l0 40024d40: 96 10 20 01 mov 1, %o3 40024d44: 7f ff 86 8c call 40006774 40024d48: 94 10 00 10 mov %l0, %o2 40024d4c: 80 a2 20 00 cmp %o0, 0 40024d50: 12 80 00 3e bne 40024e48 40024d54: c2 07 bf e8 ld [ %fp + -24 ], %g1 return -1; mt_entry = loc.mt_entry; 40024d58: f0 07 bf f4 ld [ %fp + -12 ], %i0 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ 40024d5c: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 40024d60: 80 a0 80 01 cmp %g2, %g1 40024d64: 12 80 00 41 bne 40024e68 40024d68: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 40024d6c: 80 a0 60 00 cmp %g1, 0 40024d70: 22 80 00 09 be,a 40024d94 40024d74: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40024d78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40024d7c: 80 a0 60 00 cmp %g1, 0 40024d80: 22 80 00 05 be,a 40024d94 40024d84: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40024d88: 9f c0 40 00 call %g1 40024d8c: 90 10 00 10 mov %l0, %o0 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 40024d90: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40024d94: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 40024d98: 80 a0 a0 00 cmp %g2, 0 40024d9c: 02 80 00 61 be 40024f20 40024da0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 40024da4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40024da8: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 40024dac: 80 a0 a0 00 cmp %g2, 0 40024db0: 02 80 00 5c be 40024f20 40024db4: 03 10 01 32 sethi %hi(0x4004c800), %g1 * 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 ) 40024db8: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 4004cb44 40024dbc: c6 00 a0 10 ld [ %g2 + 0x10 ], %g3 40024dc0: 80 a0 c0 18 cmp %g3, %i0 40024dc4: 02 80 00 23 be 40024e50 40024dc8: 03 10 01 84 sethi %hi(0x40061000), %g1 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 40024dcc: c4 00 62 a8 ld [ %g1 + 0x2a8 ], %g2 ! 400612a8 40024dd0: 82 10 62 a8 or %g1, 0x2a8, %g1 40024dd4: 88 00 60 04 add %g1, 4, %g4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40024dd8: 80 a1 00 02 cmp %g4, %g2 40024ddc: 02 80 00 0f be 40024e18 40024de0: 01 00 00 00 nop the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) { 40024de4: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 40024de8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40024dec: 80 a0 40 03 cmp %g1, %g3 40024df0: 32 80 00 07 bne,a 40024e0c 40024df4: c4 00 80 00 ld [ %g2 ], %g2 40024df8: 30 80 00 16 b,a 40024e50 <== NOT EXECUTED 40024dfc: 80 a0 c0 01 cmp %g3, %g1 40024e00: 02 80 00 14 be 40024e50 40024e04: 01 00 00 00 nop * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 40024e08: c4 00 80 00 ld [ %g2 ], %g2 * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 40024e0c: 80 a1 00 02 cmp %g4, %g2 40024e10: 32 bf ff fb bne,a 40024dfc 40024e14: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 * 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 ) 40024e18: 7f ff 87 77 call 40006bf4 40024e1c: 90 10 00 18 mov %i0, %o0 40024e20: 80 a2 20 01 cmp %o0, 1 40024e24: 02 80 00 0b be 40024e50 40024e28: 01 00 00 00 nop * 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 ) 40024e2c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 40024e30: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 40024e34: 9f c0 40 00 call %g1 40024e38: 90 10 00 18 mov %i0, %o0 40024e3c: 80 a2 20 00 cmp %o0, 0 40024e40: 22 80 00 19 be,a 40024ea4 40024e44: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 40024e48: 81 c7 e0 08 ret 40024e4c: 91 e8 3f ff restore %g0, -1, %o0 * 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 ); 40024e50: 40 00 3a 52 call 40033798 <__errno> 40024e54: b0 10 3f ff mov -1, %i0 40024e58: 82 10 20 10 mov 0x10, %g1 40024e5c: c2 22 00 00 st %g1, [ %o0 ] 40024e60: 81 c7 e0 08 ret 40024e64: 81 e8 00 00 restore /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc ); 40024e68: 80 a0 60 00 cmp %g1, 0 40024e6c: 02 80 00 08 be 40024e8c 40024e70: 01 00 00 00 nop 40024e74: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40024e78: 80 a0 60 00 cmp %g1, 0 40024e7c: 02 80 00 04 be 40024e8c 40024e80: 01 00 00 00 nop 40024e84: 9f c0 40 00 call %g1 40024e88: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 40024e8c: 40 00 3a 43 call 40033798 <__errno> 40024e90: b0 10 3f ff mov -1, %i0 40024e94: 82 10 20 0d mov 0xd, %g1 40024e98: c2 22 00 00 st %g1, [ %o0 ] 40024e9c: 81 c7 e0 08 ret 40024ea0: 81 e8 00 00 restore * 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){ 40024ea4: c2 00 a0 2c ld [ %g2 + 0x2c ], %g1 40024ea8: 9f c0 40 00 call %g1 40024eac: 90 10 00 18 mov %i0, %o0 40024eb0: 80 a2 20 00 cmp %o0, 0 40024eb4: 32 80 00 13 bne,a 40024f00 40024eb8: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 40024ebc: 40 00 05 ba call 400265a4 <_Chain_Extract> 40024ec0: 90 10 00 18 mov %i0, %o0 /* * 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 ); 40024ec4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40024ec8: 80 a0 60 00 cmp %g1, 0 40024ecc: 02 80 00 09 be 40024ef0 40024ed0: 90 10 00 18 mov %i0, %o0 40024ed4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40024ed8: 80 a0 60 00 cmp %g1, 0 40024edc: 02 80 00 05 be 40024ef0 40024ee0: 01 00 00 00 nop 40024ee4: 9f c0 40 00 call %g1 40024ee8: 90 06 20 08 add %i0, 8, %o0 free( mt_entry ); 40024eec: 90 10 00 18 mov %i0, %o0 40024ef0: 7f ff 86 7f call 400068ec 40024ef4: b0 10 20 00 clr %i0 40024ef8: 81 c7 e0 08 ret 40024efc: 81 e8 00 00 restore * 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 ) 40024f00: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED 40024f04: 9f c0 40 00 call %g1 <== NOT EXECUTED 40024f08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40024f0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40024f10: 02 bf ff ce be 40024e48 <== NOT EXECUTED 40024f14: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 40024f18: 7f ff 99 06 call 4000b330 <== NOT EXECUTED 40024f1c: 90 10 20 00 clr %o0 ! 0 <== 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 ); 40024f20: 40 00 3a 1e call 40033798 <__errno> <== NOT EXECUTED 40024f24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40024f28: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40024f2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024f30: 81 c7 e0 08 ret <== NOT EXECUTED 40024f34: 81 e8 00 00 restore <== NOT EXECUTED 40024f38 : int utime( const char *path, const struct utimbuf *times ) { 40024f38: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) 40024f3c: 92 10 20 00 clr %o1 40024f40: 90 10 00 18 mov %i0, %o0 40024f44: a0 07 bf e8 add %fp, -24, %l0 40024f48: 96 10 20 01 mov 1, %o3 40024f4c: 94 10 00 10 mov %l0, %o2 40024f50: 7f ff 86 09 call 40006774 40024f54: b0 10 3f ff mov -1, %i0 40024f58: 80 a2 20 00 cmp %o0, 0 40024f5c: 12 80 00 14 bne 40024fac 40024f60: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 40024f64: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40024f68: 80 a0 60 00 cmp %g1, 0 40024f6c: 22 80 00 12 be,a 40024fb4 40024f70: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 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 ); 40024f74: d4 06 60 04 ld [ %i1 + 4 ], %o2 40024f78: d2 06 40 00 ld [ %i1 ], %o1 40024f7c: 9f c0 40 00 call %g1 40024f80: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 40024f84: c2 07 bf f0 ld [ %fp + -16 ], %g1 40024f88: 80 a0 60 00 cmp %g1, 0 40024f8c: 02 80 00 08 be 40024fac 40024f90: b0 10 00 08 mov %o0, %i0 40024f94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40024f98: 80 a0 60 00 cmp %g1, 0 40024f9c: 02 80 00 0f be 40024fd8 40024fa0: 01 00 00 00 nop 40024fa4: 9f c0 40 00 call %g1 40024fa8: 90 10 00 10 mov %l0, %o0 return result; } 40024fac: 81 c7 e0 08 ret 40024fb0: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 40024fb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40024fb8: 02 80 00 04 be 40024fc8 <== NOT EXECUTED 40024fbc: 01 00 00 00 nop <== NOT EXECUTED 40024fc0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40024fc4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40024fc8: 40 00 39 f4 call 40033798 <__errno> <== NOT EXECUTED 40024fcc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40024fd0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40024fd4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40024fd8: 81 c7 e0 08 ret <== NOT EXECUTED 40024fdc: 81 e8 00 00 restore <== NOT EXECUTED 40003d1c : */ void vprintk( const char *fmt, va_list ap ) { 40003d1c: 9d e3 bf 80 save %sp, -128, %sp char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40003d20: d0 0e 00 00 ldub [ %i0 ], %o0 40003d24: 91 2a 20 18 sll %o0, 0x18, %o0 40003d28: 80 a2 20 00 cmp %o0, 0 40003d2c: 02 80 00 44 be 40003e3c 40003d30: 03 10 00 66 sethi %hi(0x40019800), %g1 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40003d34: 05 10 00 0f sethi %hi(0x40003c00), %g2 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40003d38: a8 10 63 fc or %g1, 0x3fc, %l4 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40003d3c: b4 10 a0 48 or %g2, 0x48, %i2 40003d40: 03 10 00 63 sethi %hi(0x40018c00), %g1 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40003d44: b6 07 bf f8 add %fp, -8, %i3 40003d48: b8 10 60 48 or %g1, 0x48, %i4 40003d4c: ae 07 bf e0 add %fp, -32, %l7 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 40003d50: 91 3a 20 18 sra %o0, 0x18, %o0 40003d54: 80 a2 20 25 cmp %o0, 0x25 40003d58: 32 80 00 3b bne,a 40003e44 40003d5c: c2 05 00 00 ld [ %l4 ], %g1 fmt++; if (*fmt == '0' ) { 40003d60: d0 0e 20 01 ldub [ %i0 + 1 ], %o0 sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; 40003d64: 88 06 20 01 add %i0, 1, %g4 if (*fmt == '0' ) { 40003d68: 87 2a 20 18 sll %o0, 0x18, %g3 40003d6c: 83 38 e0 18 sra %g3, 0x18, %g1 40003d70: 80 a0 60 30 cmp %g1, 0x30 40003d74: 02 80 00 b7 be 40004050 40003d78: ba 10 20 20 mov 0x20, %i5 lead = '0'; fmt++; } if (*fmt == '-' ) { 40003d7c: 83 38 e0 18 sra %g3, 0x18, %g1 40003d80: 80 a0 60 2d cmp %g1, 0x2d 40003d84: 02 80 00 ae be 4000403c 40003d88: ac 10 20 00 clr %l6 minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40003d8c: 82 02 3f d0 add %o0, -48, %g1 40003d90: a0 10 20 00 clr %l0 40003d94: 82 08 60 ff and %g1, 0xff, %g1 40003d98: b0 10 00 04 mov %g4, %i0 40003d9c: 80 a0 60 09 cmp %g1, 9 40003da0: 08 80 00 05 bleu 40003db4 40003da4: aa 10 20 00 clr %l5 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40003da8: 10 80 00 13 b 40003df4 40003dac: 83 38 e0 18 sra %g3, 0x18, %g1 40003db0: 87 2a 20 18 sll %o0, 0x18, %g3 fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); fmt++; 40003db4: 88 01 20 01 inc %g4 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40003db8: d0 09 00 00 ldub [ %g4 ], %o0 width *= 10; width += (*fmt - '0'); 40003dbc: 85 2c 20 03 sll %l0, 3, %g2 40003dc0: 83 2c 20 01 sll %l0, 1, %g1 40003dc4: 87 38 e0 18 sra %g3, 0x18, %g3 40003dc8: 82 00 40 02 add %g1, %g2, %g1 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40003dcc: 84 02 3f d0 add %o0, -48, %g2 width *= 10; width += (*fmt - '0'); 40003dd0: 82 00 40 03 add %g1, %g3, %g1 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40003dd4: 84 08 a0 ff and %g2, 0xff, %g2 40003dd8: 80 a0 a0 09 cmp %g2, 9 40003ddc: 08 bf ff f5 bleu 40003db0 40003de0: a0 00 7f d0 add %g1, -48, %l0 40003de4: b0 10 00 04 mov %g4, %i0 40003de8: aa 10 00 10 mov %l0, %l5 40003dec: 87 2a 20 18 sll %o0, 0x18, %g3 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 40003df0: 83 38 e0 18 sra %g3, 0x18, %g1 40003df4: 80 a0 60 6c cmp %g1, 0x6c 40003df8: 22 80 00 9b be,a 40004064 40003dfc: d0 09 20 01 ldub [ %g4 + 1 ], %o0 lflag = 1; c = *++fmt; } switch (c) { 40003e00: 82 02 3f bc add %o0, -68, %g1 40003e04: 82 08 60 ff and %g1, 0xff, %g1 40003e08: 80 a0 60 34 cmp %g1, 0x34 40003e0c: 08 80 00 12 bleu 40003e54 40003e10: 83 28 60 02 sll %g1, 2, %g1 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40003e14: c2 05 00 00 ld [ %l4 ], %g1 40003e18: 91 2a 20 18 sll %o0, 0x18, %o0 40003e1c: 9f c0 40 00 call %g1 40003e20: 91 3a 20 18 sra %o0, 0x18, %o0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40003e24: b0 06 20 01 inc %i0 40003e28: d0 0e 00 00 ldub [ %i0 ], %o0 40003e2c: 91 2a 20 18 sll %o0, 0x18, %o0 40003e30: 80 a2 20 00 cmp %o0, 0 40003e34: 12 bf ff c8 bne 40003d54 40003e38: 91 3a 20 18 sra %o0, 0x18, %o0 40003e3c: 81 c7 e0 08 ret 40003e40: 81 e8 00 00 restore if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 40003e44: 9f c0 40 00 call %g1 40003e48: b0 06 20 01 inc %i0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40003e4c: 10 bf ff f8 b 40003e2c 40003e50: d0 0e 00 00 ldub [ %i0 ], %o0 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40003e54: c4 06 80 01 ld [ %i2 + %g1 ], %g2 40003e58: 81 c0 80 00 jmp %g2 40003e5c: 01 00 00 00 nop break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40003e60: 82 10 20 00 clr %g1 ! 0 <== NOT EXECUTED 40003e64: a6 10 20 08 mov 8, %l3 <== NOT EXECUTED break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 40003e68: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40003e6c: 80 a4 60 00 cmp %l1, 0 40003e70: 06 80 00 3d bl 40003f64 40003e74: b2 06 60 04 add %i1, 4, %i1 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40003e78: 90 10 00 11 mov %l1, %o0 40003e7c: 92 10 00 13 mov %l3, %o1 40003e80: 40 00 46 83 call 4001588c <.udiv> 40003e84: a0 10 20 00 clr %l0 40003e88: 80 a2 20 00 cmp %o0, 0 40003e8c: 02 80 00 14 be 40003edc 40003e90: a4 10 20 01 mov 1, %l2 40003e94: a4 10 00 11 mov %l1, %l2 40003e98: a0 10 20 00 clr %l0 40003e9c: 10 80 00 03 b 40003ea8 40003ea0: a2 10 00 08 mov %o0, %l1 40003ea4: a2 10 00 08 mov %o0, %l1 toPrint[count++] = (num - (n*base)); 40003ea8: 92 10 00 13 mov %l3, %o1 40003eac: 40 00 46 3e call 400157a4 <.umul> 40003eb0: 90 10 00 11 mov %l1, %o0 40003eb4: 90 24 80 08 sub %l2, %o0, %o0 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40003eb8: 92 10 00 13 mov %l3, %o1 toPrint[count++] = (num - (n*base)); 40003ebc: d0 2d c0 10 stb %o0, [ %l7 + %l0 ] num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40003ec0: 90 10 00 11 mov %l1, %o0 40003ec4: 40 00 46 72 call 4001588c <.udiv> 40003ec8: a0 04 20 01 inc %l0 40003ecc: 80 a2 20 00 cmp %o0, 0 40003ed0: 12 bf ff f5 bne 40003ea4 40003ed4: a4 10 00 11 mov %l1, %l2 40003ed8: a4 04 20 01 add %l0, 1, %l2 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40003edc: 82 06 c0 10 add %i3, %l0, %g1 40003ee0: e2 28 7f e8 stb %l1, [ %g1 + -24 ] for (n=maxwidth ; n > count; n-- ) 40003ee4: 80 a4 80 15 cmp %l2, %l5 40003ee8: 1a 80 00 0a bcc 40003f10 40003eec: a0 10 00 15 mov %l5, %l0 40003ef0: a2 10 00 1d mov %i5, %l1 BSP_output_char(lead); 40003ef4: c2 05 00 00 ld [ %l4 ], %g1 40003ef8: 9f c0 40 00 call %g1 40003efc: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40003f00: a0 04 3f ff add %l0, -1, %l0 40003f04: 80 a4 80 10 cmp %l2, %l0 40003f08: 2a bf ff fc bcs,a 40003ef8 40003f0c: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(lead); for (n = 0; n < count; n++) { 40003f10: 80 a4 a0 00 cmp %l2, 0 40003f14: 02 bf ff c4 be 40003e24 40003f18: a2 06 c0 12 add %i3, %l2, %l1 40003f1c: a0 10 20 00 clr %l0 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40003f20: 82 24 40 10 sub %l1, %l0, %g1 40003f24: c4 48 7f e7 ldsb [ %g1 + -25 ], %g2 40003f28: c6 05 00 00 ld [ %l4 ], %g3 40003f2c: d0 4f 00 02 ldsb [ %i4 + %g2 ], %o0 40003f30: 9f c0 c0 00 call %g3 40003f34: a0 04 20 01 inc %l0 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { 40003f38: 80 a4 80 10 cmp %l2, %l0 40003f3c: 18 bf ff fa bgu 40003f24 40003f40: 82 24 40 10 sub %l1, %l0, %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40003f44: 10 bf ff b9 b 40003e28 40003f48: b0 06 20 01 inc %i0 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 40003f4c: e2 06 40 00 ld [ %i1 ], %l1 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40003f50: 82 10 20 01 mov 1, %g1 40003f54: a6 10 20 0a mov 0xa, %l3 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40003f58: 80 a4 60 00 cmp %l1, 0 40003f5c: 16 bf ff c7 bge 40003e78 40003f60: b2 06 60 04 add %i1, 4, %i1 40003f64: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 40003f68: 02 bf ff c5 be 40003e7c <== NOT EXECUTED 40003f6c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED BSP_output_char('-'); 40003f70: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 40003f74: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003f78: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 40003f7c: 80 a0 00 15 cmp %g0, %l5 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 40003f80: a2 20 00 11 neg %l1 <== NOT EXECUTED if (maxwidth) maxwidth--; 40003f84: 10 bf ff bd b 40003e78 <== NOT EXECUTED 40003f88: aa 65 60 00 subx %l5, 0, %l5 <== NOT EXECUTED case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 40003f8c: e6 06 40 00 ld [ %i1 ], %l3 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 40003f90: a4 10 20 00 clr %l2 40003f94: c2 4c c0 00 ldsb [ %l3 ], %g1 40003f98: 80 a0 60 00 cmp %g1, 0 40003f9c: 02 80 00 07 be 40003fb8 40003fa0: b2 06 60 04 add %i1, 4, %i1 40003fa4: a4 04 a0 01 inc %l2 40003fa8: c2 4c c0 12 ldsb [ %l3 + %l2 ], %g1 40003fac: 80 a0 60 00 cmp %g1, 0 40003fb0: 32 bf ff fe bne,a 40003fa8 40003fb4: a4 04 a0 01 inc %l2 ; /* leading spaces */ if ( !minus ) 40003fb8: 80 a5 a0 00 cmp %l6, 0 40003fbc: 02 80 00 36 be 40004094 40003fc0: 80 a4 00 12 cmp %l0, %l2 for ( i=len ; i 40003fcc: aa 10 00 12 mov %l2, %l5 width = len; } /* output the string */ for ( i=0 ; i 40003fd8: 80 a5 a0 00 cmp %l6, 0 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 40003fdc: 22 bf ff 93 be,a 40003e28 40003fe0: b0 06 20 01 inc %i0 for ( i=len ; i 40003fec: b0 06 20 01 inc %i0 <== NOT EXECUTED 40003ff0: a0 10 00 12 mov %l2, %l0 BSP_output_char(' '); 40003ff4: c2 05 00 00 ld [ %l4 ], %g1 40003ff8: 9f c0 40 00 call %g1 40003ffc: 90 10 20 20 mov 0x20, %o0 for ( i=0 ; i 4000400c: c2 05 00 00 ld [ %l4 ], %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40004010: 10 bf ff 86 b 40003e28 40004014: b0 06 20 01 inc %i0 for ( i=len ; i <== NOT EXECUTED 4000402c: b0 06 20 01 inc %i0 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40004030: 82 10 20 00 clr %g1 40004034: 10 bf ff 8d b 40003e68 40004038: a6 10 20 0a mov 0xa, %l3 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = 1; fmt++; 4000403c: 88 01 20 01 inc %g4 40004040: d0 09 00 00 ldub [ %g4 ], %o0 40004044: ac 10 20 01 mov 1, %l6 40004048: 10 bf ff 51 b 40003d8c 4000404c: 87 2a 20 18 sll %o0, 0x18, %g3 lead = ' '; if (*fmt == '%') { fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 40004050: d0 0e 20 02 ldub [ %i0 + 2 ], %o0 40004054: 88 06 20 02 add %i0, 2, %g4 40004058: ba 10 20 30 mov 0x30, %i5 4000405c: 10 bf ff 48 b 40003d7c 40004060: 87 2a 20 18 sll %o0, 0x18, %g3 fmt++; } if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; 40004064: 10 bf ff 67 b 40003e00 40004068: b0 01 20 01 add %g4, 1, %i0 width = len; } /* output the string */ for ( i=0 ; i 40004088: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 4000408c: 10 bf ff d4 b 40003fdc 40004090: 80 a5 a0 00 cmp %l6, 0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 40004098: a2 10 00 12 mov %l2, %l1 BSP_output_char(' '); 4000409c: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 400040a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400040a4: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i <== NOT EXECUTED 400040b4: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i <== NOT EXECUTED 400040bc: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 400040c0: 82 10 20 00 clr %g1 400040c4: 10 bf ff 69 b 40003e68 400040c8: a6 10 20 10 mov 0x10, %l3 400180f0 : ssize_t write( int fd, const void *buffer, size_t count ) { 400180f0: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400180f4: 03 10 00 66 sethi %hi(0x40019800), %g1 400180f8: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 40019af8 ssize_t write( int fd, const void *buffer, size_t count ) { 400180fc: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40018100: 80 a6 00 02 cmp %i0, %g2 40018104: 1a 80 00 24 bcc 40018194 40018108: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001810c: 03 10 00 6a sethi %hi(0x4001a800), %g1 40018110: c6 00 60 6c ld [ %g1 + 0x6c ], %g3 ! 4001a86c 40018114: 85 2e 20 02 sll %i0, 2, %g2 40018118: 83 2e 20 04 sll %i0, 4, %g1 4001811c: 82 20 40 02 sub %g1, %g2, %g1 40018120: 82 00 40 18 add %g1, %i0, %g1 40018124: 83 28 60 02 sll %g1, 2, %g1 40018128: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 4001812c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40018130: 80 88 61 00 btst 0x100, %g1 40018134: 02 80 00 18 be 40018194 40018138: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001813c: 02 80 00 1c be 400181ac 40018140: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40018144: 02 80 00 12 be 4001818c 40018148: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001814c: 80 88 60 04 btst 4, %g1 40018150: 02 80 00 17 be 400181ac 40018154: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 40018158: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4001815c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40018160: 80 a0 60 00 cmp %g1, 0 40018164: 02 80 00 18 be 400181c4 40018168: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 4001816c: 9f c0 40 00 call %g1 40018170: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 40018174: 80 a2 20 00 cmp %o0, 0 40018178: 04 80 00 05 ble 4001818c 4001817c: 01 00 00 00 nop iop->offset += rc; 40018180: c2 06 20 08 ld [ %i0 + 8 ], %g1 40018184: 82 00 40 08 add %g1, %o0, %g1 40018188: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 4001818c: 81 c7 e0 08 ret 40018190: 91 e8 00 08 restore %g0, %o0, %o0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); 40018194: 7f ff d9 ee call 4000e94c <__errno> <== NOT EXECUTED 40018198: 01 00 00 00 nop <== NOT EXECUTED 4001819c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 400181a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400181a4: 10 bf ff fa b 4001818c <== NOT EXECUTED 400181a8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400181ac: 7f ff d9 e8 call 4000e94c <__errno> <== NOT EXECUTED 400181b0: 01 00 00 00 nop <== NOT EXECUTED 400181b4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400181b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400181bc: 10 bf ff f4 b 4001818c <== NOT EXECUTED 400181c0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400181c4: 7f ff d9 e2 call 4000e94c <__errno> <== NOT EXECUTED 400181c8: 01 00 00 00 nop <== NOT EXECUTED 400181cc: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400181d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400181d4: 10 bf ff ee b 4001818c <== NOT EXECUTED 400181d8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED