0201f0c0 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 201f0c0: 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(); 201f0c4: 40 00 07 75 call 2020e98 201f0c8: f0 06 00 00 ld [ %i0 ], %i0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 201f0cc: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 201f0d0: 91 2a 20 10 sll %o0, 0x10, %o0 201f0d4: 91 32 20 10 srl %o0, 0x10, %o0 201f0d8: 80 a2 00 01 cmp %o0, %g1 201f0dc: 02 80 00 04 be 201f0ec 201f0e0: 80 a2 20 00 cmp %o0, 0 201f0e4: 12 80 00 0c bne 201f114 <== NOT EXECUTED 201f0e8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 201f0ec: f2 36 20 38 sth %i1, [ %i0 + 0x38 ] jnode->st_gid = group; 201f0f0: f4 36 20 3a sth %i2, [ %i0 + 0x3a ] IMFS_update_ctime( jnode ); 201f0f4: 90 07 bf f0 add %fp, -16, %o0 201f0f8: 7f ff 95 ca call 2004820 201f0fc: 92 10 20 00 clr %o1 201f100: c2 07 bf f0 ld [ %fp + -16 ], %g1 201f104: 84 10 20 00 clr %g2 201f108: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 201f10c: 81 c7 e0 08 ret 201f110: 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 ); 201f114: 40 00 49 d1 call 2031858 <__errno> <== NOT EXECUTED 201f118: 01 00 00 00 nop <== NOT EXECUTED 201f11c: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 201f120: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 201f124: 10 bf ff fa b 201f10c <== NOT EXECUTED 201f128: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 0200cce0 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 200cce0: 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 ) 200cce4: a2 96 20 00 orcc %i0, 0, %l1 200cce8: 02 80 00 03 be 200ccf4 200ccec: a0 10 20 00 clr %l0 parent = parent_loc->node_access; 200ccf0: e0 04 40 00 ld [ %l1 ], %l0 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 200ccf4: 90 10 20 01 mov 1, %o0 200ccf8: 7f ff f6 b7 call 200a7d4 200ccfc: 92 10 20 5c mov 0x5c, %o1 if ( !node ) 200cd00: b0 92 20 00 orcc %o0, 0, %i0 200cd04: 02 80 00 30 be 200cdc4 200cd08: 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 ); 200cd0c: 92 10 00 1a mov %i2, %o1 200cd10: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; 200cd14: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] node->type = type; 200cd18: f2 26 20 48 st %i1, [ %i0 + 0x48 ] strncpy( node->name, name, IMFS_NAME_MAX ); 200cd1c: 40 00 08 88 call 200ef3c 200cd20: 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; 200cd24: 05 00 80 5e sethi %hi(0x2017800), %g2 200cd28: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 ! 2017814 200cd2c: c2 10 e0 24 lduh [ %g3 + 0x24 ], %g1 200cd30: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 200cd34: 7f ff f7 64 call 200aac4 200cd38: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] node->st_gid = getegid(); 200cd3c: 7f ff f7 5e call 200aab4 200cd40: d0 36 20 38 sth %o0, [ %i0 + 0x38 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200cd44: 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(); 200cd48: d0 36 20 3a sth %o0, [ %i0 + 0x3a ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 200cd4c: 7f ff f7 62 call 200aad4 200cd50: 90 07 bf f0 add %fp, -16, %o0 node->stat_atime = (time_t) tv.tv_sec; 200cd54: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 200cd58: 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; 200cd5c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 200cd60: c2 26 20 3c st %g1, [ %i0 + 0x3c ] /* * Set the type specific information */ switch (type) { 200cd64: 08 80 00 1a bleu 200cdcc 200cd68: c2 26 20 40 st %g1, [ %i0 + 0x40 ] node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; default: assert(0); 200cd6c: 11 00 80 5a sethi %hi(0x2016800), %o0 <== NOT EXECUTED 200cd70: 15 00 80 5a sethi %hi(0x2016800), %o2 <== NOT EXECUTED 200cd74: 17 00 80 5a sethi %hi(0x2016800), %o3 <== NOT EXECUTED 200cd78: 90 12 23 a0 or %o0, 0x3a0, %o0 <== NOT EXECUTED 200cd7c: 94 12 a3 f8 or %o2, 0x3f8, %o2 <== NOT EXECUTED 200cd80: 96 12 e3 f0 or %o3, 0x3f0, %o3 <== NOT EXECUTED 200cd84: 7f ff d4 5f call 2001f00 <__assert_func> <== NOT EXECUTED 200cd88: 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; 200cd8c: c2 07 00 00 ld [ %i4 ], %g1 200cd90: c2 26 20 4c st %g1, [ %i0 + 0x4c ] /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 200cd94: 80 a4 20 00 cmp %l0, 0 200cd98: 02 80 00 0b be 200cdc4 200cd9c: 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 ); 200cda0: 7f ff e5 66 call 2006338 <_Chain_Append> 200cda4: 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; 200cda8: 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; 200cdac: e0 26 20 08 st %l0, [ %i0 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 200cdb0: c6 00 60 2c ld [ %g1 + 0x2c ], %g3 node->st_ino = ++fs_info->ino_count; 200cdb4: c4 00 c0 00 ld [ %g3 ], %g2 200cdb8: 84 00 a0 01 inc %g2 200cdbc: c4 20 c0 00 st %g2, [ %g3 ] 200cdc0: c4 26 20 34 st %g2, [ %i0 + 0x34 ] } return node; } 200cdc4: 81 c7 e0 08 ret 200cdc8: 81 e8 00 00 restore /* * Set the type specific information */ switch (type) { 200cdcc: 83 2e 60 02 sll %i1, 2, %g1 200cdd0: 05 00 80 33 sethi %hi(0x200cc00), %g2 200cdd4: 84 10 a0 c4 or %g2, 0xc4, %g2 ! 200ccc4 200cdd8: c6 00 80 01 ld [ %g2 + %g1 ], %g3 200cddc: 81 c0 c0 00 jmp %g3 200cde0: 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; 200cde4: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 200cde8: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 200cdec: c0 26 20 4c clr [ %i0 + 0x4c ] node->info.file.indirect = 0; 200cdf0: c0 26 20 50 clr [ %i0 + 0x50 ] node->info.file.doubly_indirect = 0; 200cdf4: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.triply_indirect = 0; 200cdf8: 10 bf ff e7 b 200cd94 200cdfc: 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; 200ce00: 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; 200ce04: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 200ce08: 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; 200ce0c: 10 bf ff e2 b 200cd94 200ce10: 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); 200ce14: 82 06 20 50 add %i0, 0x50, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200ce18: 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; 200ce1c: 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); 200ce20: c2 26 20 4c st %g1, [ %i0 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 200ce24: 10 bf ff dc b 200cd94 200ce28: c4 26 20 54 st %g2, [ %i0 + 0x54 ] 02003b08 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2003b08: 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 ); 2003b0c: 80 a6 20 00 cmp %i0, 0 2003b10: 02 80 00 2c be 2003bc0 2003b14: 80 a6 60 00 cmp %i1, 0 assert( level >= 0 ); 2003b18: 06 80 00 38 bl 2003bf8 2003b1c: 11 00 80 75 sethi %hi(0x201d400), %o0 assert( the_directory->type == IMFS_DIRECTORY ); 2003b20: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2003b24: 80 a0 60 01 cmp %g1, 1 2003b28: 12 80 00 2e bne 2003be0 2003b2c: 15 00 80 76 sethi %hi(0x201d800), %o2 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2003b30: 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; 2003b34: b0 06 20 50 add %i0, 0x50, %i0 !rtems_chain_is_tail( the_chain, the_node ); 2003b38: 80 a4 40 18 cmp %l1, %i0 2003b3c: 02 80 00 1b be 2003ba8 2003b40: 03 00 80 7e sethi %hi(0x201f800), %g1 2003b44: 05 00 80 76 sethi %hi(0x201d800), %g2 2003b48: a6 10 61 48 or %g1, 0x148, %l3 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2003b4c: a4 10 a0 48 or %g2, 0x48, %l2 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2003b50: 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; 2003b54: a0 10 20 00 clr %l0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2003b58: c2 04 c0 00 ld [ %l3 ], %g1 2003b5c: 90 10 00 12 mov %l2, %o0 2003b60: d6 00 60 08 ld [ %g1 + 8 ], %o3 2003b64: 92 10 20 01 mov 1, %o1 2003b68: 40 00 3d b4 call 2013238 2003b6c: 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++ ) 2003b70: a0 04 20 01 inc %l0 2003b74: 80 a6 40 10 cmp %i1, %l0 2003b78: 36 bf ff f9 bge,a 2003b5c 2003b7c: c2 04 c0 00 ld [ %l3 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2003b80: 7f ff ff 85 call 2003994 2003b84: 90 10 00 11 mov %l1, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 2003b88: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 2003b8c: 80 a0 60 01 cmp %g1, 1 2003b90: 22 80 00 08 be,a 2003bb0 2003b94: 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 ) { 2003b98: 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 ); 2003b9c: 80 a4 40 18 cmp %l1, %i0 2003ba0: 12 bf ff ee bne 2003b58 2003ba4: a0 10 20 00 clr %l0 2003ba8: 81 c7 e0 08 ret 2003bac: 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 ); 2003bb0: 7f ff ff d6 call 2003b08 2003bb4: 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 ) { 2003bb8: 10 bf ff f9 b 2003b9c 2003bbc: 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 ); 2003bc0: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 2003bc4: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED 2003bc8: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED 2003bcc: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED 2003bd0: 94 12 a0 f8 or %o2, 0xf8, %o2 <== NOT EXECUTED 2003bd4: 96 12 e0 00 mov %o3, %o3 <== NOT EXECUTED 2003bd8: 40 00 01 c5 call 20042ec <__assert_func> <== NOT EXECUTED 2003bdc: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED assert( level >= 0 ); assert( the_directory->type == IMFS_DIRECTORY ); 2003be0: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED 2003be4: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED 2003be8: 94 12 a0 f8 or %o2, 0xf8, %o2 <== NOT EXECUTED 2003bec: 96 12 e0 20 or %o3, 0x20, %o3 <== NOT EXECUTED 2003bf0: 40 00 01 bf call 20042ec <__assert_func> <== NOT EXECUTED 2003bf4: 92 10 20 83 mov 0x83, %o1 <== NOT EXECUTED IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 2003bf8: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED 2003bfc: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED 2003c00: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED 2003c04: 94 12 a0 f8 or %o2, 0xf8, %o2 <== NOT EXECUTED 2003c08: 96 12 e0 10 or %o3, 0x10, %o3 <== NOT EXECUTED 2003c0c: 40 00 01 b8 call 20042ec <__assert_func> <== NOT EXECUTED 2003c10: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED 2003c14: 01 00 00 00 nop 02009b88 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 2009b88: 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; 2009b8c: 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 ) 2009b90: 03 00 80 5e sethi %hi(0x2017800), %g1 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 2009b94: 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 ) 2009b98: ac 10 60 14 or %g1, 0x14, %l6 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 2009b9c: a4 10 20 00 clr %l2 2009ba0: a8 07 bf d0 add %fp, -48, %l4 2009ba4: 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 ); 2009ba8: 90 04 c0 12 add %l3, %l2, %o0 2009bac: 92 10 00 14 mov %l4, %o1 2009bb0: 40 00 01 b2 call 200a278 2009bb4: 94 10 00 15 mov %l5, %o2 i += len; if ( !pathloc->node_access ) 2009bb8: 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 ); 2009bbc: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 2009bc0: 80 a0 e0 00 cmp %g3, 0 2009bc4: 02 80 00 57 be 2009d20 2009bc8: 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 ) 2009bcc: 80 a2 20 00 cmp %o0, 0 2009bd0: 12 80 00 10 bne 2009c10 2009bd4: 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 ) { 2009bd8: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 2009bdc: 80 a0 60 01 cmp %g1, 1 2009be0: 12 80 00 6f bne 2009d9c 2009be4: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 2009be8: c6 00 e0 58 ld [ %g3 + 0x58 ], %g3 2009bec: 80 a0 e0 00 cmp %g3, 0 2009bf0: 02 80 00 6b be 2009d9c 2009bf4: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 2009bf8: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 *pathloc = newloc; 2009bfc: 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; 2009c00: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 2009c04: 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; 2009c08: 10 80 00 59 b 2009d6c 2009c0c: 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 ) 2009c10: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2009c14: 80 a0 60 01 cmp %g1, 1 2009c18: 02 80 00 3b be 2009d04 2009c1c: 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 ) { 2009c20: 80 a4 60 03 cmp %l1, 3 2009c24: 02 80 00 0b be 2009c50 2009c28: a0 10 00 03 mov %g3, %l0 2009c2c: 80 a4 60 04 cmp %l1, 4 2009c30: 02 80 00 2f be 2009cec 2009c34: 80 a4 60 02 cmp %l1, 2 2009c38: 02 80 00 1a be 2009ca0 2009c3c: 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) ) { 2009c40: 12 bf ff db bne 2009bac 2009c44: 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 ) { 2009c48: 10 bf ff e5 b 2009bdc <== NOT EXECUTED 2009c4c: 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 ) { 2009c50: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 2009c54: 80 a0 60 03 cmp %g1, 3 2009c58: 02 80 00 38 be 2009d38 2009c5c: 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 ) { 2009c60: 02 80 00 66 be 2009df8 2009c64: 90 10 00 1a mov %i2, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 2009c68: 80 a0 60 01 cmp %g1, 1 2009c6c: 12 80 00 57 bne 2009dc8 2009c70: 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 ) { 2009c74: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 2009c78: 80 a0 e0 00 cmp %g3, 0 2009c7c: 12 bf ff df bne 2009bf8 2009c80: 90 10 00 10 mov %l0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 2009c84: 40 00 01 4f call 200a1c0 2009c88: 92 10 00 14 mov %l4, %o1 if ( !node ) 2009c8c: a0 92 20 00 orcc %o0, 0, %l0 2009c90: 02 80 00 24 be 2009d20 2009c94: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; 2009c98: 10 bf ff c4 b 2009ba8 2009c9c: 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 ) 2009ca0: c2 05 80 00 ld [ %l6 ], %g1 2009ca4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 2009ca8: 80 a0 80 03 cmp %g2, %g3 2009cac: 02 bf ff c0 be 2009bac 2009cb0: 90 04 c0 12 add %l3, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 2009cb4: d8 06 a0 0c ld [ %i2 + 0xc ], %o4 2009cb8: c2 03 20 18 ld [ %o4 + 0x18 ], %g1 2009cbc: 80 a0 40 03 cmp %g1, %g3 2009cc0: 22 80 00 27 be,a 2009d5c 2009cc4: c8 03 20 10 ld [ %o4 + 0x10 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 2009cc8: e0 00 e0 08 ld [ %g3 + 8 ], %l0 2009ccc: 80 a4 20 00 cmp %l0, 0 2009cd0: 32 bf ff b7 bne,a 2009bac 2009cd4: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 2009cd8: 40 00 0f 57 call 200da34 <__errno> 2009cdc: b0 10 3f ff mov -1, %i0 2009ce0: e2 22 00 00 st %l1, [ %o0 ] 2009ce4: 81 c7 e0 08 ret 2009ce8: 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 ); 2009cec: 40 00 0f 52 call 200da34 <__errno> 2009cf0: b0 10 3f ff mov -1, %i0 2009cf4: 82 10 20 5b mov 0x5b, %g1 2009cf8: c2 22 00 00 st %g1, [ %o0 ] 2009cfc: 81 c7 e0 08 ret 2009d00: 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 ) ) 2009d04: 7f ff ff 36 call 20099dc 2009d08: 92 10 20 01 mov 1, %o1 2009d0c: 80 a2 20 00 cmp %o0, 0 2009d10: 02 80 00 43 be 2009e1c 2009d14: 01 00 00 00 nop 2009d18: 10 bf ff c2 b 2009c20 2009d1c: 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 ); 2009d20: 40 00 0f 45 call 200da34 <__errno> 2009d24: b0 10 3f ff mov -1, %i0 2009d28: 82 10 20 02 mov 2, %g1 2009d2c: c2 22 00 00 st %g1, [ %o0 ] 2009d30: 81 c7 e0 08 ret 2009d34: 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 ); 2009d38: 90 10 00 1a mov %i2, %o0 2009d3c: 7f ff ff 40 call 2009a3c 2009d40: 92 10 20 00 clr %o1 node = pathloc->node_access; 2009d44: e0 06 80 00 ld [ %i2 ], %l0 if ( !node ) 2009d48: 80 a4 20 00 cmp %l0, 0 2009d4c: 02 80 00 1f be 2009dc8 2009d50: 01 00 00 00 nop } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 2009d54: 10 bf ff c5 b 2009c68 2009d58: 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; 2009d5c: c2 03 20 14 ld [ %o4 + 0x14 ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); 2009d60: 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; 2009d64: c4 03 20 0c ld [ %o4 + 0xc ], %g2 2009d68: 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 ); 2009d6c: 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; 2009d70: c2 26 a0 0c st %g1, [ %i2 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 2009d74: 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; 2009d78: c4 26 a0 04 st %g2, [ %i2 + 4 ] 2009d7c: c6 26 80 00 st %g3, [ %i2 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 2009d80: 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; 2009d84: c8 26 a0 08 st %g4, [ %i2 + 8 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 2009d88: 92 10 00 19 mov %i1, %o1 2009d8c: 9f c3 40 00 call %o5 2009d90: 94 10 00 1a mov %i2, %o2 2009d94: 81 c7 e0 08 ret 2009d98: 91 e8 00 08 restore %g0, %o0, %o0 } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 2009d9c: 7f ff fe f2 call 2009964 2009da0: 90 10 00 1a mov %i2, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 2009da4: 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 ); 2009da8: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 2009dac: 7f ff ff 0c call 20099dc 2009db0: 90 10 00 1a mov %i2, %o0 2009db4: 80 a2 20 00 cmp %o0, 0 2009db8: 02 80 00 0a be 2009de0 2009dbc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 2009dc0: 81 c7 e0 08 ret 2009dc4: 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 ); 2009dc8: 40 00 0f 1b call 200da34 <__errno> 2009dcc: b0 10 3f ff mov -1, %i0 2009dd0: 82 10 20 14 mov 0x14, %g1 2009dd4: c2 22 00 00 st %g1, [ %o0 ] 2009dd8: 81 c7 e0 08 ret 2009ddc: 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 ); 2009de0: 40 00 0f 15 call 200da34 <__errno> 2009de4: b0 10 3f ff mov -1, %i0 2009de8: 82 10 20 0d mov 0xd, %g1 2009dec: c2 22 00 00 st %g1, [ %o0 ] return result; } 2009df0: 81 c7 e0 08 ret 2009df4: 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 ); 2009df8: 7f ff ff 2c call 2009aa8 2009dfc: 92 10 20 00 clr %o1 2009e00: b0 10 00 08 mov %o0, %i0 node = pathloc->node_access; if ( result == -1 ) 2009e04: 80 a2 3f ff cmp %o0, -1 2009e08: 02 bf ff b7 be 2009ce4 2009e0c: 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; 2009e10: a0 10 00 08 mov %o0, %l0 2009e14: 10 bf ff 95 b 2009c68 2009e18: 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 ); 2009e1c: 40 00 0f 06 call 200da34 <__errno> 2009e20: b0 10 3f ff mov -1, %i0 2009e24: 82 10 20 0d mov 0xd, %g1 2009e28: c2 22 00 00 st %g1, [ %o0 ] 2009e2c: 81 c7 e0 08 ret 2009e30: 81 e8 00 00 restore 02009a3c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 2009a3c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 2009a40: c4 06 00 00 ld [ %i0 ], %g2 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 2009a44: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 2009a48: 80 a0 60 03 cmp %g1, 3 2009a4c: 12 80 00 14 bne 2009a9c 2009a50: 90 10 00 18 mov %i0, %o0 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 2009a54: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 IMFS_Set_handlers( node ); 2009a58: 7f ff ff c3 call 2009964 2009a5c: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 2009a60: 90 10 00 18 mov %i0, %o0 2009a64: 92 10 00 19 mov %i1, %o1 2009a68: 7f ff ff dd call 20099dc 2009a6c: b0 10 20 00 clr %i0 2009a70: 80 a2 20 00 cmp %o0, 0 2009a74: 02 80 00 04 be 2009a84 2009a78: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 2009a7c: 81 c7 e0 08 ret 2009a80: 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 ); 2009a84: 40 00 0f ec call 200da34 <__errno> <== NOT EXECUTED 2009a88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2009a8c: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 2009a90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 2009a94: 81 c7 e0 08 ret <== NOT EXECUTED 2009a98: 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); 2009a9c: 7f ff f1 13 call 2005ee8 <== NOT EXECUTED 2009aa0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 2009aa4: 01 00 00 00 nop 02009e34 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 2009e34: 9d e3 bf 98 save %sp, -104, %sp 2009e38: 25 00 80 5e sethi %hi(0x2017800), %l2 2009e3c: 10 80 00 07 b 2009e58 2009e40: a2 14 a0 14 or %l2, 0x14, %l1 ! 2017814 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 2009e44: 02 80 00 23 be 2009ed0 2009e48: 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 ) ) ); 2009e4c: 80 a0 60 01 cmp %g1, 1 2009e50: 18 80 00 1c bgu 2009ec0 2009e54: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 2009e58: c4 04 40 00 ld [ %l1 ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 2009e5c: e0 06 00 00 ld [ %i0 ], %l0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 2009e60: c2 10 a0 26 lduh [ %g2 + 0x26 ], %g1 2009e64: 82 00 60 01 inc %g1 2009e68: c2 30 a0 26 sth %g1, [ %g2 + 0x26 ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 2009e6c: 83 28 60 10 sll %g1, 0x10, %g1 2009e70: 83 30 60 10 srl %g1, 0x10, %g1 2009e74: 80 a0 60 05 cmp %g1, 5 2009e78: 18 80 00 1b bgu 2009ee4 2009e7c: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 2009e80: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2009e84: 80 a0 60 03 cmp %g1, 3 2009e88: 12 bf ff ef bne 2009e44 2009e8c: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_hard_link( node, flags ); 2009e90: 90 10 00 18 mov %i0, %o0 2009e94: 7f ff fe ea call 2009a3c 2009e98: 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 ) ) ); 2009e9c: 80 a2 20 00 cmp %o0, 0 2009ea0: 12 80 00 09 bne 2009ec4 2009ea4: c2 04 a0 14 ld [ %l2 + 0x14 ], %g1 2009ea8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2009eac: 82 00 7f fd add %g1, -3, %g1 2009eb0: 80 a0 60 01 cmp %g1, 1 2009eb4: 28 bf ff ea bleu,a 2009e5c 2009eb8: c4 04 40 00 ld [ %l1 ], %g2 2009ebc: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 2009ec0: c2 04 a0 14 ld [ %l2 + 0x14 ], %g1 2009ec4: c0 30 60 26 clrh [ %g1 + 0x26 ] return result; } 2009ec8: 81 c7 e0 08 ret 2009ecc: 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 ); 2009ed0: 90 10 00 18 mov %i0, %o0 2009ed4: 7f ff fe f5 call 2009aa8 2009ed8: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 2009edc: 10 bf ff f1 b 2009ea0 2009ee0: 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 ); 2009ee4: 40 00 0e d4 call 200da34 <__errno> 2009ee8: c0 30 a0 26 clrh [ %g2 + 0x26 ] 2009eec: 82 10 20 5c mov 0x5c, %g1 2009ef0: c2 22 00 00 st %g1, [ %o0 ] 2009ef4: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 2009ef8: 81 c7 e0 08 ret 2009efc: 91 e8 00 08 restore %g0, %o0, %o0 020099dc : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 20099dc: 9d e3 bf 98 save %sp, -104, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 20099e0: 40 00 04 39 call 200aac4 20099e4: e2 06 00 00 ld [ %i0 ], %l1 st_gid = getegid(); 20099e8: 40 00 04 33 call 200aab4 20099ec: 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 ) 20099f0: c2 14 60 38 lduh [ %l1 + 0x38 ], %g1 20099f4: a1 2c 20 10 sll %l0, 0x10, %l0 20099f8: a1 34 20 10 srl %l0, 0x10, %l0 20099fc: 80 a4 00 01 cmp %l0, %g1 2009a00: 02 80 00 09 be 2009a24 2009a04: b1 2e 60 06 sll %i1, 6, %i0 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 2009a08: c4 14 60 3a lduh [ %l1 + 0x3a ], %g2 2009a0c: 83 2a 20 10 sll %o0, 0x10, %g1 2009a10: 83 30 60 10 srl %g1, 0x10, %g1 2009a14: 80 a0 40 02 cmp %g1, %g2 2009a18: 02 80 00 03 be 2009a24 2009a1c: b1 2e 60 03 sll %i1, 3, %i0 2009a20: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED flags_to_test <<= 3; 2009a24: c2 14 60 2e lduh [ %l1 + 0x2e ], %g1 2009a28: 82 2e 00 01 andn %i0, %g1, %g1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 2009a2c: 80 a0 00 01 cmp %g0, %g1 2009a30: b0 60 3f ff subx %g0, -1, %i0 2009a34: 81 c7 e0 08 ret 2009a38: 81 e8 00 00 restore 02009aa8 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 2009aa8: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 2009aac: d0 06 00 00 ld [ %i0 ], %o0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 2009ab0: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 2009ab4: 80 a0 60 04 cmp %g1, 4 2009ab8: 12 80 00 2f bne 2009b74 2009abc: 01 00 00 00 nop rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 2009ac0: c2 02 20 08 ld [ %o0 + 8 ], %g1 2009ac4: 80 a0 60 00 cmp %g1, 0 2009ac8: 02 80 00 2d be 2009b7c 2009acc: 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; 2009ad0: c2 26 00 00 st %g1, [ %i0 ] rtems_filesystem_get_sym_start_loc( 2009ad4: d0 02 20 4c ld [ %o0 + 0x4c ], %o0 2009ad8: c2 4a 00 00 ldsb [ %o0 ], %g1 2009adc: 80 a0 60 2f cmp %g1, 0x2f 2009ae0: 02 80 00 06 be 2009af8 2009ae4: 80 a0 60 5c cmp %g1, 0x5c 2009ae8: 02 80 00 04 be 2009af8 2009aec: 80 a0 60 00 cmp %g1, 0 2009af0: 12 80 00 0d bne 2009b24 2009af4: 88 10 20 00 clr %g4 2009af8: 03 00 80 5e sethi %hi(0x2017800), %g1 2009afc: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 ! 2017814 2009b00: 88 10 20 01 mov 1, %g4 2009b04: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 2009b08: c2 26 00 00 st %g1, [ %i0 ] 2009b0c: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 2009b10: c4 26 20 04 st %g2, [ %i0 + 4 ] 2009b14: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 2009b18: c2 26 20 08 st %g1, [ %i0 + 8 ] 2009b1c: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 2009b20: c4 26 20 0c st %g2, [ %i0 + 0xc ] /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 2009b24: 90 02 00 04 add %o0, %g4, %o0 2009b28: 94 10 00 18 mov %i0, %o2 2009b2c: 40 00 00 17 call 2009b88 2009b30: 92 10 00 19 mov %i1, %o1 2009b34: a0 10 00 08 mov %o0, %l0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 2009b38: 7f ff ff 8b call 2009964 2009b3c: 90 10 00 18 mov %i0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 2009b40: 90 10 00 18 mov %i0, %o0 2009b44: 7f ff ff a6 call 20099dc 2009b48: 92 10 00 19 mov %i1, %o1 2009b4c: 80 a2 20 00 cmp %o0, 0 2009b50: 02 80 00 04 be 2009b60 2009b54: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 2009b58: 81 c7 e0 08 ret 2009b5c: 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 ); 2009b60: 40 00 0f b5 call 200da34 <__errno> <== NOT EXECUTED 2009b64: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED 2009b68: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 2009b6c: 10 bf ff fb b 2009b58 <== NOT EXECUTED 2009b70: 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); 2009b74: 7f ff f0 dd call 2005ee8 <== NOT EXECUTED 2009b78: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 2009b7c: 7f ff f0 db call 2005ee8 <== NOT EXECUTED 2009b80: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 2009b84: 01 00 00 00 nop 0200ce2c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 200ce2c: 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(); 200ce30: 7f ff f7 25 call 200aac4 200ce34: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 200ce38: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 200ce3c: 91 2a 20 10 sll %o0, 0x10, %o0 200ce40: 91 32 20 10 srl %o0, 0x10, %o0 200ce44: 80 a2 00 01 cmp %o0, %g1 200ce48: 02 80 00 04 be 200ce58 200ce4c: 80 a2 20 00 cmp %o0, 0 200ce50: 12 80 00 12 bne 200ce98 <== NOT EXECUTED 200ce54: 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 ) ) ) 200ce58: 83 2e 60 10 sll %i1, 0x10, %g1 200ce5c: 83 30 60 10 srl %g1, 0x10, %g1 200ce60: 82 08 7e 00 and %g1, -512, %g1 200ce64: 80 a0 60 00 cmp %g1, 0 200ce68: 12 80 00 0c bne 200ce98 200ce6c: 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; 200ce70: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 200ce74: 82 08 7e 00 and %g1, -512, %g1 200ce78: 82 16 40 01 or %i1, %g1, %g1 IMFS_update_ctime( jnode ); 200ce7c: 92 10 20 00 clr %o1 200ce80: 7f ff f7 15 call 200aad4 200ce84: c2 34 20 2e sth %g1, [ %l0 + 0x2e ] 200ce88: c2 07 bf f0 ld [ %fp + -16 ], %g1 200ce8c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 200ce90: 81 c7 e0 08 ret 200ce94: 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 ); 200ce98: 40 00 02 e7 call 200da34 <__errno> 200ce9c: b0 10 3f ff mov -1, %i0 200cea0: 82 10 20 01 mov 1, %g1 200cea4: c2 22 00 00 st %g1, [ %o0 ] 200cea8: 81 c7 e0 08 ret 200ceac: 81 e8 00 00 restore 0200a1c0 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 200a1c0: 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 ); 200a1c4: 80 a6 20 00 cmp %i0, 0 200a1c8: 02 80 00 15 be 200a21c 200a1cc: 80 a6 60 00 cmp %i1, 0 if ( !name ) 200a1d0: 02 80 00 11 be 200a214 200a1d4: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 200a1d8: 13 00 80 59 sethi %hi(0x2016400), %o1 200a1dc: 40 00 12 e6 call 200ed74 200a1e0: 92 12 63 20 or %o1, 0x320, %o1 ! 2016720 200a1e4: 80 a2 20 00 cmp %o0, 0 200a1e8: 02 80 00 09 be 200a20c 200a1ec: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 200a1f0: 13 00 80 59 sethi %hi(0x2016400), %o1 200a1f4: 40 00 12 e0 call 200ed74 200a1f8: 92 12 63 28 or %o1, 0x328, %o1 ! 2016728 200a1fc: 80 a2 20 00 cmp %o0, 0 200a200: 32 80 00 0f bne,a 200a23c 200a204: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 return directory->Parent; 200a208: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 200a20c: 81 c7 e0 08 ret <== NOT EXECUTED 200a210: 81 e8 00 00 restore <== NOT EXECUTED if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 200a214: 81 c7 e0 08 ret 200a218: 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 ); 200a21c: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED 200a220: 15 00 80 59 sethi %hi(0x2016400), %o2 <== NOT EXECUTED 200a224: 17 00 80 59 sethi %hi(0x2016400), %o3 <== NOT EXECUTED 200a228: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED 200a22c: 94 12 a3 30 or %o2, 0x330, %o2 <== NOT EXECUTED 200a230: 96 12 e3 10 or %o3, 0x310, %o3 <== NOT EXECUTED 200a234: 7f ff df 33 call 2001f00 <__assert_func> <== NOT EXECUTED 200a238: 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; 200a23c: 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 ); 200a240: 80 a4 00 18 cmp %l0, %i0 200a244: 12 80 00 06 bne 200a25c 200a248: 90 10 00 19 mov %i1, %o0 200a24c: 30 bf ff f2 b,a 200a214 200a250: 80 a4 00 18 cmp %l0, %i0 200a254: 02 bf ff f0 be 200a214 200a258: 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 ) ) 200a25c: 40 00 12 c6 call 200ed74 200a260: 92 04 20 0c add %l0, 0xc, %o1 200a264: 80 a2 20 00 cmp %o0, 0 200a268: 32 bf ff fa bne,a 200a250 200a26c: e0 04 00 00 ld [ %l0 ], %l0 200a270: 81 c7 e0 08 ret 200a274: 91 e8 00 10 restore %g0, %l0, %o0 0201fb14 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 201fb14: 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; 201fb18: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 201fb1c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 201fb20: 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; 201fb24: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 loc = temp_mt_entry->mt_fs_root; 201fb28: c2 27 bf ec st %g1, [ %fp + -20 ] 201fb2c: 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; 201fb30: c0 26 20 18 clr [ %i0 + 0x18 ] 201fb34: a2 07 bf e8 add %fp, -24, %l1 do { next = jnode->Parent; loc.node_access = (void *)jnode; 201fb38: e0 27 bf e8 st %l0, [ %fp + -24 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 201fb3c: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 201fb40: 7f ff fd dc call 201f2b0 201fb44: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 201fb48: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 201fb4c: 80 a0 60 01 cmp %g1, 1 201fb50: 12 80 00 17 bne 201fbac 201fb54: 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 ) ) { 201fb58: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 201fb5c: 80 a0 40 02 cmp %g1, %g2 201fb60: 02 80 00 13 be 201fbac 201fb64: 01 00 00 00 nop result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 201fb68: 80 a4 20 00 cmp %l0, 0 201fb6c: 02 80 00 0e be 201fba4 201fb70: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 201fb74: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 201fb78: 80 a0 60 01 cmp %g1, 1 201fb7c: 32 bf ff f0 bne,a 201fb3c 201fb80: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 201fb84: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 201fb88: 82 04 20 50 add %l0, 0x50, %g1 201fb8c: 80 a0 80 01 cmp %g2, %g1 201fb90: 22 bf ff eb be,a 201fb3c 201fb94: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 201fb98: a0 90 a0 00 orcc %g2, 0, %l0 201fb9c: 32 bf ff e8 bne,a 201fb3c 201fba0: e0 27 bf e8 st %l0, [ %fp + -24 ] return 0; } 201fba4: 81 c7 e0 08 ret 201fba8: 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 ); 201fbac: 7f ff 91 27 call 2004048 201fbb0: 90 10 00 11 mov %l1, %o0 if (result != 0) 201fbb4: 80 a2 20 00 cmp %o0, 0 201fbb8: 02 bf ff ec be 201fb68 201fbbc: 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); 201fbc0: 81 c7 e0 08 ret <== NOT EXECUTED 201fbc4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 0200a380 : 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 ) { 200a380: 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, 200a384: 03 00 80 5c sethi %hi(0x2017000), %g1 200a388: c6 00 62 fc ld [ %g1 + 0x2fc ], %g3 ! 20172fc * 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) { 200a38c: 84 10 20 20 mov 0x20, %g2 200a390: 80 a0 e0 10 cmp %g3, 0x10 200a394: 02 80 00 09 be 200a3b8 200a398: 82 10 20 00 clr %g1 200a39c: 80 a0 c0 02 cmp %g3, %g2 200a3a0: 02 80 00 06 be 200a3b8 200a3a4: 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); 200a3a8: 80 a0 60 05 cmp %g1, 5 200a3ac: 12 bf ff fc bne 200a39c 200a3b0: 85 28 a0 01 sll %g2, 1, %g2 200a3b4: 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) 200a3b8: 03 00 80 5f sethi %hi(0x2017c00), %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( 200a3bc: 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) 200a3c0: c6 20 62 a4 st %g3, [ %g1 + 0x2a4 ] * 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( 200a3c4: 92 10 20 01 mov 1, %o1 200a3c8: 90 10 20 00 clr %o0 200a3cc: 15 00 80 58 sethi %hi(0x2016000), %o2 200a3d0: 17 00 00 10 sethi %hi(0x4000), %o3 200a3d4: 94 12 a3 c0 or %o2, 0x3c0, %o2 200a3d8: 40 00 0a 42 call 200cce0 200a3dc: 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; 200a3e0: 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( 200a3e4: 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; 200a3e8: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 200a3ec: 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; 200a3f0: 13 00 80 5a sethi %hi(0x2016800), %o1 200a3f4: 90 06 20 30 add %i0, 0x30, %o0 200a3f8: 40 00 0f 81 call 200e1fc 200a3fc: 92 12 63 70 or %o1, 0x370, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 200a400: 90 10 20 01 mov 1, %o0 200a404: 40 00 00 f4 call 200a7d4 200a408: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 200a40c: 80 a2 20 00 cmp %o0, 0 200a410: 02 80 00 0a be 200a438 200a414: 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; 200a418: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 200a41c: 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; 200a420: 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; 200a424: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 200a428: 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; 200a42c: 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; } 200a430: 81 c7 e0 08 ret 200a434: 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); 200a438: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 <== NOT EXECUTED 200a43c: 40 00 01 2c call 200a8ec <== NOT EXECUTED 200a440: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 200a444: 40 00 0d 7c call 200da34 <__errno> <== NOT EXECUTED 200a448: 01 00 00 00 nop <== NOT EXECUTED 200a44c: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 200a450: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a454: 81 c7 e0 08 ret <== NOT EXECUTED 200a458: 81 e8 00 00 restore <== NOT EXECUTED 02003d68 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 2003d68: 9d e3 bf 58 save %sp, -168, %sp /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 2003d6c: c2 06 00 00 ld [ %i0 ], %g1 2003d70: c2 27 bf dc st %g1, [ %fp + -36 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 2003d74: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 2003d78: 80 a0 a0 07 cmp %g2, 7 2003d7c: 18 80 00 1b bgu 2003de8 2003d80: 90 10 00 1a mov %i2, %o0 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 2003d84: a0 07 bf b8 add %fp, -72, %l0 2003d88: 94 07 bf f4 add %fp, -12, %o2 2003d8c: 7f ff ff 74 call 2003b5c 2003d90: 92 10 00 10 mov %l0, %o1 /* * Create a new link node. */ new_node = IMFS_create_node( 2003d94: 90 10 00 19 mov %i1, %o0 2003d98: 94 10 00 10 mov %l0, %o2 2003d9c: 92 10 20 03 mov 3, %o1 2003da0: 17 00 00 28 sethi %hi(0xa000), %o3 2003da4: 98 07 bf dc add %fp, -36, %o4 2003da8: 40 00 6c e8 call 201f148 2003dac: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 2003db0: 80 a2 20 00 cmp %o0, 0 2003db4: 02 80 00 13 be 2003e00 2003db8: 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 ); 2003dbc: 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++; 2003dc0: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 IMFS_update_ctime( info.hard_link.link_node ); 2003dc4: 92 10 20 00 clr %o1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 2003dc8: 82 00 60 01 inc %g1 IMFS_update_ctime( info.hard_link.link_node ); 2003dcc: 40 00 02 95 call 2004820 2003dd0: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] 2003dd4: c4 07 bf ec ld [ %fp + -20 ], %g2 2003dd8: c2 07 bf dc ld [ %fp + -36 ], %g1 2003ddc: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 2003de0: 81 c7 e0 08 ret 2003de4: 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 ); 2003de8: 40 00 b6 9c call 2031858 <__errno> 2003dec: b0 10 3f ff mov -1, %i0 2003df0: 82 10 20 1f mov 0x1f, %g1 2003df4: c2 22 00 00 st %g1, [ %o0 ] 2003df8: 81 c7 e0 08 ret 2003dfc: 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 ); 2003e00: 40 00 b6 96 call 2031858 <__errno> <== NOT EXECUTED 2003e04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003e08: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 2003e0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003e10: 81 c7 e0 08 ret <== NOT EXECUTED 2003e14: 81 e8 00 00 restore <== NOT EXECUTED 020281bc : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 20281bc: 9d e3 bf 98 save %sp, -104, %sp 20281c0: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 20281c4: 80 a6 20 00 cmp %i0, 0 20281c8: 02 80 00 17 be 2028224 20281cc: 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 ); 20281d0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 20281d4: 80 a0 60 05 cmp %g1, 5 20281d8: 32 80 00 1b bne,a 2028244 20281dc: 11 00 81 1b sethi %hi(0x2046c00), %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 ); 20281e0: 7f ff fe 74 call 2027bb0 20281e4: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 20281e8: 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 ); 20281ec: b2 10 00 08 mov %o0, %i1 if ( *block_entry_ptr ) 20281f0: 80 a0 60 00 cmp %g1, 0 20281f4: 02 80 00 04 be 2028204 20281f8: b0 10 20 00 clr %i0 if ( !memory ) return 1; *block_entry_ptr = memory; return 0; } 20281fc: 81 c7 e0 08 ret 2028200: 81 e8 00 00 restore #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 2028204: 7f ff fe 5e call 2027b7c 2028208: b0 10 20 01 mov 1, %i0 if ( !memory ) 202820c: 80 a2 20 00 cmp %o0, 0 2028210: 02 bf ff fb be 20281fc 2028214: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 2028218: d0 26 40 00 st %o0, [ %i1 ] return 0; } 202821c: 81 c7 e0 08 ret 2028220: 91 e8 20 00 restore %g0, 0, %o0 ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 2028224: 11 00 81 1b sethi %hi(0x2046c00), %o0 <== NOT EXECUTED 2028228: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 202822c: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028230: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028234: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 2028238: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 202823c: 7f ff 70 22 call 20042c4 <__assert_func> <== NOT EXECUTED 2028240: 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 ); 2028244: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2028248: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 202824c: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028250: 94 12 a2 38 or %o2, 0x238, %o2 <== NOT EXECUTED 2028254: 96 12 e1 08 or %o3, 0x108, %o3 <== NOT EXECUTED 2028258: 7f ff 70 1b call 20042c4 <__assert_func> <== NOT EXECUTED 202825c: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 2028260: 01 00 00 00 nop 02028264 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 2028264: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2028268: a6 96 20 00 orcc %i0, 0, %l3 202826c: 02 80 00 44 be 202837c 2028270: 11 00 81 1b sethi %hi(0x2046c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 2028274: c2 04 e0 48 ld [ %l3 + 0x48 ], %g1 2028278: 80 a0 60 05 cmp %g1, 5 202827c: 12 80 00 47 bne 2028398 2028280: 03 00 81 2d sethi %hi(0x204b400), %g1 if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 2028284: e2 00 63 64 ld [ %g1 + 0x364 ], %l1 ! 204b764 2028288: a1 34 60 02 srl %l1, 2, %l0 202828c: 92 10 00 10 mov %l0, %o1 2028290: 40 00 65 c7 call 20419ac <.umul> 2028294: 90 04 20 01 add %l0, 1, %o0 2028298: 92 10 00 10 mov %l0, %o1 202829c: 40 00 65 c4 call 20419ac <.umul> 20282a0: 90 02 20 01 inc %o0 20282a4: 92 10 00 11 mov %l1, %o1 20282a8: 40 00 65 c1 call 20419ac <.umul> 20282ac: 90 02 3f ff add %o0, -1, %o0 20282b0: 80 a6 40 08 cmp %i1, %o0 20282b4: 1a 80 00 2c bcc 2028364 20282b8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 20282bc: e0 04 e0 4c ld [ %l3 + 0x4c ], %l0 20282c0: 80 a6 40 10 cmp %i1, %l0 20282c4: 04 80 00 26 ble 202835c 20282c8: b0 10 20 00 clr %i0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 20282cc: 92 10 00 11 mov %l1, %o1 20282d0: 40 00 65 f3 call 2041a9c <.div> 20282d4: 90 10 00 19 mov %i1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 20282d8: 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; 20282dc: a4 10 00 08 mov %o0, %l2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 20282e0: 40 00 65 ef call 2041a9c <.div> 20282e4: 90 10 00 10 mov %l0, %o0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 20282e8: 80 a4 80 08 cmp %l2, %o0 20282ec: 0a 80 00 0f bcs 2028328 20282f0: a2 10 00 08 mov %o0, %l1 20282f4: 10 80 00 05 b 2028308 20282f8: a0 10 00 08 mov %o0, %l0 20282fc: 80 a4 80 10 cmp %l2, %l0 2028300: 2a 80 00 0b bcs,a 202832c 2028304: f2 24 e0 4c st %i1, [ %l3 + 0x4c ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 2028308: 90 10 00 13 mov %l3, %o0 202830c: 7f ff ff ac call 20281bc 2028310: 92 10 00 10 mov %l0, %o1 2028314: 80 a2 20 00 cmp %o0, 0 2028318: 22 bf ff f9 be,a 20282fc 202831c: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 2028320: 10 80 00 09 b 2028344 <== NOT EXECUTED 2028324: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 2028328: f2 24 e0 4c st %i1, [ %l3 + 0x4c ] <== NOT EXECUTED return 0; } 202832c: 81 c7 e0 08 ret 2028330: 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 ); 2028334: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2028338: 7f ff fe cb call 2027e64 <== NOT EXECUTED 202833c: 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-- ) { 2028340: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED 2028344: 08 bf ff fc bleu 2028334 <== NOT EXECUTED 2028348: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 202834c: 40 00 25 43 call 2031858 <__errno> <== NOT EXECUTED 2028350: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028354: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2028358: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202835c: 81 c7 e0 08 ret 2028360: 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 ); 2028364: 40 00 25 3d call 2031858 <__errno> <== NOT EXECUTED 2028368: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202836c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2028370: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028374: 81 c7 e0 08 ret <== NOT EXECUTED 2028378: 81 e8 00 00 restore <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 202837c: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2028380: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028384: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028388: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 202838c: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 2028390: 7f ff 6f cd call 20042c4 <__assert_func> <== NOT EXECUTED 2028394: 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 ); 2028398: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 202839c: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 20283a0: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 20283a4: 94 12 a2 50 or %o2, 0x250, %o2 <== NOT EXECUTED 20283a8: 96 12 e1 08 or %o3, 0x108, %o3 <== NOT EXECUTED 20283ac: 7f ff 6f c6 call 20042c4 <__assert_func> <== NOT EXECUTED 20283b0: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 20283b4: 01 00 00 00 nop 02027bb0 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 2027bb0: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2027bb4: 80 a6 20 00 cmp %i0, 0 2027bb8: 02 80 00 32 be 2027c80 2027bbc: 11 00 81 1b sethi %hi(0x2046c00), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 2027bc0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2027bc4: 80 a0 60 05 cmp %g1, 5 2027bc8: 12 80 00 35 bne 2027c9c 2027bcc: 03 00 81 2d sethi %hi(0x204b400), %g1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 2027bd0: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 204b764 2027bd4: a3 30 a0 02 srl %g2, 2, %l1 2027bd8: 82 04 7f ff add %l1, -1, %g1 2027bdc: 80 a6 40 01 cmp %i1, %g1 2027be0: 08 80 00 20 bleu 2027c60 2027be4: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 2027be8: 90 04 60 01 add %l1, 1, %o0 <== NOT EXECUTED 2027bec: 40 00 67 70 call 20419ac <.umul> <== NOT EXECUTED 2027bf0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2027bf4: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 2027bf8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 2027bfc: 18 80 00 3f bgu 2027cf8 <== NOT EXECUTED 2027c00: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 2027c04: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2027c08: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2027c0c: 40 00 68 4e call 2041d44 <.urem> <== NOT EXECUTED 2027c10: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2027c14: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2027c18: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2027c1c: 40 00 67 9e call 2041a94 <.udiv> <== NOT EXECUTED 2027c20: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 2027c24: 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; 2027c28: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 2027c2c: 02 80 00 29 be 2027cd0 <== NOT EXECUTED 2027c30: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( !p ) { 2027c34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027c38: 02 80 00 6b be 2027de4 <== NOT EXECUTED 2027c3c: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 2027c40: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED 2027c44: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 2027c48: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2027c4c: 02 80 00 5f be 2027dc8 <== NOT EXECUTED 2027c50: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 2027c54: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 2027c58: 81 c7 e0 08 ret <== NOT EXECUTED 2027c5c: 91 e8 80 01 restore %g2, %g1, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 2027c60: 02 80 00 16 be 2027cb8 2027c64: d0 06 20 50 ld [ %i0 + 0x50 ], %o0 if ( !p ) { 2027c68: 80 a2 20 00 cmp %o0, 0 2027c6c: 02 80 00 50 be 2027dac 2027c70: 01 00 00 00 nop p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 2027c74: 83 2e 60 02 sll %i1, 2, %g1 2027c78: 81 c7 e0 08 ret 2027c7c: 91 ea 00 01 restore %o0, %g1, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 2027c80: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2027c84: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2027c88: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2027c8c: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 2027c90: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 2027c94: 7f ff 71 8c call 20042c4 <__assert_func> <== NOT EXECUTED 2027c98: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 2027c9c: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2027ca0: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2027ca4: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2027ca8: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 2027cac: 96 12 e1 08 or %o3, 0x108, %o3 <== NOT EXECUTED 2027cb0: 7f ff 71 85 call 20042c4 <__assert_func> <== NOT EXECUTED 2027cb4: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 2027cb8: 83 2e 60 02 sll %i1, 2, %g1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 2027cbc: 80 a2 20 00 cmp %o0, 0 2027cc0: 02 80 00 0c be 2027cf0 2027cc4: b0 02 00 01 add %o0, %g1, %i0 /* * This means the requested block number is out of range. */ return 0; } 2027cc8: 81 c7 e0 08 ret 2027ccc: 81 e8 00 00 restore } return (block_p *)&p1[ singly ]; } if ( !p ) 2027cd0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027cd4: 02 80 00 07 be 2027cf0 <== NOT EXECUTED 2027cd8: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 2027cdc: 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 ]; 2027ce0: 87 2c a0 02 sll %l2, 2, %g3 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 2027ce4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2027ce8: 12 bf ff f8 bne 2027cc8 <== NOT EXECUTED 2027cec: b0 00 80 03 add %g2, %g3, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 2027cf0: 81 c7 e0 08 ret <== NOT EXECUTED 2027cf4: 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 ) { 2027cf8: 90 02 20 01 inc %o0 <== NOT EXECUTED 2027cfc: 40 00 67 2c call 20419ac <.umul> <== NOT EXECUTED 2027d00: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2027d04: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 2027d08: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 2027d0c: 18 bf ff f9 bgu 2027cf0 <== NOT EXECUTED 2027d10: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 2027d14: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2027d18: 40 00 68 0b call 2041d44 <.urem> <== NOT EXECUTED 2027d1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2027d20: 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; 2027d24: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 2027d28: 40 00 67 5b call 2041a94 <.udiv> <== NOT EXECUTED 2027d2c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 2027d30: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2027d34: 40 00 67 58 call 2041a94 <.udiv> <== NOT EXECUTED 2027d38: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 2027d3c: 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; 2027d40: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 2027d44: 40 00 68 00 call 2041d44 <.urem> <== NOT EXECUTED 2027d48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 2027d4c: 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; 2027d50: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 2027d54: 02 80 00 2b be 2027e00 <== NOT EXECUTED 2027d58: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) { 2027d5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027d60: 02 80 00 3a be 2027e48 <== NOT EXECUTED 2027d64: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 2027d68: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 2027d6c: c8 02 00 01 ld [ %o0 + %g1 ], %g4 <== NOT EXECUTED if ( !p1 ) { 2027d70: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 2027d74: 02 80 00 2e be 2027e2c <== NOT EXECUTED 2027d78: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 2027d7c: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 2027d80: d0 01 00 01 ld [ %g4 + %g1 ], %o0 <== NOT EXECUTED if ( !p2 ) { 2027d84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027d88: 12 bf ff bb bne 2027c74 <== NOT EXECUTED 2027d8c: a0 01 00 01 add %g4, %g1, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 2027d90: 7f ff ff 7b call 2027b7c <== NOT EXECUTED 2027d94: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 2027d98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027d9c: 02 bf ff d5 be 2027cf0 <== NOT EXECUTED 2027da0: 01 00 00 00 nop <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 2027da4: 10 bf ff b4 b 2027c74 <== NOT EXECUTED 2027da8: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 2027dac: 7f ff ff 74 call 2027b7c 2027db0: 01 00 00 00 nop if ( !p ) 2027db4: 80 a2 20 00 cmp %o0, 0 2027db8: 02 bf ff ce be 2027cf0 2027dbc: 01 00 00 00 nop return 0; info->indirect = p; 2027dc0: 10 bf ff ad b 2027c74 2027dc4: d0 26 20 50 st %o0, [ %i0 + 0x50 ] info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 2027dc8: 7f ff ff 6d call 2027b7c <== NOT EXECUTED 2027dcc: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 2027dd0: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 2027dd4: 02 bf ff c7 be 2027cf0 <== NOT EXECUTED 2027dd8: 01 00 00 00 nop <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 2027ddc: 10 bf ff 9e b 2027c54 <== NOT EXECUTED 2027de0: c4 24 00 00 st %g2, [ %l0 ] <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 2027de4: 7f ff ff 66 call 2027b7c <== NOT EXECUTED 2027de8: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 2027dec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027df0: 02 bf ff c0 be 2027cf0 <== NOT EXECUTED 2027df4: 01 00 00 00 nop <== NOT EXECUTED return 0; info->doubly_indirect = p; 2027df8: 10 bf ff 92 b 2027c40 <== NOT EXECUTED 2027dfc: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 2027e00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027e04: 02 bf ff bb be 2027cf0 <== NOT EXECUTED 2027e08: 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 ]; 2027e0c: d0 02 00 01 ld [ %o0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 2027e10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027e14: 02 bf ff b7 be 2027cf0 <== NOT EXECUTED 2027e18: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 2027e1c: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED 2027e20: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED 2027e24: 81 c7 e0 08 ret <== NOT EXECUTED 2027e28: 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(); 2027e2c: 7f ff ff 54 call 2027b7c <== NOT EXECUTED 2027e30: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 2027e34: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 2027e38: 02 bf ff ae be 2027cf0 <== NOT EXECUTED 2027e3c: 01 00 00 00 nop <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 2027e40: 10 bf ff cf b 2027d7c <== NOT EXECUTED 2027e44: c8 24 00 00 st %g4, [ %l0 ] <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 2027e48: 7f ff ff 4d call 2027b7c <== NOT EXECUTED 2027e4c: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 2027e50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2027e54: 02 bf ff a7 be 2027cf0 <== NOT EXECUTED 2027e58: 01 00 00 00 nop <== NOT EXECUTED return 0; info->triply_indirect = p; 2027e5c: 10 bf ff c3 b 2027d68 <== NOT EXECUTED 2027e60: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED 020287f0 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 20287f0: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 20287f4: a6 96 20 00 orcc %i0, 0, %l3 20287f8: 02 80 00 8c be 2028a28 20287fc: 11 00 81 1b sethi %hi(0x2046c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 2028800: c4 04 e0 48 ld [ %l3 + 0x48 ], %g2 2028804: 82 00 bf fb add %g2, -5, %g1 2028808: 80 a0 60 01 cmp %g1, 1 202880c: 18 80 00 95 bgu 2028a60 2028810: 80 a6 a0 00 cmp %i2, 0 /* * Error checks on arguments */ assert( dest ); 2028814: 02 80 00 8c be 2028a44 2028818: 80 a6 e0 00 cmp %i3, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 202881c: 02 80 00 7d be 2028a10 2028820: 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) { 2028824: 02 80 00 57 be 2028980 2028828: 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 ) 202882c: c4 04 e0 4c ld [ %l3 + 0x4c ], %g2 2028830: 80 a0 40 02 cmp %g1, %g2 2028834: 08 80 00 3d bleu 2028928 2028838: 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; 202883c: 2b 00 81 2d sethi %hi(0x204b400), %l5 2028840: f6 05 63 64 ld [ %l5 + 0x364 ], %i3 ! 204b764 2028844: 90 10 00 19 mov %i1, %o0 2028848: 40 00 65 41 call 2041d4c <.rem> 202884c: 92 10 00 1b mov %i3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2028850: 92 10 00 1b mov %i3, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2028854: b0 10 00 08 mov %o0, %i0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 2028858: 40 00 64 91 call 2041a9c <.div> 202885c: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 2028860: 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; 2028864: b2 10 00 08 mov %o0, %i1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 2028868: a8 15 63 64 or %l5, 0x364, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { 202886c: a2 10 00 1a mov %i2, %l1 2028870: 12 80 00 30 bne 2028930 2028874: a0 10 20 00 clr %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2028878: f6 05 63 64 ld [ %l5 + 0x364 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 202887c: 80 a4 80 1b cmp %l2, %i3 2028880: 0a 80 00 15 bcs 20288d4 2028884: 80 a4 a0 00 cmp %l2, 0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2028888: 90 10 00 13 mov %l3, %o0 202888c: 92 10 00 19 mov %i1, %o1 2028890: 7f ff fc c8 call 2027bb0 2028894: 94 10 20 00 clr %o2 assert( block_ptr ); 2028898: 80 a2 20 00 cmp %o0, 0 202889c: 22 80 00 56 be,a 20289f4 20288a0: 11 00 81 1b sethi %hi(0x2046c00), %o0 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 20288a4: d2 02 00 00 ld [ %o0 ], %o1 20288a8: 94 10 00 1b mov %i3, %o2 20288ac: 40 00 2d d8 call 203400c 20288b0: 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 ) { 20288b4: 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; 20288b8: 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; 20288bc: 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 ) { 20288c0: 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++; 20288c4: 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 ) { 20288c8: 08 bf ff f0 bleu 2028888 20288cc: 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 ) { 20288d0: 80 a4 a0 00 cmp %l2, 0 20288d4: 02 80 00 0d be 2028908 20288d8: b0 10 00 10 mov %l0, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 20288dc: 92 10 00 19 mov %i1, %o1 20288e0: 90 10 00 13 mov %l3, %o0 20288e4: 7f ff fc b3 call 2027bb0 20288e8: 94 10 20 00 clr %o2 assert( block_ptr ); 20288ec: 80 a2 20 00 cmp %o0, 0 20288f0: 02 80 00 6b be 2028a9c 20288f4: b0 04 80 10 add %l2, %l0, %i0 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 20288f8: d2 02 00 00 ld [ %o0 ], %o1 20288fc: 90 10 00 11 mov %l1, %o0 2028900: 40 00 2d c3 call 203400c 2028904: 94 10 00 12 mov %l2, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 2028908: 90 07 bf f0 add %fp, -16, %o0 202890c: 7f ff 6f c5 call 2004820 2028910: 92 10 20 00 clr %o1 2028914: c2 07 bf f0 ld [ %fp + -16 ], %g1 return copied; 2028918: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 202891c: c2 24 e0 3c st %g1, [ %l3 + 0x3c ] return copied; } 2028920: 81 c7 e0 08 ret 2028924: 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 ) 2028928: 10 bf ff c5 b 202883c <== NOT EXECUTED 202892c: 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 ); 2028930: 90 10 00 13 mov %l3, %o0 2028934: 92 10 00 19 mov %i1, %o1 2028938: 7f ff fc 9e call 2027bb0 202893c: 94 10 20 00 clr %o2 assert( block_ptr ); 2028940: 80 a2 20 00 cmp %o0, 0 2028944: 02 80 00 4e be 2028a7c 2028948: 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; 202894c: 80 a4 80 09 cmp %l2, %o1 2028950: 18 80 00 1e bgu 20289c8 2028954: 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 ); 2028958: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 202895c: 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 ); 2028960: 92 02 40 18 add %o1, %i0, %o1 dest += to_copy; block++; 2028964: b2 06 60 01 inc %i1 my_length -= to_copy; 2028968: a4 24 80 0a sub %l2, %o2, %l2 202896c: 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 ); 2028970: 40 00 2d a7 call 203400c 2028974: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 2028978: 10 bf ff c1 b 202887c 202897c: f6 05 63 64 ld [ %l5 + 0x364 ], %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)) 2028980: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED 2028984: b0 20 40 19 sub %g1, %i1, %i0 <== NOT EXECUTED 2028988: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED 202898c: 18 80 00 08 bgu 20289ac <== NOT EXECUTED 2028990: 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); 2028994: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 2028998: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 202899c: 40 00 2d 9c call 203400c <== NOT EXECUTED 20289a0: 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 ); 20289a4: 10 bf ff da b 202890c <== NOT EXECUTED 20289a8: 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)) 20289ac: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 20289b0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 20289b4: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 20289b8: 40 00 2d 95 call 203400c <== NOT EXECUTED 20289bc: 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 ); 20289c0: 10 bf ff d3 b 202890c <== NOT EXECUTED 20289c4: 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; 20289c8: 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 ); 20289cc: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 20289d0: 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 ); 20289d4: 92 02 40 18 add %o1, %i0, %o1 dest += to_copy; block++; 20289d8: b2 06 60 01 inc %i1 my_length -= to_copy; 20289dc: a4 24 80 0a sub %l2, %o2, %l2 20289e0: 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 ); 20289e4: 40 00 2d 8a call 203400c 20289e8: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 20289ec: 10 bf ff a4 b 202887c 20289f0: f6 05 63 64 ld [ %l5 + 0x364 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 20289f4: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 20289f8: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 20289fc: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028a00: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 2028a04: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 2028a08: 7f ff 6e 2f call 20042c4 <__assert_func> <== NOT EXECUTED 2028a0c: 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 ); 2028a10: 40 00 23 92 call 2031858 <__errno> <== NOT EXECUTED 2028a14: 01 00 00 00 nop <== NOT EXECUTED 2028a18: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2028a1c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 2028a20: 10 bf ff c0 b 2028920 <== NOT EXECUTED 2028a24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 2028a28: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2028a2c: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028a30: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028a34: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 2028a38: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 2028a3c: 7f ff 6e 22 call 20042c4 <__assert_func> <== NOT EXECUTED 2028a40: 92 10 22 4a mov 0x24a, %o1 <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 2028a44: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2028a48: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028a4c: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028a50: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 2028a54: 96 12 e1 a8 or %o3, 0x1a8, %o3 <== NOT EXECUTED 2028a58: 7f ff 6e 1b call 20042c4 <__assert_func> <== NOT EXECUTED 2028a5c: 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 || 2028a60: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2028a64: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028a68: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028a6c: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 2028a70: 96 12 e1 58 or %o3, 0x158, %o3 <== NOT EXECUTED 2028a74: 7f ff 6e 14 call 20042c4 <__assert_func> <== NOT EXECUTED 2028a78: 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 ); 2028a7c: 11 00 81 1b sethi %hi(0x2046c00), %o0 <== NOT EXECUTED 2028a80: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2028a84: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028a88: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028a8c: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 2028a90: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 2028a94: 7f ff 6e 0c call 20042c4 <__assert_func> <== NOT EXECUTED 2028a98: 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 ); 2028a9c: 11 00 81 1b sethi %hi(0x2046c00), %o0 <== NOT EXECUTED 2028aa0: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2028aa4: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028aa8: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028aac: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED 2028ab0: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 2028ab4: 7f ff 6e 04 call 20042c4 <__assert_func> <== NOT EXECUTED 2028ab8: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED 2028abc: 01 00 00 00 nop 02027f18 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 2027f18: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2027f1c: 80 a6 20 00 cmp %i0, 0 2027f20: 02 80 00 5f be 202809c 2027f24: 11 00 81 1b sethi %hi(0x2046c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 2027f28: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2027f2c: 80 a0 60 05 cmp %g1, 5 2027f30: 12 80 00 62 bne 20280b8 2027f34: 23 00 81 2d sethi %hi(0x204b400), %l1 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 2027f38: 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; 2027f3c: c4 04 63 64 ld [ %l1 + 0x364 ], %g2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 2027f40: 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; 2027f44: a5 30 a0 02 srl %g2, 2, %l2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 2027f48: 02 80 00 05 be 2027f5c 2027f4c: aa 14 63 64 or %l1, 0x364, %l5 memfile_free_blocks_in_table( &info->indirect, to_free ); 2027f50: 90 06 20 50 add %i0, 0x50, %o0 2027f54: 7f ff ff d0 call 2027e94 2027f58: 92 10 00 12 mov %l2, %o1 } if ( info->doubly_indirect ) { 2027f5c: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 2027f60: 80 a2 20 00 cmp %o0, 0 2027f64: 02 80 00 19 be 2027fc8 2027f68: c2 04 63 64 ld [ %l1 + 0x364 ], %g1 for ( i=0 ; i <== NOT EXECUTED 2027f78: 82 10 20 00 clr %g1 <== NOT EXECUTED 2027f7c: 10 80 00 03 b 2027f88 <== NOT EXECUTED 2027f80: a0 10 20 00 clr %l0 <== NOT EXECUTED 2027f84: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 2027f88: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED 2027f8c: c2 02 00 02 ld [ %o0 + %g2 ], %g1 <== NOT EXECUTED 2027f90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2027f94: 02 80 00 04 be 2027fa4 <== NOT EXECUTED 2027f98: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 2027f9c: 7f ff ff be call 2027e94 <== NOT EXECUTED 2027fa0: 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 2027fb8: 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 ); 2027fbc: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 2027fc0: 7f ff ff b5 call 2027e94 <== NOT EXECUTED 2027fc4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 2027fc8: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 2027fcc: 80 a2 20 00 cmp %o0, 0 2027fd0: 02 80 00 31 be 2028094 2027fd4: c2 04 63 64 ld [ %l1 + 0x364 ], %g1 for ( i=0 ; i <== NOT EXECUTED 2027fe4: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 2027fe8: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 2027fec: a8 10 20 00 clr %l4 <== NOT EXECUTED 2027ff0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2027ff4: 02 80 00 25 be 2028088 <== NOT EXECUTED 2027ff8: a6 10 20 00 clr %l3 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 202800c: 82 10 20 00 clr %g1 <== NOT EXECUTED 2028010: a0 10 20 00 clr %l0 <== NOT EXECUTED if ( p[j] ) { 2028014: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED 2028018: c2 04 40 02 ld [ %l1 + %g2 ], %g1 <== NOT EXECUTED 202801c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2028020: 02 80 00 04 be 2028030 <== NOT EXECUTED 2028024: 90 04 40 02 add %l1, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 2028028: 7f ff ff 9b call 2027e94 <== NOT EXECUTED 202802c: 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 2028044: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED 2028048: 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( 202804c: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED 2028050: 7f ff ff 91 call 2027e94 <== NOT EXECUTED 2028054: 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 202806c: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 2028070: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 2028074: a7 2d 20 02 sll %l4, 2, %l3 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 2028078: e2 02 00 13 ld [ %o0 + %l3 ], %l1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 202807c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2028080: 32 bf ff e0 bne,a 2028000 <== NOT EXECUTED 2028084: 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( 2028088: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 202808c: 7f ff ff 82 call 2027e94 <== NOT EXECUTED 2028090: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 2028094: 81 c7 e0 08 ret 2028098: 91 e8 20 00 restore %g0, 0, %o0 /* * Perform internal consistency checks */ assert( the_jnode ); 202809c: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 20280a0: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 20280a4: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 20280a8: 94 12 a2 00 or %o2, 0x200, %o2 <== NOT EXECUTED 20280ac: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 20280b0: 7f ff 70 85 call 20042c4 <__assert_func> <== NOT EXECUTED 20280b4: 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 ); 20280b8: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 20280bc: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 20280c0: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 20280c4: 94 12 a2 00 or %o2, 0x200, %o2 <== NOT EXECUTED 20280c8: 96 12 e1 08 or %o3, 0x108, %o3 <== NOT EXECUTED 20280cc: 7f ff 70 7e call 20042c4 <__assert_func> <== NOT EXECUTED 20280d0: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED 20280d4: 01 00 00 00 nop 02027e64 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 2027e64: 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 ); 2027e68: 94 10 20 00 clr %o2 <== NOT EXECUTED 2027e6c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2027e70: 7f ff ff 50 call 2027bb0 <== NOT EXECUTED 2027e74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 2027e78: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 2027e7c: 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; 2027e80: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 2027e84: 7f ff ff 35 call 2027b58 <== NOT EXECUTED 2027e88: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 2027e8c: 81 c7 e0 08 ret <== NOT EXECUTED 2027e90: 81 e8 00 00 restore <== NOT EXECUTED 02028484 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 2028484: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 2028488: a2 96 20 00 orcc %i0, 0, %l1 202848c: 02 80 00 83 be 2028698 2028490: 11 00 81 1b sethi %hi(0x2046c00), %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 2028494: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 2028498: 80 a0 60 05 cmp %g1, 5 202849c: 12 80 00 78 bne 202867c 20284a0: 80 a6 a0 00 cmp %i2, 0 /* * Error check arguments */ assert( source ); 20284a4: 02 80 00 84 be 20286b4 20284a8: 80 a6 e0 00 cmp %i3, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 20284ac: 02 80 00 6e be 2028664 20284b0: 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 ) { 20284b4: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 20284b8: 80 a2 40 01 cmp %o1, %g1 20284bc: 18 80 00 4d bgu 20285f0 20284c0: 27 00 81 2d sethi %hi(0x204b400), %l3 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 20284c4: e0 04 e3 64 ld [ %l3 + 0x364 ], %l0 ! 204b764 20284c8: 90 10 00 19 mov %i1, %o0 20284cc: 40 00 66 20 call 2041d4c <.rem> 20284d0: 92 10 00 10 mov %l0, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 20284d4: 92 10 00 10 mov %l0, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 20284d8: b0 10 00 08 mov %o0, %i0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 20284dc: 40 00 65 70 call 2041a9c <.div> 20284e0: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 20284e4: 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; 20284e8: b2 10 00 08 mov %o0, %i1 if ( start_offset ) { 20284ec: 12 80 00 2e bne 20285a4 20284f0: a4 14 e3 64 or %l3, 0x364, %l2 20284f4: a0 10 00 1a mov %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 20284f8: f4 04 e3 64 ld [ %l3 + 0x364 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 20284fc: 80 a6 c0 1a cmp %i3, %i2 2028500: 0a 80 00 14 bcs 2028550 2028504: 80 a6 e0 00 cmp %i3, 0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2028508: 90 10 00 11 mov %l1, %o0 202850c: 92 10 00 19 mov %i1, %o1 2028510: 7f ff fd a8 call 2027bb0 2028514: 94 10 20 00 clr %o2 assert( block_ptr ); 2028518: 80 a2 20 00 cmp %o0, 0 202851c: 02 80 00 4a be 2028644 2028520: 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 ); 2028524: d0 02 00 00 ld [ %o0 ], %o0 2028528: 40 00 2e b9 call 203400c 202852c: 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 ) { 2028530: 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; 2028534: 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; 2028538: 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 ) { 202853c: 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++; 2028540: 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 ) { 2028544: 08 bf ff f1 bleu 2028508 2028548: b0 06 00 1a add %i0, %i2, %i0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 202854c: 80 a6 e0 00 cmp %i3, 0 2028550: 02 80 00 0e be 2028588 2028554: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 2028558: 92 10 00 19 mov %i1, %o1 202855c: 90 10 00 11 mov %l1, %o0 2028560: 7f ff fd 94 call 2027bb0 2028564: 94 10 20 00 clr %o2 assert( block_ptr ); 2028568: 80 a2 20 00 cmp %o0, 0 202856c: 02 80 00 61 be 20286f0 2028570: 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 ); 2028574: d0 02 00 00 ld [ %o0 ], %o0 2028578: 92 10 00 10 mov %l0, %o1 202857c: 40 00 2e a4 call 203400c 2028580: 94 10 00 1b mov %i3, %o2 my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 2028584: 90 07 bf f0 add %fp, -16, %o0 2028588: 7f ff 70 a6 call 2004820 202858c: 92 10 20 00 clr %o1 2028590: c2 07 bf f0 ld [ %fp + -16 ], %g1 2028594: c2 24 60 3c st %g1, [ %l1 + 0x3c ] 2028598: c2 24 60 40 st %g1, [ %l1 + 0x40 ] return copied; } 202859c: 81 c7 e0 08 ret 20285a0: 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 ); 20285a4: 90 10 00 11 mov %l1, %o0 20285a8: 92 10 00 19 mov %i1, %o1 20285ac: 7f ff fd 81 call 2027bb0 20285b0: 94 10 20 00 clr %o2 assert( block_ptr ); 20285b4: 80 a2 20 00 cmp %o0, 0 20285b8: 02 80 00 46 be 20286d0 20285bc: 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; 20285c0: 80 a2 80 1b cmp %o2, %i3 20285c4: 18 80 00 16 bgu 202861c 20285c8: 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; 20285cc: 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 ); 20285d0: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED src += to_copy; block++; 20285d4: b2 06 60 01 inc %i1 <== NOT EXECUTED my_length -= to_copy; 20285d8: b6 26 c0 0a sub %i3, %o2, %i3 <== NOT EXECUTED copied += to_copy; 20285dc: 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 ); 20285e0: 40 00 2e 8b call 203400c <== NOT EXECUTED 20285e4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 20285e8: 10 bf ff c5 b 20284fc <== NOT EXECUTED 20285ec: f4 04 e3 64 ld [ %l3 + 0x364 ], %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 ); 20285f0: 7f ff ff 1d call 2028264 20285f4: 90 10 00 11 mov %l1, %o0 if ( status ) 20285f8: 80 a2 20 00 cmp %o0, 0 20285fc: 02 bf ff b2 be 20284c4 2028600: 27 00 81 2d sethi %hi(0x204b400), %l3 rtems_set_errno_and_return_minus_one( ENOSPC ); 2028604: 40 00 24 95 call 2031858 <__errno> <== NOT EXECUTED 2028608: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202860c: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2028610: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028614: 81 c7 e0 08 ret <== NOT EXECUTED 2028618: 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; 202861c: 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 ); 2028620: 90 02 00 18 add %o0, %i0, %o0 src += to_copy; 2028624: a0 06 80 0a add %i2, %o2, %l0 block++; 2028628: b2 06 60 01 inc %i1 my_length -= to_copy; 202862c: b6 26 c0 0a sub %i3, %o2, %i3 copied += to_copy; 2028630: 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 ); 2028634: 40 00 2e 76 call 203400c 2028638: 92 10 00 1a mov %i2, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 202863c: 10 bf ff b0 b 20284fc 2028640: f4 04 e3 64 ld [ %l3 + 0x364 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 2028644: 11 00 81 1b sethi %hi(0x2046c00), %o0 <== NOT EXECUTED 2028648: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 202864c: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028650: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028654: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 2028658: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 202865c: 7f ff 6f 1a call 20042c4 <__assert_func> <== NOT EXECUTED 2028660: 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 ); 2028664: 40 00 24 7d call 2031858 <__errno> <== NOT EXECUTED 2028668: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202866c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2028670: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2028674: 81 c7 e0 08 ret <== NOT EXECUTED 2028678: 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 ); 202867c: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2028680: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2028684: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028688: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 202868c: 96 12 e1 08 or %o3, 0x108, %o3 <== NOT EXECUTED 2028690: 7f ff 6f 0d call 20042c4 <__assert_func> <== NOT EXECUTED 2028694: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 2028698: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 202869c: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 20286a0: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 20286a4: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 20286a8: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 20286ac: 7f ff 6f 06 call 20042c4 <__assert_func> <== NOT EXECUTED 20286b0: 92 10 22 e1 mov 0x2e1, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 20286b4: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 20286b8: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 20286bc: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 20286c0: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 20286c4: 96 12 e1 40 or %o3, 0x140, %o3 <== NOT EXECUTED 20286c8: 7f ff 6e ff call 20042c4 <__assert_func> <== NOT EXECUTED 20286cc: 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 ); 20286d0: 11 00 81 1b sethi %hi(0x2046c00), %o0 <== NOT EXECUTED 20286d4: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 20286d8: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 20286dc: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 20286e0: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 20286e4: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 20286e8: 7f ff 6e f7 call 20042c4 <__assert_func> <== NOT EXECUTED 20286ec: 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 ); 20286f0: 11 00 81 1b sethi %hi(0x2046c00), %o0 <== NOT EXECUTED 20286f4: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 20286f8: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 20286fc: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2028700: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 2028704: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 2028708: 7f ff 6e ef call 20042c4 <__assert_func> <== NOT EXECUTED 202870c: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 2028710: 01 00 00 00 nop 0200a45c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 200a45c: 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 ); 200a460: 90 10 00 18 mov %i0, %o0 200a464: 94 07 bf f4 add %fp, -12, %o2 200a468: b0 07 bf c0 add %fp, -64, %i0 200a46c: 7f ff ff 83 call 200a278 200a470: 92 10 00 18 mov %i0, %o1 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 200a474: b3 2e 60 10 sll %i1, 0x10, %i1 200a478: 03 00 00 3c sethi %hi(0xf000), %g1 200a47c: 97 36 60 10 srl %i1, 0x10, %o3 200a480: 05 00 00 10 sethi %hi(0x4000), %g2 200a484: 86 0a c0 01 and %o3, %g1, %g3 200a488: 80 a0 c0 02 cmp %g3, %g2 200a48c: 02 80 00 1f be 200a508 200a490: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 200a494: 03 00 00 20 sethi %hi(0x8000), %g1 200a498: 80 a0 c0 01 cmp %g3, %g1 200a49c: 02 80 00 12 be 200a4e4 200a4a0: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 200a4a4: 03 00 00 18 sethi %hi(0x6000), %g1 200a4a8: 80 a0 c0 01 cmp %g3, %g1 200a4ac: 02 80 00 0b be 200a4d8 200a4b0: 03 00 00 08 sethi %hi(0x2000), %g1 200a4b4: 80 a0 c0 01 cmp %g3, %g1 200a4b8: 22 80 00 09 be,a 200a4dc 200a4bc: 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 ); 200a4c0: 40 00 0d 5d call 200da34 <__errno> <== NOT EXECUTED 200a4c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a4c8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200a4cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a4d0: 81 c7 e0 08 ret <== NOT EXECUTED 200a4d4: 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 ); 200a4d8: f4 27 bf e4 st %i2, [ %fp + -28 ] <== NOT EXECUTED 200a4dc: f6 27 bf e8 st %i3, [ %fp + -24 ] 200a4e0: 92 10 20 02 mov 2, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 200a4e4: 94 10 00 18 mov %i0, %o2 200a4e8: 98 07 bf e4 add %fp, -28, %o4 200a4ec: 40 00 09 fd call 200cce0 200a4f0: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 200a4f4: 80 a2 20 00 cmp %o0, 0 200a4f8: 02 80 00 06 be 200a510 200a4fc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 200a500: 81 c7 e0 08 ret 200a504: 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 ); 200a508: 10 bf ff f7 b 200a4e4 200a50c: 92 10 20 01 mov 1, %o1 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 200a510: 40 00 0d 49 call 200da34 <__errno> <== NOT EXECUTED 200a514: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a518: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 200a51c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 200a520: 81 c7 e0 08 ret <== NOT EXECUTED 200a524: 81 e8 00 00 restore <== NOT EXECUTED 02003ee4 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2003ee4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2003ee8: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2003eec: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 2003ef0: 80 a0 60 01 cmp %g1, 1 2003ef4: 12 80 00 05 bne 2003f08 2003ef8: 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; 2003efc: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] return 0; } 2003f00: 81 c7 e0 08 ret 2003f04: 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 ); 2003f08: 40 00 b6 54 call 2031858 <__errno> <== NOT EXECUTED 2003f0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003f10: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2003f14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003f18: 81 c7 e0 08 ret <== NOT EXECUTED 2003f1c: 81 e8 00 00 restore <== NOT EXECUTED 02003994 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2003994: 9d e3 bf 98 save %sp, -104, %sp assert( the_jnode ); 2003998: 80 a6 20 00 cmp %i0, 0 200399c: 02 80 00 52 be 2003ae4 20039a0: 21 00 80 7e sethi %hi(0x201f800), %l0 fprintf(stdout, "%s", the_jnode->name ); 20039a4: c2 04 21 48 ld [ %l0 + 0x148 ], %g1 ! 201f948 <_impure_ptr> 20039a8: 90 06 20 0c add %i0, 0xc, %o0 20039ac: 40 00 3b 53 call 20126f8 20039b0: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 20039b4: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 20039b8: 80 a2 a0 06 cmp %o2, 6 20039bc: 08 80 00 0f bleu 20039f8 20039c0: 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 ); 20039c4: c2 04 21 48 ld [ %l0 + 0x148 ], %g1 <== NOT EXECUTED 20039c8: 13 00 80 75 sethi %hi(0x201d400), %o1 <== NOT EXECUTED 20039cc: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 20039d0: 40 00 3a f8 call 20125b0 <== NOT EXECUTED 20039d4: 92 12 63 f0 or %o1, 0x3f0, %o1 <== NOT EXECUTED assert(0); 20039d8: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); assert(0); 20039dc: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 20039e0: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED 20039e4: 17 00 80 75 sethi %hi(0x201d400), %o3 <== NOT EXECUTED 20039e8: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED 20039ec: 94 12 a1 10 or %o2, 0x110, %o2 <== NOT EXECUTED 20039f0: 40 00 02 3f call 20042ec <__assert_func> <== NOT EXECUTED 20039f4: 96 12 e3 e8 or %o3, 0x3e8, %o3 <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 20039f8: 05 00 80 0e sethi %hi(0x2003800), %g2 20039fc: 84 10 a1 3c or %g2, 0x13c, %g2 ! 200393c 2003a00: c6 00 80 01 ld [ %g2 + %g1 ], %g3 2003a04: 81 c0 c0 00 jmp %g3 2003a08: 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)", 2003a0c: c2 04 21 48 ld [ %l0 + 0x148 ], %g1 <== NOT EXECUTED 2003a10: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED 2003a14: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED 2003a18: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 2003a1c: 13 00 80 75 sethi %hi(0x201d400), %o1 <== NOT EXECUTED 2003a20: 40 00 3a e4 call 20125b0 <== NOT EXECUTED 2003a24: 92 12 63 b0 or %o1, 0x3b0, %o1 ! 201d7b0 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2003a28: 31 00 80 75 sethi %hi(0x201d400), %i0 <== NOT EXECUTED 2003a2c: 40 00 42 01 call 2014230 <== NOT EXECUTED 2003a30: 91 ee 22 e8 restore %i0, 0x2e8, %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 ")", 2003a34: c2 04 21 48 ld [ %l0 + 0x148 ], %g1 2003a38: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 2003a3c: d0 00 60 08 ld [ %g1 + 8 ], %o0 2003a40: 13 00 80 75 sethi %hi(0x201d400), %o1 2003a44: 40 00 3a db call 20125b0 2003a48: 92 12 63 c0 or %o1, 0x3c0, %o1 ! 201d7c0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2003a4c: 31 00 80 75 sethi %hi(0x201d400), %i0 2003a50: 40 00 41 f8 call 2014230 2003a54: 91 ee 22 e8 restore %i0, 0x2e8, %o0 fprintf(stdout, " links not printed\n" ); assert(0); break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2003a58: c2 04 21 48 ld [ %l0 + 0x148 ], %g1 <== NOT EXECUTED 2003a5c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2003a60: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2003a64: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 2003a68: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 2003a6c: 40 00 3d f3 call 2013238 <== NOT EXECUTED 2003a70: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 201d7d0 <== NOT EXECUTED assert(0); 2003a74: 10 bf ff da b 20039dc <== NOT EXECUTED 2003a78: 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" ); 2003a7c: c2 04 21 48 ld [ %l0 + 0x148 ], %g1 <== NOT EXECUTED 2003a80: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2003a84: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 2003a88: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 2003a8c: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 2003a90: 40 00 3d ea call 2013238 <== NOT EXECUTED 2003a94: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 201d7d0 <== NOT EXECUTED assert(0); 2003a98: 10 bf ff d1 b 20039dc <== NOT EXECUTED 2003a9c: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2003aa0: c2 04 21 48 ld [ %l0 + 0x148 ], %g1 2003aa4: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 2003aa8: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 2003aac: d0 00 60 08 ld [ %g1 + 8 ], %o0 2003ab0: 13 00 80 75 sethi %hi(0x201d400), %o1 2003ab4: 40 00 3a bf call 20125b0 2003ab8: 92 12 63 98 or %o1, 0x398, %o1 ! 201d798 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2003abc: 31 00 80 75 sethi %hi(0x201d400), %i0 2003ac0: 40 00 41 dc call 2014230 2003ac4: 91 ee 22 e8 restore %i0, 0x2e8, %o0 assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2003ac8: c2 04 21 48 ld [ %l0 + 0x148 ], %g1 2003acc: 90 10 20 2f mov 0x2f, %o0 2003ad0: d2 00 60 08 ld [ %g1 + 8 ], %o1 2003ad4: 40 00 3a d1 call 2012618 2003ad8: 31 00 80 75 sethi %hi(0x201d400), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2003adc: 40 00 41 d5 call 2014230 2003ae0: 91 ee 22 e8 restore %i0, 0x2e8, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 2003ae4: 11 00 80 75 sethi %hi(0x201d400), %o0 <== NOT EXECUTED 2003ae8: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED 2003aec: 17 00 80 75 sethi %hi(0x201d400), %o3 <== NOT EXECUTED 2003af0: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED 2003af4: 94 12 a1 10 or %o2, 0x110, %o2 <== NOT EXECUTED 2003af8: 96 12 e3 88 or %o3, 0x388, %o3 <== NOT EXECUTED 2003afc: 40 00 01 fc call 20042ec <__assert_func> <== NOT EXECUTED 2003b00: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED 2003b04: 01 00 00 00 nop 02003f2c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 2003f2c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 2003f30: c8 06 00 00 ld [ %i0 ], %g4 if ( node->type != IMFS_SYM_LINK ) 2003f34: c2 01 20 48 ld [ %g4 + 0x48 ], %g1 2003f38: 80 a0 60 04 cmp %g1, 4 2003f3c: 12 80 00 19 bne 2003fa0 2003f40: 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++ ) 2003f44: 02 80 00 15 be 2003f98 2003f48: 86 10 20 00 clr %g3 2003f4c: 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 ); 2003f50: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 2003f54: c4 48 40 00 ldsb [ %g1 ], %g2 2003f58: 80 a0 a0 00 cmp %g2, 0 2003f5c: 12 80 00 08 bne 2003f7c 2003f60: c2 08 40 00 ldub [ %g1 ], %g1 2003f64: 30 80 00 13 b,a 2003fb0 <== NOT EXECUTED 2003f68: c2 01 20 4c ld [ %g4 + 0x4c ], %g1 2003f6c: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 2003f70: 80 a0 a0 00 cmp %g2, 0 2003f74: 02 80 00 07 be 2003f90 2003f78: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 buf[i] = node->info.sym_link.name[i]; 2003f7c: 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++ ) 2003f80: b0 06 20 01 inc %i0 2003f84: 80 a6 80 18 cmp %i2, %i0 2003f88: 18 bf ff f8 bgu 2003f68 2003f8c: 86 10 00 18 mov %i0, %g3 buf[i] = node->info.sym_link.name[i]; return i; } 2003f90: 81 c7 e0 08 ret 2003f94: 81 e8 00 00 restore 2003f98: 81 c7 e0 08 ret <== NOT EXECUTED 2003f9c: 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 ); 2003fa0: 40 00 b6 2e call 2031858 <__errno> <== NOT EXECUTED 2003fa4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2003fa8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2003fac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2003fb0: 81 c7 e0 08 ret <== NOT EXECUTED 2003fb4: 81 e8 00 00 restore <== NOT EXECUTED 0200a534 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 200a534: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 200a538: 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 ) { 200a53c: c2 04 20 08 ld [ %l0 + 8 ], %g1 200a540: 80 a0 60 00 cmp %g1, 0 200a544: 22 80 00 06 be,a 200a55c 200a548: 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 ); 200a54c: 40 00 06 6c call 200befc <_Chain_Extract> 200a550: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 200a554: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 200a558: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 200a55c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 200a560: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 200a564: 90 07 bf f0 add %fp, -16, %o0 200a568: 40 00 01 5b call 200aad4 200a56c: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 200a570: 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) ) { 200a574: 90 10 00 10 mov %l0, %o0 200a578: 40 00 01 91 call 200abbc 200a57c: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 200a580: 80 a2 20 00 cmp %o0, 0 200a584: 12 80 00 12 bne 200a5cc 200a588: 01 00 00 00 nop 200a58c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 200a590: 80 a0 60 00 cmp %g1, 0 200a594: 12 80 00 0e bne 200a5cc 200a598: 03 00 80 5e sethi %hi(0x2017800), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 200a59c: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 ! 2017814 200a5a0: c4 06 00 00 ld [ %i0 ], %g2 200a5a4: c2 00 e0 04 ld [ %g3 + 4 ], %g1 200a5a8: 80 a0 40 02 cmp %g1, %g2 200a5ac: 22 80 00 02 be,a 200a5b4 200a5b0: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 200a5b4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 200a5b8: 80 a0 60 04 cmp %g1, 4 200a5bc: 22 80 00 06 be,a 200a5d4 200a5c0: 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 ); 200a5c4: 40 00 00 ca call 200a8ec 200a5c8: 90 10 00 10 mov %l0, %o0 } return 0; } 200a5cc: 81 c7 e0 08 ret 200a5d0: 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 ) 200a5d4: 80 a2 20 00 cmp %o0, 0 200a5d8: 02 bf ff fb be 200a5c4 200a5dc: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 200a5e0: 40 00 00 c3 call 200a8ec 200a5e4: 01 00 00 00 nop 200a5e8: 30 bf ff f7 b,a 200a5c4 0200a5ec : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 200a5ec: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 200a5f0: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 200a5f4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 200a5f8: 80 a0 60 04 cmp %g1, 4 200a5fc: 22 80 00 11 be,a 200a640 200a600: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 200a604: 14 80 00 0b bg 200a630 200a608: 80 a0 60 06 cmp %g1, 6 200a60c: 80 a0 60 02 cmp %g1, 2 200a610: 22 80 00 1e be,a 200a688 200a614: 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 ); 200a618: 40 00 0d 07 call 200da34 <__errno> <== NOT EXECUTED 200a61c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200a620: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200a624: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200a628: 81 c7 e0 08 ret <== NOT EXECUTED 200a62c: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 200a630: 14 bf ff fa bg 200a618 200a634: 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; 200a638: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 200a63c: 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; 200a640: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 200a644: 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; 200a648: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 200a64c: 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; 200a650: 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; 200a654: 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; 200a658: 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; 200a65c: 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; 200a660: 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; 200a664: 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; 200a668: 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; 200a66c: 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; 200a670: 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; 200a674: 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; 200a678: 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; 200a67c: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 200a680: 81 c7 e0 08 ret 200a684: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 200a688: 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 ); 200a68c: c2 26 60 04 st %g1, [ %i1 + 4 ] 200a690: 10 bf ff ec b 200a640 200a694: c4 26 40 00 st %g2, [ %i1 ] 02003fb8 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 2003fb8: 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 ); 2003fbc: 94 07 bf f4 add %fp, -12, %o2 2003fc0: a0 07 bf c0 add %fp, -64, %l0 2003fc4: 90 10 00 1a mov %i2, %o0 2003fc8: 7f ff fe e5 call 2003b5c 2003fcc: 92 10 00 10 mov %l0, %o1 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 2003fd0: 40 00 ca f8 call 2036bb0 2003fd4: 90 10 00 19 mov %i1, %o0 2003fd8: d0 27 bf e4 st %o0, [ %fp + -28 ] if (info.sym_link.name == NULL) { 2003fdc: 80 a2 20 00 cmp %o0, 0 2003fe0: 02 80 00 14 be 2004030 2003fe4: 90 10 00 18 mov %i0, %o0 /* * Create a new link node. */ new_node = IMFS_create_node( 2003fe8: 94 10 00 10 mov %l0, %o2 2003fec: 92 10 20 04 mov 4, %o1 2003ff0: 17 00 00 28 sethi %hi(0xa000), %o3 2003ff4: 98 07 bf e4 add %fp, -28, %o4 2003ff8: 96 12 e1 ff or %o3, 0x1ff, %o3 2003ffc: 40 00 6c 53 call 201f148 2004000: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2004004: 80 a2 20 00 cmp %o0, 0 2004008: 12 80 00 08 bne 2004028 200400c: d0 07 bf e4 ld [ %fp + -28 ], %o0 free( info.sym_link.name); 2004010: 40 00 01 d9 call 2004774 <== NOT EXECUTED 2004014: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 2004018: 40 00 b6 10 call 2031858 <__errno> <== NOT EXECUTED 200401c: 01 00 00 00 nop <== NOT EXECUTED 2004020: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2004024: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 2004028: 81 c7 e0 08 ret 200402c: 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); 2004030: 40 00 b6 0a call 2031858 <__errno> <== NOT EXECUTED 2004034: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004038: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 200403c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004040: 81 c7 e0 08 ret <== NOT EXECUTED 2004044: 81 e8 00 00 restore <== NOT EXECUTED 02004048 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 2004048: 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; 200404c: 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 ) { 2004050: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2004054: 80 a0 60 03 cmp %g1, 3 2004058: 32 80 00 1b bne,a 20040c4 200405c: c4 06 20 04 ld [ %i0 + 4 ], %g2 if ( !node->info.hard_link.link_node ) 2004060: c8 04 20 4c ld [ %l0 + 0x4c ], %g4 2004064: 80 a1 20 00 cmp %g4, 0 2004068: 02 80 00 1c be 20040d8 200406c: a2 07 bf e0 add %fp, -32, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 2004070: c2 06 20 04 ld [ %i0 + 4 ], %g1 2004074: c4 06 20 08 ld [ %i0 + 8 ], %g2 2004078: c6 06 20 0c ld [ %i0 + 0xc ], %g3 200407c: c2 27 bf e4 st %g1, [ %fp + -28 ] 2004080: c4 3f bf e8 std %g2, [ %fp + -24 ] the_link.node_access = node->info.hard_link.link_node; 2004084: c8 27 bf e0 st %g4, [ %fp + -32 ] IMFS_Set_handlers( &the_link ); 2004088: 40 00 6c 8a call 201f2b0 200408c: 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) 2004090: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 2004094: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 2004098: 80 a0 60 01 cmp %g1, 1 200409c: 02 80 00 15 be 20040f0 20040a0: 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 ); 20040a4: 90 07 bf f0 add %fp, -16, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 20040a8: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 20040ac: 40 00 01 dd call 2004820 20040b0: 92 10 20 00 clr %o1 20040b4: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 20040b8: c2 07 bf f0 ld [ %fp + -16 ], %g1 20040bc: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 20040c0: c4 06 20 04 ld [ %i0 + 4 ], %g2 20040c4: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 20040c8: 9f c0 40 00 call %g1 20040cc: 90 10 00 18 mov %i0, %o0 return result; } 20040d0: 81 c7 e0 08 ret 20040d4: 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 ); 20040d8: 40 00 b5 e0 call 2031858 <__errno> <== NOT EXECUTED 20040dc: 01 00 00 00 nop <== NOT EXECUTED 20040e0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 20040e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20040e8: 10 bf ff fa b 20040d0 <== NOT EXECUTED 20040ec: 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 ); 20040f0: c2 07 bf e4 ld [ %fp + -28 ], %g1 20040f4: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 20040f8: 9f c0 80 00 call %g2 20040fc: 90 10 00 11 mov %l1, %o0 if ( result != 0 ) 2004100: 80 a2 20 00 cmp %o0, 0 2004104: 02 bf ff ef be 20040c0 2004108: 90 10 3f ff mov -1, %o0 200410c: 30 bf ff f1 b,a 20040d0 02004110 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2004110: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 2004114: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2004118: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 200411c: 80 a0 60 01 cmp %g1, 1 2004120: 12 80 00 09 bne 2004144 2004124: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 2004128: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 200412c: 80 a0 60 00 cmp %g1, 0 2004130: 02 80 00 0b be 200415c 2004134: 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; 2004138: c0 20 a0 58 clr [ %g2 + 0x58 ] return 0; } 200413c: 81 c7 e0 08 ret 2004140: 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 ); 2004144: 40 00 b5 c5 call 2031858 <__errno> <== NOT EXECUTED 2004148: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200414c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 2004150: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004154: 81 c7 e0 08 ret <== NOT EXECUTED 2004158: 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 */ 200415c: 40 00 b5 bf call 2031858 <__errno> <== NOT EXECUTED 2004160: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004164: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2004168: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200416c: 81 c7 e0 08 ret <== NOT EXECUTED 2004170: 81 e8 00 00 restore <== NOT EXECUTED 02002264 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 2002264: 9d e3 bf 98 save %sp, -104, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 2002268: 03 00 80 5f sethi %hi(0x2017c00), %g1 200226c: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 2017d54 2002270: 80 a0 60 00 cmp %g1, 0 2002274: 02 80 00 05 be 2002288 2002278: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 200227c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 2002280: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002284: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 2002288: 40 00 22 fd call 200ae7c 200228c: a0 10 00 18 mov %i0, %l0 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 2002290: 03 00 80 5f sethi %hi(0x2017c00), %g1 2002294: c2 00 61 58 ld [ %g1 + 0x158 ], %g1 ! 2017d58 2002298: 80 a0 60 00 cmp %g1, 0 200229c: 02 80 00 06 be 20022b4 20022a0: 90 10 00 18 mov %i0, %o0 starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 20022a4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 20022a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20022ac: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20022b0: 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() ) 20022b4: 03 00 80 60 sethi %hi(0x2018000), %g1 20022b8: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 201826c <_Configuration_Table> 20022bc: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 20022c0: 80 a0 e0 00 cmp %g3, 0 20022c4: 12 80 00 10 bne 2002304 20022c8: 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 ); 20022cc: 92 10 00 10 mov %l0, %o1 20022d0: 11 00 80 60 sethi %hi(0x2018000), %o0 20022d4: 94 10 00 19 mov %i1, %o2 20022d8: 90 12 20 00 mov %o0, %o0 20022dc: 40 00 11 84 call 20068ec <_Heap_Initialize> 20022e0: 96 10 20 08 mov 8, %o3 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 20022e4: 80 a2 20 00 cmp %o0, 0 20022e8: 02 80 00 0c be 2002318 20022ec: 05 00 80 60 sethi %hi(0x2018000), %g2 rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 20022f0: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 ! 2018058 20022f4: 82 06 40 01 add %i1, %g1, %g1 20022f8: c2 20 a0 58 st %g1, [ %g2 + 0x58 ] } 20022fc: 81 c7 e0 08 ret 2002300: 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 ); 2002304: 92 10 20 00 clr %o1 <== NOT EXECUTED 2002308: 40 00 2f f6 call 200e2e0 <== NOT EXECUTED 200230c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 2002310: 10 bf ff f0 b 20022d0 <== NOT EXECUTED 2002314: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) rtems_fatal_error_occurred( status ); 2002318: 40 00 0e f4 call 2005ee8 <== NOT EXECUTED 200231c: 01 00 00 00 nop 2002320: 01 00 00 00 nop 02002ea0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 2002ea0: 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 ) 2002ea4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2002ea8: 02 80 00 39 be 2002f8c <== NOT EXECUTED 2002eac: 2b 00 81 2d sethi %hi(0x204b400), %l5 <== NOT EXECUTED return; if ( !print_handler ) 2002eb0: e8 05 63 60 ld [ %l5 + 0x360 ], %l4 ! 204b760 <== NOT EXECUTED 2002eb4: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2002eb8: 02 80 00 35 be 2002f8c <== NOT EXECUTED 2002ebc: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 2002ec0: 02 80 00 3b be 2002fac <== NOT EXECUTED 2002ec4: 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 ); 2002ec8: ec 06 21 50 ld [ %i0 + 0x150 ], %l6 <== NOT EXECUTED } low = Stack_check_usable_stack_start(stack); 2002ecc: e0 04 a0 04 ld [ %l2 + 4 ], %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2002ed0: 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); 2002ed4: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 2002ed8: a6 00 7f f0 add %g1, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 2002edc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2002ee0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 2002ee4: 7f ff ff d6 call 2002e3c <== NOT EXECUTED 2002ee8: a0 04 00 13 add %l0, %l3, %l0 <== NOT EXECUTED if ( high_water_mark ) 2002eec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2002ef0: 02 80 00 40 be 2002ff0 <== NOT EXECUTED 2002ef4: 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 ) { 2002ef8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2002efc: 02 80 00 35 be 2002fd0 <== NOT EXECUTED 2002f00: 03 00 81 2d sethi %hi(0x204b400), %g1 <== NOT EXECUTED (*print_handler)( 2002f04: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED 2002f08: e2 00 63 5c ld [ %g1 + 0x35c ], %l1 <== NOT EXECUTED 2002f0c: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED 2002f10: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 2002f14: b0 10 63 5c or %g1, 0x35c, %i0 <== NOT EXECUTED 2002f18: 40 00 16 52 call 2008860 <== NOT EXECUTED 2002f1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2002f20: 13 00 81 0f sethi %hi(0x2043c00), %o1 <== NOT EXECUTED 2002f24: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 2002f28: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 2002f2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2002f30: 9f c5 00 00 call %l4 <== NOT EXECUTED 2002f34: 92 12 62 b0 or %o1, 0x2b0, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 2002f38: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 2002f3c: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 2002f40: c4 05 63 60 ld [ %l5 + 0x360 ], %g2 <== NOT EXECUTED 2002f44: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 2002f48: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 2002f4c: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 2002f50: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 2002f54: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 2002f58: 13 00 81 0f sethi %hi(0x2043c00), %o1 <== NOT EXECUTED 2002f5c: 9f c0 80 00 call %g2 <== NOT EXECUTED 2002f60: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 2043ed0 <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 2002f64: 03 00 81 2d sethi %hi(0x204b400), %g1 <== NOT EXECUTED 2002f68: c4 00 63 58 ld [ %g1 + 0x358 ], %g2 ! 204b758 <== NOT EXECUTED 2002f6c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2002f70: 02 80 00 09 be 2002f94 <== NOT EXECUTED 2002f74: c2 05 63 60 ld [ %l5 + 0x360 ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 2002f78: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 2002f7c: 13 00 81 0f sethi %hi(0x2043c00), %o1 <== NOT EXECUTED 2002f80: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED 2002f84: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002f88: 92 12 63 00 or %o1, 0x300, %o1 <== NOT EXECUTED 2002f8c: 81 c7 e0 08 ret <== NOT EXECUTED 2002f90: 81 e8 00 00 restore <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 2002f94: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 2002f98: 13 00 81 0f sethi %hi(0x2043c00), %o1 <== NOT EXECUTED 2002f9c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002fa0: 92 12 62 f0 or %o1, 0x2f0, %o1 ! 2043ef0 <== NOT EXECUTED 2002fa4: 81 c7 e0 08 ret <== NOT EXECUTED 2002fa8: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 2002fac: 03 00 81 7a sethi %hi(0x205e800), %g1 <== NOT EXECUTED 2002fb0: 82 10 60 94 or %g1, 0x94, %g1 ! 205e894 <== NOT EXECUTED 2002fb4: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 2002fb8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2002fbc: 02 bf ff f4 be 2002f8c <== NOT EXECUTED 2002fc0: a4 10 00 01 mov %g1, %l2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 2002fc4: b0 10 20 00 clr %i0 <== NOT EXECUTED 2002fc8: 10 bf ff c1 b 2002ecc <== NOT EXECUTED 2002fcc: 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 ); 2002fd0: d0 00 63 5c ld [ %g1 + 0x35c ], %o0 <== NOT EXECUTED 2002fd4: 13 00 81 0f sethi %hi(0x2043c00), %o1 <== NOT EXECUTED 2002fd8: b0 10 63 5c or %g1, 0x35c, %i0 <== NOT EXECUTED 2002fdc: 92 12 62 c0 or %o1, 0x2c0, %o1 <== NOT EXECUTED 2002fe0: 9f c5 00 00 call %l4 <== NOT EXECUTED 2002fe4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED } (*print_handler)( 2002fe8: 10 bf ff d5 b 2002f3c <== NOT EXECUTED 2002fec: 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 ) 2002ff0: 10 bf ff c2 b 2002ef8 <== NOT EXECUTED 2002ff4: ae 10 20 00 clr %l7 <== NOT EXECUTED 02002e3c : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 2002e3c: 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++) 2002e40: 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; 2002e44: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 2002e48: 86 02 00 09 add %o0, %o1, %g3 <== NOT EXECUTED 2002e4c: 80 a2 00 03 cmp %o0, %g3 <== NOT EXECUTED 2002e50: 3a 80 00 12 bcc,a 2002e98 <== NOT EXECUTED 2002e54: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) 2002e58: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 2002e5c: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== NOT EXECUTED 2002e60: 82 10 61 a5 or %g1, 0x1a5, %g1 ! a5a5a5a5 <== NOT EXECUTED 2002e64: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2002e68: 22 80 00 07 be,a 2002e84 <== NOT EXECUTED 2002e6c: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 2002e70: 30 80 00 0a b,a 2002e98 <== NOT EXECUTED 2002e74: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2002e78: 12 80 00 08 bne 2002e98 <== NOT EXECUTED 2002e7c: 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++) 2002e80: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 2002e84: 80 a0 c0 08 cmp %g3, %o0 <== NOT EXECUTED 2002e88: 38 bf ff fb bgu,a 2002e74 <== NOT EXECUTED 2002e8c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 2002e90: 81 c3 e0 08 retl <== NOT EXECUTED 2002e94: 90 10 20 00 clr %o0 <== NOT EXECUTED 2002e98: 81 c3 e0 08 retl <== NOT EXECUTED 2002e9c: 01 00 00 00 nop 0200306c : */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 200306c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 2003070: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 2003074: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2003078: 11 00 81 0f sethi %hi(0x2043c00), %o0 <== NOT EXECUTED 200307c: 40 00 0b a4 call 2005f0c <== NOT EXECUTED 2003080: 90 12 23 70 or %o0, 0x370, %o0 ! 2043f70 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 2003084: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 2003088: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 200308c: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED 2003090: 11 00 81 0f sethi %hi(0x2043c00), %o0 <== NOT EXECUTED 2003094: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 2003098: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 200309c: 40 00 0b 9c call 2005f0c <== NOT EXECUTED 20030a0: 94 02 40 0a add %o1, %o2, %o2 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 20030a4: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 20030a8: 22 80 00 04 be,a 20030b8 <== NOT EXECUTED 20030ac: 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 ); 20030b0: 40 00 18 42 call 20091b8 <== NOT EXECUTED 20030b4: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { printk( 20030b8: 11 00 81 0f sethi %hi(0x2043c00), %o0 <== NOT EXECUTED 20030bc: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 20030c0: 90 12 23 e0 or %o0, 0x3e0, %o0 <== NOT EXECUTED 20030c4: 40 00 0b 92 call 2005f0c <== NOT EXECUTED 20030c8: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 20030cc: 30 bf ff f9 b,a 20030b0 <== NOT EXECUTED 02006184 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 2006184: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006188: 03 00 80 61 sethi %hi(0x2018400), %g1 200618c: e0 00 60 14 ld [ %g1 + 0x14 ], %l0 ! 2018414 <_API_extensions_List> 2006190: 82 10 60 14 or %g1, 0x14, %g1 2006194: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006198: 80 a4 00 11 cmp %l0, %l1 200619c: 02 80 00 0c be 20061cc <_API_extensions_Run_postdriver+0x48> 20061a0: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 20061a4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20061a8: 80 a0 60 00 cmp %g1, 0 20061ac: 22 80 00 05 be,a 20061c0 <_API_extensions_Run_postdriver+0x3c> 20061b0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 20061b4: 9f c0 40 00 call %g1 20061b8: 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 ) { 20061bc: 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 ) ; 20061c0: 80 a4 00 11 cmp %l0, %l1 20061c4: 32 bf ff f9 bne,a 20061a8 <_API_extensions_Run_postdriver+0x24> 20061c8: c2 04 20 0c ld [ %l0 + 0xc ], %g1 20061cc: 81 c7 e0 08 ret 20061d0: 81 e8 00 00 restore 020061d4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 20061d4: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 20061d8: 03 00 80 61 sethi %hi(0x2018400), %g1 20061dc: e0 00 60 14 ld [ %g1 + 0x14 ], %l0 ! 2018414 <_API_extensions_List> 20061e0: 82 10 60 14 or %g1, 0x14, %g1 20061e4: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 20061e8: 80 a4 00 11 cmp %l0, %l1 20061ec: 02 80 00 0d be 2006220 <_API_extensions_Run_postswitch+0x4c> 20061f0: 03 00 80 60 sethi %hi(0x2018000), %g1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 20061f4: a4 10 62 94 or %g1, 0x294, %l2 ! 2018294 <_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 ) 20061f8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 20061fc: 80 a0 60 00 cmp %g1, 0 2006200: 22 80 00 05 be,a 2006214 <_API_extensions_Run_postswitch+0x40> 2006204: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 2006208: 9f c0 40 00 call %g1 200620c: 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 ) { 2006210: 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 ) ; 2006214: 80 a4 00 11 cmp %l0, %l1 2006218: 32 bf ff f9 bne,a 20061fc <_API_extensions_Run_postswitch+0x28> 200621c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2006220: 81 c7 e0 08 ret 2006224: 81 e8 00 00 restore 02006134 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 2006134: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 2006138: 03 00 80 61 sethi %hi(0x2018400), %g1 200613c: e0 00 60 14 ld [ %g1 + 0x14 ], %l0 ! 2018414 <_API_extensions_List> 2006140: 82 10 60 14 or %g1, 0x14, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2006144: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 2006148: 80 a4 00 11 cmp %l0, %l1 200614c: 02 80 00 0c be 200617c <_API_extensions_Run_predriver+0x48> 2006150: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 2006154: c2 04 20 08 ld [ %l0 + 8 ], %g1 2006158: 80 a0 60 00 cmp %g1, 0 200615c: 22 80 00 05 be,a 2006170 <_API_extensions_Run_predriver+0x3c> 2006160: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 2006164: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006168: 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 ) { 200616c: 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 ) ; 2006170: 80 a4 00 11 cmp %l0, %l1 2006174: 32 bf ff f9 bne,a 2006158 <_API_extensions_Run_predriver+0x24> 2006178: c2 04 20 08 ld [ %l0 + 8 ], %g1 200617c: 81 c7 e0 08 ret 2006180: 81 e8 00 00 restore 020085d4 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 20085d4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 20085d8: 03 00 80 6b sethi %hi(0x201ac00), %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 ); 20085dc: 7f ff ea 10 call 2002e1c 20085e0: e0 00 61 74 ld [ %g1 + 0x174 ], %l0 ! 201ad74 <_Thread_Executing> 20085e4: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 20085e8: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 20085ec: 80 a0 60 00 cmp %g1, 0 20085f0: 02 80 00 2d be 20086a4 <_CORE_RWLock_Release+0xd0> 20085f4: 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 ) { 20085f8: 22 80 00 23 be,a 2008684 <_CORE_RWLock_Release+0xb0> 20085fc: 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; 2008600: 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; 2008604: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 2008608: 7f ff ea 09 call 2002e2c 200860c: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 2008610: 40 00 06 42 call 2009f18 <_Thread_queue_Dequeue> 2008614: 90 10 00 18 mov %i0, %o0 if ( next ) { 2008618: 80 a2 20 00 cmp %o0, 0 200861c: 02 80 00 18 be 200867c <_CORE_RWLock_Release+0xa8> 2008620: 01 00 00 00 nop if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 2008624: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 2008628: 80 a0 60 01 cmp %g1, 1 200862c: 02 80 00 24 be 20086bc <_CORE_RWLock_Release+0xe8> 2008630: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2008634: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2008638: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 200863c: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 2008640: 10 80 00 0a b 2008668 <_CORE_RWLock_Release+0x94> 2008644: 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 || 2008648: 80 a0 60 01 cmp %g1, 1 200864c: 02 80 00 0c be 200867c <_CORE_RWLock_Release+0xa8> 2008650: 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; 2008654: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2008658: 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; 200865c: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 2008660: 40 00 07 54 call 200a3b0 <_Thread_queue_Extract> 2008664: 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 ); 2008668: 40 00 07 a3 call 200a4f4 <_Thread_queue_First> 200866c: 90 10 00 18 mov %i0, %o0 if ( !next || 2008670: 80 a2 20 00 cmp %o0, 0 2008674: 32 bf ff f5 bne,a 2008648 <_CORE_RWLock_Release+0x74> 2008678: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200867c: 81 c7 e0 08 ret 2008680: 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; 2008684: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 2008688: 80 a0 60 00 cmp %g1, 0 200868c: 02 bf ff dd be 2008600 <_CORE_RWLock_Release+0x2c> 2008690: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 2008694: 7f ff e9 e6 call 2002e2c 2008698: b0 10 20 00 clr %i0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 200869c: 81 c7 e0 08 ret 20086a0: 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 ); 20086a4: 7f ff e9 e2 call 2002e2c <== NOT EXECUTED 20086a8: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 20086ac: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 20086b0: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 20086b4: 81 c7 e0 08 ret <== NOT EXECUTED 20086b8: 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; 20086bc: 82 10 20 02 mov 2, %g1 20086c0: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 20086c4: 81 c7 e0 08 ret 20086c8: 91 e8 20 00 restore %g0, 0, %o0 02012720 <_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 ) { 2012720: 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 ) { 2012724: 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 ) { 2012728: 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 ) { 201272c: 80 a0 40 1a cmp %g1, %i2 2012730: 0a 80 00 17 bcs 201278c <_CORE_message_queue_Broadcast+0x6c> 2012734: 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 ) { 2012738: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 201273c: 80 a0 60 00 cmp %g1, 0 2012740: 02 80 00 0a be 2012768 <_CORE_message_queue_Broadcast+0x48> 2012744: a2 10 20 00 clr %l1 *count = 0; 2012748: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 201274c: 81 c7 e0 08 ret <== NOT EXECUTED 2012750: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2012754: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2012758: 40 00 23 db call 201b6c4 201275c: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 2012760: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 2012764: 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))) { 2012768: 40 00 0a 40 call 2015068 <_Thread_queue_Dequeue> 201276c: 90 10 00 12 mov %l2, %o0 2012770: 92 10 00 19 mov %i1, %o1 2012774: a0 10 00 08 mov %o0, %l0 2012778: 80 a2 20 00 cmp %o0, 0 201277c: 12 bf ff f6 bne 2012754 <_CORE_message_queue_Broadcast+0x34> 2012780: 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; 2012784: e2 27 40 00 st %l1, [ %i5 ] 2012788: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 201278c: 81 c7 e0 08 ret 2012790: 81 e8 00 00 restore 020149e0 <_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 ) { 20149e0: 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 ) { 20149e4: 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 ) { 20149e8: 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 ) { 20149ec: 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 ) { 20149f0: 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 ) { 20149f4: 0a 80 00 22 bcs 2014a7c <_CORE_message_queue_Submit+0x9c> 20149f8: 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 ) { 20149fc: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 2014a00: 80 a0 a0 00 cmp %g2, 0 2014a04: 02 80 00 22 be 2014a8c <_CORE_message_queue_Submit+0xac> 2014a08: 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 < 2014a0c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 2014a10: 80 a0 40 02 cmp %g1, %g2 2014a14: 18 80 00 2b bgu 2014ac0 <_CORE_message_queue_Submit+0xe0> 2014a18: 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 ) { 2014a1c: 02 80 00 18 be 2014a7c <_CORE_message_queue_Submit+0x9c> 2014a20: 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() ) { 2014a24: 03 00 80 a5 sethi %hi(0x2029400), %g1 2014a28: c4 00 60 00 ld [ %g1 ], %g2 2014a2c: 80 a0 a0 00 cmp %g2, 0 2014a30: 32 80 00 13 bne,a 2014a7c <_CORE_message_queue_Submit+0x9c> 2014a34: 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; 2014a38: 03 00 80 a5 sethi %hi(0x2029400), %g1 _ISR_Disable( level ); 2014a3c: 7f ff b6 e6 call 20025d4 2014a40: e0 00 60 24 ld [ %g1 + 0x24 ], %l0 ! 2029424 <_Thread_Executing> 2014a44: 82 10 20 01 mov 1, %g1 2014a48: 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; 2014a4c: 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; 2014a50: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 2014a54: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 2014a58: 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; 2014a5c: 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 ); 2014a60: 7f ff b6 e1 call 20025e4 2014a64: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 2014a68: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 2014a6c: 90 10 00 11 mov %l1, %o0 2014a70: 15 00 80 3b sethi %hi(0x200ec00), %o2 2014a74: 7f ff e7 56 call 200e7cc <_Thread_queue_Enqueue_with_handler> 2014a78: 94 12 a0 24 or %o2, 0x24, %o2 ! 200ec24 <_Thread_queue_Timeout> 2014a7c: 81 c7 e0 08 ret 2014a80: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 2014a84: 81 c7 e0 08 ret <== NOT EXECUTED 2014a88: 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 ); 2014a8c: 7f ff e6 ec call 200e63c <_Thread_queue_Dequeue> 2014a90: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 2014a94: a0 92 20 00 orcc %o0, 0, %l0 2014a98: 02 80 00 1b be 2014b04 <_CORE_message_queue_Submit+0x124> 2014a9c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2014aa0: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 2014aa4: 40 00 15 51 call 2019fe8 2014aa8: 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; 2014aac: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 2014ab0: 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; 2014ab4: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 2014ab8: 81 c7 e0 08 ret 2014abc: 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 *) 2014ac0: 7f ff df 9b call 200c92c <_Chain_Get> 2014ac4: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 2014ac8: a0 92 20 00 orcc %o0, 0, %l0 2014acc: 02 bf ff ee be 2014a84 <_CORE_message_queue_Submit+0xa4> 2014ad0: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 2014ad4: 94 10 00 1a mov %i2, %o2 2014ad8: 40 00 15 44 call 2019fe8 2014adc: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 2014ae0: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 2014ae4: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 2014ae8: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 2014aec: 92 10 00 10 mov %l0, %o1 2014af0: 94 10 00 1d mov %i5, %o2 2014af4: 40 00 0d 24 call 2017f84 <_CORE_message_queue_Insert_message> 2014af8: b0 10 20 00 clr %i0 2014afc: 81 c7 e0 08 ret 2014b00: 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 ) { 2014b04: 10 bf ff c2 b 2014a0c <_CORE_message_queue_Submit+0x2c> 2014b08: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 0200bfd0 <_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 ) { 200bfd0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 200bfd4: 03 00 80 60 sethi %hi(0x2018000), %g1 200bfd8: c6 00 62 94 ld [ %g1 + 0x294 ], %g3 ! 2018294 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 200bfdc: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 200bfe0: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 200bfe4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200bfe8: 80 a0 60 00 cmp %g1, 0 200bfec: 22 80 00 12 be,a 200c034 <_CORE_mutex_Seize_interrupt_trylock+0x64> 200bff0: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 200bff4: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 200bff8: 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; 200bffc: 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; 200c000: 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; 200c004: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 200c008: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 200c00c: 80 a0 a0 02 cmp %g2, 2 200c010: 02 80 00 0e be 200c048 <_CORE_mutex_Seize_interrupt_trylock+0x78> 200c014: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 200c018: 80 a0 a0 03 cmp %g2, 3 200c01c: 22 80 00 0d be,a 200c050 <_CORE_mutex_Seize_interrupt_trylock+0x80> 200c020: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 200c024: 7f ff d7 64 call 2001db4 200c028: b0 10 20 00 clr %i0 200c02c: 81 c7 e0 08 ret 200c030: 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 ) ) { 200c034: 80 a0 c0 01 cmp %g3, %g1 200c038: 22 80 00 2a be,a 200c0e0 <_CORE_mutex_Seize_interrupt_trylock+0x110> 200c03c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 200c040: 81 c7 e0 08 ret 200c044: 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++; 200c048: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200c04c: 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++; 200c050: 82 00 60 01 inc %g1 } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 200c054: 12 bf ff f4 bne 200c024 <_CORE_mutex_Seize_interrupt_trylock+0x54> 200c058: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 200c05c: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 current = executing->current_priority; 200c060: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 if ( current == ceiling ) { 200c064: 80 a0 80 01 cmp %g2, %g1 200c068: 02 80 00 2f be 200c124 <_CORE_mutex_Seize_interrupt_trylock+0x154> 200c06c: 01 00 00 00 nop _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 200c070: 1a 80 00 11 bcc 200c0b4 <_CORE_mutex_Seize_interrupt_trylock+0xe4> 200c074: 82 10 20 06 mov 6, %g1 ! 6 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200c078: 05 00 80 60 sethi %hi(0x2018000), %g2 200c07c: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> 200c080: 82 00 60 01 inc %g1 200c084: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 200c088: 7f ff d7 4b call 2001db4 200c08c: 01 00 00 00 nop _Thread_Change_priority( 200c090: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 200c094: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 200c098: 94 10 20 00 clr %o2 200c09c: 7f ff ed 26 call 2007534 <_Thread_Change_priority> 200c0a0: b0 10 20 00 clr %i0 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 200c0a4: 7f ff ee ba call 2007b8c <_Thread_Enable_dispatch> 200c0a8: 01 00 00 00 nop 200c0ac: 81 c7 e0 08 ret 200c0b0: 81 e8 00 00 restore return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 200c0b4: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 200c0b8: 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; 200c0bc: 84 10 20 01 mov 1, %g2 200c0c0: c4 26 20 50 st %g2, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 200c0c4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 200c0c8: 82 00 7f ff add %g1, -1, %g1 200c0cc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] _ISR_Enable( level ); 200c0d0: 7f ff d7 39 call 2001db4 200c0d4: b0 10 20 00 clr %i0 200c0d8: 81 c7 e0 08 ret 200c0dc: 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 ) { 200c0e0: 80 a0 60 00 cmp %g1, 0 200c0e4: 22 80 00 0a be,a 200c10c <_CORE_mutex_Seize_interrupt_trylock+0x13c> 200c0e8: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 200c0ec: 80 a0 60 01 cmp %g1, 1 200c0f0: 12 bf ff d4 bne 200c040 <_CORE_mutex_Seize_interrupt_trylock+0x70> 200c0f4: 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; 200c0f8: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] _ISR_Enable( level ); 200c0fc: 7f ff d7 2e call 2001db4 200c100: b0 10 20 00 clr %i0 200c104: 81 c7 e0 08 ret 200c108: 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++; 200c10c: 82 00 60 01 inc %g1 200c110: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 200c114: 7f ff d7 28 call 2001db4 200c118: b0 10 20 00 clr %i0 200c11c: 81 c7 e0 08 ret 200c120: 81 e8 00 00 restore Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 200c124: 7f ff d7 24 call 2001db4 <== NOT EXECUTED 200c128: b0 10 20 00 clr %i0 <== NOT EXECUTED 200c12c: 81 c7 e0 08 ret <== NOT EXECUTED 200c130: 81 e8 00 00 restore <== NOT EXECUTED 020065a4 <_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 ) { 20065a4: 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 ) { 20065a8: 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 ) { 20065ac: 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 ) { 20065b0: 80 a0 60 00 cmp %g1, 0 20065b4: 02 80 00 07 be 20065d0 <_CORE_mutex_Surrender+0x2c> 20065b8: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 20065bc: 03 00 80 60 sethi %hi(0x2018000), %g1 20065c0: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 2018294 <_Thread_Executing> 20065c4: 80 a2 00 02 cmp %o0, %g2 20065c8: 12 80 00 2e bne 2006680 <_CORE_mutex_Surrender+0xdc> 20065cc: 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 ) 20065d0: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 20065d4: 80 a0 60 00 cmp %g1, 0 20065d8: 02 80 00 22 be 2006660 <_CORE_mutex_Surrender+0xbc> 20065dc: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 20065e0: 80 a0 60 00 cmp %g1, 0 20065e4: 12 80 00 21 bne 2006668 <_CORE_mutex_Surrender+0xc4> 20065e8: 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; 20065ec: 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 ) || 20065f0: 80 a0 a0 02 cmp %g2, 2 20065f4: 02 80 00 31 be 20066b8 <_CORE_mutex_Surrender+0x114> 20065f8: 80 a0 a0 03 cmp %g2, 3 20065fc: 22 80 00 30 be,a 20066bc <_CORE_mutex_Surrender+0x118> 2006600: 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; 2006604: 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 ) || 2006608: 80 a0 a0 02 cmp %g2, 2 200660c: 02 80 00 1f be 2006688 <_CORE_mutex_Surrender+0xe4> 2006610: c0 24 20 60 clr [ %l0 + 0x60 ] 2006614: 80 a0 a0 03 cmp %g2, 3 2006618: 22 80 00 1d be,a 200668c <_CORE_mutex_Surrender+0xe8> 200661c: 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 ) ) ) { 2006620: 40 00 06 55 call 2007f74 <_Thread_queue_Dequeue> 2006624: 90 10 00 10 mov %l0, %o0 2006628: 86 92 20 00 orcc %o0, 0, %g3 200662c: 02 80 00 37 be 2006708 <_CORE_mutex_Surrender+0x164> 2006630: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 2006634: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 2006638: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 200663c: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 2006640: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 2006644: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 2006648: 80 a0 a0 02 cmp %g2, 2 200664c: 02 80 00 2a be 20066f4 <_CORE_mutex_Surrender+0x150> 2006650: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 2006654: 80 a0 a0 03 cmp %g2, 3 2006658: 22 80 00 1c be,a 20066c8 <_CORE_mutex_Surrender+0x124> 200665c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 2006660: 81 c7 e0 08 ret 2006664: 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 ) { 2006668: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 200666c: 80 a0 60 00 cmp %g1, 0 2006670: 02 bf ff fc be 2006660 <_CORE_mutex_Surrender+0xbc> 2006674: 80 a0 60 01 cmp %g1, 1 2006678: 12 bf ff dd bne 20065ec <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 200667c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 2006680: 81 c7 e0 08 ret 2006684: 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 && 2006688: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 200668c: 80 a0 60 00 cmp %g1, 0 2006690: 12 bf ff e4 bne 2006620 <_CORE_mutex_Surrender+0x7c> 2006694: 01 00 00 00 nop 2006698: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 200669c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 20066a0: 80 a2 40 01 cmp %o1, %g1 20066a4: 02 bf ff df be 2006620 <_CORE_mutex_Surrender+0x7c> 20066a8: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 20066ac: 40 00 03 a2 call 2007534 <_Thread_Change_priority> 20066b0: 94 10 20 01 mov 1, %o2 ! 1 20066b4: 30 bf ff db b,a 2006620 <_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--; 20066b8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 20066bc: 82 00 7f ff add %g1, -1, %g1 20066c0: 10 bf ff d1 b 2006604 <_CORE_mutex_Surrender+0x60> 20066c4: 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 < 20066c8: 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++; 20066cc: 82 00 60 01 inc %g1 20066d0: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 20066d4: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 20066d8: 80 a2 40 02 cmp %o1, %g2 20066dc: 1a bf ff e1 bcc 2006660 <_CORE_mutex_Surrender+0xbc> 20066e0: 94 10 20 00 clr %o2 the_thread->current_priority){ _Thread_Change_priority( 20066e4: 40 00 03 94 call 2007534 <_Thread_Change_priority> 20066e8: b0 10 20 00 clr %i0 20066ec: 81 c7 e0 08 ret 20066f0: 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++; 20066f4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 20066f8: 82 00 60 01 inc %g1 20066fc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 2006700: 81 c7 e0 08 ret 2006704: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 2006708: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 200670c: 81 c7 e0 08 ret 2006710: 91 e8 20 00 restore %g0, 0, %o0 02007144 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 2007144: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 2007148: 7f ff ec ee call 2002500 200714c: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 2007150: c2 06 20 04 ld [ %i0 + 4 ], %g1 2007154: 80 a0 60 00 cmp %g1, 0 2007158: 02 80 00 0c be 2007188 <_CORE_spinlock_Release+0x44> 200715c: 03 00 80 50 sethi %hi(0x2014000), %g1 } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 2007160: c4 00 61 24 ld [ %g1 + 0x124 ], %g2 ! 2014124 <_Thread_Executing> 2007164: c6 06 20 0c ld [ %i0 + 0xc ], %g3 2007168: c2 00 a0 08 ld [ %g2 + 8 ], %g1 200716c: 80 a0 c0 01 cmp %g3, %g1 2007170: 02 80 00 0a be 2007198 <_CORE_spinlock_Release+0x54> 2007174: 01 00 00 00 nop _ISR_Enable( level ); 2007178: 7f ff ec e6 call 2002510 <== NOT EXECUTED 200717c: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 2007180: 81 c7 e0 08 ret <== NOT EXECUTED 2007184: 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 ); 2007188: 7f ff ec e2 call 2002510 200718c: b0 10 20 06 mov 6, %i0 2007190: 81 c7 e0 08 ret 2007194: 81 e8 00 00 restore } /* * Let it be unlocked. */ the_spinlock->users -= 1; 2007198: c2 06 20 08 ld [ %i0 + 8 ], %g1 200719c: 82 00 7f ff add %g1, -1, %g1 20071a0: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 20071a4: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 20071a8: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 20071ac: 7f ff ec d9 call 2002510 20071b0: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 20071b4: 81 c7 e0 08 ret 20071b8: 81 e8 00 00 restore 020071bc <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 20071bc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 20071c0: 05 00 80 50 sethi %hi(0x2014000), %g2 20071c4: c2 00 a1 b4 ld [ %g2 + 0x1b4 ], %g1 ! 20141b4 <_Watchdog_Ticks_since_boot> 20071c8: a2 10 a1 b4 or %g2, 0x1b4, %l1 _ISR_Disable( level ); 20071cc: 7f ff ec cd call 2002500 20071d0: a0 06 80 01 add %i2, %g1, %l0 20071d4: 88 10 00 08 mov %o0, %g4 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 20071d8: c2 06 20 04 ld [ %i0 + 4 ], %g1 20071dc: 80 a0 60 01 cmp %g1, 1 20071e0: 02 80 00 34 be 20072b0 <_CORE_spinlock_Wait+0xf4> 20071e4: 03 00 80 50 sethi %hi(0x2014000), %g1 (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 20071e8: c2 06 20 08 ld [ %i0 + 8 ], %g1 20071ec: 82 00 60 01 inc %g1 20071f0: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 20071f4: c4 06 20 04 ld [ %i0 + 4 ], %g2 20071f8: 80 a0 a0 00 cmp %g2, 0 20071fc: 02 80 00 1a be 2007264 <_CORE_spinlock_Wait+0xa8> 2007200: 80 8e 60 ff btst 0xff, %i1 2007204: 03 00 80 50 sethi %hi(0x2014000), %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 2007208: 02 80 00 22 be 2007290 <_CORE_spinlock_Wait+0xd4> 200720c: b2 10 60 60 or %g1, 0x60, %i1 ! 2014060 <_Thread_Dispatch_disable_level> } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 2007210: 80 a6 a0 00 cmp %i2, 0 2007214: 02 80 00 06 be 200722c <_CORE_spinlock_Wait+0x70> 2007218: 01 00 00 00 nop 200721c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 2007220: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 2007224: 08 80 00 2d bleu 20072d8 <_CORE_spinlock_Wait+0x11c> <== NOT EXECUTED 2007228: 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 ); 200722c: 7f ff ec b9 call 2002510 2007230: 90 10 00 04 mov %g4, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 2007234: 40 00 04 f5 call 2008608 <_Thread_Enable_dispatch> 2007238: 01 00 00 00 nop 200723c: c2 06 40 00 ld [ %i1 ], %g1 2007240: 82 00 60 01 inc %g1 2007244: 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 ); 2007248: 7f ff ec ae call 2002500 200724c: 01 00 00 00 nop 2007250: 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 ) { 2007254: c2 06 20 04 ld [ %i0 + 4 ], %g1 2007258: 80 a0 60 00 cmp %g1, 0 200725c: 12 bf ff ee bne 2007214 <_CORE_spinlock_Wait+0x58> 2007260: 80 a6 a0 00 cmp %i2, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 2007264: 03 00 80 50 sethi %hi(0x2014000), %g1 2007268: c6 00 61 24 ld [ %g1 + 0x124 ], %g3 ! 2014124 <_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; 200726c: 84 10 20 01 mov 1, %g2 2007270: c4 26 20 04 st %g2, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 2007274: c2 00 e0 08 ld [ %g3 + 8 ], %g1 2007278: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 200727c: b0 10 20 00 clr %i0 2007280: 7f ff ec a4 call 2002510 2007284: 90 10 00 04 mov %g4, %o0 2007288: 81 c7 e0 08 ret 200728c: 81 e8 00 00 restore /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 2007290: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 2007294: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2007298: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 200729c: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 20072a0: 7f ff ec 9c call 2002510 <== NOT EXECUTED 20072a4: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 20072a8: 81 c7 e0 08 ret <== NOT EXECUTED 20072ac: 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) && 20072b0: c4 00 61 24 ld [ %g1 + 0x124 ], %g2 20072b4: c6 06 20 0c ld [ %i0 + 0xc ], %g3 20072b8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 20072bc: 80 a0 c0 01 cmp %g3, %g1 20072c0: 12 bf ff ca bne 20071e8 <_CORE_spinlock_Wait+0x2c> 20072c4: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 20072c8: 7f ff ec 92 call 2002510 20072cc: b0 10 20 01 mov 1, %i0 ! 1 20072d0: 81 c7 e0 08 ret 20072d4: 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; 20072d8: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 20072dc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20072e0: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 20072e4: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 20072e8: 7f ff ec 8a call 2002510 <== NOT EXECUTED 20072ec: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 20072f0: 81 c7 e0 08 ret <== NOT EXECUTED 20072f4: 81 e8 00 00 restore <== NOT EXECUTED 02024634 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 2024634: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 2024638: 7f ff 79 e9 call 2002ddc <== NOT EXECUTED 202463c: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2024640: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2024644: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 2024648: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 202464c: 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; 2024650: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 2024654: 7f ff 79 e6 call 2002dec <== NOT EXECUTED 2024658: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 202465c: 01 00 00 00 nop 0200be90 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 200be90: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED 200be94: c4 00 62 98 ld [ %g1 + 0x298 ], %g2 ! 2018298 <_Debug_Level> <== NOT EXECUTED 200be98: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED 200be9c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 200bea0: 81 c3 e0 08 retl <== NOT EXECUTED 200bea4: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 020052e4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 20052e4: 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 ]; 20052e8: f2 06 21 68 ld [ %i0 + 0x168 ], %i1 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 20052ec: 7f ff f2 ae call 2001da4 20052f0: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 20052f4: a0 10 00 08 mov %o0, %l0 pending_events = api->pending_events; 20052f8: c8 06 40 00 ld [ %i1 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 20052fc: 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 ) ) { 2005300: 9a 88 c0 04 andcc %g3, %g4, %o5 2005304: 02 80 00 28 be 20053a4 <_Event_Surrender+0xc0> 2005308: 03 00 80 60 sethi %hi(0x2018000), %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() && 200530c: c4 00 62 70 ld [ %g1 + 0x270 ], %g2 ! 2018270 <_ISR_Nest_level> 2005310: 80 a0 a0 00 cmp %g2, 0 2005314: 22 80 00 08 be,a 2005334 <_Event_Surrender+0x50> 2005318: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200531c: 03 00 80 60 sethi %hi(0x2018000), %g1 2005320: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 2018294 <_Thread_Executing> 2005324: 80 a6 00 02 cmp %i0, %g2 2005328: 02 80 00 2a be 20053d0 <_Event_Surrender+0xec> 200532c: 19 00 80 62 sethi %hi(0x2018800), %o4 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 2005330: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2005334: 80 88 61 00 btst 0x100, %g1 2005338: 02 80 00 19 be 200539c <_Event_Surrender+0xb8> 200533c: 80 a0 c0 0d cmp %g3, %o5 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 2005340: 02 80 00 04 be 2005350 <_Event_Surrender+0x6c> 2005344: 80 8c 60 02 btst 2, %l1 2005348: 02 80 00 15 be 200539c <_Event_Surrender+0xb8> 200534c: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 2005350: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005354: 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 ); 2005358: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 200535c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005360: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 2005364: 7f ff f2 94 call 2001db4 2005368: 90 10 00 10 mov %l0, %o0 200536c: 7f ff f2 8e call 2001da4 2005370: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 2005374: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2005378: 80 a0 60 02 cmp %g1, 2 200537c: 02 80 00 0c be 20053ac <_Event_Surrender+0xc8> 2005380: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 2005384: 90 10 00 10 mov %l0, %o0 2005388: 7f ff f2 8b call 2001db4 200538c: 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 ); 2005390: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 2005394: 40 00 08 e5 call 2007728 <_Thread_Clear_state> 2005398: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 200539c: 7f ff f2 86 call 2001db4 <== NOT EXECUTED 20053a0: 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 ); 20053a4: 7f ff f2 84 call 2001db4 20053a8: 91 e8 00 08 restore %g0, %o0, %o0 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 20053ac: 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 ); 20053b0: 7f ff f2 81 call 2001db4 20053b4: 90 10 00 10 mov %l0, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 20053b8: 40 00 0f 16 call 2009010 <_Watchdog_Remove> 20053bc: 90 06 20 48 add %i0, 0x48, %o0 20053c0: 33 04 00 ff sethi %hi(0x1003fc00), %i1 20053c4: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 20053c8: 40 00 08 d8 call 2007728 <_Thread_Clear_state> 20053cc: 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() && 20053d0: c2 03 22 f0 ld [ %o4 + 0x2f0 ], %g1 20053d4: 80 a0 60 01 cmp %g1, 1 20053d8: 02 80 00 07 be 20053f4 <_Event_Surrender+0x110> 20053dc: 80 a0 c0 0d cmp %g3, %o5 20053e0: c2 03 22 f0 ld [ %o4 + 0x2f0 ], %g1 <== NOT EXECUTED 20053e4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 20053e8: 32 bf ff d3 bne,a 2005334 <_Event_Surrender+0x50> <== NOT EXECUTED 20053ec: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED _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) ) { 20053f0: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED 20053f4: 02 80 00 04 be 2005404 <_Event_Surrender+0x120> 20053f8: 80 8c 60 02 btst 2, %l1 20053fc: 02 80 00 09 be 2005420 <_Event_Surrender+0x13c> <== NOT EXECUTED 2005400: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 2005404: 82 29 00 0d andn %g4, %o5, %g1 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 2005408: 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 ); 200540c: c2 26 40 00 st %g1, [ %i1 ] the_thread->Wait.count = 0; 2005410: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 2005414: 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; 2005418: da 20 80 00 st %o5, [ %g2 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 200541c: c2 23 22 f0 st %g1, [ %o4 + 0x2f0 ] } _ISR_Enable( level ); 2005420: 7f ff f2 65 call 2001db4 2005424: 91 e8 00 10 restore %g0, %l0, %o0 2005428: 01 00 00 00 nop 0200542c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 200542c: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 2005430: 90 10 00 18 mov %i0, %o0 2005434: 40 00 09 e4 call 2007bc4 <_Thread_Get> 2005438: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 200543c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2005440: 80 a0 60 00 cmp %g1, 0 2005444: 12 80 00 19 bne 20054a8 <_Event_Timeout+0x7c> 2005448: 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 ); 200544c: 7f ff f2 56 call 2001da4 2005450: 01 00 00 00 nop 2005454: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 2005458: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200545c: 80 a0 60 00 cmp %g1, 0 2005460: 02 80 00 14 be 20054b0 <_Event_Timeout+0x84> 2005464: 03 00 80 60 sethi %hi(0x2018000), %g1 _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 2005468: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 2018294 <_Thread_Executing> 200546c: 80 a6 00 02 cmp %i0, %g2 2005470: 02 80 00 18 be 20054d0 <_Event_Timeout+0xa4> 2005474: 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; 2005478: 82 10 20 06 mov 6, %g1 200547c: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 2005480: 7f ff f2 4d call 2001db4 2005484: 90 10 00 03 mov %g3, %o0 2005488: 90 10 00 18 mov %i0, %o0 200548c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2005490: 40 00 08 a6 call 2007728 <_Thread_Clear_state> 2005494: 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; 2005498: 05 00 80 60 sethi %hi(0x2018000), %g2 200549c: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> 20054a0: 82 00 7f ff add %g1, -1, %g1 20054a4: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] 20054a8: 81 c7 e0 08 ret 20054ac: 81 e8 00 00 restore 20054b0: 05 00 80 60 sethi %hi(0x2018000), %g2 <== NOT EXECUTED 20054b4: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 20054b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20054bc: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 20054c0: 7f ff f2 3d call 2001db4 <== NOT EXECUTED 20054c4: 01 00 00 00 nop <== NOT EXECUTED 20054c8: 81 c7 e0 08 ret <== NOT EXECUTED 20054cc: 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; 20054d0: 05 00 80 62 sethi %hi(0x2018800), %g2 20054d4: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 2018af0 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 20054d8: 80 a0 60 01 cmp %g1, 1 20054dc: 38 bf ff e8 bgu,a 200547c <_Event_Timeout+0x50> 20054e0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 20054e4: 82 10 20 02 mov 2, %g1 20054e8: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 20054ec: 10 bf ff e4 b 200547c <_Event_Timeout+0x50> 20054f0: 82 10 20 06 mov 6, %g1 02008b38 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 2008b38: 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; 2008b3c: 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); 2008b40: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2008b44: 90 10 00 19 mov %i1, %o0 2008b48: 92 10 00 16 mov %l6, %o1 2008b4c: 40 00 01 82 call 2009154 <_Heap_Calc_block_size> 2008b50: aa 10 00 18 mov %i0, %l5 if(the_size == 0) 2008b54: ae 92 20 00 orcc %o0, 0, %l7 2008b58: 02 80 00 69 be 2008cfc <_Heap_Allocate_aligned+0x1c4> 2008b5c: b2 06 7f fc add %i1, -4, %i1 return NULL; if(alignment == 0) 2008b60: 80 a6 a0 00 cmp %i2, 0 2008b64: 22 80 00 02 be,a 2008b6c <_Heap_Allocate_aligned+0x34> 2008b68: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 2008b6c: 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; 2008b70: 80 a5 40 11 cmp %l5, %l1 2008b74: 02 80 00 62 be 2008cfc <_Heap_Allocate_aligned+0x1c4> 2008b78: 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); 2008b7c: c2 04 60 04 ld [ %l1 + 4 ], %g1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008b80: 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); 2008b84: 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; 2008b88: 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. */ 2008b8c: 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; 2008b90: 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. */ 2008b94: 18 80 00 22 bgu 2008c1c <_Heap_Allocate_aligned+0xe4> 2008b98: 90 10 00 10 mov %l0, %o0 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 2008b9c: 40 00 40 a5 call 2018e30 <.urem> 2008ba0: 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)); 2008ba4: 92 10 00 16 mov %l6, %o1 2008ba8: b0 24 00 08 sub %l0, %o0, %i0 2008bac: 40 00 40 a1 call 2018e30 <.urem> 2008bb0: 90 10 00 18 mov %i0, %o0 2008bb4: a0 04 60 08 add %l1, 8, %l0 2008bb8: 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) { 2008bbc: 80 a4 00 02 cmp %l0, %g2 2008bc0: 38 80 00 18 bgu,a 2008c20 <_Heap_Allocate_aligned+0xe8> 2008bc4: 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) { 2008bc8: fa 05 60 14 ld [ %l5 + 0x14 ], %i5 2008bcc: 82 20 80 10 sub %g2, %l0, %g1 2008bd0: 80 a0 40 1d cmp %g1, %i5 2008bd4: 1a 80 00 1e bcc 2008c4c <_Heap_Allocate_aligned+0x114> 2008bd8: 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) { 2008bdc: 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; 2008be0: 90 10 00 10 mov %l0, %o0 2008be4: 92 10 00 1a mov %i2, %o1 2008be8: 80 a5 80 01 cmp %l6, %g1 2008bec: 18 80 00 17 bgu 2008c48 <_Heap_Allocate_aligned+0x110> 2008bf0: 84 10 00 10 mov %l0, %g2 2008bf4: 40 00 40 8f call 2018e30 <.urem> <== NOT EXECUTED 2008bf8: 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) { 2008bfc: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED *value = r ? v - r + a : v; 2008c00: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED 2008c04: 86 10 20 00 clr %g3 <== NOT EXECUTED 2008c08: 12 80 00 35 bne 2008cdc <_Heap_Allocate_aligned+0x1a4> <== NOT EXECUTED 2008c0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2008c10: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 2008c14: 38 80 00 0d bgu,a 2008c48 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 2008c18: 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) 2008c1c: 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; 2008c20: 80 a5 40 11 cmp %l5, %l1 2008c24: 12 bf ff d6 bne 2008b7c <_Heap_Allocate_aligned+0x44> 2008c28: a8 05 20 01 inc %l4 2008c2c: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 2008c30: c2 05 60 44 ld [ %l5 + 0x44 ], %g1 2008c34: 80 a0 40 14 cmp %g1, %l4 2008c38: 2a 80 00 02 bcs,a 2008c40 <_Heap_Allocate_aligned+0x108> 2008c3c: e8 25 60 44 st %l4, [ %l5 + 0x44 ] stats->max_search = search_count; return user_ptr; } 2008c40: 81 c7 e0 08 ret 2008c44: 91 e8 00 08 restore %g0, %o0, %o0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 2008c48: 80 a6 20 00 cmp %i0, 0 2008c4c: 22 bf ff f5 be,a 2008c20 <_Heap_Allocate_aligned+0xe8> 2008c50: 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; 2008c54: 82 04 e0 08 add %l3, 8, %g1 2008c58: 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; 2008c5c: 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) { 2008c60: 80 a0 80 1d cmp %g2, %i5 2008c64: 2a 80 00 29 bcs,a 2008d08 <_Heap_Allocate_aligned+0x1d0> 2008c68: 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; 2008c6c: 82 10 a0 01 or %g2, 1, %g1 2008c70: 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); 2008c74: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 2008c78: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 2008c7c: 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 ); 2008c80: 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; 2008c84: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2008c88: 82 10 60 01 or %g1, 1, %g1 2008c8c: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 2008c90: c6 05 60 30 ld [ %l5 + 0x30 ], %g3 if(stats->min_free_size > stats->free_size) 2008c94: 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; 2008c98: 86 20 c0 04 sub %g3, %g4, %g3 if(stats->min_free_size > stats->free_size) 2008c9c: 80 a0 c0 01 cmp %g3, %g1 2008ca0: 1a 80 00 03 bcc 2008cac <_Heap_Allocate_aligned+0x174> 2008ca4: c6 25 60 30 st %g3, [ %l5 + 0x30 ] stats->min_free_size = stats->free_size; 2008ca8: c6 25 60 34 st %g3, [ %l5 + 0x34 ] stats->used_blocks += 1; 2008cac: 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; 2008cb0: c6 05 60 4c ld [ %l5 + 0x4c ], %g3 stats->allocs += 1; 2008cb4: 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; 2008cb8: 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; 2008cbc: 86 00 e0 01 inc %g3 stats->allocs += 1; 2008cc0: 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; 2008cc4: 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; 2008cc8: 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; 2008ccc: 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; 2008cd0: 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; 2008cd4: 10 bf ff d7 b 2008c30 <_Heap_Allocate_aligned+0xf8> 2008cd8: 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; 2008cdc: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED 2008ce0: 90 20 40 04 sub %g1, %g4, %o0 <== NOT EXECUTED 2008ce4: 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) { 2008ce8: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED 2008cec: 28 bf ff cd bleu,a 2008c20 <_Heap_Allocate_aligned+0xe8> <== NOT EXECUTED 2008cf0: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED 2008cf4: 10 bf ff d5 b 2008c48 <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED 2008cf8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } } } if(stats->max_search < search_count) stats->max_search = search_count; 2008cfc: 90 10 20 00 clr %o0 <== NOT EXECUTED return user_ptr; } 2008d00: 81 c7 e0 08 ret <== NOT EXECUTED 2008d04: 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; 2008d08: 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; 2008d0c: c2 05 60 38 ld [ %l5 + 0x38 ], %g1 prev->next = next; next->prev = prev; 2008d10: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 2008d14: 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; 2008d18: c6 20 a0 08 st %g3, [ %g2 + 8 ] 2008d1c: c2 25 60 38 st %g1, [ %l5 + 0x38 ] 2008d20: 10 bf ff d8 b 2008c80 <_Heap_Allocate_aligned+0x148> 2008d24: 88 10 00 12 mov %l2, %g4 0202fc4c <_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; 202fc4c: 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; 202fc50: 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; 202fc54: c0 22 40 00 clr [ %o1 ] the_info->Free.total = 0; 202fc58: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 202fc5c: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 202fc60: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 202fc64: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; while ( the_block != end ) { 202fc68: 80 a0 40 0b cmp %g1, %o3 202fc6c: 02 80 00 26 be 202fd04 <_Heap_Get_information+0xb8> 202fc70: c0 22 60 10 clr [ %o1 + 0x10 ] 202fc74: 10 80 00 0e b 202fcac <_Heap_Get_information+0x60> 202fc78: 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; 202fc7c: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 202fc80: 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++; 202fc84: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 202fc88: 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++; 202fc8c: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 202fc90: 80 a0 c0 04 cmp %g3, %g4 202fc94: 1a 80 00 03 bcc 202fca0 <_Heap_Get_information+0x54> 202fc98: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 202fc9c: 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 ) { 202fca0: 80 a2 c0 0d cmp %o3, %o5 202fca4: 02 80 00 18 be 202fd04 <_Heap_Get_information+0xb8> 202fca8: 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); 202fcac: 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 ); 202fcb0: 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); 202fcb4: 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) ) { 202fcb8: 80 8b 20 01 btst 1, %o4 202fcbc: 32 bf ff f0 bne,a 202fc7c <_Heap_Get_information+0x30> 202fcc0: 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++; 202fcc4: c2 02 40 00 ld [ %o1 ], %g1 the_info->Free.total += the_size; 202fcc8: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 202fccc: 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++; 202fcd0: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 202fcd4: 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++; 202fcd8: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 202fcdc: 80 a0 c0 04 cmp %g3, %g4 202fce0: 1a 80 00 03 bcc 202fcec <_Heap_Get_information+0xa0> 202fce4: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 202fce8: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 202fcec: c2 03 40 00 ld [ %o5 ], %g1 202fcf0: 80 a0 40 04 cmp %g1, %g4 202fcf4: 02 bf ff ec be 202fca4 <_Heap_Get_information+0x58> 202fcf8: 80 a2 c0 0d cmp %o3, %o5 202fcfc: 81 c3 e0 08 retl <== NOT EXECUTED 202fd00: 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; 202fd04: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 202fd08: 90 10 20 00 clr %o0 202fd0c: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 202fd10: 81 c3 e0 08 retl 202fd14: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 020159c0 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 20159c0: 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; 20159c4: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 uint32_t const page_size = the_heap->page_size; 20159c8: ea 06 20 10 ld [ %i0 + 0x10 ], %l5 *old_mem_size = 0; 20159cc: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 20159d0: 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); 20159d4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 20159d8: 7f ff fb 8e call 2014810 <.urem> 20159dc: 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 ); 20159e0: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 20159e4: 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); 20159e8: 82 06 7f f8 add %i1, -8, %g1 20159ec: 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)) 20159f0: 80 a4 40 04 cmp %l1, %g4 20159f4: 84 60 3f ff subx %g0, -1, %g2 20159f8: 80 a0 c0 11 cmp %g3, %l1 20159fc: 82 60 3f ff subx %g0, -1, %g1 2015a00: 80 88 80 01 btst %g2, %g1 2015a04: 02 80 00 2f be 2015ac0 <_Heap_Resize_block+0x100> 2015a08: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 2015a0c: 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); 2015a10: 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 ); 2015a14: 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) || 2015a18: 80 a4 80 04 cmp %l2, %g4 2015a1c: 84 60 3f ff subx %g0, -1, %g2 2015a20: 80 a0 c0 12 cmp %g3, %l2 2015a24: 82 60 3f ff subx %g0, -1, %g1 2015a28: 80 88 80 01 btst %g2, %g1 2015a2c: 02 80 00 25 be 2015ac0 <_Heap_Resize_block+0x100> 2015a30: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2015a34: c2 04 a0 04 ld [ %l2 + 4 ], %g1 2015a38: 80 88 60 01 btst 1, %g1 2015a3c: 02 80 00 21 be 2015ac0 <_Heap_Resize_block+0x100> 2015a40: 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) || 2015a44: 80 a0 c0 12 cmp %g3, %l2 2015a48: a8 10 20 01 mov 1, %l4 2015a4c: 02 80 00 04 be 2015a5c <_Heap_Resize_block+0x9c> 2015a50: 82 04 80 17 add %l2, %l7, %g1 2015a54: c2 00 60 04 ld [ %g1 + 4 ], %g1 2015a58: 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) 2015a5c: 82 24 80 19 sub %l2, %i1, %g1 2015a60: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 2015a64: c2 26 c0 00 st %g1, [ %i3 ] if (size > old_user_size) { 2015a68: 80 a0 40 1a cmp %g1, %i2 2015a6c: 1a 80 00 17 bcc 2015ac8 <_Heap_Resize_block+0x108> 2015a70: 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 */ 2015a74: 80 8d 20 ff btst 0xff, %l4 2015a78: 12 80 00 10 bne 2015ab8 <_Heap_Resize_block+0xf8> 2015a7c: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 2015a80: 92 10 00 15 mov %l5, %o1 2015a84: 7f ff fb 63 call 2014810 <.urem> 2015a88: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 2015a8c: 80 a2 20 00 cmp %o0, 0 2015a90: 02 80 00 05 be 2015aa4 <_Heap_Resize_block+0xe4> 2015a94: 80 a4 00 16 cmp %l0, %l6 2015a98: 82 04 00 15 add %l0, %l5, %g1 2015a9c: a0 20 40 08 sub %g1, %o0, %l0 2015aa0: 80 a4 00 16 cmp %l0, %l6 2015aa4: 0a 80 00 2e bcs 2015b5c <_Heap_Resize_block+0x19c> 2015aa8: 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) 2015aac: 80 a5 c0 08 cmp %l7, %o0 2015ab0: 1a 80 00 32 bcc 2015b78 <_Heap_Resize_block+0x1b8> 2015ab4: 94 10 00 08 mov %o0, %o2 } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } 2015ab8: 81 c7 e0 08 ret 2015abc: 91 e8 20 01 restore %g0, 1, %o0 } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 2015ac0: 81 c7 e0 08 ret 2015ac4: 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; 2015ac8: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 2015acc: 92 10 00 15 mov %l5, %o1 2015ad0: 7f ff fb 50 call 2014810 <.urem> 2015ad4: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 2015ad8: a0 a4 00 08 subcc %l0, %o0, %l0 2015adc: 22 80 00 1c be,a 2015b4c <_Heap_Resize_block+0x18c> 2015ae0: 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; 2015ae4: 84 26 00 10 sub %i0, %l0, %g2 if (new_block_size < min_block_size) { 2015ae8: 80 a5 80 02 cmp %l6, %g2 2015aec: 18 80 00 1e bgu 2015b64 <_Heap_Resize_block+0x1a4> 2015af0: 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) { 2015af4: 80 8d 20 ff btst 0xff, %l4 2015af8: 12 80 00 2a bne 2015ba0 <_Heap_Resize_block+0x1e0> 2015afc: 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; 2015b00: 82 10 80 1b or %g2, %i3, %g1 2015b04: 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 ); 2015b08: 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; 2015b0c: 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; 2015b10: 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; 2015b14: 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; 2015b18: 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; 2015b1c: 84 11 20 01 or %g4, 1, %g2 2015b20: 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; 2015b24: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 2015b28: da 20 e0 08 st %o5, [ %g3 + 8 ] 2015b2c: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 2015b30: d8 20 e0 0c st %o4, [ %g3 + 0xc ] 2015b34: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 2015b38: 88 01 3f fc add %g4, -4, %g4 next->prev = prev->next = block; 2015b3c: c6 23 60 0c st %g3, [ %o5 + 0xc ] 2015b40: c6 23 20 08 st %g3, [ %o4 + 8 ] 2015b44: c8 27 00 00 st %g4, [ %i4 ] *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 2015b48: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 2015b4c: 82 00 60 01 inc %g1 2015b50: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 2015b54: 81 c7 e0 08 ret 2015b58: 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; 2015b5c: 10 bf ff d4 b 2015aac <_Heap_Resize_block+0xec> 2015b60: 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) { 2015b64: a0 a4 00 01 subcc %l0, %g1, %l0 2015b68: 12 bf ff e3 bne 2015af4 <_Heap_Resize_block+0x134> 2015b6c: 84 00 80 01 add %g2, %g1, %g2 *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 2015b70: 10 bf ff f7 b 2015b4c <_Heap_Resize_block+0x18c> 2015b74: 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 = 2015b78: 92 10 00 12 mov %l2, %o1 2015b7c: 7f ff c3 bd call 2006a70 <_Heap_Block_allocate> 2015b80: 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; 2015b84: 90 02 00 18 add %o0, %i0, %o0 2015b88: 90 12 00 1b or %o0, %i3, %o0 2015b8c: d0 24 60 04 st %o0, [ %l1 + 4 ] --stats->used_blocks; 2015b90: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 2015b94: 82 00 7f ff add %g1, -1, %g1 2015b98: 10 bf ff ec b 2015b48 <_Heap_Resize_block+0x188> 2015b9c: 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) { 2015ba0: 38 bf ff eb bgu,a 2015b4c <_Heap_Resize_block+0x18c> <== NOT EXECUTED 2015ba4: 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; 2015ba8: 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 ); 2015bac: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED 2015bb0: 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; 2015bb4: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED 2015bb8: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 2015bbc: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2015bc0: 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 */ 2015bc4: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2015bc8: 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 */ 2015bcc: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 2015bd0: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 2015bd4: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 2015bd8: 7f ff d9 b2 call 200c2a0 <_Heap_Free> <== NOT EXECUTED 2015bdc: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 2015be0: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 2015be4: 10 bf ff d9 b 2015b48 <_Heap_Resize_block+0x188> <== NOT EXECUTED 2015be8: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 0200eeb4 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 200eeb4: 9d e3 bf 98 save %sp, -104, %sp /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200eeb8: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 200eebc: e2 06 20 20 ld [ %i0 + 0x20 ], %l1 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 200eec0: 06 80 00 8c bl 200f0f0 <_Heap_Walk+0x23c> 200eec4: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 200eec8: c2 04 60 04 ld [ %l1 + 4 ], %g1 200eecc: 80 88 60 01 btst 1, %g1 200eed0: 02 80 00 81 be 200f0d4 <_Heap_Walk+0x220> 200eed4: 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) { 200eed8: c4 04 40 00 ld [ %l1 ], %g2 200eedc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200eee0: 80 a0 80 01 cmp %g2, %g1 200eee4: 02 80 00 08 be 200ef04 <_Heap_Walk+0x50> 200eee8: 80 a4 40 16 cmp %l1, %l6 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 200eeec: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200eef0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200eef4: 90 12 21 98 or %o0, 0x198, %o0 <== NOT EXECUTED 200eef8: 7f ff d7 53 call 2004c44 <== NOT EXECUTED 200eefc: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 200ef00: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED 200ef04: 22 80 00 63 be,a 200f090 <_Heap_Walk+0x1dc> 200ef08: 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)) { 200ef0c: 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); 200ef10: c8 04 60 04 ld [ %l1 + 4 ], %g4 200ef14: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200ef18: 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 ); 200ef1c: a0 04 40 12 add %l1, %l2, %l0 200ef20: 80 a4 00 01 cmp %l0, %g1 200ef24: 84 60 3f ff subx %g0, -1, %g2 200ef28: 80 a0 c0 10 cmp %g3, %l0 200ef2c: 82 60 3f ff subx %g0, -1, %g1 200ef30: 80 88 80 01 btst %g2, %g1 200ef34: 02 80 00 77 be 200f110 <_Heap_Walk+0x25c> 200ef38: 03 00 80 6b sethi %hi(0x201ac00), %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); 200ef3c: 05 00 80 6f sethi %hi(0x201bc00), %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"); 200ef40: ba 10 63 d8 or %g1, 0x3d8, %i5 printk("PASS: %d !the_block not in the free list", source); 200ef44: ae 10 a2 58 or %g2, 0x258, %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); 200ef48: 03 00 80 6f sethi %hi(0x201bc00), %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); 200ef4c: 05 00 80 6f sethi %hi(0x201bc00), %g2 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 200ef50: 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); 200ef54: b8 10 62 28 or %g1, 0x228, %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); 200ef58: b6 10 a1 f8 or %g2, 0x1f8, %i3 200ef5c: 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)) { 200ef60: c2 04 20 04 ld [ %l0 + 4 ], %g1 200ef64: 80 88 60 01 btst 1, %g1 200ef68: 12 80 00 20 bne 200efe8 <_Heap_Walk+0x134> 200ef6c: 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) { 200ef70: c2 04 00 00 ld [ %l0 ], %g1 200ef74: 80 a0 40 12 cmp %g1, %l2 200ef78: 02 80 00 07 be 200ef94 <_Heap_Walk+0xe0> 200ef7c: 80 8d 20 ff btst 0xff, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 200ef80: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200ef84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200ef88: 7f ff d7 2f call 2004c44 <== NOT EXECUTED 200ef8c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (!prev_used) { 200ef90: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED 200ef94: 32 80 00 0a bne,a 200efbc <_Heap_Walk+0x108> 200ef98: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (do_dump || error) printk("\n"); 200ef9c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 200efa0: 12 80 00 49 bne 200f0c4 <_Heap_Walk+0x210> <== NOT EXECUTED 200efa4: 01 00 00 00 nop <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200efa8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 200efac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200efb0: 7f ff d7 25 call 2004c44 <== NOT EXECUTED 200efb4: 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; 200efb8: 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) 200efbc: 80 a0 40 11 cmp %g1, %l1 200efc0: 02 80 00 0a be 200efe8 <_Heap_Walk+0x134> 200efc4: 80 a4 e0 00 cmp %l3, 0 200efc8: 80 a6 00 01 cmp %i0, %g1 200efcc: 02 80 00 58 be 200f12c <_Heap_Walk+0x278> 200efd0: 80 a0 40 11 cmp %g1, %l1 block = block->next; 200efd4: 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) 200efd8: 80 a0 40 11 cmp %g1, %l1 200efdc: 12 bf ff fc bne 200efcc <_Heap_Walk+0x118> 200efe0: 80 a6 00 01 cmp %i0, %g1 error = 1; } } } if (do_dump || error) printk("\n"); 200efe4: 80 a4 e0 00 cmp %l3, 0 200efe8: 32 80 00 58 bne,a 200f148 <_Heap_Walk+0x294> 200efec: 27 00 80 6b sethi %hi(0x201ac00), %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200eff0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200eff4: 80 a0 40 12 cmp %g1, %l2 200eff8: 18 80 00 40 bgu 200f0f8 <_Heap_Walk+0x244> 200effc: 11 00 80 6f sethi %hi(0x201bc00), %o0 printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 200f000: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 200f004: 40 00 27 8b call 2018e30 <.urem> 200f008: 90 10 00 12 mov %l2, %o0 200f00c: 80 a2 20 00 cmp %o0, 0 200f010: 12 80 00 15 bne 200f064 <_Heap_Walk+0x1b0> 200f014: 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) 200f018: 12 80 00 17 bne 200f074 <_Heap_Walk+0x1c0> 200f01c: 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 ) { 200f020: 02 80 00 1c be 200f090 <_Heap_Walk+0x1dc> 200f024: 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); 200f028: 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)) { 200f02c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 200f030: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 200f034: a4 09 3f fe and %g4, -2, %l2 200f038: a0 04 00 12 add %l0, %l2, %l0 200f03c: 80 a4 00 01 cmp %l0, %g1 200f040: 84 60 3f ff subx %g0, -1, %g2 200f044: 80 a0 c0 10 cmp %g3, %l0 200f048: 82 60 3f ff subx %g0, -1, %g1 200f04c: 80 88 80 01 btst %g2, %g1 200f050: 02 80 00 2f be 200f10c <_Heap_Walk+0x258> 200f054: 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); 200f058: a2 10 00 15 mov %l5, %l1 200f05c: 10 bf ff c1 b 200ef60 <_Heap_Walk+0xac> 200f060: 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); 200f064: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f068: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f06c: 7f ff d6 f6 call 2004c44 <== NOT EXECUTED 200f070: 90 12 22 b0 or %o0, 0x2b0, %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", 200f074: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED 200f078: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f07c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f080: 90 12 22 d8 or %o0, 0x2d8, %o0 <== NOT EXECUTED 200f084: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 200f088: 7f ff d6 ef call 2004c44 <== NOT EXECUTED 200f08c: 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) { 200f090: 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); 200f094: c2 04 60 04 ld [ %l1 + 4 ], %g1 200f098: 94 08 7f fe and %g1, -2, %o2 200f09c: 80 a2 c0 0a cmp %o3, %o2 200f0a0: 02 80 00 07 be 200f0bc <_Heap_Walk+0x208> 200f0a4: b0 10 00 13 mov %l3, %i0 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 200f0a8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f0ac: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f0b0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 200f0b4: 7f ff d6 e4 call 2004c44 <== NOT EXECUTED 200f0b8: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 200f0bc: 81 c7 e0 08 ret 200f0c0: 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"); 200f0c4: 7f ff d6 e0 call 2004c44 <== NOT EXECUTED 200f0c8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 200f0cc: 10 bf ff b8 b 200efac <_Heap_Walk+0xf8> <== NOT EXECUTED 200f0d0: 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); 200f0d4: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f0d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f0dc: 90 12 21 60 or %o0, 0x160, %o0 <== NOT EXECUTED 200f0e0: 7f ff d6 d9 call 2004c44 <== NOT EXECUTED 200f0e4: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 200f0e8: 10 bf ff 7d b 200eedc <_Heap_Walk+0x28> <== NOT EXECUTED 200f0ec: 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; 200f0f0: 10 bf ff 76 b 200eec8 <_Heap_Walk+0x14> <== NOT EXECUTED 200f0f4: 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); 200f0f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f0fc: 7f ff d6 d2 call 2004c44 <== NOT EXECUTED 200f100: 90 12 22 88 or %o0, 0x288, %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", 200f104: 10 bf ff dd b 200f078 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200f108: 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); 200f10c: 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); 200f110: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 200f114: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED 200f118: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200f11c: 7f ff d6 ca call 2004c44 <== NOT EXECUTED 200f120: 90 12 21 d0 or %o0, 0x1d0, %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", 200f124: 10 bf ff d5 b 200f078 <_Heap_Walk+0x1c4> <== NOT EXECUTED 200f128: 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) { 200f12c: 02 bf ff ae be 200efe4 <_Heap_Walk+0x130> <== NOT EXECUTED 200f130: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED if (do_dump || error) printk("\n"); 200f134: 12 80 00 0a bne 200f15c <_Heap_Walk+0x2a8> <== NOT EXECUTED 200f138: 27 00 80 6b sethi %hi(0x201ac00), %l3 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200f13c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 200f140: 7f ff d6 c1 call 2004c44 <== NOT EXECUTED 200f144: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 200f148: 90 14 e3 d8 or %l3, 0x3d8, %o0 <== NOT EXECUTED 200f14c: 7f ff d6 be call 2004c44 <== NOT EXECUTED 200f150: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 200f154: 10 bf ff a8 b 200eff4 <_Heap_Walk+0x140> <== NOT EXECUTED 200f158: 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"); 200f15c: 7f ff d6 ba call 2004c44 <== NOT EXECUTED 200f160: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 200f164: 10 bf ff f7 b 200f140 <_Heap_Walk+0x28c> <== NOT EXECUTED 200f168: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 02006be0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006be0: 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 ) 2006be4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 2006be8: 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 ) 2006bec: 80 a0 60 00 cmp %g1, 0 2006bf0: 02 80 00 1d be 2006c64 <_Objects_Allocate+0x84> 2006bf4: 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 ); 2006bf8: a2 04 20 20 add %l0, 0x20, %l1 2006bfc: 40 00 14 ca call 200bf24 <_Chain_Get> 2006c00: 90 10 00 11 mov %l1, %o0 if ( information->auto_extend ) { 2006c04: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1 2006c08: 80 a0 60 00 cmp %g1, 0 2006c0c: 02 80 00 16 be 2006c64 <_Objects_Allocate+0x84> 2006c10: 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 ) { 2006c14: 80 a2 20 00 cmp %o0, 0 2006c18: 02 80 00 15 be 2006c6c <_Objects_Allocate+0x8c> 2006c1c: 01 00 00 00 nop } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 2006c20: c4 06 20 08 ld [ %i0 + 8 ], %g2 2006c24: d0 04 20 08 ld [ %l0 + 8 ], %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c28: d2 04 20 14 ld [ %l0 + 0x14 ], %o1 } if ( the_object ) { uint32_t block; block = _Objects_Get_index( the_object->id ) - 2006c2c: 03 00 00 3f sethi %hi(0xfc00), %g1 2006c30: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006c34: 84 08 80 01 and %g2, %g1, %g2 2006c38: 90 0a 00 01 and %o0, %g1, %o0 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 2006c3c: 40 00 36 49 call 2014560 <.udiv> 2006c40: 90 20 80 08 sub %g2, %o0, %o0 2006c44: c6 04 20 30 ld [ %l0 + 0x30 ], %g3 2006c48: 91 2a 20 02 sll %o0, 2, %o0 information->inactive--; 2006c4c: 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 ]--; 2006c50: c4 00 c0 08 ld [ %g3 + %o0 ], %g2 information->inactive--; 2006c54: 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 ]--; 2006c58: 84 00 bf ff add %g2, -1, %g2 information->inactive--; 2006c5c: 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 ]--; 2006c60: c4 20 c0 08 st %g2, [ %g3 + %o0 ] information->inactive--; } } return the_object; } 2006c64: 81 c7 e0 08 ret 2006c68: 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 ); 2006c6c: 40 00 00 14 call 2006cbc <_Objects_Extend_information> 2006c70: 90 10 00 10 mov %l0, %o0 the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 2006c74: 40 00 14 ac call 200bf24 <_Chain_Get> 2006c78: 90 10 00 11 mov %l1, %o0 } if ( the_object ) { 2006c7c: b0 92 20 00 orcc %o0, 0, %i0 2006c80: 32 bf ff e9 bne,a 2006c24 <_Objects_Allocate+0x44> 2006c84: c4 06 20 08 ld [ %i0 + 8 ], %g2 information->inactive--; } } return the_object; } 2006c88: 81 c7 e0 08 ret <== NOT EXECUTED 2006c8c: 81 e8 00 00 restore <== NOT EXECUTED 02006cbc <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 2006cbc: 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; 2006cc0: 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 ) 2006cc4: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5 2006cc8: 03 00 00 3f sethi %hi(0xfc00), %g1 2006ccc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006cd0: a8 08 80 01 and %g2, %g1, %l4 2006cd4: 80 a5 40 14 cmp %l5, %l4 2006cd8: 1a 80 00 79 bcc 2006ebc <_Objects_Extend_information+0x200> 2006cdc: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 2006ce0: a6 10 00 14 mov %l4, %l3 2006ce4: a4 10 20 00 clr %l2 2006ce8: a2 10 20 00 clr %l1 2006cec: ac 10 20 01 mov 1, %l6 2006cf0: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 2006cf4: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006cf8: 80 a0 60 00 cmp %g1, 0 2006cfc: 12 80 00 8d bne 2006f30 <_Objects_Extend_information+0x274> 2006d00: ba 04 00 15 add %l0, %l5, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 2006d04: 90 02 00 14 add %o0, %l4, %o0 2006d08: 90 02 00 1d add %o0, %i5, %o0 2006d0c: 40 00 09 30 call 20091cc <_Workspace_Allocate_or_fatal_error> 2006d10: 91 2a 20 02 sll %o0, 2, %o0 2006d14: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d18: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006d1c: 85 2d a0 02 sll %l6, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d20: 80 a0 40 14 cmp %g1, %l4 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 2006d24: ac 05 c0 02 add %l7, %g2, %l6 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 2006d28: 18 80 00 94 bgu 2006f78 <_Objects_Extend_information+0x2bc> 2006d2c: 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++ ) { 2006d30: 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, 2006d34: 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++ ) { 2006d38: 02 80 00 08 be 2006d58 <_Objects_Extend_information+0x9c> 2006d3c: ab 2c a0 02 sll %l2, 2, %l5 local_table[ index ] = NULL; 2006d40: 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++ ) { 2006d44: 84 00 a0 01 inc %g2 2006d48: 80 a0 80 14 cmp %g2, %l4 2006d4c: 0a bf ff fd bcs 2006d40 <_Objects_Extend_information+0x84> 2006d50: c0 24 00 01 clr [ %l0 + %g1 ] 2006d54: 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; 2006d58: c0 25 80 15 clr [ %l6 + %l5 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 2006d5c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006d60: 86 04 c0 01 add %l3, %g1, %g3 2006d64: 80 a4 c0 03 cmp %l3, %g3 2006d68: 1a 80 00 0a bcc 2006d90 <_Objects_Extend_information+0xd4> 2006d6c: c0 25 c0 15 clr [ %l7 + %l5 ] 2006d70: 83 2c e0 02 sll %l3, 2, %g1 2006d74: 84 04 00 01 add %l0, %g1, %g2 2006d78: 82 10 00 13 mov %l3, %g1 index++ ) { local_table[ index ] = NULL; 2006d7c: 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++ ) { 2006d80: 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 ); 2006d84: 80 a0 40 03 cmp %g1, %g3 2006d88: 0a bf ff fd bcs 2006d7c <_Objects_Extend_information+0xc0> 2006d8c: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 2006d90: 7f ff ec 05 call 2001da4 2006d94: 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( 2006d98: c2 06 00 00 ld [ %i0 ], %g1 2006d9c: 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; 2006da0: e0 26 20 1c st %l0, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006da4: 89 29 20 1b sll %g4, 0x1b, %g4 2006da8: 87 2f 60 10 sll %i5, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 2006dac: 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( 2006db0: 87 30 e0 10 srl %g3, 0x10, %g3 2006db4: 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; 2006db8: ec 26 20 30 st %l6, [ %i0 + 0x30 ] information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 2006dbc: 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; 2006dc0: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 2006dc4: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 2006dc8: 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( 2006dcc: 82 10 40 04 or %g1, %g4, %g1 2006dd0: 82 10 40 03 or %g1, %g3, %g1 2006dd4: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 2006dd8: 7f ff eb f7 call 2001db4 2006ddc: 01 00 00 00 nop if ( old_tables ) 2006de0: 80 a4 20 00 cmp %l0, 0 2006de4: 22 80 00 05 be,a 2006df8 <_Objects_Extend_information+0x13c> 2006de8: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 _Workspace_Free( old_tables ); 2006dec: 40 00 08 ea call 2009194 <_Workspace_Free> 2006df0: 90 10 00 10 mov %l0, %o0 2006df4: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 2006df8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006dfc: 80 a0 60 00 cmp %g1, 0 2006e00: 02 80 00 55 be 2006f54 <_Objects_Extend_information+0x298> 2006e04: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 information->object_blocks[ block ] = 2006e08: 90 10 00 10 mov %l0, %o0 2006e0c: 40 00 35 9b call 2014478 <.umul> 2006e10: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2006e14: 40 00 08 e7 call 20091b0 <_Workspace_Allocate> 2006e18: a9 2c 60 02 sll %l1, 2, %l4 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006e1c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 2006e20: d0 24 00 14 st %o0, [ %l0 + %l4 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 2006e24: d2 00 40 14 ld [ %g1 + %l4 ], %o1 2006e28: 80 a2 60 00 cmp %o1, 0 2006e2c: 02 80 00 64 be 2006fbc <_Objects_Extend_information+0x300> 2006e30: 01 00 00 00 nop /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e34: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 2006e38: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e3c: a0 10 00 13 mov %l3, %l0 2006e40: a2 06 20 20 add %i0, 0x20, %l1 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e44: 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( 2006e48: 25 00 00 40 sethi %hi(0x10000), %l2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 2006e4c: 40 00 14 49 call 200bf70 <_Chain_Initialize> 2006e50: 90 10 00 13 mov %l3, %o0 2006e54: 30 80 00 0c b,a 2006e84 <_Objects_Extend_information+0x1c8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 2006e58: c4 16 20 04 lduh [ %i0 + 4 ], %g2 2006e5c: 83 28 60 18 sll %g1, 0x18, %g1 2006e60: 85 28 a0 1b sll %g2, 0x1b, %g2 2006e64: 82 10 40 12 or %g1, %l2, %g1 2006e68: 82 10 40 02 or %g1, %g2, %g1 2006e6c: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e70: 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( 2006e74: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 2006e78: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 2006e7c: 7f ff fd 2f call 2006338 <_Chain_Append> 2006e80: 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 ) { 2006e84: 40 00 14 28 call 200bf24 <_Chain_Get> 2006e88: 90 10 00 13 mov %l3, %o0 2006e8c: 80 a2 20 00 cmp %o0, 0 2006e90: 32 bf ff f2 bne,a 2006e58 <_Objects_Extend_information+0x19c> 2006e94: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006e98: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 2006e9c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 information->inactive += information->allocation_size; 2006ea0: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 2006ea4: c4 20 c0 14 st %g2, [ %g3 + %l4 ] information->inactive += information->allocation_size; 2006ea8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 2006eac: 82 00 40 04 add %g1, %g4, %g1 2006eb0: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 2006eb4: 81 c7 e0 08 ret 2006eb8: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 2006ebc: 90 10 00 15 mov %l5, %o0 2006ec0: 40 00 35 a8 call 2014560 <.udiv> 2006ec4: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 2006ec8: a4 92 20 00 orcc %o0, 0, %l2 2006ecc: 02 80 00 3e be 2006fc4 <_Objects_Extend_information+0x308> 2006ed0: a6 10 00 14 mov %l4, %l3 if ( information->object_blocks[ block ] == NULL ) 2006ed4: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 2006ed8: c2 00 80 00 ld [ %g2 ], %g1 2006edc: 80 a0 60 00 cmp %g1, 0 2006ee0: 12 80 00 08 bne 2006f00 <_Objects_Extend_information+0x244> 2006ee4: a2 10 20 00 clr %l1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 2006ee8: 10 80 00 0c b 2006f18 <_Objects_Extend_information+0x25c> <== NOT EXECUTED 2006eec: 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 ) 2006ef0: c2 00 80 01 ld [ %g2 + %g1 ], %g1 2006ef4: 80 a0 60 00 cmp %g1, 0 2006ef8: 02 80 00 08 be 2006f18 <_Objects_Extend_information+0x25c> 2006efc: 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++ ) { 2006f00: a2 04 60 01 inc %l1 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 2006f04: 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++ ) { 2006f08: 80 a4 80 11 cmp %l2, %l1 2006f0c: 18 bf ff f9 bgu 2006ef0 <_Objects_Extend_information+0x234> 2006f10: 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 ) { 2006f14: 80 a4 c0 15 cmp %l3, %l5 2006f18: 2a bf ff b9 bcs,a 2006dfc <_Objects_Extend_information+0x140> 2006f1c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 2006f20: ac 04 a0 01 add %l2, 1, %l6 2006f24: 83 2d a0 01 sll %l6, 1, %g1 2006f28: 10 bf ff 73 b 2006cf4 <_Objects_Extend_information+0x38> 2006f2c: 90 00 40 16 add %g1, %l6, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 2006f30: 90 02 00 14 add %o0, %l4, %o0 2006f34: 90 02 00 1d add %o0, %i5, %o0 2006f38: 40 00 08 9e call 20091b0 <_Workspace_Allocate> 2006f3c: 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 ) 2006f40: ae 92 20 00 orcc %o0, 0, %l7 2006f44: 32 bf ff 76 bne,a 2006d1c <_Objects_Extend_information+0x60> 2006f48: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 2006f4c: 81 c7 e0 08 ret <== NOT EXECUTED 2006f50: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 2006f54: 90 10 00 10 mov %l0, %o0 2006f58: 40 00 35 48 call 2014478 <.umul> 2006f5c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 2006f60: 40 00 08 9b call 20091cc <_Workspace_Allocate_or_fatal_error> 2006f64: a9 2c 60 02 sll %l1, 2, %l4 2006f68: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 2006f6c: d0 24 00 14 st %o0, [ %l0 + %l4 ] 2006f70: 10 bf ff b1 b 2006e34 <_Objects_Extend_information+0x178> 2006f74: 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, 2006f78: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 2006f7c: ab 2c a0 02 sll %l2, 2, %l5 2006f80: 90 10 00 17 mov %l7, %o0 2006f84: 40 00 1c 9e call 200e1fc 2006f88: 94 10 00 15 mov %l5, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 2006f8c: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 2006f90: 94 10 00 15 mov %l5, %o2 2006f94: 40 00 1c 9a call 200e1fc 2006f98: 90 10 00 16 mov %l6, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 2006f9c: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 2006fa0: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 2006fa4: 94 05 00 0a add %l4, %o2, %o2 2006fa8: 90 10 00 10 mov %l0, %o0 2006fac: 40 00 1c 94 call 200e1fc 2006fb0: 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; 2006fb4: 10 bf ff 6a b 2006d5c <_Objects_Extend_information+0xa0> 2006fb8: c0 25 80 15 clr [ %l6 + %l5 ] 2006fbc: 81 c7 e0 08 ret <== NOT EXECUTED 2006fc0: 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++ ) { 2006fc4: 10 bf ff d4 b 2006f14 <_Objects_Extend_information+0x258> <== NOT EXECUTED 2006fc8: a2 10 20 00 clr %l1 <== NOT EXECUTED 0200707c <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 200707c: 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 ) 2007080: 82 06 3f ff add %i0, -1, %g1 2007084: 80 a0 60 03 cmp %g1, 3 2007088: 38 80 00 1e bgu,a 2007100 <_Objects_Get_information+0x84> 200708c: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 2007090: 80 a6 60 00 cmp %i1, 0 2007094: 12 80 00 04 bne 20070a4 <_Objects_Get_information+0x28> 2007098: 01 00 00 00 nop if ( info->maximum == 0 ) return NULL; #endif return info; } 200709c: 81 c7 e0 08 ret 20070a0: 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 ); 20070a4: 40 00 14 fb call 200c490 <_Objects_API_maximum_class> 20070a8: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 20070ac: 80 a2 20 00 cmp %o0, 0 20070b0: 06 bf ff fb bl 200709c <_Objects_Get_information+0x20> 20070b4: 80 a2 00 19 cmp %o0, %i1 20070b8: 2a 80 00 12 bcs,a 2007100 <_Objects_Get_information+0x84> 20070bc: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 20070c0: 85 2e 20 02 sll %i0, 2, %g2 20070c4: 03 00 80 60 sethi %hi(0x2018000), %g1 20070c8: 82 10 61 30 or %g1, 0x130, %g1 ! 2018130 <_Objects_Information_table> 20070cc: c4 00 40 02 ld [ %g1 + %g2 ], %g2 20070d0: 80 a0 a0 00 cmp %g2, 0 20070d4: 02 80 00 0b be 2007100 <_Objects_Get_information+0x84> 20070d8: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 20070dc: 83 2e 60 02 sll %i1, 2, %g1 20070e0: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 20070e4: 80 a6 20 00 cmp %i0, 0 20070e8: 02 80 00 06 be 2007100 <_Objects_Get_information+0x84> 20070ec: 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 ) 20070f0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 20070f4: 80 a0 60 00 cmp %g1, 0 20070f8: 22 80 00 02 be,a 2007100 <_Objects_Get_information+0x84> 20070fc: b0 10 20 00 clr %i0 return NULL; #endif return info; } 2007100: 81 c7 e0 08 ret 2007104: 81 e8 00 00 restore 020183b0 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 20183b0: 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) 20183b4: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 20183b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 20183bc: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 20183c0: 22 80 00 02 be,a 20183c8 <_Objects_Get_next+0x18> <== NOT EXECUTED 20183c4: 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) 20183c8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 20183cc: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 20183d0: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 20183d4: 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); 20183d8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20183dc: 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) 20183e0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20183e4: 0a 80 00 0b bcs 2018410 <_Objects_Get_next+0x60> <== NOT EXECUTED 20183e8: 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); 20183ec: 7f ff d4 e9 call 200d790 <_Objects_Get> <== NOT EXECUTED 20183f0: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 20183f4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 20183f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20183fc: 32 bf ff f6 bne,a 20183d4 <_Objects_Get_next+0x24> <== NOT EXECUTED 2018400: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 2018404: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 2018408: 81 c7 e0 08 ret <== NOT EXECUTED 201840c: 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; 2018410: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2018414: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 2018418: 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; 201841c: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 2018420: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 2018424: 81 c7 e0 08 ret <== NOT EXECUTED 2018428: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02008480 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 2008480: 9d e3 bf 90 save %sp, -112, %sp 2008484: 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 ) 2008488: 80 a6 60 00 cmp %i1, 0 200848c: 02 80 00 24 be 200851c <_Objects_Id_to_name+0x9c> 2008490: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 2008494: 80 a2 60 00 cmp %o1, 0 2008498: 02 80 00 26 be 2008530 <_Objects_Id_to_name+0xb0> 200849c: 03 00 80 72 sethi %hi(0x201c800), %g1 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 20084a0: 83 32 60 18 srl %o1, 0x18, %g1 20084a4: 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 ) 20084a8: 84 00 7f ff add %g1, -1, %g2 20084ac: 80 a0 a0 03 cmp %g2, 3 20084b0: 38 80 00 1b bgu,a 200851c <_Objects_Id_to_name+0x9c> 20084b4: 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 ] ) 20084b8: 85 28 60 02 sll %g1, 2, %g2 20084bc: 03 00 80 71 sethi %hi(0x201c400), %g1 20084c0: 82 10 63 50 or %g1, 0x350, %g1 ! 201c750 <_Objects_Information_table> 20084c4: c4 00 40 02 ld [ %g1 + %g2 ], %g2 20084c8: 80 a0 a0 00 cmp %g2, 0 20084cc: 02 80 00 16 be 2008524 <_Objects_Id_to_name+0xa4> 20084d0: 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 ]; 20084d4: 83 28 60 02 sll %g1, 2, %g1 20084d8: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 20084dc: 80 a2 20 00 cmp %o0, 0 20084e0: 02 80 00 0f be 200851c <_Objects_Id_to_name+0x9c> 20084e4: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 20084e8: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 20084ec: 80 a0 60 00 cmp %g1, 0 20084f0: 12 80 00 0e bne 2008528 <_Objects_Id_to_name+0xa8> 20084f4: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 20084f8: 7f ff ff c5 call 200840c <_Objects_Get> 20084fc: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 2008500: 80 a2 20 00 cmp %o0, 0 2008504: 22 80 00 06 be,a 200851c <_Objects_Id_to_name+0x9c> 2008508: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 200850c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 2008510: b0 10 20 00 clr %i0 2008514: 40 00 02 77 call 2008ef0 <_Thread_Enable_dispatch> 2008518: c2 26 40 00 st %g1, [ %i1 ] 200851c: 81 c7 e0 08 ret 2008520: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 2008524: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 2008528: 81 c7 e0 08 ret <== NOT EXECUTED 200852c: 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; 2008530: c4 00 60 b4 ld [ %g1 + 0xb4 ], %g2 2008534: 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); 2008538: 83 32 60 18 srl %o1, 0x18, %g1 200853c: 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 ) 2008540: 84 00 7f ff add %g1, -1, %g2 2008544: 80 a0 a0 03 cmp %g2, 3 2008548: 38 bf ff f5 bgu,a 200851c <_Objects_Id_to_name+0x9c> 200854c: 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 ] ) 2008550: 10 bf ff db b 20084bc <_Objects_Id_to_name+0x3c> 2008554: 85 28 60 02 sll %g1, 2, %g2 02012ab0 <_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 ) { 2012ab0: 9d e3 bf 98 save %sp, -104, %sp 2012ab4: a8 10 00 18 mov %i0, %l4 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 2012ab8: 80 a6 a0 00 cmp %i2, 0 2012abc: 02 80 00 1d be 2012b30 <_Objects_Name_to_id_string+0x80> 2012ac0: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 2012ac4: 80 a6 60 00 cmp %i1, 0 2012ac8: 22 80 00 1a be,a 2012b30 <_Objects_Name_to_id_string+0x80> 2012acc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 2012ad0: e6 15 20 10 lduh [ %l4 + 0x10 ], %l3 2012ad4: 80 a4 e0 00 cmp %l3, 0 2012ad8: 22 80 00 16 be,a 2012b30 <_Objects_Name_to_id_string+0x80> 2012adc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 2012ae0: e4 05 20 1c ld [ %l4 + 0x1c ], %l2 2012ae4: a0 10 20 01 mov 1, %l0 the_object = information->local_table[ index ]; 2012ae8: 83 2c 20 02 sll %l0, 2, %g1 2012aec: e2 04 80 01 ld [ %l2 + %g1 ], %l1 if ( !the_object ) 2012af0: 80 a4 60 00 cmp %l1, 0 2012af4: 02 80 00 0b be 2012b20 <_Objects_Name_to_id_string+0x70> 2012af8: a0 04 20 01 inc %l0 continue; if ( !the_object->name.name_p ) 2012afc: d2 04 60 0c ld [ %l1 + 0xc ], %o1 2012b00: 80 a2 60 00 cmp %o1, 0 2012b04: 02 80 00 07 be 2012b20 <_Objects_Name_to_id_string+0x70> 2012b08: 90 10 00 19 mov %i1, %o0 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 2012b0c: 40 00 0c e5 call 2015ea0 2012b10: d4 15 20 3a lduh [ %l4 + 0x3a ], %o2 2012b14: 80 a2 20 00 cmp %o0, 0 2012b18: 22 80 00 08 be,a 2012b38 <_Objects_Name_to_id_string+0x88> 2012b1c: 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++ ) { 2012b20: 80 a4 00 13 cmp %l0, %l3 2012b24: 08 bf ff f2 bleu 2012aec <_Objects_Name_to_id_string+0x3c> 2012b28: 83 2c 20 02 sll %l0, 2, %g1 2012b2c: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 2012b30: 81 c7 e0 08 ret 2012b34: 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; 2012b38: c2 26 80 00 st %g1, [ %i2 ] 2012b3c: 81 c7 e0 08 ret 2012b40: 91 e8 20 00 restore %g0, 0, %o0 02007300 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 2007300: 86 10 00 08 mov %o0, %g3 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 2007304: 80 a2 e0 00 cmp %o3, 0 2007308: 02 80 00 20 be 2007388 <_Objects_Name_to_id_u32+0x88> 200730c: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 2007310: 80 a2 60 00 cmp %o1, 0 2007314: 22 80 00 1d be,a 2007388 <_Objects_Name_to_id_u32+0x88> 2007318: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 200731c: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1 2007320: 85 28 60 10 sll %g1, 0x10, %g2 2007324: 80 a0 a0 00 cmp %g2, 0 2007328: 22 80 00 18 be,a 2007388 <_Objects_Name_to_id_u32+0x88> 200732c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 2007330: 80 a2 a0 00 cmp %o2, 0 2007334: 12 80 00 17 bne 2007390 <_Objects_Name_to_id_u32+0x90> 2007338: 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++ ) { 200733c: 89 30 a0 10 srl %g2, 0x10, %g4 2007340: 80 a1 20 00 cmp %g4, 0 2007344: 02 80 00 11 be 2007388 <_Objects_Name_to_id_u32+0x88> 2007348: 90 10 20 01 mov 1, %o0 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 200734c: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0 2007350: 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 ]; 2007354: 83 28 e0 02 sll %g3, 2, %g1 2007358: c4 02 00 01 ld [ %o0 + %g1 ], %g2 if ( !the_object ) 200735c: 80 a0 a0 00 cmp %g2, 0 2007360: 02 80 00 06 be 2007378 <_Objects_Name_to_id_u32+0x78> 2007364: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 2007368: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200736c: 80 a0 40 09 cmp %g1, %o1 2007370: 22 80 00 0f be,a 20073ac <_Objects_Name_to_id_u32+0xac> 2007374: 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++ ) { 2007378: 80 a0 c0 04 cmp %g3, %g4 200737c: 08 bf ff f7 bleu 2007358 <_Objects_Name_to_id_u32+0x58> 2007380: 83 28 e0 02 sll %g3, 2, %g1 2007384: 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 } 2007388: 81 c3 e0 08 retl 200738c: 01 00 00 00 nop if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 2007390: 82 10 63 ff or %g1, 0x3ff, %g1 2007394: 80 a2 80 01 cmp %o2, %g1 2007398: 02 bf ff e9 be 200733c <_Objects_Name_to_id_u32+0x3c> 200739c: 80 a2 a0 01 cmp %o2, 1 20073a0: 02 bf ff e7 be 200733c <_Objects_Name_to_id_u32+0x3c> 20073a4: 90 10 20 01 mov 1, %o0 20073a8: 30 bf ff f8 b,a 2007388 <_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; 20073ac: 90 10 20 00 clr %o0 20073b0: 81 c3 e0 08 retl 20073b4: c2 22 c0 00 st %g1, [ %o3 ] 020073c0 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 20073c0: 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; 20073c4: 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; 20073c8: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 20073cc: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 20073d0: 03 00 00 3f sethi %hi(0xfc00), %g1 20073d4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 20073d8: 92 10 00 10 mov %l0, %o1 20073dc: a4 08 80 01 and %g2, %g1, %l2 20073e0: 40 00 34 60 call 2014560 <.udiv> 20073e4: 90 22 00 12 sub %o0, %l2, %o0 for ( block = 0; block < block_count; block++ ) { 20073e8: 80 a2 20 00 cmp %o0, 0 20073ec: 02 80 00 12 be 2007434 <_Objects_Shrink_information+0x74> 20073f0: 84 10 20 00 clr %g2 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 20073f4: c6 06 20 30 ld [ %i0 + 0x30 ], %g3 20073f8: c2 00 c0 00 ld [ %g3 ], %g1 20073fc: 80 a4 00 01 cmp %l0, %g1 2007400: 12 80 00 09 bne 2007424 <_Objects_Shrink_information+0x64> 2007404: a2 10 20 04 mov 4, %l1 2007408: 10 80 00 0d b 200743c <_Objects_Shrink_information+0x7c> <== NOT EXECUTED 200740c: a2 10 20 00 clr %l1 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 2007410: 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 ) { 2007414: 80 a4 00 01 cmp %l0, %g1 2007418: 02 80 00 09 be 200743c <_Objects_Shrink_information+0x7c> 200741c: 82 04 60 04 add %l1, 4, %g1 2007420: 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++ ) { 2007424: 84 00 a0 01 inc %g2 2007428: 80 a2 00 02 cmp %o0, %g2 200742c: 38 bf ff f9 bgu,a 2007410 <_Objects_Shrink_information+0x50> 2007430: c2 00 c0 11 ld [ %g3 + %l1 ], %g1 2007434: 81 c7 e0 08 ret 2007438: 81 e8 00 00 restore 200743c: 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; 2007440: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 2007444: 10 80 00 0f b 2007480 <_Objects_Shrink_information+0xc0> 2007448: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 200744c: 82 04 80 01 add %l2, %g1, %g1 2007450: 80 a0 40 03 cmp %g1, %g3 2007454: 08 80 00 10 bleu 2007494 <_Objects_Shrink_information+0xd4> 2007458: 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 ); 200745c: 40 00 12 a8 call 200befc <_Chain_Extract> 2007460: 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 ) ); 2007464: 80 a4 20 00 cmp %l0, 0 2007468: 22 80 00 10 be,a 20074a8 <_Objects_Shrink_information+0xe8> 200746c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 2007470: c2 04 00 00 ld [ %l0 ], %g1 2007474: 80 a0 60 00 cmp %g1, 0 2007478: 02 80 00 0b be 20074a4 <_Objects_Shrink_information+0xe4> 200747c: 84 10 00 10 mov %l0, %g2 2007480: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2007484: 86 08 40 13 and %g1, %l3, %g3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 2007488: 80 a0 c0 12 cmp %g3, %l2 200748c: 3a bf ff f0 bcc,a 200744c <_Objects_Shrink_information+0x8c> 2007490: 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; 2007494: e0 00 80 00 ld [ %g2 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 2007498: 80 a4 20 00 cmp %l0, 0 200749c: 32 bf ff f6 bne,a 2007474 <_Objects_Shrink_information+0xb4> 20074a0: c2 04 00 00 ld [ %l0 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 20074a4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 20074a8: 40 00 07 3b call 2009194 <_Workspace_Free> 20074ac: d0 00 40 11 ld [ %g1 + %l1 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 20074b0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 20074b4: 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; 20074b8: 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; 20074bc: c6 06 20 34 ld [ %i0 + 0x34 ], %g3 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 20074c0: 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; 20074c4: c0 20 c0 11 clr [ %g3 + %l1 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 20074c8: 82 20 40 02 sub %g1, %g2, %g1 20074cc: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 20074d0: 81 c7 e0 08 ret 20074d4: 81 e8 00 00 restore 0200600c <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 200600c: 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; 2006010: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 2006014: 80 a6 20 00 cmp %i0, 0 2006018: 02 80 00 1f be 2006094 <_POSIX_API_Initialize+0x88> 200601c: 03 00 80 59 sethi %hi(0x2016400), %g1 api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 2006020: 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; 2006024: 05 00 80 60 sethi %hi(0x2018000), %g2 2006028: 03 00 80 61 sethi %hi(0x2018400), %g1 200602c: 82 10 62 a4 or %g1, 0x2a4, %g1 ! 20186a4 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 2006030: 40 00 15 05 call 200b444 <_POSIX_signals_Manager_Initialization> 2006034: c2 20 a1 3c st %g1, [ %g2 + 0x13c ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 2006038: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 200603c: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 2006040: 40 00 15 8d call 200b674 <_POSIX_Threads_Manager_initialization> 2006044: 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( 2006048: 40 00 14 a8 call 200b2e8 <_POSIX_Condition_variables_Manager_initialization> 200604c: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 2006050: 40 00 14 b3 call 200b31c <_POSIX_Key_Manager_initialization> 2006054: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 2006058: 40 00 14 d4 call 200b3a8 <_POSIX_Mutex_Manager_initialization> 200605c: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 2006060: 40 00 14 bc call 200b350 <_POSIX_Message_queue_Manager_initialization> 2006064: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 2006068: 40 00 16 4a call 200b990 <_POSIX_Semaphore_Manager_initialization> 200606c: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 2006070: 40 00 16 3b call 200b95c <_POSIX_Timer_Manager_initialization> 2006074: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 2006078: 40 00 14 d9 call 200b3dc <_POSIX_Barrier_Manager_initialization> 200607c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 2006080: 40 00 14 e4 call 200b410 <_POSIX_RWLock_Manager_initialization> 2006084: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 2006088: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 200608c: 40 00 15 63 call 200b618 <_POSIX_Spinlock_Manager_initialization> 2006090: 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 ) 2006094: 10 bf ff e3 b 2006020 <_POSIX_API_Initialize+0x14> <== NOT EXECUTED 2006098: b0 10 62 20 or %g1, 0x220, %i0 <== NOT EXECUTED 02006180 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 2006180: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 2006184: 80 a6 20 00 cmp %i0, 0 2006188: 02 80 00 12 be 20061d0 <_POSIX_Condition_variables_Get+0x50> 200618c: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 2006190: f2 06 00 00 ld [ %i0 ], %i1 2006194: 80 a6 7f ff cmp %i1, -1 2006198: 02 80 00 05 be 20061ac <_POSIX_Condition_variables_Get+0x2c> 200619c: 90 10 00 18 mov %i0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 20061a0: 31 00 80 5e sethi %hi(0x2017800), %i0 20061a4: 40 00 0c 52 call 20092ec <_Objects_Get> 20061a8: 91 ee 21 04 restore %i0, 0x104, %o0 if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 20061ac: 40 00 00 0d call 20061e0 <== NOT EXECUTED 20061b0: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 20061b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20061b8: 12 80 00 07 bne 20061d4 <_POSIX_Condition_variables_Get+0x54> <== NOT EXECUTED 20061bc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20061c0: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 20061c4: 31 00 80 5e sethi %hi(0x2017800), %i0 <== NOT EXECUTED 20061c8: 40 00 0c 49 call 20092ec <_Objects_Get> <== NOT EXECUTED 20061cc: 91 ee 21 04 restore %i0, 0x104, %o0 <== NOT EXECUTED * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); if ( status ) { *location = OBJECTS_ERROR; 20061d0: 82 10 20 01 mov 1, %g1 20061d4: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 20061d8: 81 c7 e0 08 ret 20061dc: 91 e8 20 00 restore %g0, 0, %o0 02006398 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 2006398: 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 ) ) { 200639c: a0 07 bf f4 add %fp, -12, %l0 20063a0: 90 10 00 19 mov %i1, %o0 20063a4: 40 00 00 7f call 20065a0 <_POSIX_Mutex_Get> 20063a8: 92 10 00 10 mov %l0, %o1 20063ac: 80 a2 20 00 cmp %o0, 0 20063b0: 22 80 00 18 be,a 2006410 <_POSIX_Condition_variables_Wait_support+0x78> 20063b4: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 20063b8: 03 00 80 5d sethi %hi(0x2017400), %g1 20063bc: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 2017470 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 20063c0: 92 10 00 10 mov %l0, %o1 20063c4: 84 00 bf ff add %g2, -1, %g2 20063c8: 90 10 00 18 mov %i0, %o0 20063cc: c4 20 60 70 st %g2, [ %g1 + 0x70 ] 20063d0: 7f ff ff 6c call 2006180 <_POSIX_Condition_variables_Get> 20063d4: 01 00 00 00 nop switch ( location ) { 20063d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20063dc: 80 a0 60 00 cmp %g1, 0 20063e0: 12 80 00 1a bne 2006448 <_POSIX_Condition_variables_Wait_support+0xb0> 20063e4: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 20063e8: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 20063ec: 80 a0 a0 00 cmp %g2, 0 20063f0: 02 80 00 0a be 2006418 <_POSIX_Condition_variables_Wait_support+0x80> 20063f4: 01 00 00 00 nop 20063f8: c2 06 40 00 ld [ %i1 ], %g1 20063fc: 80 a0 80 01 cmp %g2, %g1 2006400: 02 80 00 06 be 2006418 <_POSIX_Condition_variables_Wait_support+0x80> 2006404: 01 00 00 00 nop _Thread_Enable_dispatch(); 2006408: 40 00 0e 0e call 2009c40 <_Thread_Enable_dispatch> <== NOT EXECUTED 200640c: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 2006410: 81 c7 e0 08 ret 2006414: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 2006418: 40 00 00 ff call 2006814 200641c: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 2006420: 80 8e e0 ff btst 0xff, %i3 2006424: 22 80 00 0b be,a 2006450 <_POSIX_Condition_variables_Wait_support+0xb8> 2006428: c2 06 40 00 ld [ %i1 ], %g1 status = _Thread_Executing->Wait.return_code; if ( status && status != ETIMEDOUT ) return status; } else { _Thread_Enable_dispatch(); 200642c: 40 00 0e 05 call 2009c40 <_Thread_Enable_dispatch> 2006430: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 2006434: 40 00 00 d7 call 2006790 2006438: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 200643c: 80 a2 20 00 cmp %o0, 0 2006440: 02 80 00 1c be 20064b0 <_POSIX_Condition_variables_Wait_support+0x118> 2006444: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 2006448: 81 c7 e0 08 ret 200644c: 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; 2006450: 21 00 80 5d sethi %hi(0x2017400), %l0 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 2006454: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 2006458: c4 04 21 34 ld [ %l0 + 0x134 ], %g2 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 200645c: 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; 2006460: 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; 2006464: 82 10 20 01 mov 1, %g1 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 2006468: 92 10 00 1a mov %i2, %o1 200646c: 90 10 00 03 mov %g3, %o0 2006470: 15 00 80 29 sethi %hi(0x200a400), %o2 2006474: 94 12 a2 90 or %o2, 0x290, %o2 ! 200a690 <_Thread_queue_Timeout> 2006478: 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; 200647c: 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; 2006480: 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 ); 2006484: 40 00 0f 4d call 200a1b8 <_Thread_queue_Enqueue_with_handler> 2006488: c6 20 a0 44 st %g3, [ %g2 + 0x44 ] _Thread_Enable_dispatch(); 200648c: 40 00 0d ed call 2009c40 <_Thread_Enable_dispatch> 2006490: 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; 2006494: c2 04 21 34 ld [ %l0 + 0x134 ], %g1 2006498: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 200649c: 80 a6 20 00 cmp %i0, 0 20064a0: 02 bf ff e5 be 2006434 <_POSIX_Condition_variables_Wait_support+0x9c> 20064a4: 80 a6 20 74 cmp %i0, 0x74 20064a8: 02 bf ff e3 be 2006434 <_POSIX_Condition_variables_Wait_support+0x9c> 20064ac: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 20064b0: 81 c7 e0 08 ret 20064b4: 81 e8 00 00 restore 0200d058 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 200d058: 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); 200d05c: 03 00 80 61 sethi %hi(0x2018400), %g1 uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 200d060: c6 06 20 08 ld [ %i0 + 8 ], %g3 200d064: a4 10 62 24 or %g1, 0x224, %l2 200d068: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 200d06c: 85 30 e0 18 srl %g3, 0x18, %g2 200d070: 89 28 60 10 sll %g1, 0x10, %g4 200d074: 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 ]; 200d078: 03 00 00 3f sethi %hi(0xfc00), %g1 200d07c: 84 00 a0 06 add %g2, 6, %g2 200d080: 82 10 63 ff or %g1, 0x3ff, %g1 200d084: ab 28 a0 02 sll %g2, 2, %l5 200d088: 86 08 c0 01 and %g3, %g1, %g3 200d08c: a8 10 20 00 clr %l4 200d090: a7 28 e0 02 sll %g3, 2, %l3 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 200d094: 80 a1 20 00 cmp %g4, 0 200d098: 02 80 00 29 be 200d13c <_POSIX_Keys_Run_destructors+0xe4> 200d09c: a0 10 20 01 mov 1, %l0 200d0a0: a2 10 20 01 mov 1, %l1 the_key = (POSIX_Keys_Control *) 200d0a4: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 200d0a8: 83 2c 20 02 sll %l0, 2, %g1 200d0ac: f0 00 80 01 ld [ %g2 + %g1 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 200d0b0: 80 a6 20 00 cmp %i0, 0 200d0b4: 02 80 00 16 be 200d10c <_POSIX_Keys_Run_destructors+0xb4> 200d0b8: a0 04 20 01 inc %l0 200d0bc: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 200d0c0: 80 a0 60 00 cmp %g1, 0 200d0c4: 22 80 00 13 be,a 200d110 <_POSIX_Keys_Run_destructors+0xb8> 200d0c8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED 200d0cc: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 200d0d0: 80 a0 e0 00 cmp %g3, 0 200d0d4: 22 80 00 0f be,a 200d110 <_POSIX_Keys_Run_destructors+0xb8> 200d0d8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 200d0dc: c2 06 00 15 ld [ %i0 + %l5 ], %g1 200d0e0: c4 00 40 13 ld [ %g1 + %l3 ], %g2 if ( value ) { 200d0e4: 90 90 a0 00 orcc %g2, 0, %o0 200d0e8: 22 80 00 0a be,a 200d110 <_POSIX_Keys_Run_destructors+0xb8> 200d0ec: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 200d0f0: 9f c0 c0 00 call %g3 200d0f4: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 200d0f8: c2 06 00 15 ld [ %i0 + %l5 ], %g1 200d0fc: c4 00 40 13 ld [ %g1 + %l3 ], %g2 200d100: 80 a0 00 02 cmp %g0, %g2 200d104: 82 40 3f ff addx %g0, -1, %g1 200d108: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 200d10c: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 200d110: 89 28 60 10 sll %g1, 0x10, %g4 200d114: 83 31 20 10 srl %g4, 0x10, %g1 200d118: 80 a0 40 10 cmp %g1, %l0 200d11c: 3a bf ff e3 bcc,a 200d0a8 <_POSIX_Keys_Run_destructors+0x50> 200d120: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 200d124: 80 8c 60 ff btst 0xff, %l1 200d128: 12 80 00 05 bne 200d13c <_POSIX_Keys_Run_destructors+0xe4> 200d12c: 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 ) 200d130: 80 a5 20 04 cmp %l4, 4 200d134: 12 bf ff d9 bne 200d098 <_POSIX_Keys_Run_destructors+0x40> 200d138: 80 a1 20 00 cmp %g4, 0 200d13c: 81 c7 e0 08 ret 200d140: 81 e8 00 00 restore 020115c0 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 20115c0: 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 ); 20115c4: 92 10 20 ff mov 0xff, %o1 20115c8: 90 10 00 18 mov %i0, %o0 20115cc: 40 00 12 c5 call 20160e0 20115d0: a8 10 00 18 mov %i0, %l4 if ( n > NAME_MAX ) 20115d4: b0 10 20 5b mov 0x5b, %i0 20115d8: 80 a2 20 ff cmp %o0, 0xff 20115dc: 18 80 00 37 bgu 20116b8 <_POSIX_Message_queue_Create_support+0xf8> 20115e0: a4 10 00 08 mov %o0, %l2 20115e4: 05 00 80 8a sethi %hi(0x2022800), %g2 20115e8: c2 00 a1 c0 ld [ %g2 + 0x1c0 ], %g1 ! 20229c0 <_Thread_Dispatch_disable_level> 20115ec: 82 00 60 01 inc %g1 20115f0: c2 20 a1 c0 st %g1, [ %g2 + 0x1c0 ] * 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 ) { 20115f4: 80 a6 a0 00 cmp %i2, 0 20115f8: 22 80 00 32 be,a 20116c0 <_POSIX_Message_queue_Create_support+0x100> 20115fc: b4 10 20 10 mov 0x10, %i2 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 2011600: e2 06 a0 04 ld [ %i2 + 4 ], %l1 2011604: 80 a4 60 00 cmp %l1, 0 2011608: 04 80 00 3d ble 20116fc <_POSIX_Message_queue_Create_support+0x13c> 201160c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 2011610: f4 06 a0 08 ld [ %i2 + 8 ], %i2 2011614: 80 a6 a0 00 cmp %i2, 0 2011618: 04 80 00 39 ble 20116fc <_POSIX_Message_queue_Create_support+0x13c> 201161c: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 2011620: 27 00 80 8b sethi %hi(0x2022c00), %l3 2011624: 7f ff ed 80 call 200cc24 <_Objects_Allocate> 2011628: 90 14 e1 50 or %l3, 0x150, %o0 ! 2022d50 <_POSIX_Message_queue_Information> attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 201162c: a0 92 20 00 orcc %o0, 0, %l0 2011630: 02 80 00 3b be 201171c <_POSIX_Message_queue_Create_support+0x15c> 2011634: 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; 2011638: 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; 201163c: 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); 2011640: 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; 2011644: 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; 2011648: 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); 201164c: 7f ff f7 38 call 200f32c <_Workspace_Allocate> 2011650: c2 2c 20 14 stb %g1, [ %l0 + 0x14 ] if (!name) { 2011654: b2 92 20 00 orcc %o0, 0, %i1 2011658: 22 80 00 39 be,a 201173c <_POSIX_Message_queue_Create_support+0x17c> 201165c: 90 14 e1 50 or %l3, 0x150, %o0 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 2011660: 40 00 10 35 call 2015734 2011664: 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( 2011668: 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; 201166c: c0 24 20 5c clr [ %l0 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 2011670: 96 10 00 1a mov %i2, %o3 2011674: 90 04 20 1c add %l0, 0x1c, %o0 2011678: 40 00 03 80 call 2012478 <_CORE_message_queue_Initialize> 201167c: 92 04 20 5c add %l0, 0x5c, %o1 2011680: 80 8a 20 ff btst 0xff, %o0 2011684: 02 80 00 11 be 20116c8 <_POSIX_Message_queue_Create_support+0x108> 2011688: 82 14 e1 50 or %l3, 0x150, %g1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 201168c: c4 04 20 08 ld [ %l0 + 8 ], %g2 2011690: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2011694: 03 00 00 3f sethi %hi(0xfc00), %g1 2011698: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 201169c: 84 08 80 01 and %g2, %g1, %g2 20116a0: 85 28 a0 02 sll %g2, 2, %g2 20116a4: 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; 20116a8: f2 24 20 0c st %i1, [ %l0 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 20116ac: e0 26 c0 00 st %l0, [ %i3 ] _Thread_Enable_dispatch(); 20116b0: 7f ff f1 46 call 200dbc8 <_Thread_Enable_dispatch> 20116b4: b0 10 20 00 clr %i0 return 0; } 20116b8: 81 c7 e0 08 ret 20116bc: 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 ); 20116c0: 10 bf ff d8 b 2011620 <_POSIX_Message_queue_Create_support+0x60> 20116c4: 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 ); 20116c8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20116cc: 7f ff ee 51 call 200d010 <_Objects_Free> <== NOT EXECUTED 20116d0: 90 14 e1 50 or %l3, 0x150, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 20116d4: 7f ff f7 0f call 200f310 <_Workspace_Free> <== NOT EXECUTED 20116d8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 20116dc: 7f ff f1 3b call 200dbc8 <_Thread_Enable_dispatch> <== NOT EXECUTED 20116e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 20116e4: 40 00 0a e0 call 2014264 <__errno> <== NOT EXECUTED 20116e8: 01 00 00 00 nop <== NOT EXECUTED 20116ec: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 20116f0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20116f4: 81 c7 e0 08 ret <== NOT EXECUTED 20116f8: 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(); 20116fc: 7f ff f1 33 call 200dbc8 <_Thread_Enable_dispatch> 2011700: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 2011704: 40 00 0a d8 call 2014264 <__errno> 2011708: 01 00 00 00 nop 201170c: 82 10 20 16 mov 0x16, %g1 ! 16 2011710: c2 22 00 00 st %g1, [ %o0 ] 2011714: 81 c7 e0 08 ret 2011718: 81 e8 00 00 restore attr = *attr_ptr; } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); 201171c: 7f ff f1 2b call 200dbc8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011720: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 2011724: 40 00 0a d0 call 2014264 <__errno> <== NOT EXECUTED 2011728: 01 00 00 00 nop <== NOT EXECUTED 201172c: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED 2011730: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2011734: 81 c7 e0 08 ret <== NOT EXECUTED 2011738: 81 e8 00 00 restore <== NOT EXECUTED 201173c: 7f ff ee 35 call 200d010 <_Objects_Free> <== NOT EXECUTED 2011740: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED */ name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 2011744: 7f ff f1 21 call 200dbc8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011748: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 201174c: 40 00 0a c6 call 2014264 <__errno> <== NOT EXECUTED 2011750: 01 00 00 00 nop <== NOT EXECUTED 2011754: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 2011758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 201175c: 81 c7 e0 08 ret <== NOT EXECUTED 2011760: 81 e8 00 00 restore <== NOT EXECUTED 020096c4 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 20096c4: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 20096c8: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 20096cc: 80 a0 60 00 cmp %g1, 0 20096d0: 12 80 00 16 bne 2009728 <_POSIX_Message_queue_Delete+0x64> 20096d4: b2 10 00 18 mov %i0, %i1 20096d8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 20096dc: 80 a0 60 00 cmp %g1, 0 20096e0: 12 80 00 12 bne 2009728 <_POSIX_Message_queue_Delete+0x64> 20096e4: 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 ) 20096e8: d0 06 20 0c ld [ %i0 + 0xc ], %o0 20096ec: 80 a2 20 00 cmp %o0, 0 20096f0: 02 80 00 04 be 2009700 <_POSIX_Message_queue_Delete+0x3c> 20096f4: 31 00 80 8b sethi %hi(0x2022c00), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 20096f8: 40 00 17 06 call 200f310 <_Workspace_Free> <== NOT EXECUTED 20096fc: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 2009700: 92 10 00 19 mov %i1, %o1 2009704: 40 00 0d 74 call 200ccd4 <_Objects_Close> 2009708: 90 16 21 50 or %i0, 0x150, %o0 _CORE_message_queue_Close( 200970c: 90 06 60 1c add %i1, 0x1c, %o0 2009710: 92 10 20 00 clr %o1 2009714: 94 10 20 05 mov 5, %o2 2009718: 40 00 0a 5c call 200c088 <_CORE_message_queue_Close> 200971c: b0 16 21 50 or %i0, 0x150, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 2009720: 40 00 0e 3c call 200d010 <_Objects_Free> 2009724: 81 e8 00 00 restore 2009728: 81 c7 e0 08 ret 200972c: 81 e8 00 00 restore 02009c20 <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 2009c20: 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 ) 2009c24: 80 a6 e0 20 cmp %i3, 0x20 2009c28: 18 80 00 47 bgu 2009d44 <_POSIX_Message_queue_Send_support+0x124> 2009c2c: 11 00 80 8b sethi %hi(0x2022c00), %o0 2009c30: 92 10 00 18 mov %i0, %o1 2009c34: 90 12 22 cc or %o0, 0x2cc, %o0 2009c38: 40 00 0d 63 call 200d1c4 <_Objects_Get> 2009c3c: 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 ) { 2009c40: c2 07 bf f4 ld [ %fp + -12 ], %g1 2009c44: 80 a0 60 00 cmp %g1, 0 2009c48: 12 80 00 31 bne 2009d0c <_POSIX_Message_queue_Send_support+0xec> 2009c4c: 01 00 00 00 nop case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 2009c50: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 2009c54: 80 88 a0 03 btst 3, %g2 2009c58: 02 80 00 41 be 2009d5c <_POSIX_Message_queue_Send_support+0x13c> 2009c5c: 80 8f 20 ff btst 0xff, %i4 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 2009c60: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 2009c64: 12 80 00 15 bne 2009cb8 <_POSIX_Message_queue_Send_support+0x98> 2009c68: 82 10 20 00 clr %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 2009c6c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] <== NOT EXECUTED 2009c70: fa 23 a0 60 st %i5, [ %sp + 0x60 ] <== NOT EXECUTED 2009c74: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2009c78: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 2009c7c: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 2009c80: 9a 20 00 1b neg %i3, %o5 <== NOT EXECUTED 2009c84: 98 10 20 00 clr %o4 <== NOT EXECUTED 2009c88: 40 00 09 65 call 200c21c <_CORE_message_queue_Submit> <== NOT EXECUTED 2009c8c: 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(); 2009c90: 40 00 0f ce call 200dbc8 <_Thread_Enable_dispatch> <== NOT EXECUTED 2009c94: 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 ) 2009c98: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED 2009c9c: 02 80 00 19 be 2009d00 <_POSIX_Message_queue_Send_support+0xe0> <== NOT EXECUTED 2009ca0: 03 00 80 8a sethi %hi(0x2022800), %g1 <== NOT EXECUTED msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 2009ca4: 80 a7 60 00 cmp %i5, 0 2009ca8: 12 80 00 1f bne 2009d24 <_POSIX_Message_queue_Send_support+0x104> 2009cac: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 2009cb0: 81 c7 e0 08 ret 2009cb4: 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 ) 2009cb8: 83 30 a0 0e srl %g2, 0xe, %g1 2009cbc: 82 18 60 01 xor %g1, 1, %g1 2009cc0: 82 08 60 01 and %g1, 1, %g1 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 2009cc4: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 2009cc8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2009ccc: 92 10 00 19 mov %i1, %o1 2009cd0: 94 10 00 1a mov %i2, %o2 2009cd4: 96 10 00 18 mov %i0, %o3 2009cd8: 9a 20 00 1b neg %i3, %o5 2009cdc: 98 10 20 00 clr %o4 2009ce0: 40 00 09 4f call 200c21c <_CORE_message_queue_Submit> 2009ce4: 90 02 20 1c add %o0, 0x1c, %o0 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 2009ce8: 40 00 0f b8 call 200dbc8 <_Thread_Enable_dispatch> 2009cec: 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 ) 2009cf0: 80 a7 60 07 cmp %i5, 7 2009cf4: 12 bf ff ed bne 2009ca8 <_POSIX_Message_queue_Send_support+0x88> 2009cf8: 80 a7 60 00 cmp %i5, 0 msg_status = _Thread_Executing->Wait.return_code; 2009cfc: 03 00 80 8a sethi %hi(0x2022800), %g1 2009d00: c4 00 62 84 ld [ %g1 + 0x284 ], %g2 ! 2022a84 <_Thread_Executing> 2009d04: 10 bf ff e8 b 2009ca4 <_POSIX_Message_queue_Send_support+0x84> 2009d08: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 2009d0c: 40 00 29 56 call 2014264 <__errno> 2009d10: b0 10 3f ff mov -1, %i0 2009d14: 82 10 20 09 mov 9, %g1 2009d18: c2 22 00 00 st %g1, [ %o0 ] } 2009d1c: 81 c7 e0 08 ret 2009d20: 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( 2009d24: 40 00 29 50 call 2014264 <__errno> 2009d28: b0 10 3f ff mov -1, %i0 2009d2c: a0 10 00 08 mov %o0, %l0 2009d30: 40 00 00 5b call 2009e9c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 2009d34: 90 10 00 1d mov %i5, %o0 2009d38: d0 24 00 00 st %o0, [ %l0 ] 2009d3c: 81 c7 e0 08 ret 2009d40: 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 ); 2009d44: 40 00 29 48 call 2014264 <__errno> 2009d48: b0 10 3f ff mov -1, %i0 2009d4c: 82 10 20 16 mov 0x16, %g1 2009d50: c2 22 00 00 st %g1, [ %o0 ] 2009d54: 81 c7 e0 08 ret 2009d58: 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(); 2009d5c: 40 00 0f 9b call 200dbc8 <_Thread_Enable_dispatch> 2009d60: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( EBADF ); 2009d64: 40 00 29 40 call 2014264 <__errno> 2009d68: 01 00 00 00 nop 2009d6c: 82 10 20 09 mov 9, %g1 ! 9 2009d70: c2 22 00 00 st %g1, [ %o0 ] 2009d74: 81 c7 e0 08 ret 2009d78: 81 e8 00 00 restore 0200729c <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 200729c: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 20072a0: 80 a6 20 00 cmp %i0, 0 20072a4: 02 80 00 12 be 20072ec <_POSIX_Mutex_Get+0x50> 20072a8: b4 10 00 19 mov %i1, %i2 20072ac: f2 06 00 00 ld [ %i0 ], %i1 20072b0: 80 a6 7f ff cmp %i1, -1 20072b4: 02 80 00 05 be 20072c8 <_POSIX_Mutex_Get+0x2c> 20072b8: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 20072bc: 31 00 80 66 sethi %hi(0x2019800), %i0 20072c0: 40 00 0c 3c call 200a3b0 <_Objects_Get> 20072c4: 91 ee 20 80 restore %i0, 0x80, %o0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 20072c8: 40 00 00 20 call 2007348 <== NOT EXECUTED 20072cc: 92 10 20 00 clr %o1 <== NOT EXECUTED 20072d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20072d4: 12 80 00 07 bne 20072f0 <_POSIX_Mutex_Get+0x54> <== NOT EXECUTED 20072d8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20072dc: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 20072e0: 31 00 80 66 sethi %hi(0x2019800), %i0 <== NOT EXECUTED 20072e4: 40 00 0c 33 call 200a3b0 <_Objects_Get> <== NOT EXECUTED 20072e8: 91 ee 20 80 restore %i0, 0x80, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 20072ec: 82 10 20 01 mov 1, %g1 20072f0: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 20072f4: 81 c7 e0 08 ret 20072f8: 91 e8 20 00 restore %g0, 0, %o0 02007234 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 2007234: 9d e3 bf 98 save %sp, -104, %sp 2007238: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 200723c: 80 a6 20 00 cmp %i0, 0 2007240: 02 80 00 13 be 200728c <_POSIX_Mutex_Get_interrupt_disable+0x58> 2007244: b6 10 00 1a mov %i2, %i3 2007248: f2 06 00 00 ld [ %i0 ], %i1 200724c: 80 a6 7f ff cmp %i1, -1 2007250: 02 80 00 05 be 2007264 <_POSIX_Mutex_Get_interrupt_disable+0x30> 2007254: b4 10 00 10 mov %l0, %i2 return (POSIX_Mutex_Control *) 2007258: 31 00 80 66 sethi %hi(0x2019800), %i0 200725c: 40 00 0c 37 call 200a338 <_Objects_Get_isr_disable> 2007260: 91 ee 20 80 restore %i0, 0x80, %o0 ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 2007264: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2007268: 40 00 00 38 call 2007348 <== NOT EXECUTED 200726c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2007270: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2007274: 12 80 00 06 bne 200728c <_POSIX_Mutex_Get_interrupt_disable+0x58> <== NOT EXECUTED 2007278: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED 200727c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED return (POSIX_Mutex_Control *) 2007280: 31 00 80 66 sethi %hi(0x2019800), %i0 <== NOT EXECUTED 2007284: 40 00 0c 2d call 200a338 <_Objects_Get_isr_disable> <== NOT EXECUTED 2007288: 91 ee 20 80 restore %i0, 0x80, %o0 <== NOT EXECUTED ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 200728c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2007290: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 2007294: 81 c7 e0 08 ret <== NOT EXECUTED 2007298: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 0200eff4 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 200eff4: 9d e3 bf 98 save %sp, -104, %sp 200eff8: 03 00 80 7a sethi %hi(0x201e800), %g1 200effc: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 ! 201e950 <_Thread_Dispatch_disable_level> 200f000: 84 00 a0 01 inc %g2 200f004: c4 20 61 50 st %g2, [ %g1 + 0x150 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 200f008: 80 a6 60 00 cmp %i1, 0 200f00c: 12 80 00 2e bne 200f0c4 <_POSIX_Semaphore_Create_support+0xd0> 200f010: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 200f014: 02 80 00 07 be 200f030 <_POSIX_Semaphore_Create_support+0x3c> 200f018: 21 00 80 7b sethi %hi(0x201ec00), %l0 if( strlen(name) > PATH_MAX ) { 200f01c: 40 00 0f ec call 2012fcc 200f020: 90 10 00 18 mov %i0, %o0 200f024: 80 a2 20 ff cmp %o0, 0xff 200f028: 18 80 00 2f bgu 200f0e4 <_POSIX_Semaphore_Create_support+0xf0> 200f02c: 21 00 80 7b sethi %hi(0x201ec00), %l0 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 200f030: 7f ff eb 9e call 2009ea8 <_Objects_Allocate> 200f034: 90 14 20 60 or %l0, 0x60, %o0 ! 201ec60 <_POSIX_Semaphore_Information> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 200f038: b2 92 20 00 orcc %o0, 0, %i1 200f03c: 02 80 00 32 be 200f104 <_POSIX_Semaphore_Create_support+0x110> 200f040: 80 a6 20 00 cmp %i0, 0 rtems_set_errno_and_return_minus_one( ENOSPC ); } the_semaphore->process_shared = pshared; if ( name ) { 200f044: 02 80 00 1c be 200f0b4 <_POSIX_Semaphore_Create_support+0xc0> 200f048: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 200f04c: 84 10 20 01 mov 1, %g2 } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 200f050: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 200f054: c4 2e 60 15 stb %g2, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 200f058: c4 26 60 18 st %g2, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 200f05c: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200f060: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200f064: 94 10 00 1a mov %i2, %o2 200f068: 90 06 60 1c add %i1, 0x1c, %o0 200f06c: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 200f070: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 200f074: 7f ff ea 5e call 20099ec <_CORE_semaphore_Initialize> 200f078: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200f07c: 82 14 20 60 or %l0, 0x60, %g1 200f080: c4 06 60 08 ld [ %i1 + 8 ], %g2 200f084: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 200f088: 03 00 00 3f sethi %hi(0xfc00), %g1 200f08c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200f090: 84 08 80 01 and %g2, %g1, %g2 200f094: 85 28 a0 02 sll %g2, 2, %g2 200f098: 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; 200f09c: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 200f0a0: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 200f0a4: 7f ff ef 3e call 200ad9c <_Thread_Enable_dispatch> 200f0a8: b0 10 20 00 clr %i0 return 0; } 200f0ac: 81 c7 e0 08 ret 200f0b0: 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; 200f0b4: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 200f0b8: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 200f0bc: 10 bf ff e9 b 200f060 <_POSIX_Semaphore_Create_support+0x6c> 200f0c0: c0 2e 60 15 clrb [ %i1 + 0x15 ] _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); 200f0c4: 7f ff ef 36 call 200ad9c <_Thread_Enable_dispatch> 200f0c8: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSYS ); 200f0cc: 40 00 08 f6 call 20114a4 <__errno> 200f0d0: 01 00 00 00 nop 200f0d4: 82 10 20 58 mov 0x58, %g1 ! 58 200f0d8: c2 22 00 00 st %g1, [ %o0 ] 200f0dc: 81 c7 e0 08 ret 200f0e0: 81 e8 00 00 restore } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); 200f0e4: 7f ff ef 2e call 200ad9c <_Thread_Enable_dispatch> <== NOT EXECUTED 200f0e8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 200f0ec: 40 00 08 ee call 20114a4 <__errno> <== NOT EXECUTED 200f0f0: 01 00 00 00 nop <== NOT EXECUTED 200f0f4: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED 200f0f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200f0fc: 81 c7 e0 08 ret <== NOT EXECUTED 200f100: 81 e8 00 00 restore <== NOT EXECUTED } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 200f104: 7f ff ef 26 call 200ad9c <_Thread_Enable_dispatch> 200f108: b0 10 3f ff mov -1, %i0 rtems_set_errno_and_return_minus_one( ENOSPC ); 200f10c: 40 00 08 e6 call 20114a4 <__errno> 200f110: 01 00 00 00 nop 200f114: 82 10 20 1c mov 0x1c, %g1 ! 1c 200f118: c2 22 00 00 st %g1, [ %o0 ] 200f11c: 81 c7 e0 08 ret 200f120: 81 e8 00 00 restore 0200b8d8 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 200b8d8: 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 ]; 200b8dc: f0 06 61 6c ld [ %i1 + 0x16c ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 200b8e0: 40 00 04 3f call 200c9dc <_Timespec_To_ticks> 200b8e4: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 200b8e8: 80 a2 20 00 cmp %o0, 0 200b8ec: 22 80 00 02 be,a 200b8f4 <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 200b8f0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 200b8f4: 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 || 200b8f8: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 200b8fc: 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; 200b900: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 200b904: 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 || 200b908: 80 a0 e0 00 cmp %g3, 0 200b90c: 02 80 00 10 be 200b94c <_POSIX_Threads_Sporadic_budget_TSR+0x74> 200b910: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 200b914: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 200b918: 80 a0 40 09 cmp %g1, %o1 200b91c: 18 80 00 0d bgu 200b950 <_POSIX_Threads_Sporadic_budget_TSR+0x78> 200b920: 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 ); 200b924: 40 00 04 2e call 200c9dc <_Timespec_To_ticks> 200b928: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 200b92c: 80 a2 20 00 cmp %o0, 0 200b930: 22 80 00 02 be,a 200b938 <_POSIX_Threads_Sporadic_budget_TSR+0x60> 200b934: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200b938: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200b93c: b2 06 20 9c add %i0, 0x9c, %i1 200b940: 31 00 80 60 sethi %hi(0x2018000), %i0 200b944: 7f ff f5 48 call 2008e64 <_Watchdog_Insert> 200b948: 91 ee 22 b4 restore %i0, 0x2b4, %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 ); 200b94c: 90 10 00 19 mov %i1, %o0 200b950: 7f ff ee f9 call 2007534 <_Thread_Change_priority> 200b954: 94 10 20 01 mov 1, %o2 200b958: 30 bf ff f3 b,a 200b924 <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 0200b888 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 200b888: c4 02 21 6c ld [ %o0 + 0x16c ], %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 || 200b88c: c8 02 20 1c ld [ %o0 + 0x1c ], %g4 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 200b890: 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 */ 200b894: 82 10 3f ff mov -1, %g1 200b898: 84 10 20 ff mov 0xff, %g2 200b89c: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 200b8a0: 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 || 200b8a4: 80 a1 20 00 cmp %g4, 0 200b8a8: 02 80 00 06 be 200b8c0 <_POSIX_Threads_Sporadic_budget_callout+0x38> 200b8ac: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 200b8b0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 200b8b4: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 200b8b8: 08 80 00 06 bleu 200b8d0 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 200b8bc: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 200b8c0: 94 10 20 01 mov 1, %o2 ! 1 200b8c4: 82 13 c0 00 mov %o7, %g1 200b8c8: 7f ff ef 1b call 2007534 <_Thread_Change_priority> 200b8cc: 9e 10 40 00 mov %g1, %o7 200b8d0: 81 c3 e0 08 retl <== NOT EXECUTED 200b8d4: 01 00 00 00 nop 0200cfe8 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 200cfe8: 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 ]; 200cfec: e2 06 21 6c ld [ %i0 + 0x16c ], %l1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 200cff0: 82 10 20 01 mov 1, %g1 while ( !_Chain_Is_empty( handler_stack ) ) { 200cff4: 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; 200cff8: b0 04 60 dc add %l1, 0xdc, %i0 200cffc: 80 a0 80 18 cmp %g2, %i0 200d000: 02 80 00 14 be 200d050 <_POSIX_Threads_cancel_run+0x68> 200d004: c2 24 60 cc st %g1, [ %l1 + 0xcc ] _ISR_Disable( level ); 200d008: 7f ff d3 67 call 2001da4 <== NOT EXECUTED 200d00c: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 200d010: e0 06 20 04 ld [ %i0 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200d014: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 200d018: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 200d01c: 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; 200d020: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 200d024: 7f ff d3 64 call 2001db4 <== NOT EXECUTED 200d028: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 200d02c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 200d030: 9f c0 40 00 call %g1 <== NOT EXECUTED 200d034: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 200d038: 7f ff f0 57 call 2009194 <_Workspace_Free> <== NOT EXECUTED 200d03c: 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 ) ) { 200d040: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED 200d044: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 200d048: 12 bf ff f0 bne 200d008 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED 200d04c: 01 00 00 00 nop <== NOT EXECUTED 200d050: 81 c7 e0 08 ret 200d054: 81 e8 00 00 restore 0200dff0 <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 200dff0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 200dff4: 7f ff f4 ba call 200b2dc <_Watchdog_Remove> 200dff8: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200dffc: 7f ff d2 d1 call 2002b40 200e000: 01 00 00 00 nop 200e004: 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 ) { 200e008: c2 06 20 08 ld [ %i0 + 8 ], %g1 200e00c: 80 a0 60 00 cmp %g1, 0 200e010: 12 80 00 0f bne 200e04c <_POSIX_Timer_Insert_helper+0x5c> 200e014: 92 10 00 18 mov %i0, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 200e018: f6 26 20 1c st %i3, [ %i0 + 0x1c ] the_watchdog->id = id; 200e01c: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 200e020: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200e024: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 200e028: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200e02c: 11 00 80 74 sethi %hi(0x201d000), %o0 200e030: 7f ff f4 40 call 200b130 <_Watchdog_Insert> 200e034: 90 12 20 84 or %o0, 0x84, %o0 ! 201d084 <_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 ); 200e038: b0 10 20 01 mov 1, %i0 200e03c: 7f ff d2 c5 call 2002b50 200e040: 90 10 00 10 mov %l0, %o0 return true; } 200e044: 81 c7 e0 08 ret 200e048: 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 ); 200e04c: 7f ff d2 c1 call 2002b50 <== NOT EXECUTED 200e050: b0 10 20 00 clr %i0 <== NOT EXECUTED 200e054: 81 c7 e0 08 ret <== NOT EXECUTED 200e058: 81 e8 00 00 restore <== NOT EXECUTED 02007100 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 2007100: 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; 2007104: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2007108: 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; 200710c: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 2007110: 80 a0 a0 00 cmp %g2, 0 2007114: 12 80 00 0e bne 200714c <_POSIX_Timer_TSR+0x4c> 2007118: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 200711c: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 2007120: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2007124: 32 80 00 0b bne,a 2007150 <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED 2007128: 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; 200712c: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 2007130: 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 ) ) { 2007134: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 2007138: 40 00 1a cd call 200dc6c 200713c: 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; 2007140: c0 26 60 68 clr [ %i1 + 0x68 ] 2007144: 81 c7 e0 08 ret 2007148: 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( 200714c: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 2007150: d4 06 60 08 ld [ %i1 + 8 ], %o2 2007154: 90 06 60 10 add %i1, 0x10, %o0 2007158: 17 00 80 1c sethi %hi(0x2007000), %o3 200715c: 98 10 00 19 mov %i1, %o4 2007160: 40 00 1b a4 call 200dff0 <_POSIX_Timer_Insert_helper> 2007164: 96 12 e1 00 or %o3, 0x100, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 2007168: 80 8a 20 ff btst 0xff, %o0 200716c: 02 bf ff f6 be 2007144 <_POSIX_Timer_TSR+0x44> 2007170: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 2007174: 40 00 06 22 call 20089fc <_TOD_Get> 2007178: 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; 200717c: 82 10 20 03 mov 3, %g1 2007180: 10 bf ff ed b 2007134 <_POSIX_Timer_TSR+0x34> 2007184: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 0200d1ec <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 200d1ec: 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 ); 200d1f0: 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 ) 200d1f4: 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 ); 200d1f8: 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 ) 200d1fc: b8 10 3f ff mov -1, %i4 200d200: 02 80 00 04 be 200d210 <_POSIX_signals_Clear_signals+0x24> 200d204: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 200d208: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 200d20c: 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 ); 200d210: 7f ff d2 e5 call 2001da4 200d214: 01 00 00 00 nop 200d218: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 200d21c: 80 8e e0 ff btst 0xff, %i3 200d220: 22 80 00 33 be,a 200d2ec <_POSIX_signals_Clear_signals+0x100> 200d224: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 200d228: 05 00 80 62 sethi %hi(0x2018800), %g2 200d22c: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 ! 201896c <_POSIX_signals_Pending> 200d230: 82 0c 00 01 and %l0, %g1, %g1 200d234: 80 88 40 1c btst %g1, %i4 200d238: 02 80 00 37 be 200d314 <_POSIX_signals_Clear_signals+0x128> 200d23c: 85 2e 60 02 sll %i1, 2, %g2 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 200d240: 87 2e 60 04 sll %i1, 4, %g3 200d244: 03 00 80 61 sethi %hi(0x2018400), %g1 200d248: 86 20 c0 02 sub %g3, %g2, %g3 200d24c: 82 10 63 a0 or %g1, 0x3a0, %g1 200d250: c4 00 40 03 ld [ %g1 + %g3 ], %g2 200d254: 80 a0 a0 02 cmp %g2, 2 200d258: 12 80 00 34 bne 200d328 <_POSIX_signals_Clear_signals+0x13c> 200d25c: 03 00 80 62 sethi %hi(0x2018800), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 200d260: 88 10 61 70 or %g1, 0x170, %g4 ! 2018970 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200d264: c4 00 c0 04 ld [ %g3 + %g4 ], %g2 200d268: 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; 200d26c: 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)) 200d270: 80 a0 80 0d cmp %g2, %o5 200d274: 02 80 00 34 be 200d344 <_POSIX_signals_Clear_signals+0x158> 200d278: b8 10 20 00 clr %i4 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 200d27c: c2 00 80 00 ld [ %g2 ], %g1 200d280: b8 10 00 02 mov %g2, %i4 the_chain->first = new_first; 200d284: c2 20 c0 04 st %g1, [ %g3 + %g4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 200d288: 80 a3 40 01 cmp %o5, %g1 200d28c: 02 80 00 2e be 200d344 <_POSIX_signals_Clear_signals+0x158> 200d290: d8 20 60 04 st %o4, [ %g1 + 4 ] _POSIX_signals_Clear_process_signals( mask ); if ( psiginfo ) { 200d294: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 200d298: 02 80 00 1b be 200d304 <_POSIX_signals_Clear_signals+0x118> 200d29c: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 200d2a0: 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; 200d2a4: b0 10 20 01 mov 1, %i0 200d2a8: c2 26 80 00 st %g1, [ %i2 ] 200d2ac: c4 07 20 0c ld [ %i4 + 0xc ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200d2b0: 03 00 80 62 sethi %hi(0x2018800), %g1 200d2b4: c4 26 a0 04 st %g2, [ %i2 + 4 ] 200d2b8: 82 10 61 24 or %g1, 0x124, %g1 200d2bc: c6 07 20 10 ld [ %i4 + 0x10 ], %g3 200d2c0: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 200d2c4: 82 00 7f fc add %g1, -4, %g1 200d2c8: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 200d2cc: f8 20 60 08 st %i4, [ %g1 + 8 ] 200d2d0: c6 26 a0 08 st %g3, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200d2d4: 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; 200d2d8: f8 20 80 00 st %i4, [ %g2 ] if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 200d2dc: 7f ff d2 b6 call 2001db4 200d2e0: 90 10 00 11 mov %l1, %o0 return do_callout; } 200d2e4: 81 c7 e0 08 ret 200d2e8: 81 e8 00 00 restore } else _POSIX_signals_Clear_process_signals( mask ); do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 200d2ec: 82 0c 00 02 and %l0, %g2, %g1 200d2f0: 80 88 40 1c btst %g1, %i4 200d2f4: 02 80 00 08 be 200d314 <_POSIX_signals_Clear_signals+0x128> 200d2f8: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 200d2fc: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 200d300: b0 10 20 01 mov 1, %i0 do_callout = true; } } _ISR_Enable( level ); 200d304: 7f ff d2 ac call 2001db4 200d308: 90 10 00 11 mov %l1, %o0 return do_callout; } 200d30c: 81 c7 e0 08 ret 200d310: 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; 200d314: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 200d318: 7f ff d2 a7 call 2001db4 200d31c: 90 10 00 11 mov %l1, %o0 return do_callout; } 200d320: 81 c7 e0 08 ret 200d324: 81 e8 00 00 restore &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 200d328: 90 10 00 10 mov %l0, %o0 200d32c: 40 00 01 aa call 200d9d4 <_POSIX_signals_Clear_process_signals> 200d330: b0 10 20 01 mov 1, %i0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = true; } } _ISR_Enable( level ); 200d334: 7f ff d2 a0 call 2001db4 200d338: 90 10 00 11 mov %l1, %o0 return do_callout; } 200d33c: 81 c7 e0 08 ret 200d340: 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 ); 200d344: 40 00 01 a4 call 200d9d4 <_POSIX_signals_Clear_process_signals> 200d348: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 200d34c: 10 bf ff d3 b 200d298 <_POSIX_signals_Clear_signals+0xac> 200d350: 80 a7 20 00 cmp %i4, 0 02006324 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 2006324: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2006328: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 200632c: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 2006330: 82 02 3f ff add %o0, -1, %g1 2006334: 83 28 80 01 sll %g2, %g1, %g1 2006338: 80 88 40 03 btst %g1, %g3 200633c: 12 80 00 11 bne 2006380 <_POSIX_signals_Get_highest+0x5c> 2006340: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 2006344: 90 02 20 01 inc %o0 2006348: 80 a2 20 20 cmp %o0, 0x20 200634c: 12 bf ff fa bne 2006334 <_POSIX_signals_Get_highest+0x10> 2006350: 82 02 3f ff add %o0, -1, %g1 2006354: 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 ) ) 2006358: 10 80 00 05 b 200636c <_POSIX_signals_Get_highest+0x48> 200635c: 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++ ) { 2006360: 80 a2 20 1b cmp %o0, 0x1b 2006364: 02 80 00 09 be 2006388 <_POSIX_signals_Get_highest+0x64> 2006368: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) 200636c: 82 02 3f ff add %o0, -1, %g1 2006370: 83 28 80 01 sll %g2, %g1, %g1 2006374: 80 88 40 03 btst %g1, %g3 2006378: 22 bf ff fa be,a 2006360 <_POSIX_signals_Get_highest+0x3c> 200637c: 90 02 20 01 inc %o0 return signo; } return 0; } 2006380: 81 c3 e0 08 retl 2006384: 01 00 00 00 nop 2006388: 81 c3 e0 08 retl <== NOT EXECUTED 200638c: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 0200b504 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 200b504: 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 ]; 200b508: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 if ( !api ) 200b50c: 80 a4 20 00 cmp %l0, 0 200b510: 02 80 00 3c be 200b600 <_POSIX_signals_Post_switch_extension+0xfc> 200b514: 03 00 80 62 sethi %hi(0x2018800), %g1 200b518: a2 10 61 6c or %g1, 0x16c, %l1 ! 201896c <_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 ); 200b51c: 7f ff da 22 call 2001da4 200b520: 01 00 00 00 nop 200b524: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 200b528: c2 04 40 00 ld [ %l1 ], %g1 200b52c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 200b530: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 200b534: 82 10 40 02 or %g1, %g2, %g1 200b538: 80 a8 40 03 andncc %g1, %g3, %g0 200b53c: 02 80 00 2f be 200b5f8 <_POSIX_signals_Post_switch_extension+0xf4> 200b540: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 200b544: 7f ff da 1c call 2001db4 200b548: b0 10 20 1b mov 0x1b, %i0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 200b54c: 92 10 00 18 mov %i0, %o1 200b550: 94 10 20 00 clr %o2 200b554: 40 00 06 fc call 200d144 <_POSIX_signals_Check_signal> 200b558: 90 10 00 10 mov %l0, %o0 200b55c: 80 8a 20 ff btst 0xff, %o0 200b560: 12 bf ff ef bne 200b51c <_POSIX_signals_Post_switch_extension+0x18> 200b564: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 200b568: 90 10 00 10 mov %l0, %o0 200b56c: 94 10 20 01 mov 1, %o2 200b570: 40 00 06 f5 call 200d144 <_POSIX_signals_Check_signal> 200b574: b0 06 20 01 inc %i0 200b578: 80 8a 20 ff btst 0xff, %o0 200b57c: 12 bf ff e8 bne 200b51c <_POSIX_signals_Post_switch_extension+0x18> 200b580: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 200b584: 12 bf ff f3 bne 200b550 <_POSIX_signals_Post_switch_extension+0x4c> 200b588: 92 10 00 18 mov %i0, %o1 200b58c: 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 ) ) 200b590: 92 10 00 18 mov %i0, %o1 200b594: 94 10 20 00 clr %o2 200b598: 40 00 06 eb call 200d144 <_POSIX_signals_Check_signal> 200b59c: 90 10 00 10 mov %l0, %o0 200b5a0: 80 8a 20 ff btst 0xff, %o0 200b5a4: 12 bf ff de bne 200b51c <_POSIX_signals_Post_switch_extension+0x18> 200b5a8: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 200b5ac: 90 10 00 10 mov %l0, %o0 200b5b0: 94 10 20 01 mov 1, %o2 200b5b4: 40 00 06 e4 call 200d144 <_POSIX_signals_Check_signal> 200b5b8: b0 06 20 01 inc %i0 200b5bc: 80 8a 20 ff btst 0xff, %o0 200b5c0: 12 bf ff d7 bne 200b51c <_POSIX_signals_Post_switch_extension+0x18> 200b5c4: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 200b5c8: 12 bf ff f3 bne 200b594 <_POSIX_signals_Post_switch_extension+0x90> 200b5cc: 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 ); 200b5d0: 7f ff d9 f5 call 2001da4 <== NOT EXECUTED 200b5d4: 01 00 00 00 nop <== NOT EXECUTED 200b5d8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if ( !(~api->signals_blocked & 200b5dc: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 200b5e0: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 <== NOT EXECUTED 200b5e4: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 <== NOT EXECUTED 200b5e8: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED 200b5ec: 80 a8 40 03 andncc %g1, %g3, %g0 <== NOT EXECUTED 200b5f0: 12 bf ff d5 bne 200b544 <_POSIX_signals_Post_switch_extension+0x40> <== NOT EXECUTED 200b5f4: 01 00 00 00 nop <== NOT EXECUTED (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 200b5f8: 7f ff d9 ef call 2001db4 200b5fc: 81 e8 00 00 restore 200b600: 81 c7 e0 08 ret <== NOT EXECUTED 200b604: 81 e8 00 00 restore <== NOT EXECUTED 02005514 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 2005514: 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 ); 2005518: 7f ff f3 ac call 20023c8 200551c: 33 00 80 58 sethi %hi(0x2016000), %i1 2005520: 7f ff ff 07 call 200513c 2005524: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 2005528: 40 00 10 93 call 2009774 <_Watchdog_Remove> 200552c: 90 16 63 14 or %i1, 0x314, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2005530: 31 00 80 59 sethi %hi(0x2016400), %i0 2005534: b2 16 63 14 or %i1, 0x314, %i1 2005538: 40 00 10 24 call 20095c8 <_Watchdog_Insert> 200553c: 91 ee 21 54 restore %i0, 0x154, %o0 2005540: 01 00 00 00 nop <== NOT EXECUTED 02022cf8 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 2022cf8: 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 ) ) { 2022cfc: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 2022d00: 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 ); 2022d04: 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 ) ) { 2022d08: 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 ); 2022d0c: 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 ) ) { 2022d10: 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 ); 2022d14: 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 ) ) { 2022d18: 02 80 00 25 be 2022dac <_POSIX_signals_Unblock_thread+0xb4> 2022d1c: c6 06 21 6c ld [ %i0 + 0x16c ], %g3 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 2022d20: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 2022d24: 80 a8 80 01 andncc %g2, %g1, %g0 2022d28: 02 80 00 1f be 2022da4 <_POSIX_signals_Unblock_thread+0xac> 2022d2c: 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 ) { 2022d30: 80 89 00 01 btst %g4, %g1 2022d34: 02 80 00 11 be 2022d78 <_POSIX_signals_Unblock_thread+0x80> 2022d38: da 2e 20 75 stb %o5, [ %i0 + 0x75 ] the_thread->Wait.return_code = EINTR; 2022d3c: 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) ){ 2022d40: 80 89 20 08 btst 8, %g4 2022d44: 02 80 00 18 be 2022da4 <_POSIX_signals_Unblock_thread+0xac> 2022d48: c2 26 20 34 st %g1, [ %i0 + 0x34 ] if ( _Watchdog_Is_active( &the_thread->Timer ) ) 2022d4c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 2022d50: 80 a0 60 02 cmp %g1, 2 2022d54: 02 80 00 36 be 2022e2c <_POSIX_signals_Unblock_thread+0x134> 2022d58: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 2022d5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2022d60: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2022d64: b0 10 20 00 clr %i0 2022d68: 7f ff ac 0c call 200dd98 <_Thread_Clear_state> 2022d6c: 92 12 63 f8 or %o1, 0x3f8, %o1 2022d70: 81 c7 e0 08 ret 2022d74: 81 e8 00 00 restore (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 2022d78: 80 a1 20 00 cmp %g4, 0 2022d7c: 12 80 00 0a bne 2022da4 <_POSIX_signals_Unblock_thread+0xac> 2022d80: 03 00 80 a5 sethi %hi(0x2029400), %g1 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 2022d84: c4 00 60 00 ld [ %g1 ], %g2 2022d88: 80 a0 a0 00 cmp %g2, 0 2022d8c: 02 80 00 06 be 2022da4 <_POSIX_signals_Unblock_thread+0xac> 2022d90: 03 00 80 a5 sethi %hi(0x2029400), %g1 2022d94: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 ! 2029424 <_Thread_Executing> 2022d98: 80 a6 00 02 cmp %i0, %g2 2022d9c: 02 80 00 1c be 2022e0c <_POSIX_signals_Unblock_thread+0x114> 2022da0: 03 00 80 a5 sethi %hi(0x2029400), %g1 _ISR_Signals_to_thread_executing = TRUE; } } return false; } 2022da4: 81 c7 e0 08 ret 2022da8: 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) ) { 2022dac: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2022db0: 80 88 80 01 btst %g2, %g1 2022db4: 22 80 00 12 be,a 2022dfc <_POSIX_signals_Unblock_thread+0x104> 2022db8: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 the_thread->Wait.return_code = EINTR; 2022dbc: 82 10 20 04 mov 4, %g1 2022dc0: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 2022dc4: 80 a6 a0 00 cmp %i2, 0 2022dc8: 02 80 00 14 be 2022e18 <_POSIX_signals_Unblock_thread+0x120> 2022dcc: 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; 2022dd0: c2 06 80 00 ld [ %i2 ], %g1 2022dd4: c2 20 c0 00 st %g1, [ %g3 ] 2022dd8: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2022ddc: c4 20 e0 04 st %g2, [ %g3 + 4 ] 2022de0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 2022de4: c2 20 e0 08 st %g1, [ %g3 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 2022de8: 90 10 00 18 mov %i0, %o0 2022dec: 7f ff af 3a call 200ead4 <_Thread_queue_Extract_with_proxy> 2022df0: b0 10 20 01 mov 1, %i0 2022df4: 81 c7 e0 08 ret 2022df8: 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) ) { 2022dfc: 80 a8 80 01 andncc %g2, %g1, %g0 2022e00: 12 bf ff f0 bne 2022dc0 <_POSIX_signals_Unblock_thread+0xc8> 2022e04: 82 10 20 04 mov 4, %g1 2022e08: 30 bf ff e7 b,a 2022da4 <_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; 2022e0c: da 28 60 b8 stb %o5, [ %g1 + 0xb8 ] 2022e10: 81 c7 e0 08 ret 2022e14: 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; 2022e18: 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; 2022e1c: f2 20 c0 00 st %i1, [ %g3 ] the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; 2022e20: 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; 2022e24: 10 bf ff f1 b 2022de8 <_POSIX_signals_Unblock_thread+0xf0> 2022e28: 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 ); 2022e2c: 7f ff b2 49 call 200f750 <_Watchdog_Remove> 2022e30: 90 06 20 48 add %i0, 0x48, %o0 2022e34: 10 bf ff cb b 2022d60 <_POSIX_signals_Unblock_thread+0x68> 2022e38: 90 10 00 18 mov %i0, %o0 02024e2c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2024e2c: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 2024e30: 80 a6 20 00 cmp %i0, 0 2024e34: 02 80 00 10 be 2024e74 <_Protected_heap_Get_information+0x48> 2024e38: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 2024e3c: 02 80 00 0e be 2024e74 <_Protected_heap_Get_information+0x48> 2024e40: 23 00 81 7a sethi %hi(0x205e800), %l1 return false; _RTEMS_Lock_allocator(); 2024e44: 7f ff 91 cf call 2009580 <_API_Mutex_Lock> 2024e48: d0 04 63 4c ld [ %l1 + 0x34c ], %o0 ! 205eb4c <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 2024e4c: 90 10 00 18 mov %i0, %o0 2024e50: 40 00 2b 7f call 202fc4c <_Heap_Get_information> 2024e54: 92 10 00 19 mov %i1, %o1 2024e58: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 2024e5c: 7f ff 91 df call 20095d8 <_API_Mutex_Unlock> 2024e60: d0 04 63 4c ld [ %l1 + 0x34c ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 2024e64: 80 a0 00 10 cmp %g0, %l0 2024e68: 82 60 3f ff subx %g0, -1, %g1 2024e6c: 81 c7 e0 08 ret 2024e70: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 2024e74: 81 c7 e0 08 ret <== NOT EXECUTED 2024e78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02006e3c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 2006e3c: 9d e3 bf 90 save %sp, -112, %sp 2006e40: 11 00 80 74 sethi %hi(0x201d000), %o0 2006e44: 92 10 00 18 mov %i0, %o1 2006e48: 90 12 21 0c or %o0, 0x10c, %o0 2006e4c: 40 00 08 19 call 2008eb0 <_Objects_Get> 2006e50: 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 ) { 2006e54: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006e58: 80 a0 60 00 cmp %g1, 0 2006e5c: 12 80 00 11 bne 2006ea0 <_Rate_monotonic_Timeout+0x64> 2006e60: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 2006e64: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 2006e68: 03 00 00 10 sethi %hi(0x4000), %g1 2006e6c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 2006e70: 80 88 80 01 btst %g2, %g1 2006e74: 32 80 00 0d bne,a 2006ea8 <_Rate_monotonic_Timeout+0x6c> 2006e78: 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 ) { 2006e7c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 2006e80: 80 a0 60 01 cmp %g1, 1 2006e84: 02 80 00 12 be 2006ecc <_Rate_monotonic_Timeout+0x90> 2006e88: 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; 2006e8c: 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; 2006e90: 05 00 80 74 sethi %hi(0x201d000), %g2 2006e94: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 ! 201d280 <_Thread_Dispatch_disable_level> 2006e98: 82 00 7f ff add %g1, -1, %g1 2006e9c: c2 20 a2 80 st %g1, [ %g2 + 0x280 ] 2006ea0: 81 c7 e0 08 ret 2006ea4: 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 ) && 2006ea8: c2 06 20 08 ld [ %i0 + 8 ], %g1 2006eac: 80 a0 80 01 cmp %g2, %g1 2006eb0: 32 bf ff f4 bne,a 2006e80 <_Rate_monotonic_Timeout+0x44> 2006eb4: 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 ); 2006eb8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 2006ebc: 40 00 09 67 call 2009458 <_Thread_Clear_state> 2006ec0: 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 ); 2006ec4: 10 80 00 05 b 2006ed8 <_Rate_monotonic_Timeout+0x9c> 2006ec8: 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; 2006ecc: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006ed0: 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; 2006ed4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 2006ed8: 7f ff fe 2e call 2006790 <_Rate_monotonic_Initiate_statistics> 2006edc: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006ee0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006ee4: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006ee8: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006eec: 11 00 80 74 sethi %hi(0x201d000), %o0 2006ef0: 40 00 10 0e call 200af28 <_Watchdog_Insert> 2006ef4: 90 12 23 64 or %o0, 0x364, %o0 ! 201d364 <_Watchdog_Ticks_chain> 2006ef8: 30 bf ff e6 b,a 2006e90 <_Rate_monotonic_Timeout+0x54> 020078e4 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 20078e4: 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 ); 20078e8: 35 00 80 60 sethi %hi(0x2018000), %i2 20078ec: 7f ff fc bd call 2006be0 <_Objects_Allocate> 20078f0: 90 16 a3 30 or %i2, 0x330, %o0 ! 2018330 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 20078f4: 37 00 80 60 sethi %hi(0x2018000), %i3 20078f8: c2 06 e1 d0 ld [ %i3 + 0x1d0 ], %g1 ! 20181d0 <_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(); 20078fc: 39 00 80 60 sethi %hi(0x2018000), %i4 2007900: 82 00 60 01 inc %g1 2007904: d0 27 23 7c st %o0, [ %i4 + 0x37c ] 2007908: c2 26 e1 d0 st %g1, [ %i3 + 0x1d0 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 200790c: 33 00 80 60 sethi %hi(0x2018000), %i1 2007910: c2 06 62 6c ld [ %i1 + 0x26c ], %g1 ! 201826c <_Configuration_Table> 2007914: 05 00 80 5c sethi %hi(0x2017000), %g2 2007918: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 200791c: d6 00 a3 a0 ld [ %g2 + 0x3a0 ], %o3 2007920: 03 00 80 59 sethi %hi(0x2016400), %g1 2007924: 82 10 62 68 or %g1, 0x268, %g1 ! 2016668 <_Status_Object_name_errors_to_status+0x14> 2007928: c2 27 bf f4 st %g1, [ %fp + -12 ] 200792c: 80 a2 c0 03 cmp %o3, %g3 2007930: 1a 80 00 03 bcc 200793c <_Thread_Create_idle+0x58> 2007934: d2 07 23 7c ld [ %i4 + 0x37c ], %o1 2007938: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED 200793c: 03 00 80 5c sethi %hi(0x2017000), %g1 2007940: da 08 63 a4 ldub [ %g1 + 0x3a4 ], %o5 ! 20173a4 2007944: 84 07 bf f4 add %fp, -12, %g2 2007948: 82 10 20 01 mov 1, %g1 200794c: c0 23 a0 60 clr [ %sp + 0x60 ] 2007950: c0 23 a0 64 clr [ %sp + 0x64 ] 2007954: c0 23 a0 68 clr [ %sp + 0x68 ] 2007958: 90 16 a3 30 or %i2, 0x330, %o0 200795c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2007960: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 2007964: 94 10 20 00 clr %o2 2007968: 40 00 00 c3 call 2007c74 <_Thread_Initialize> 200796c: 98 10 20 00 clr %o4 * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 2007970: c4 06 62 6c ld [ %i1 + 0x26c ], %g2 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 2007974: c2 06 e1 d0 ld [ %i3 + 0x1d0 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007978: c6 07 23 7c ld [ %i4 + 0x37c ], %g3 200797c: 82 00 7f ff add %g1, -1, %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 2007980: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2 2007984: c2 26 e1 d0 st %g1, [ %i3 + 0x1d0 ] /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 2007988: 05 00 80 60 sethi %hi(0x2018000), %g2 200798c: 03 00 80 60 sethi %hi(0x2018000), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 2007990: 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 = 2007994: c6 20 a2 94 st %g3, [ %g2 + 0x294 ] 2007998: c6 20 62 60 st %g3, [ %g1 + 0x260 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 200799c: b2 10 20 00 clr %i1 20079a0: b6 10 20 00 clr %i3 20079a4: 40 00 03 e0 call 2008924 <_Thread_Start> 20079a8: 99 e8 20 00 restore %g0, 0, %o4 20079ac: 01 00 00 00 nop 02007bc4 <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 2007bc4: 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 ) ) { 2007bc8: 80 a2 20 00 cmp %o0, 0 2007bcc: 02 80 00 1d be 2007c40 <_Thread_Get+0x7c> 2007bd0: 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); 2007bd4: 83 32 20 18 srl %o0, 0x18, %g1 2007bd8: 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 ) 2007bdc: 84 00 7f ff add %g1, -1, %g2 2007be0: 80 a0 a0 03 cmp %g2, 3 2007be4: 38 80 00 14 bgu,a 2007c34 <_Thread_Get+0x70> 2007be8: 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 :) */ 2007bec: 89 32 20 1b srl %o0, 0x1b, %g4 2007bf0: 80 a1 20 01 cmp %g4, 1 2007bf4: 12 80 00 0f bne 2007c30 <_Thread_Get+0x6c> 2007bf8: 85 28 60 02 sll %g1, 2, %g2 *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; 2007bfc: 03 00 80 60 sethi %hi(0x2018000), %g1 2007c00: 82 10 61 30 or %g1, 0x130, %g1 ! 2018130 <_Objects_Information_table> 2007c04: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 2007c08: 80 a0 60 00 cmp %g1, 0 2007c0c: 22 80 00 17 be,a 2007c68 <_Thread_Get+0xa4> 2007c10: c8 22 80 00 st %g4, [ %o2 ] *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; 2007c14: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 2007c18: 80 a2 20 00 cmp %o0, 0 2007c1c: 02 80 00 11 be 2007c60 <_Thread_Get+0x9c> 2007c20: 92 10 00 03 mov %g3, %o1 *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 2007c24: 82 13 c0 00 mov %o7, %g1 2007c28: 7f ff fd 56 call 2007180 <_Objects_Get> 2007c2c: 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; 2007c30: 82 10 20 01 mov 1, %g1 2007c34: 90 10 20 00 clr %o0 2007c38: 81 c3 e0 08 retl 2007c3c: c2 22 80 00 st %g1, [ %o2 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007c40: 03 00 80 60 sethi %hi(0x2018000), %g1 2007c44: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20181d0 <_Thread_Dispatch_disable_level> 2007c48: 84 00 a0 01 inc %g2 2007c4c: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ] 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; 2007c50: 03 00 80 60 sethi %hi(0x2018000), %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; 2007c54: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 2007c58: 81 c3 e0 08 retl 2007c5c: d0 00 62 94 ld [ %g1 + 0x294 ], %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; 2007c60: 81 c3 e0 08 retl <== NOT EXECUTED 2007c64: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED goto done; } api_information = _Objects_Information_table[ the_api ]; if ( !api_information ) { *location = OBJECTS_ERROR; 2007c68: 81 c3 e0 08 retl 2007c6c: 90 10 20 00 clr %o0 0200d784 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 200d784: 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; 200d788: 03 00 80 60 sethi %hi(0x2018000), %g1 200d78c: e0 00 62 94 ld [ %g1 + 0x294 ], %l0 ! 2018294 <_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(); 200d790: 3f 00 80 35 sethi %hi(0x200d400), %i7 200d794: be 17 e3 84 or %i7, 0x384, %i7 ! 200d784 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 200d798: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0 _ISR_Set_level(level); 200d79c: 7f ff d1 86 call 2001db4 200d7a0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 200d7a4: 07 00 80 5f sethi %hi(0x2017c00), %g3 doneConstructors = 1; 200d7a8: 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; 200d7ac: e4 08 e2 e0 ldub [ %g3 + 0x2e0 ], %l2 doneConstructors = 1; 200d7b0: c2 28 e2 e0 stb %g1, [ %g3 + 0x2e0 ] #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) { 200d7b4: c4 04 21 60 ld [ %l0 + 0x160 ], %g2 200d7b8: 80 a0 a0 00 cmp %g2, 0 200d7bc: 02 80 00 0b be 200d7e8 <_Thread_Handler+0x64> 200d7c0: 23 00 80 60 sethi %hi(0x2018000), %l1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 200d7c4: d0 04 62 58 ld [ %l1 + 0x258 ], %o0 ! 2018258 <_Thread_Allocated_fp> 200d7c8: 80 a4 00 08 cmp %l0, %o0 200d7cc: 02 80 00 07 be 200d7e8 <_Thread_Handler+0x64> 200d7d0: 80 a2 20 00 cmp %o0, 0 if ( _Thread_Allocated_fp != NULL ) 200d7d4: 22 80 00 05 be,a 200d7e8 <_Thread_Handler+0x64> 200d7d8: e0 24 62 58 st %l0, [ %l1 + 0x258 ] _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 200d7dc: 7f ff ee ac call 200928c <_CPU_Context_save_fp> 200d7e0: 90 02 21 60 add %o0, 0x160, %o0 _Thread_Allocated_fp = executing; 200d7e4: e0 24 62 58 st %l0, [ %l1 + 0x258 ] * 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 ); 200d7e8: 7f ff ed 0d call 2008c1c <_User_extensions_Thread_begin> 200d7ec: 90 10 00 10 mov %l0, %o0 /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 200d7f0: 7f ff e8 e7 call 2007b8c <_Thread_Enable_dispatch> 200d7f4: 01 00 00 00 nop /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ 200d7f8: 83 2c a0 18 sll %l2, 0x18, %g1 200d7fc: 80 a0 60 00 cmp %g1, 0 200d800: 02 80 00 1e be 200d878 <_Thread_Handler+0xf4> 200d804: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200d808: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200d80c: 80 a0 60 01 cmp %g1, 1 200d810: 22 80 00 21 be,a 200d894 <_Thread_Handler+0x110> 200d814: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200d818: 80 a0 60 01 cmp %g1, 1 200d81c: 1a 80 00 0c bcc 200d84c <_Thread_Handler+0xc8> 200d820: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 200d824: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200d828: 9f c0 40 00 call %g1 200d82c: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 200d830: d0 24 20 28 st %o0, [ %l0 + 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 ); 200d834: 7f ff ed 0e call 2008c6c <_User_extensions_Thread_exitted> 200d838: 90 10 00 10 mov %l0, %o0 _Internal_error_Occurred( 200d83c: 90 10 20 00 clr %o0 200d840: 92 10 20 01 mov 1, %o1 200d844: 7f ff e4 b7 call 2006b20 <_Internal_error_Occurred> 200d848: 94 10 20 06 mov 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200d84c: 22 80 00 16 be,a 200d8a4 <_Thread_Handler+0x120> <== NOT EXECUTED 200d850: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200d854: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 200d858: 12 bf ff f7 bne 200d834 <_Thread_Handler+0xb0> <== NOT EXECUTED 200d85c: 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 = 200d860: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED 200d864: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED 200d868: 9f c0 40 00 call %g1 <== NOT EXECUTED 200d86c: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED 200d870: 10 bf ff f1 b 200d834 <_Thread_Handler+0xb0> <== NOT EXECUTED 200d874: d0 24 20 28 st %o0, [ %l0 + 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 (); 200d878: 40 00 26 90 call 20172b8 <_init> 200d87c: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 200d880: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 200d884: 80 a0 60 01 cmp %g1, 1 200d888: 12 bf ff e5 bne 200d81c <_Thread_Handler+0x98> 200d88c: 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 = 200d890: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200d894: 9f c0 40 00 call %g1 200d898: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 200d89c: 10 bf ff e6 b 200d834 <_Thread_Handler+0xb0> 200d8a0: d0 24 20 28 st %o0, [ %l0 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 200d8a4: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED 200d8a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 200d8ac: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED 200d8b0: 10 bf ff e1 b 200d834 <_Thread_Handler+0xb0> <== NOT EXECUTED 200d8b4: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED 02007c74 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 2007c74: 9d e3 bf 98 save %sp, -104, %sp 2007c78: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007c7c: 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 ) { 2007c80: e4 00 40 00 ld [ %g1 ], %l2 2007c84: e6 07 a0 60 ld [ %fp + 0x60 ], %l3 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 2007c88: 02 80 00 69 be 2007e2c <_Thread_Initialize+0x1b8> 2007c8c: 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; 2007c90: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 2007c94: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 2007c98: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 2007c9c: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2007ca0: 80 8f 20 ff btst 0xff, %i4 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) { _Thread_Stack_Free( the_thread ); return FALSE; 2007ca4: b4 10 20 00 clr %i2 /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 2007ca8: 12 80 00 43 bne 2007db4 <_Thread_Initialize+0x140> 2007cac: 82 10 20 00 clr %g1 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007cb0: 37 00 80 60 sethi %hi(0x2018000), %i3 2007cb4: d0 06 e2 74 ld [ %i3 + 0x274 ], %o0 ! 2018274 <_Thread_Maximum_extensions> } else fp_area = NULL; the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; 2007cb8: c2 26 60 cc st %g1, [ %i1 + 0xcc ] fp_area = _Context_Fp_start( fp_area, 0 ); } else fp_area = NULL; the_thread->fp_context = fp_area; 2007cbc: c2 26 61 60 st %g1, [ %i1 + 0x160 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2007cc0: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 2007cc4: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 2007cc8: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 2007ccc: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 2007cd0: c0 26 61 64 clr [ %i1 + 0x164 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 2007cd4: 80 a2 20 00 cmp %o0, 0 2007cd8: 12 80 00 41 bne 2007ddc <_Thread_Initialize+0x168> 2007cdc: b8 16 e2 74 or %i3, 0x274, %i4 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 2007ce0: c0 26 61 74 clr [ %i1 + 0x174 ] 2007ce4: a0 10 20 00 clr %l0 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007ce8: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 2007cec: e2 2e 60 ac stb %l1, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007cf0: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 2007cf4: 80 a4 e0 02 cmp %l3, 2 2007cf8: 12 80 00 05 bne 2007d0c <_Thread_Initialize+0x98> 2007cfc: e6 26 60 b0 st %l3, [ %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; 2007d00: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED 2007d04: c4 00 61 28 ld [ %g1 + 0x128 ], %g2 ! 2018128 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 2007d08: 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; 2007d0c: 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 ); 2007d10: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 2007d14: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 2007d18: 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 ); 2007d1c: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 2007d20: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 2007d24: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 2007d28: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 2007d2c: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 2007d30: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 2007d34: 40 00 02 1a call 200859c <_Thread_Set_priority> 2007d38: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007d3c: c4 06 60 08 ld [ %i1 + 8 ], %g2 2007d40: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 2007d44: 03 00 00 3f sethi %hi(0xfc00), %g1 2007d48: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2007d4c: 84 08 80 01 and %g2, %g1, %g2 2007d50: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2007d54: e4 26 60 0c st %l2, [ %i1 + 0xc ] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 2007d58: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 2007d5c: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007d60: 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 ); 2007d64: 90 10 00 19 mov %i1, %o0 2007d68: 40 00 03 e9 call 2008d0c <_User_extensions_Thread_create> 2007d6c: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 2007d70: 80 8a 20 ff btst 0xff, %o0 2007d74: 12 80 00 0e bne 2007dac <_Thread_Initialize+0x138> 2007d78: 80 a4 20 00 cmp %l0, 0 if ( extensions_area ) 2007d7c: 02 80 00 05 be 2007d90 <_Thread_Initialize+0x11c> <== NOT EXECUTED 2007d80: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 2007d84: 40 00 05 04 call 2009194 <_Workspace_Free> <== NOT EXECUTED 2007d88: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007d8c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2007d90: 02 80 00 05 be 2007da4 <_Thread_Initialize+0x130> <== NOT EXECUTED 2007d94: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007d98: 40 00 04 ff call 2009194 <_Workspace_Free> <== NOT EXECUTED 2007d9c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007da0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007da4: 40 00 02 ba call 200888c <_Thread_Stack_Free> <== NOT EXECUTED 2007da8: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 2007dac: 81 c7 e0 08 ret 2007db0: 81 e8 00 00 restore */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 2007db4: 40 00 04 ff call 20091b0 <_Workspace_Allocate> 2007db8: 90 10 20 88 mov 0x88, %o0 if ( !fp_area ) { 2007dbc: b4 92 20 00 orcc %o0, 0, %i2 2007dc0: 12 bf ff bc bne 2007cb0 <_Thread_Initialize+0x3c> 2007dc4: 82 10 00 1a mov %i2, %g1 _Thread_Stack_Free( the_thread ); 2007dc8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007dcc: 40 00 02 b0 call 200888c <_Thread_Stack_Free> <== NOT EXECUTED 2007dd0: b0 10 20 00 clr %i0 <== NOT EXECUTED 2007dd4: 81 c7 e0 08 ret <== NOT EXECUTED 2007dd8: 81 e8 00 00 restore <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 2007ddc: 90 02 20 01 inc %o0 2007de0: 40 00 04 f4 call 20091b0 <_Workspace_Allocate> 2007de4: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 2007de8: a0 92 20 00 orcc %o0, 0, %l0 2007dec: 02 80 00 1b be 2007e58 <_Thread_Initialize+0x1e4> 2007df0: c2 06 e2 74 ld [ %i3 + 0x274 ], %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007df4: 80 a0 7f ff cmp %g1, -1 2007df8: 02 bf ff bc be 2007ce8 <_Thread_Initialize+0x74> 2007dfc: e0 26 61 74 st %l0, [ %i1 + 0x174 ] 2007e00: 86 10 20 00 clr %g3 2007e04: 88 10 00 10 mov %l0, %g4 2007e08: c4 07 00 00 ld [ %i4 ], %g2 the_thread->extensions[i] = NULL; 2007e0c: 83 28 e0 02 sll %g3, 2, %g1 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 2007e10: 86 00 e0 01 inc %g3 2007e14: 84 00 a0 01 inc %g2 2007e18: 80 a0 80 03 cmp %g2, %g3 2007e1c: 18 bf ff fb bgu 2007e08 <_Thread_Initialize+0x194> 2007e20: c0 21 00 01 clr [ %g4 + %g1 ] * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 2007e24: 10 bf ff b2 b 2007cec <_Thread_Initialize+0x78> 2007e28: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 2007e2c: 90 10 00 19 mov %i1, %o0 2007e30: 40 00 02 7b call 200881c <_Thread_Stack_Allocate> 2007e34: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 2007e38: 80 a2 20 00 cmp %o0, 0 2007e3c: 02 80 00 0e be 2007e74 <_Thread_Initialize+0x200> 2007e40: 80 a6 c0 08 cmp %i3, %o0 2007e44: 18 80 00 0c bgu 2007e74 <_Thread_Initialize+0x200> 2007e48: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 2007e4c: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 2007e50: 10 bf ff 92 b 2007c98 <_Thread_Initialize+0x24> 2007e54: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) 2007e58: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2007e5c: 02 80 00 04 be 2007e6c <_Thread_Initialize+0x1f8> <== NOT EXECUTED 2007e60: 01 00 00 00 nop <== NOT EXECUTED (void) _Workspace_Free( fp_area ); 2007e64: 40 00 04 cc call 2009194 <_Workspace_Free> <== NOT EXECUTED 2007e68: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED #endif _Thread_Stack_Free( the_thread ); 2007e6c: 40 00 02 88 call 200888c <_Thread_Stack_Free> <== NOT EXECUTED 2007e70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2007e74: 81 c7 e0 08 ret 2007e78: 91 e8 20 00 restore %g0, 0, %o0 0200d680 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 200d680: 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; 200d684: 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; 200d688: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 200d68c: 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; 200d690: 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; 200d694: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 200d698: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 200d69c: 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; 200d6a0: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 200d6a4: 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 ) ) { 200d6a8: 7f ff ee 43 call 2008fb4 <_Thread_queue_Extract_with_proxy> 200d6ac: 90 10 00 18 mov %i0, %o0 200d6b0: 80 8a 20 ff btst 0xff, %o0 200d6b4: 32 80 00 07 bne,a 200d6d0 <_Thread_Reset+0x50> 200d6b8: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 200d6bc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200d6c0: 80 a0 60 02 cmp %g1, 2 200d6c4: 02 80 00 0c be 200d6f4 <_Thread_Reset+0x74> 200d6c8: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200d6cc: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 200d6d0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 200d6d4: 80 a0 40 19 cmp %g1, %i1 200d6d8: 02 80 00 05 be 200d6ec <_Thread_Reset+0x6c> 200d6dc: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 200d6e0: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 200d6e4: 7f ff ee bb call 20091d0 <_Thread_Set_priority> 200d6e8: 81 e8 00 00 restore 200d6ec: 81 c7 e0 08 ret 200d6f0: 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 ); 200d6f4: 7f ff f1 69 call 2009c98 <_Watchdog_Remove> <== NOT EXECUTED 200d6f8: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 200d6fc: 10 bf ff f5 b 200d6d0 <_Thread_Reset+0x50> <== NOT EXECUTED 200d700: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 0200c934 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 200c934: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 200c938: 03 00 80 60 sethi %hi(0x2018000), %g1 200c93c: e0 00 62 94 ld [ %g1 + 0x294 ], %l0 ! 2018294 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 200c940: 7f ff d5 19 call 2001da4 200c944: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 200c948: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 200c94c: c4 04 40 00 ld [ %l1 ], %g2 200c950: c2 04 60 08 ld [ %l1 + 8 ], %g1 200c954: 80 a0 80 01 cmp %g2, %g1 200c958: 02 80 00 18 be 200c9b8 <_Thread_Reset_timeslice+0x84> 200c95c: 82 04 60 04 add %l1, 4, %g1 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200c960: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 200c964: c4 04 20 04 ld [ %l0 + 4 ], %g2 next->previous = previous; previous->next = next; 200c968: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 200c96c: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200c970: 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; 200c974: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 200c978: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 200c97c: 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; 200c980: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 200c984: 7f ff d5 0c call 2001db4 200c988: 01 00 00 00 nop 200c98c: 7f ff d5 06 call 2001da4 200c990: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 200c994: 07 00 80 60 sethi %hi(0x2018000), %g3 200c998: c2 00 e2 60 ld [ %g3 + 0x260 ], %g1 ! 2018260 <_Thread_Heir> 200c99c: 80 a4 00 01 cmp %l0, %g1 200c9a0: 02 80 00 08 be 200c9c0 <_Thread_Reset_timeslice+0x8c> 200c9a4: 84 10 20 01 mov 1, %g2 _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; 200c9a8: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED 200c9ac: c4 28 62 a4 stb %g2, [ %g1 + 0x2a4 ] ! 20182a4 <_Context_Switch_necessary> <== NOT EXECUTED _ISR_Enable( level ); 200c9b0: 7f ff d5 01 call 2001db4 <== NOT EXECUTED 200c9b4: 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 ); 200c9b8: 7f ff d4 ff call 2001db4 200c9bc: 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; 200c9c0: c2 04 40 00 ld [ %l1 ], %g1 200c9c4: c2 20 e2 60 st %g1, [ %g3 + 0x260 ] _Context_Switch_necessary = TRUE; 200c9c8: 03 00 80 60 sethi %hi(0x2018000), %g1 200c9cc: c4 28 62 a4 stb %g2, [ %g1 + 0x2a4 ] ! 20182a4 <_Context_Switch_necessary> _ISR_Enable( level ); 200c9d0: 7f ff d4 f9 call 2001db4 200c9d4: 81 e8 00 00 restore 200c9d8: 01 00 00 00 nop 02009ee4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 2009ee4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 2009ee8: 7f ff e2 cc call 2002a18 2009eec: 01 00 00 00 nop 2009ef0: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 2009ef4: 80 8e 60 ff btst 0xff, %i1 2009ef8: 22 80 00 0d be,a 2009f2c <_Thread_Resume+0x48> 2009efc: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 2009f00: c0 26 20 70 clr [ %i0 + 0x70 ] if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); return; } current_state = the_thread->current_state; 2009f04: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 if ( current_state & STATES_SUSPENDED ) { 2009f08: 80 88 60 02 btst 2, %g1 2009f0c: 02 80 00 06 be 2009f24 <_Thread_Resume+0x40> 2009f10: 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); 2009f14: 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 ) ) { 2009f18: 80 a0 60 00 cmp %g1, 0 2009f1c: 02 80 00 0a be 2009f44 <_Thread_Resume+0x60> 2009f20: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 2009f24: 7f ff e2 c1 call 2002a28 2009f28: 91 e8 00 10 restore %g0, %l0, %o0 _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 2009f2c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 2009f30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2009f34: 02 bf ff f4 be 2009f04 <_Thread_Resume+0x20> <== NOT EXECUTED 2009f38: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); 2009f3c: 7f ff e2 bb call 2002a28 <== NOT EXECUTED 2009f40: 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; 2009f44: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 2009f48: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 2009f4c: 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); 2009f50: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 2009f54: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009f58: 1b 00 80 93 sethi %hi(0x2024c00), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 2009f5c: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2009f60: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 2009f64: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4 2009f68: c2 26 00 00 st %g1, [ %i0 ] 2009f6c: c4 13 60 c8 lduh [ %o5 + 0xc8 ], %g2 old_last_node = the_chain->last; 2009f70: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 2009f74: f0 20 e0 08 st %i0, [ %g3 + 8 ] 2009f78: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 2009f7c: c8 26 20 04 st %g4, [ %i0 + 4 ] 2009f80: c4 33 60 c8 sth %g2, [ %o5 + 0xc8 ] 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; 2009f84: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 2009f88: 7f ff e2 a8 call 2002a28 2009f8c: 90 10 00 10 mov %l0, %o0 2009f90: 7f ff e2 a2 call 2002a18 2009f94: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 2009f98: 09 00 80 93 sethi %hi(0x2024c00), %g4 2009f9c: c4 01 20 a0 ld [ %g4 + 0xa0 ], %g2 ! 2024ca0 <_Thread_Heir> 2009fa0: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 2009fa4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2009fa8: 80 a0 c0 01 cmp %g3, %g1 2009fac: 1a bf ff de bcc 2009f24 <_Thread_Resume+0x40> 2009fb0: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009fb4: 03 00 80 93 sethi %hi(0x2024c00), %g1 2009fb8: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2 ! 2024cd4 <_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; 2009fbc: f0 21 20 a0 st %i0, [ %g4 + 0xa0 ] if ( _Thread_Executing->is_preemptible || 2009fc0: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 2009fc4: 80 a0 60 00 cmp %g1, 0 2009fc8: 02 80 00 06 be 2009fe0 <_Thread_Resume+0xfc> 2009fcc: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009fd0: 84 10 20 01 mov 1, %g2 2009fd4: 03 00 80 93 sethi %hi(0x2024c00), %g1 2009fd8: c4 28 60 e4 stb %g2, [ %g1 + 0xe4 ] ! 2024ce4 <_Context_Switch_necessary> 2009fdc: 30 bf ff d2 b,a 2009f24 <_Thread_Resume+0x40> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 2009fe0: 12 bf ff d1 bne 2009f24 <_Thread_Resume+0x40> 2009fe4: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 2009fe8: 10 bf ff fc b 2009fd8 <_Thread_Resume+0xf4> <== NOT EXECUTED 2009fec: 03 00 80 93 sethi %hi(0x2024c00), %g1 <== NOT EXECUTED 0200881c <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 200881c: 9d e3 bf 98 save %sp, -104, %sp 2008820: 03 00 80 5c sethi %hi(0x2017000), %g1 2008824: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 20173a0 2008828: 80 a6 40 01 cmp %i1, %g1 200882c: 2a 80 00 02 bcs,a 2008834 <_Thread_Stack_Allocate+0x18> 2008830: 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 ) { 2008834: 03 00 80 60 sethi %hi(0x2018000), %g1 2008838: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 201826c <_Configuration_Table> 200883c: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 2008840: 80 a0 60 00 cmp %g1, 0 2008844: 22 80 00 0a be,a 200886c <_Thread_Stack_Allocate+0x50> 2008848: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 200884c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2008850: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 2008854: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 2008858: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 200885c: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 2008860: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 2008864: 81 c7 e0 08 ret <== NOT EXECUTED 2008868: 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 ); 200886c: 40 00 02 51 call 20091b0 <_Workspace_Allocate> 2008870: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 2008874: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 2008878: 80 a0 00 08 cmp %g0, %o0 200887c: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 2008880: b0 0e 40 18 and %i1, %i0, %i0 2008884: 81 c7 e0 08 ret 2008888: 81 e8 00 00 restore 0200888c <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 200888c: 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 ) 2008890: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 2008894: 80 a0 60 00 cmp %g1, 0 2008898: 02 80 00 09 be 20088bc <_Thread_Stack_Free+0x30> 200889c: 03 00 80 60 sethi %hi(0x2018000), %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 ) 20088a0: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 201826c <_Configuration_Table> 20088a4: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 20088a8: 80 a0 60 00 cmp %g1, 0 20088ac: 22 80 00 06 be,a 20088c4 <_Thread_Stack_Free+0x38> 20088b0: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0 (*_Configuration_Table->stack_free_hook)( 20088b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20088b8: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 20088bc: 81 c7 e0 08 ret <== NOT EXECUTED 20088c0: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 20088c4: 40 00 02 34 call 2009194 <_Workspace_Free> 20088c8: 81 e8 00 00 restore 20088cc: 01 00 00 00 nop 0200819c <_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 ) { 200819c: 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; 20081a0: 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); 20081a4: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20081a8: 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); 20081ac: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 20081b0: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 20081b4: 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 ) { 20081b8: 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 ) ) 20081bc: 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); 20081c0: 83 34 a0 06 srl %l2, 6, %g1 20081c4: 12 80 00 30 bne 2008284 <_Thread_queue_Enqueue_priority+0xe8> 20081c8: 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; 20081cc: 85 28 60 04 sll %g1, 4, %g2 20081d0: 83 28 60 02 sll %g1, 2, %g1 20081d4: 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; 20081d8: b0 10 00 01 mov %g1, %i0 20081dc: 82 05 80 01 add %l6, %g1, %g1 20081e0: 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 ); 20081e4: 7f ff e6 f0 call 2001da4 20081e8: 01 00 00 00 nop 20081ec: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->first; 20081f0: e0 05 80 18 ld [ %l6 + %i0 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 20081f4: 80 a4 00 13 cmp %l0, %l3 20081f8: 32 80 00 18 bne,a 2008258 <_Thread_queue_Enqueue_priority+0xbc> 20081fc: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 2008200: 10 80 00 81 b 2008404 <_Thread_queue_Enqueue_priority+0x268> 2008204: 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 ) ) 2008208: 80 a4 00 13 cmp %l0, %l3 200820c: 02 80 00 17 be 2008268 <_Thread_queue_Enqueue_priority+0xcc> 2008210: 90 10 00 14 mov %l4, %o0 break; search_priority = search_thread->current_priority; 2008214: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2008218: 80 a4 80 11 cmp %l2, %l1 200821c: 28 80 00 14 bleu,a 200826c <_Thread_queue_Enqueue_priority+0xd0> 2008220: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #endif _ISR_Flash( level ); 2008224: 7f ff e6 e4 call 2001db4 2008228: 90 10 00 14 mov %l4, %o0 200822c: 7f ff e6 de call 2001da4 2008230: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 2008234: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 2008238: 80 8d 40 01 btst %l5, %g1 200823c: 02 80 00 6b be 20083e8 <_Thread_queue_Enqueue_priority+0x24c> 2008240: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 2008244: 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 ) ) { 2008248: 80 a4 00 13 cmp %l0, %l3 200824c: 02 80 00 07 be 2008268 <_Thread_queue_Enqueue_priority+0xcc> 2008250: 90 10 00 14 mov %l4, %o0 search_priority = search_thread->current_priority; 2008254: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 2008258: 80 a4 80 11 cmp %l2, %l1 200825c: 38 bf ff eb bgu,a 2008208 <_Thread_queue_Enqueue_priority+0x6c> 2008260: 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 ) ) { 2008264: 90 10 00 14 mov %l4, %o0 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008268: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 200826c: 80 a6 20 01 cmp %i0, 1 2008270: 02 80 00 47 be 200838c <_Thread_queue_Enqueue_priority+0x1f0> 2008274: 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; 2008278: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 200827c: 81 c7 e0 08 ret <== NOT EXECUTED 2008280: 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; 2008284: 85 28 60 04 sll %g1, 4, %g2 2008288: 83 28 60 02 sll %g1, 2, %g1 200828c: 82 20 80 01 sub %g2, %g1, %g1 2008290: 05 00 80 5c sethi %hi(0x2017000), %g2 2008294: a6 06 00 01 add %i0, %g1, %l3 2008298: 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; 200829c: 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; 20082a0: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 20082a4: 7f ff e6 c0 call 2001da4 20082a8: a2 00 60 01 add %g1, 1, %l1 20082ac: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 20082b0: e0 06 20 08 ld [ %i0 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 20082b4: 80 a4 c0 10 cmp %l3, %l0 20082b8: 22 80 00 25 be,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> 20082bc: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 20082c0: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 20082c4: 80 a4 80 11 cmp %l2, %l1 20082c8: 3a 80 00 21 bcc,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> 20082cc: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 20082d0: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 20082d4: 80 a4 c0 10 cmp %l3, %l0 20082d8: 32 80 00 19 bne,a 200833c <_Thread_queue_Enqueue_priority+0x1a0> 20082dc: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 20082e0: 10 80 00 1b b 200834c <_Thread_queue_Enqueue_priority+0x1b0> 20082e4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 20082e8: 7f ff e6 b3 call 2001db4 20082ec: 90 10 00 14 mov %l4, %o0 20082f0: 7f ff e6 ad call 2001da4 20082f4: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 20082f8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 20082fc: 80 8d 40 01 btst %l5, %g1 2008300: 02 80 00 3d be 20083f4 <_Thread_queue_Enqueue_priority+0x258> 2008304: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 2008308: 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 ) ) { 200830c: 80 a4 00 13 cmp %l0, %l3 2008310: 22 80 00 0f be,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> 2008314: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 search_priority = search_thread->current_priority; 2008318: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 200831c: 80 a4 80 11 cmp %l2, %l1 2008320: 3a 80 00 0b bcc,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> 2008324: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 2008328: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 200832c: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 2008330: 22 80 00 07 be,a 200834c <_Thread_queue_Enqueue_priority+0x1b0> <== NOT EXECUTED 2008334: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 2008338: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 200833c: 80 a4 80 11 cmp %l2, %l1 2008340: 0a bf ff ea bcs 20082e8 <_Thread_queue_Enqueue_priority+0x14c> 2008344: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 2008348: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 200834c: 80 a6 20 01 cmp %i0, 1 2008350: 12 bf ff ca bne 2008278 <_Thread_queue_Enqueue_priority+0xdc> 2008354: 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 ) 2008358: 80 a4 80 11 cmp %l2, %l1 200835c: 02 80 00 18 be 20083bc <_Thread_queue_Enqueue_priority+0x220> 2008360: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 2008364: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 2008368: 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; 200836c: 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; 2008370: 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; 2008374: 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; 2008378: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 200837c: 7f ff e6 8e call 2001db4 2008380: 01 00 00 00 nop 2008384: 81 c7 e0 08 ret 2008388: 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 ) 200838c: 02 80 00 0c be 20083bc <_Thread_queue_Enqueue_priority+0x220> 2008390: c0 25 a0 30 clr [ %l6 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 2008394: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 2008398: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 200839c: 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; 20083a0: 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; 20083a4: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 20083a8: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20083ac: 7f ff e6 82 call 2001db4 20083b0: 90 10 00 14 mov %l4, %o0 20083b4: 81 c7 e0 08 ret 20083b8: 81 e8 00 00 restore 20083bc: 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; 20083c0: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 20083c4: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 20083c8: 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; 20083cc: 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; 20083d0: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 20083d4: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 20083d8: 7f ff e6 77 call 2001db4 20083dc: b0 10 20 01 mov 1, %i0 20083e0: 81 c7 e0 08 ret 20083e4: 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 ); 20083e8: 7f ff e6 73 call 2001db4 <== NOT EXECUTED 20083ec: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED 20083f0: 30 bf ff 7d b,a 20081e4 <_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 ); 20083f4: 7f ff e6 70 call 2001db4 <== NOT EXECUTED 20083f8: 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; 20083fc: 10 bf ff aa b 20082a4 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 2008400: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 2008404: 10 bf ff 9a b 200826c <_Thread_queue_Enqueue_priority+0xd0> 2008408: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 0200d8b8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 200d8b8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200d8bc: 7f ff d1 3a call 2001da4 200d8c0: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200d8c4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200d8c8: 03 00 00 ef sethi %hi(0x3bc00), %g1 200d8cc: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200d8d0: 80 88 80 01 btst %g2, %g1 200d8d4: 02 80 00 19 be 200d938 <_Thread_queue_Extract_fifo+0x80> 200d8d8: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 200d8dc: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 200d8e0: 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 ) ) { 200d8e4: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 200d8e8: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 200d8ec: c4 20 60 04 st %g2, [ %g1 + 4 ] 200d8f0: 80 a0 e0 02 cmp %g3, 2 200d8f4: 02 80 00 07 be 200d910 <_Thread_queue_Extract_fifo+0x58> 200d8f8: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 200d8fc: 7f ff d1 2e call 2001db4 200d900: 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 ); 200d904: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200d908: 7f ff e7 88 call 2007728 <_Thread_Clear_state> 200d90c: 81 e8 00 00 restore 200d910: 82 10 20 03 mov 3, %g1 200d914: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 200d918: 7f ff d1 27 call 2001db4 200d91c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 200d920: 7f ff ed bc call 2009010 <_Watchdog_Remove> 200d924: 90 06 60 48 add %i1, 0x48, %o0 200d928: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200d92c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200d930: 7f ff e7 7e call 2007728 <_Thread_Clear_state> 200d934: 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 ); 200d938: 7f ff d1 1f call 2001db4 <== NOT EXECUTED 200d93c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 200d940: 01 00 00 00 nop 0200c6bc <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 200c6bc: 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 ); 200c6c0: 7f ff d5 b9 call 2001da4 200c6c4: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 200c6c8: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 200c6cc: 03 00 00 ef sethi %hi(0x3bc00), %g1 200c6d0: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200c6d4: 80 88 80 01 btst %g2, %g1 200c6d8: 02 80 00 23 be 200c764 <_Thread_queue_Extract_priority_helper+0xa8> 200c6dc: 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)); 200c6e0: 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; 200c6e4: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 200c6e8: 80 a0 c0 01 cmp %g3, %g1 200c6ec: 02 80 00 2a be 200c794 <_Thread_queue_Extract_priority_helper+0xd8> 200c6f0: 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; 200c6f4: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 200c6f8: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 200c6fc: 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; 200c700: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 200c704: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 200c708: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 200c70c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 200c710: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 200c714: 80 a0 80 01 cmp %g2, %g1 200c718: 02 80 00 07 be 200c734 <_Thread_queue_Extract_priority_helper+0x78> 200c71c: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 200c720: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 200c724: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 200c728: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 200c72c: 82 00 e0 3c add %g3, 0x3c, %g1 200c730: c2 23 40 00 st %g1, [ %o5 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 200c734: 80 8e a0 ff btst 0xff, %i2 200c738: 12 80 00 0d bne 200c76c <_Thread_queue_Extract_priority_helper+0xb0> 200c73c: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 200c740: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 200c744: 80 a0 60 02 cmp %g1, 2 200c748: 02 80 00 0b be 200c774 <_Thread_queue_Extract_priority_helper+0xb8> 200c74c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 200c750: 7f ff d5 99 call 2001db4 200c754: 33 04 00 ff sethi %hi(0x1003fc00), %i1 200c758: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 200c75c: 7f ff eb f3 call 2007728 <_Thread_Clear_state> 200c760: 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 ); 200c764: 7f ff d5 94 call 2001db4 <== NOT EXECUTED 200c768: 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 ); 200c76c: 7f ff d5 92 call 2001db4 200c770: 91 e8 00 08 restore %g0, %o0, %o0 200c774: 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 ); 200c778: 7f ff d5 8f call 2001db4 200c77c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 200c780: 7f ff f2 24 call 2009010 <_Watchdog_Remove> 200c784: 90 06 20 48 add %i0, 0x48, %o0 200c788: b2 16 63 f8 or %i1, 0x3f8, %i1 200c78c: 7f ff eb e7 call 2007728 <_Thread_Clear_state> 200c790: 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; 200c794: 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; 200c798: 10 bf ff e7 b 200c734 <_Thread_queue_Extract_priority_helper+0x78> 200c79c: c4 20 40 00 st %g2, [ %g1 ] 0200c7a0 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 200c7a0: 92 10 00 08 mov %o0, %o1 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 200c7a4: 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 && 200c7a8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 200c7ac: 80 a0 e0 00 cmp %g3, 0 200c7b0: 02 80 00 06 be 200c7c8 <_Thread_queue_Process_timeout+0x28> 200c7b4: 03 00 80 60 sethi %hi(0x2018000), %g1 200c7b8: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 2018294 <_Thread_Executing> 200c7bc: 80 a2 40 02 cmp %o1, %g2 200c7c0: 02 80 00 07 be 200c7dc <_Thread_queue_Process_timeout+0x3c> 200c7c4: 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; 200c7c8: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 200c7cc: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 200c7d0: 82 13 c0 00 mov %o7, %g1 200c7d4: 7f ff ff af call 200c690 <_Thread_queue_Extract> 200c7d8: 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 ) { 200c7dc: 02 80 00 06 be 200c7f4 <_Thread_queue_Process_timeout+0x54> 200c7e0: 84 10 20 02 mov 2, %g2 the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 200c7e4: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 200c7e8: c2 22 60 34 st %g1, [ %o1 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 200c7ec: 81 c3 e0 08 retl 200c7f0: c4 22 20 30 st %g2, [ %o0 + 0x30 ] 200c7f4: 81 c3 e0 08 retl <== NOT EXECUTED 200c7f8: 01 00 00 00 nop 020084dc <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 20084dc: 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 ) 20084e0: 80 a6 20 00 cmp %i0, 0 20084e4: 02 80 00 13 be 2008530 <_Thread_queue_Requeue+0x54> 20084e8: 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 ) { 20084ec: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 20084f0: 80 a4 20 01 cmp %l0, 1 20084f4: 02 80 00 04 be 2008504 <_Thread_queue_Requeue+0x28> 20084f8: 01 00 00 00 nop 20084fc: 81 c7 e0 08 ret <== NOT EXECUTED 2008500: 81 e8 00 00 restore <== NOT EXECUTED Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 2008504: 7f ff e6 28 call 2001da4 2008508: 01 00 00 00 nop 200850c: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 2008510: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 2008514: 03 00 00 ef sethi %hi(0x3bc00), %g1 2008518: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 200851c: 80 88 80 01 btst %g2, %g1 2008520: 12 80 00 06 bne 2008538 <_Thread_queue_Requeue+0x5c> 2008524: 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 ); 2008528: 7f ff e6 23 call 2001db4 200852c: 90 10 00 11 mov %l1, %o0 2008530: 81 c7 e0 08 ret 2008534: 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 ); 2008538: 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; 200853c: e0 26 20 30 st %l0, [ %i0 + 0x30 ] 2008540: 40 00 10 5f call 200c6bc <_Thread_queue_Extract_priority_helper> 2008544: 94 10 20 01 mov 1, %o2 (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 2008548: 90 10 00 18 mov %i0, %o0 200854c: 92 10 00 19 mov %i1, %o1 2008550: 7f ff ff 13 call 200819c <_Thread_queue_Enqueue_priority> 2008554: 94 07 bf f4 add %fp, -12, %o2 2008558: 30 bf ff f4 b,a 2008528 <_Thread_queue_Requeue+0x4c> 02011b30 <_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) { 2011b30: 9d e3 bf 98 save %sp, -104, %sp 2011b34: 03 00 80 c8 sethi %hi(0x2032000), %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 ); 2011b38: 05 00 80 c8 sethi %hi(0x2032000), %g2 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011b3c: a0 10 60 54 or %g1, 0x54, %l0 if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 2011b40: 03 00 80 c8 sethi %hi(0x2032000), %g1 } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 2011b44: a4 10 a0 48 or %g2, 0x48, %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 ); 2011b48: a2 10 60 34 or %g1, 0x34, %l1 static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 2011b4c: 40 00 02 ca call 2012674 <_Chain_Get> 2011b50: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 2011b54: 80 a2 20 00 cmp %o0, 0 2011b58: 02 80 00 0f be 2011b94 <_Timer_Server_process_insertions+0x64> 2011b5c: 01 00 00 00 nop break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 2011b60: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011b64: 80 a0 60 01 cmp %g1, 1 2011b68: 02 80 00 12 be 2011bb0 <_Timer_Server_process_insertions+0x80> 2011b6c: 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 ) { 2011b70: 02 80 00 0b be 2011b9c <_Timer_Server_process_insertions+0x6c> 2011b74: 92 02 20 10 add %o0, 0x10, %o1 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011b78: 7f ff ff ee call 2011b30 <_Timer_Server_process_insertions> <== NOT EXECUTED 2011b7c: 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 ); 2011b80: 40 00 02 bd call 2012674 <_Chain_Get> 2011b84: 90 10 00 10 mov %l0, %o0 if ( the_timer == NULL ) 2011b88: 80 a2 20 00 cmp %o0, 0 2011b8c: 32 bf ff f6 bne,a 2011b64 <_Timer_Server_process_insertions+0x34> 2011b90: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED 2011b94: 81 c7 e0 08 ret 2011b98: 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 ); 2011b9c: 40 00 12 58 call 20164fc <_Watchdog_Insert> 2011ba0: 90 10 00 12 mov %l2, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011ba4: 7f ff ff e3 call 2011b30 <_Timer_Server_process_insertions> 2011ba8: 01 00 00 00 nop 2011bac: 30 bf ff f5 b,a 2011b80 <_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 ); 2011bb0: 92 02 20 10 add %o0, 0x10, %o1 2011bb4: 40 00 12 52 call 20164fc <_Watchdog_Insert> 2011bb8: 90 10 00 11 mov %l1, %o0 } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 2011bbc: 7f ff ff dd call 2011b30 <_Timer_Server_process_insertions> 2011bc0: 01 00 00 00 nop 2011bc4: 30 bf ff ef b,a 2011b80 <_Timer_Server_process_insertions+0x50> 0200a714 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 200a714: 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; 200a718: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 200a71c: 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; 200a720: 91 38 60 1f sra %g1, 0x1f, %o0 200a724: 92 10 00 01 mov %g1, %o1 200a728: 83 30 60 1d srl %g1, 0x1d, %g1 200a72c: 87 2a 60 03 sll %o1, 3, %g3 200a730: 85 2a 20 03 sll %o0, 3, %g2 200a734: 84 10 40 02 or %g1, %g2, %g2 200a738: 83 30 e0 1b srl %g3, 0x1b, %g1 200a73c: 99 28 a0 05 sll %g2, 5, %o4 200a740: 9b 28 e0 05 sll %g3, 5, %o5 200a744: 98 10 40 0c or %g1, %o4, %o4 200a748: 9a a3 40 03 subcc %o5, %g3, %o5 200a74c: 83 33 60 1a srl %o5, 0x1a, %g1 200a750: 98 63 00 02 subx %o4, %g2, %o4 200a754: 97 2b 60 06 sll %o5, 6, %o3 200a758: 95 2b 20 06 sll %o4, 6, %o2 200a75c: 96 a2 c0 0d subcc %o3, %o5, %o3 200a760: 94 10 40 0a or %g1, %o2, %o2 200a764: 94 62 80 0c subx %o2, %o4, %o2 200a768: 96 82 c0 09 addcc %o3, %o1, %o3 200a76c: 94 42 80 08 addx %o2, %o0, %o2 200a770: 83 32 e0 1e srl %o3, 0x1e, %g1 200a774: 85 2a a0 02 sll %o2, 2, %g2 200a778: 84 10 40 02 or %g1, %g2, %g2 200a77c: 87 2a e0 02 sll %o3, 2, %g3 200a780: 96 82 c0 03 addcc %o3, %g3, %o3 200a784: 94 42 80 02 addx %o2, %g2, %o2 200a788: 83 32 e0 1e srl %o3, 0x1e, %g1 200a78c: 85 2a a0 02 sll %o2, 2, %g2 200a790: 84 10 40 02 or %g1, %g2, %g2 200a794: 87 2a e0 02 sll %o3, 2, %g3 200a798: 96 82 c0 03 addcc %o3, %g3, %o3 200a79c: 94 42 80 02 addx %o2, %g2, %o2 200a7a0: 83 32 e0 1e srl %o3, 0x1e, %g1 200a7a4: 85 2a a0 02 sll %o2, 2, %g2 200a7a8: 84 10 40 02 or %g1, %g2, %g2 200a7ac: 87 2a e0 02 sll %o3, 2, %g3 200a7b0: 96 82 c0 03 addcc %o3, %g3, %o3 200a7b4: 94 42 80 02 addx %o2, %g2, %o2 200a7b8: 85 32 e0 17 srl %o3, 0x17, %g2 200a7bc: 83 2a a0 09 sll %o2, 9, %g1 200a7c0: 9b 2a e0 09 sll %o3, 9, %o5 200a7c4: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 200a7c8: 96 83 40 0f addcc %o5, %o7, %o3 200a7cc: 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; 200a7d0: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 200a7d4: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 200a7d8: 80 92 80 0b orcc %o2, %o3, %g0 200a7dc: 02 80 00 5d be 200a950 <_Timespec_Divide+0x23c> 200a7e0: 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; 200a7e4: 92 10 00 08 mov %o0, %o1 200a7e8: 83 32 60 1d srl %o1, 0x1d, %g1 200a7ec: 9b 2a 60 03 sll %o1, 3, %o5 200a7f0: 91 3a 20 1f sra %o0, 0x1f, %o0 200a7f4: 99 2a 20 03 sll %o0, 3, %o4 200a7f8: 98 10 40 0c or %g1, %o4, %o4 200a7fc: 83 33 60 1b srl %o5, 0x1b, %g1 200a800: 85 2b 20 05 sll %o4, 5, %g2 200a804: 87 2b 60 05 sll %o5, 5, %g3 200a808: 84 10 40 02 or %g1, %g2, %g2 200a80c: 86 a0 c0 0d subcc %g3, %o5, %g3 200a810: 83 30 e0 1a srl %g3, 0x1a, %g1 200a814: 84 60 80 0c subx %g2, %o4, %g2 200a818: 9b 28 e0 06 sll %g3, 6, %o5 200a81c: 99 28 a0 06 sll %g2, 6, %o4 200a820: 9a a3 40 03 subcc %o5, %g3, %o5 200a824: 98 10 40 0c or %g1, %o4, %o4 200a828: 98 63 00 02 subx %o4, %g2, %o4 200a82c: 9a 83 40 09 addcc %o5, %o1, %o5 200a830: 83 33 60 1e srl %o5, 0x1e, %g1 200a834: 98 43 00 08 addx %o4, %o0, %o4 200a838: 87 2b 60 02 sll %o5, 2, %g3 200a83c: 85 2b 20 02 sll %o4, 2, %g2 200a840: 9a 83 40 03 addcc %o5, %g3, %o5 200a844: 84 10 40 02 or %g1, %g2, %g2 200a848: 83 33 60 1e srl %o5, 0x1e, %g1 200a84c: 98 43 00 02 addx %o4, %g2, %o4 200a850: 87 2b 60 02 sll %o5, 2, %g3 200a854: 85 2b 20 02 sll %o4, 2, %g2 200a858: 9a 83 40 03 addcc %o5, %g3, %o5 200a85c: 84 10 40 02 or %g1, %g2, %g2 200a860: 83 33 60 1e srl %o5, 0x1e, %g1 200a864: 98 43 00 02 addx %o4, %g2, %o4 200a868: 87 2b 60 02 sll %o5, 2, %g3 200a86c: 85 2b 20 02 sll %o4, 2, %g2 200a870: 9a 83 40 03 addcc %o5, %g3, %o5 200a874: 84 10 40 02 or %g1, %g2, %g2 200a878: 98 43 00 02 addx %o4, %g2, %o4 200a87c: 83 2b 20 09 sll %o4, 9, %g1 200a880: 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; 200a884: 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; 200a888: a0 11 00 01 or %g4, %g1, %l0 200a88c: 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; 200a890: a2 84 40 13 addcc %l1, %l3, %l1 200a894: 83 34 60 1e srl %l1, 0x1e, %g1 200a898: 87 2c 60 02 sll %l1, 2, %g3 200a89c: a5 3c a0 1f sra %l2, 0x1f, %l2 200a8a0: a0 44 00 12 addx %l0, %l2, %l0 200a8a4: 85 2c 20 02 sll %l0, 2, %g2 200a8a8: 84 10 40 02 or %g1, %g2, %g2 200a8ac: 83 30 e0 1b srl %g3, 0x1b, %g1 200a8b0: 99 28 a0 05 sll %g2, 5, %o4 200a8b4: 9b 28 e0 05 sll %g3, 5, %o5 200a8b8: 98 10 40 0c or %g1, %o4, %o4 200a8bc: 9a a3 40 03 subcc %o5, %g3, %o5 200a8c0: 98 63 00 02 subx %o4, %g2, %o4 200a8c4: 9a 83 40 11 addcc %o5, %l1, %o5 200a8c8: 83 33 60 1e srl %o5, 0x1e, %g1 200a8cc: 98 43 00 10 addx %o4, %l0, %o4 200a8d0: 87 2b 60 02 sll %o5, 2, %g3 200a8d4: 85 2b 20 02 sll %o4, 2, %g2 200a8d8: 9a 83 40 03 addcc %o5, %g3, %o5 200a8dc: 84 10 40 02 or %g1, %g2, %g2 200a8e0: 83 33 60 1e srl %o5, 0x1e, %g1 200a8e4: 87 2b 60 02 sll %o5, 2, %g3 200a8e8: 98 43 00 02 addx %o4, %g2, %o4 200a8ec: 9a 83 40 03 addcc %o5, %g3, %o5 200a8f0: 85 2b 20 02 sll %o4, 2, %g2 200a8f4: 84 10 40 02 or %g1, %g2, %g2 200a8f8: 83 33 60 1b srl %o5, 0x1b, %g1 200a8fc: 98 43 00 02 addx %o4, %g2, %o4 200a900: 99 2b 20 05 sll %o4, 5, %o4 200a904: 98 10 40 0c or %g1, %o4, %o4 200a908: 93 2b 60 05 sll %o5, 5, %o1 200a90c: 40 00 36 52 call 2018254 <__udivdi3> 200a910: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 200a914: 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; 200a918: a0 10 00 08 mov %o0, %l0 200a91c: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 200a920: 96 10 23 e8 mov 0x3e8, %o3 200a924: 40 00 36 4c call 2018254 <__udivdi3> 200a928: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 200a92c: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 200a930: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 200a934: 94 10 20 00 clr %o2 200a938: 92 10 00 11 mov %l1, %o1 200a93c: 40 00 37 22 call 20185c4 <__umoddi3> 200a940: 96 10 23 e8 mov 0x3e8, %o3 200a944: d2 26 c0 00 st %o1, [ %i3 ] 200a948: 81 c7 e0 08 ret 200a94c: 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; 200a950: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 200a954: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 200a958: 81 c7 e0 08 ret <== NOT EXECUTED 200a95c: 81 e8 00 00 restore <== NOT EXECUTED 0200f330 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 200f330: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 200f334: 40 00 15 24 call 20147c4 <_Chain_Extract> 200f338: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 200f33c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 200f340: 80 a0 60 00 cmp %g1, 0 200f344: 02 80 00 04 be 200f354 <_User_extensions_Remove_set+0x24> 200f348: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 200f34c: 40 00 15 1e call 20147c4 <_Chain_Extract> <== NOT EXECUTED 200f350: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 200f354: 81 c7 e0 08 ret 200f358: 81 e8 00 00 restore 02008d0c <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 2008d0c: 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 ; 2008d10: 03 00 80 61 sethi %hi(0x2018400), %g1 2008d14: e0 00 60 08 ld [ %g1 + 8 ], %l0 ! 2018408 <_User_extensions_List> 2008d18: 82 10 60 08 or %g1, 8, %g1 2008d1c: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 2008d20: 80 a4 00 11 cmp %l0, %l1 2008d24: 02 80 00 10 be 2008d64 <_User_extensions_Thread_create+0x58> 2008d28: 03 00 80 60 sethi %hi(0x2018000), %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)( 2008d2c: a4 10 62 94 or %g1, 0x294, %l2 ! 2018294 <_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 ) { 2008d30: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 2008d34: 80 a0 60 00 cmp %g1, 0 2008d38: 02 80 00 07 be 2008d54 <_User_extensions_Thread_create+0x48> 2008d3c: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 2008d40: 9f c0 40 00 call %g1 2008d44: d0 04 80 00 ld [ %l2 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 2008d48: 80 8a 20 ff btst 0xff, %o0 2008d4c: 02 80 00 08 be 2008d6c <_User_extensions_Thread_create+0x60> 2008d50: 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 ) { 2008d54: 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 ) ; 2008d58: 80 a4 00 11 cmp %l0, %l1 2008d5c: 32 bf ff f6 bne,a 2008d34 <_User_extensions_Thread_create+0x28> 2008d60: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 2008d64: 81 c7 e0 08 ret 2008d68: 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 ) 2008d6c: 81 c7 e0 08 ret <== NOT EXECUTED 2008d70: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 0200ace8 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 200ace8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 200acec: 7f ff df 4b call 2002a18 200acf0: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200acf4: 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; 200acf8: 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 ) ) { 200acfc: 80 a0 80 10 cmp %g2, %l0 200ad00: 02 80 00 1f be 200ad7c <_Watchdog_Adjust+0x94> 200ad04: 80 a6 60 00 cmp %i1, 0 switch ( direction ) { 200ad08: 12 80 00 1f bne 200ad84 <_Watchdog_Adjust+0x9c> 200ad0c: 80 a6 60 01 cmp %i1, 1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 200ad10: 80 a6 a0 00 cmp %i2, 0 200ad14: 02 80 00 1a be 200ad7c <_Watchdog_Adjust+0x94> 200ad18: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200ad1c: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 200ad20: 80 a6 80 19 cmp %i2, %i1 200ad24: 1a 80 00 0b bcc 200ad50 <_Watchdog_Adjust+0x68> 200ad28: a2 10 20 01 mov 1, %l1 _Watchdog_First( header )->delta_interval -= units; 200ad2c: 10 80 00 1d b 200ada0 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED 200ad30: 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 ) { 200ad34: b4 a6 80 19 subcc %i2, %i1, %i2 200ad38: 02 80 00 11 be 200ad7c <_Watchdog_Adjust+0x94> 200ad3c: 01 00 00 00 nop if ( units < _Watchdog_First( header )->delta_interval ) { 200ad40: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 200ad44: 80 a6 40 1a cmp %i1, %i2 200ad48: 18 80 00 16 bgu 200ada0 <_Watchdog_Adjust+0xb8> 200ad4c: 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; 200ad50: e2 20 a0 10 st %l1, [ %g2 + 0x10 ] _ISR_Enable( level ); 200ad54: 7f ff df 35 call 2002a28 200ad58: 01 00 00 00 nop _Watchdog_Tickle( header ); 200ad5c: 40 00 00 b4 call 200b02c <_Watchdog_Tickle> 200ad60: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 200ad64: 7f ff df 2d call 2002a18 200ad68: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 200ad6c: c2 06 00 00 ld [ %i0 ], %g1 if ( _Chain_Is_empty( header ) ) 200ad70: 80 a4 00 01 cmp %l0, %g1 200ad74: 12 bf ff f0 bne 200ad34 <_Watchdog_Adjust+0x4c> 200ad78: 84 10 00 01 mov %g1, %g2 } break; } } _ISR_Enable( level ); 200ad7c: 7f ff df 2b call 2002a28 200ad80: 91 e8 00 08 restore %g0, %o0, %o0 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 200ad84: 12 bf ff fe bne 200ad7c <_Watchdog_Adjust+0x94> 200ad88: 01 00 00 00 nop case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 200ad8c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 200ad90: 82 00 40 1a add %g1, %i2, %g1 200ad94: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] } break; } } _ISR_Enable( level ); 200ad98: 7f ff df 24 call 2002a28 200ad9c: 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; 200ada0: 10 bf ff f7 b 200ad7c <_Watchdog_Adjust+0x94> 200ada4: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] 0201642c <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 201642c: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 2016430: a2 96 60 00 orcc %i1, 0, %l1 2016434: 12 80 00 04 bne 2016444 <_Watchdog_Adjust_to_chain+0x18> 2016438: 01 00 00 00 nop 201643c: 81 c7 e0 08 ret 2016440: 81 e8 00 00 restore return; } _ISR_Disable( level ); 2016444: 7f ff d3 7c call 200b234 2016448: 01 00 00 00 nop 201644c: a6 10 00 08 mov %o0, %l3 2016450: 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; 2016454: a0 06 20 04 add %i0, 4, %l0 if ( !_Chain_Is_empty( header ) ) { 2016458: 80 a0 80 10 cmp %g2, %l0 201645c: 02 80 00 25 be 20164f0 <_Watchdog_Adjust_to_chain+0xc4> 2016460: a4 06 a0 04 add %i2, 4, %l2 2016464: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 2016468: 80 a6 40 11 cmp %i1, %l1 201646c: 18 80 00 20 bgu 20164ec <_Watchdog_Adjust_to_chain+0xc0> 2016470: 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; 2016474: 10 80 00 15 b 20164c8 <_Watchdog_Adjust_to_chain+0x9c> 2016478: 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; 201647c: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 2016480: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 2016484: e4 20 80 00 st %l2, [ %g2 ] old_last_node = the_chain->last; 2016488: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 201648c: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 2016490: 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; 2016494: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 2016498: 7f ff d3 6b call 200b244 201649c: 90 10 00 13 mov %l3, %o0 20164a0: 7f ff d3 65 call 200b234 20164a4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 20164a8: c4 06 00 00 ld [ %i0 ], %g2 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 20164ac: 80 a4 00 02 cmp %l0, %g2 20164b0: 02 80 00 10 be 20164f0 <_Watchdog_Adjust_to_chain+0xc4> 20164b4: 01 00 00 00 nop 20164b8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 20164bc: 80 a0 60 00 cmp %g1, 0 20164c0: 32 80 00 07 bne,a 20164dc <_Watchdog_Adjust_to_chain+0xb0> 20164c4: 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)) 20164c8: 80 a4 00 02 cmp %l0, %g2 20164cc: 32 bf ff ec bne,a 201647c <_Watchdog_Adjust_to_chain+0x50> 20164d0: c2 00 80 00 ld [ %g2 ], %g1 20164d4: 10 bf ff ec b 2016484 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED 20164d8: 84 10 20 00 clr %g2 <== NOT EXECUTED return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 20164dc: 02 80 00 05 be 20164f0 <_Watchdog_Adjust_to_chain+0xc4> 20164e0: 01 00 00 00 nop 20164e4: 10 bf ff e1 b 2016468 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED 20164e8: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 20164ec: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] break; } } } _ISR_Enable( level ); 20164f0: 7f ff d3 55 call 200b244 20164f4: 91 e8 00 13 restore %g0, %l3, %o0 20164f8: 01 00 00 00 nop 02008e64 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008e64: 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; 2008e68: 03 00 80 60 sethi %hi(0x2018000), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 2008e6c: 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; 2008e70: e6 00 62 70 ld [ %g1 + 0x270 ], %l3 _ISR_Disable( level ); 2008e74: 7f ff e3 cc call 2001da4 2008e78: 01 00 00 00 nop 2008e7c: 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 ) { 2008e80: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008e84: 80 a0 60 00 cmp %g1, 0 2008e88: 12 80 00 4a bne 2008fb0 <_Watchdog_Insert+0x14c> 2008e8c: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 2008e90: 2b 00 80 60 sethi %hi(0x2018000), %l5 2008e94: c2 05 63 20 ld [ %l5 + 0x320 ], %g1 ! 2018320 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008e98: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 2008e9c: 82 00 60 01 inc %g1 2008ea0: 2f 00 80 60 sethi %hi(0x2018000), %l7 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 2008ea4: c4 26 60 08 st %g2, [ %i1 + 8 ] 2008ea8: a8 15 e2 90 or %l7, 0x290, %l4 _Watchdog_Sync_count++; 2008eac: c2 25 63 20 st %g1, [ %l5 + 0x320 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 2008eb0: ba 10 00 14 mov %l4, %i5 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008eb4: 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 ; 2008eb8: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 2008ebc: 80 a4 a0 00 cmp %l2, 0 2008ec0: 02 80 00 2b be 2008f6c <_Watchdog_Insert+0x108> 2008ec4: 03 00 80 60 sethi %hi(0x2018000), %g1 2008ec8: c2 04 40 00 ld [ %l1 ], %g1 2008ecc: 80 a0 60 00 cmp %g1, 0 2008ed0: 02 80 00 27 be 2008f6c <_Watchdog_Insert+0x108> 2008ed4: 03 00 80 60 sethi %hi(0x2018000), %g1 break; if ( delta_interval < after->delta_interval ) { 2008ed8: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 2008edc: 80 a4 80 10 cmp %l2, %l0 2008ee0: 1a 80 00 13 bcc 2008f2c <_Watchdog_Insert+0xc8> 2008ee4: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 2008ee8: 10 80 00 20 b 2008f68 <_Watchdog_Insert+0x104> 2008eec: 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 ) { 2008ef0: c2 05 00 00 ld [ %l4 ], %g1 2008ef4: 80 a4 c0 01 cmp %l3, %g1 2008ef8: 0a 80 00 30 bcs 2008fb8 <_Watchdog_Insert+0x154> 2008efc: 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 ) ) 2008f00: a4 a4 80 10 subcc %l2, %l0, %l2 2008f04: 02 80 00 19 be 2008f68 <_Watchdog_Insert+0x104> 2008f08: e2 04 40 00 ld [ %l1 ], %l1 2008f0c: c2 04 40 00 ld [ %l1 ], %g1 2008f10: 80 a0 60 00 cmp %g1, 0 2008f14: 02 80 00 16 be 2008f6c <_Watchdog_Insert+0x108> 2008f18: 03 00 80 60 sethi %hi(0x2018000), %g1 break; if ( delta_interval < after->delta_interval ) { 2008f1c: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 2008f20: 80 a4 00 12 cmp %l0, %l2 2008f24: 18 80 00 10 bgu 2008f64 <_Watchdog_Insert+0x100> 2008f28: 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 ); 2008f2c: 7f ff e3 a2 call 2001db4 2008f30: 90 10 00 18 mov %i0, %o0 2008f34: 7f ff e3 9c call 2001da4 2008f38: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 2008f3c: c2 06 60 08 ld [ %i1 + 8 ], %g1 2008f40: 80 a0 60 01 cmp %g1, 1 2008f44: 02 bf ff eb be 2008ef0 <_Watchdog_Insert+0x8c> 2008f48: 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; 2008f4c: e6 25 e2 90 st %l3, [ %l7 + 0x290 ] <== NOT EXECUTED _Watchdog_Sync_count--; 2008f50: c2 05 63 20 ld [ %l5 + 0x320 ], %g1 <== NOT EXECUTED 2008f54: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2008f58: c2 25 63 20 st %g1, [ %l5 + 0x320 ] <== NOT EXECUTED _ISR_Enable( level ); 2008f5c: 7f ff e3 96 call 2001db4 <== NOT EXECUTED 2008f60: 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; 2008f64: 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; 2008f68: 03 00 80 60 sethi %hi(0x2018000), %g1 2008f6c: c6 00 63 24 ld [ %g1 + 0x324 ], %g3 ! 2018324 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 2008f70: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 2008f74: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 2008f78: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 2008f7c: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 2008f80: 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; 2008f84: e6 25 e2 90 st %l3, [ %l7 + 0x290 ] 2008f88: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 2008f8c: c2 05 63 20 ld [ %l5 + 0x320 ], %g1 after_node->next = the_node; 2008f90: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2008f94: c4 26 60 04 st %g2, [ %i1 + 4 ] 2008f98: 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; 2008f9c: 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; 2008fa0: c8 26 40 00 st %g4, [ %i1 ] 2008fa4: c2 25 63 20 st %g1, [ %l5 + 0x320 ] _ISR_Enable( level ); 2008fa8: 7f ff e3 83 call 2001db4 2008fac: 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 ); 2008fb0: 7f ff e3 81 call 2001db4 <== NOT EXECUTED 2008fb4: 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; 2008fb8: e6 27 40 00 st %l3, [ %i5 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 2008fbc: 10 bf ff bf b 2008eb8 <_Watchdog_Insert+0x54> 2008fc0: e4 06 60 0c ld [ %i1 + 0xc ], %l2 02009010 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 2009010: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 2009014: 7f ff e3 64 call 2001da4 2009018: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 200901c: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 2009020: 80 a6 20 01 cmp %i0, 1 2009024: 02 80 00 2a be 20090cc <_Watchdog_Remove+0xbc> 2009028: 03 00 80 60 sethi %hi(0x2018000), %g1 200902c: 1a 80 00 09 bcc 2009050 <_Watchdog_Remove+0x40> 2009030: 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; 2009034: 03 00 80 60 sethi %hi(0x2018000), %g1 2009038: c4 00 63 24 ld [ %g1 + 0x324 ], %g2 ! 2018324 <_Watchdog_Ticks_since_boot> 200903c: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 2009040: 7f ff e3 5d call 2001db4 2009044: 01 00 00 00 nop return( previous_state ); } 2009048: 81 c7 e0 08 ret 200904c: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 2009050: 18 bf ff fa bgu 2009038 <_Watchdog_Remove+0x28> 2009054: 03 00 80 60 sethi %hi(0x2018000), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 2009058: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 200905c: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 2009060: c2 01 00 00 ld [ %g4 ], %g1 2009064: 80 a0 60 00 cmp %g1, 0 2009068: 02 80 00 07 be 2009084 <_Watchdog_Remove+0x74> 200906c: 03 00 80 60 sethi %hi(0x2018000), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 2009070: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 2009074: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 2009078: 82 00 40 02 add %g1, %g2, %g1 200907c: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 2009080: 03 00 80 60 sethi %hi(0x2018000), %g1 2009084: c4 00 63 20 ld [ %g1 + 0x320 ], %g2 ! 2018320 <_Watchdog_Sync_count> 2009088: 80 a0 a0 00 cmp %g2, 0 200908c: 22 80 00 07 be,a 20090a8 <_Watchdog_Remove+0x98> 2009090: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 2009094: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED 2009098: c6 00 62 70 ld [ %g1 + 0x270 ], %g3 ! 2018270 <_ISR_Nest_level> <== NOT EXECUTED 200909c: 05 00 80 60 sethi %hi(0x2018000), %g2 <== NOT EXECUTED 20090a0: c6 20 a2 90 st %g3, [ %g2 + 0x290 ] ! 2018290 <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 20090a4: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 20090a8: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 20090ac: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 20090b0: 03 00 80 60 sethi %hi(0x2018000), %g1 20090b4: c4 00 63 24 ld [ %g1 + 0x324 ], %g2 ! 2018324 <_Watchdog_Ticks_since_boot> 20090b8: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 20090bc: 7f ff e3 3e call 2001db4 20090c0: 01 00 00 00 nop return( previous_state ); } 20090c4: 81 c7 e0 08 ret 20090c8: 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; 20090cc: c4 00 63 24 ld [ %g1 + 0x324 ], %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; 20090d0: 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; 20090d4: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 20090d8: 7f ff e3 37 call 2001db4 <== NOT EXECUTED 20090dc: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 20090e0: 81 c7 e0 08 ret <== NOT EXECUTED 20090e4: 81 e8 00 00 restore <== NOT EXECUTED 02009200 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 2009200: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 2009204: 80 a6 20 00 cmp %i0, 0 2009208: 02 80 00 15 be 200925c <_Workspace_Handler_initialization+0x5c> 200920c: 80 8e 20 07 btst 7, %i0 2009210: 12 80 00 14 bne 2009260 <_Workspace_Handler_initialization+0x60> 2009214: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 2009218: 03 00 80 60 sethi %hi(0x2018000), %g1 200921c: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 201826c <_Configuration_Table> 2009220: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3 2009224: 80 a0 e0 00 cmp %g3, 0 2009228: 32 80 00 11 bne,a 200926c <_Workspace_Handler_initialization+0x6c> 200922c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 2009230: 92 10 00 18 mov %i0, %o1 2009234: 94 10 00 19 mov %i1, %o2 2009238: 11 00 80 60 sethi %hi(0x2018000), %o0 200923c: 96 10 20 08 mov 8, %o3 2009240: 7f ff f5 ab call 20068ec <_Heap_Initialize> 2009244: 90 12 21 f4 or %o0, 0x1f4, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 2009248: 80 a2 20 00 cmp %o0, 0 200924c: 02 80 00 0d be 2009280 <_Workspace_Handler_initialization+0x80> 2009250: 92 10 20 01 mov 1, %o1 2009254: 81 c7 e0 08 ret 2009258: 81 e8 00 00 restore ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 200925c: 90 10 20 00 clr %o0 2009260: 92 10 20 01 mov 1, %o1 2009264: 7f ff f6 2f call 2006b20 <_Internal_error_Occurred> 2009268: 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 ); 200926c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2009270: 40 00 14 1c call 200e2e0 <== NOT EXECUTED 2009274: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 2009278: 10 bf ff ef b 2009234 <_Workspace_Handler_initialization+0x34> <== NOT EXECUTED 200927c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 2009280: 7f ff f6 28 call 2006b20 <_Internal_error_Occurred> <== NOT EXECUTED 2009284: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 2009288: 01 00 00 00 nop 02001f48 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 2001f48: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 2001f4c: 94 10 20 00 clr %o2 <== NOT EXECUTED 2001f50: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2001f54: 7f ff ff eb call 2001f00 <__assert_func> <== NOT EXECUTED 2001f58: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2001f5c: 01 00 00 00 nop 02001f00 <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 2001f00: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 2001f04: 03 00 80 59 sethi %hi(0x2016400), %g1 <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 2001f08: 9a 10 00 1a mov %i2, %o5 <== NOT EXECUTED 2001f0c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 2001f10: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED 2001f14: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 2001f18: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 2001f1c: 02 80 00 07 be 2001f38 <__assert_func+0x38> <== NOT EXECUTED 2001f20: 98 10 60 10 or %g1, 0x10, %o4 <== NOT EXECUTED 2001f24: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED 2001f28: 40 00 04 0a call 2002f50 <== NOT EXECUTED 2001f2c: 90 12 20 20 or %o0, 0x20, %o0 ! 2016420 <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 2001f30: 40 00 0f ee call 2005ee8 <== NOT EXECUTED 2001f34: 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", 2001f38: 03 00 80 58 sethi %hi(0x2016000), %g1 <== NOT EXECUTED 2001f3c: 9a 10 63 c0 or %g1, 0x3c0, %o5 ! 20163c0 <== NOT EXECUTED 2001f40: 10 bf ff f9 b 2001f24 <__assert_func+0x24> <== NOT EXECUTED 2001f44: 98 10 00 0d mov %o5, %o4 <== NOT EXECUTED 02015594 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 2015594: 9d e3 bf 98 save %sp, -104, %sp 2015598: 40 00 07 4f call 20172d4 <_fini> 201559c: 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(); 20155a0: 7f ff ff e1 call 2015524 20155a4: 01 00 00 00 nop rtems_shutdown_executive(status); 20155a8: 40 00 00 52 call 20156f0 20155ac: 90 10 00 18 mov %i0, %o0 20155b0: 30 80 00 00 b,a 20155b0 <_exit+0x1c> <== NOT EXECUTED 0202f034 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 202f034: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 202f038: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 202f03c: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 202f040: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202f044: 7f ff ff 6a call 202edec <== NOT EXECUTED 202f048: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 202f04c: 01 00 00 00 nop 02022584 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 2022584: 81 c3 e0 08 retl <== NOT EXECUTED 2022588: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 0200ab38 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 200ab38: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200ab3c: 7f ff ff e6 call 200aad4 <== NOT EXECUTED 200ab40: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 200ab44: 01 00 00 00 nop 02021ce0 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 2021ce0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2021ce4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2021ce8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2021cec: 7f ff ff 59 call 2021a50 <== NOT EXECUTED 2021cf0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2021cf4: 01 00 00 00 nop 02021f44 <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2021f44: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2021f48: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 2021f4c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2021f50: 7f ff ff b3 call 2021e1c <== NOT EXECUTED 2021f54: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2021f58: 01 00 00 00 nop 02002ab0 <_open_r>: const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 2002ab0: 90 10 00 09 mov %o1, %o0 2002ab4: 92 10 00 0a mov %o2, %o1 2002ab8: 94 10 00 0b mov %o3, %o2 2002abc: 82 13 c0 00 mov %o7, %g1 2002ac0: 7f ff ff 38 call 20027a0 2002ac4: 9e 10 40 00 mov %g1, %o7 2002ac8: 01 00 00 00 nop <== NOT EXECUTED 020156bc <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 20156bc: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 20156c0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 20156c4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20156c8: 40 00 00 17 call 2015724 <== NOT EXECUTED 20156cc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 20156d0: 01 00 00 00 nop 020428b4 <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 20428b4: 9d e3 bf 48 save %sp, -184, %sp <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 20428b8: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 20428bc: 7f ff 0d ee call 2006074 <== NOT EXECUTED 20428c0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 20428c4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20428c8: 06 80 00 0f bl 2042904 <_rename_r+0x50> <== NOT EXECUTED 20428cc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED return s; s = link( old, new ); 20428d0: 7f ff 7c 60 call 2021a50 <== NOT EXECUTED 20428d4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 20428d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20428dc: 06 80 00 0a bl 2042904 <_rename_r+0x50> <== NOT EXECUTED 20428e0: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 20428e4: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 20428e8: 07 00 00 10 sethi %hi(0x4000), %g3 <== NOT EXECUTED 20428ec: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 20428f0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 20428f4: 02 80 00 06 be 204290c <_rename_r+0x58> <== NOT EXECUTED 20428f8: 01 00 00 00 nop <== NOT EXECUTED 20428fc: 7f ff 80 aa call 2022ba4 <== NOT EXECUTED 2042900: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 2042904: 81 c7 e0 08 ret <== NOT EXECUTED 2042908: 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 ); 204290c: 7f ff 7f 8b call 2022738 <== NOT EXECUTED 2042910: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 2042914: 81 c7 e0 08 ret <== NOT EXECUTED 2042918: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 0200619c <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 200619c: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 20061a0: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 20061a4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20061a8: 7f ff ff b3 call 2006074 <== NOT EXECUTED 20061ac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 20061b0: 01 00 00 00 nop 02022d08 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 2022d08: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 2022d0c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2022d10: 7f ff ff a5 call 2022ba4 <== NOT EXECUTED 2022d14: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2022d18: 01 00 00 00 nop 02007248 : } unsigned int alarm( unsigned int seconds ) { 2007248: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 200724c: 03 00 80 65 sethi %hi(0x2019400), %g1 2007250: a2 10 61 4c or %g1, 0x14c, %l1 ! 201954c <_POSIX_signals_Alarm_timer> 2007254: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 2007258: 80 a0 a0 00 cmp %g2, 0 200725c: 02 80 00 23 be 20072e8 2007260: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 2007264: 40 00 14 e0 call 200c5e4 <_Watchdog_Remove> 2007268: 90 10 00 11 mov %l1, %o0 200726c: 90 02 3f fe add %o0, -2, %o0 2007270: 80 a2 20 01 cmp %o0, 1 2007274: 08 80 00 09 bleu 2007298 2007278: b0 10 20 00 clr %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 200727c: e4 24 60 0c st %l2, [ %l1 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2007280: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2007284: 11 00 80 65 sethi %hi(0x2019400), %o0 <== NOT EXECUTED 2007288: 40 00 14 6c call 200c438 <_Watchdog_Insert> <== NOT EXECUTED 200728c: 90 12 23 88 or %o0, 0x388, %o0 ! 2019788 <_Watchdog_Seconds_chain> <== NOT EXECUTED } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 2007290: 81 c7 e0 08 ret <== NOT EXECUTED 2007294: 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 - 2007298: c4 04 60 14 ld [ %l1 + 0x14 ], %g2 200729c: 03 00 80 66 sethi %hi(0x2019800), %g1 20072a0: e0 04 60 18 ld [ %l1 + 0x18 ], %l0 20072a4: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 20072a8: a0 24 00 02 sub %l0, %g2, %l0 20072ac: 11 00 03 d0 sethi %hi(0xf4000), %o0 20072b0: 40 00 37 16 call 2014f08 <.udiv> 20072b4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 20072b8: 92 10 00 08 mov %o0, %o1 20072bc: 40 00 37 13 call 2014f08 <.udiv> 20072c0: 90 10 00 10 mov %l0, %o0 20072c4: c2 04 60 0c ld [ %l1 + 0xc ], %g1 20072c8: 92 10 00 11 mov %l1, %o1 20072cc: b0 20 40 08 sub %g1, %o0, %i0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20072d0: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 20072d4: 11 00 80 65 sethi %hi(0x2019400), %o0 20072d8: 40 00 14 58 call 200c438 <_Watchdog_Insert> 20072dc: 90 12 23 88 or %o0, 0x388, %o0 ! 2019788 <_Watchdog_Seconds_chain> } _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 20072e0: 81 c7 e0 08 ret 20072e4: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20072e8: 03 00 80 1c sethi %hi(0x2007000), %g1 20072ec: 82 10 63 20 or %g1, 0x320, %g1 ! 2007320 <_POSIX_signals_Alarm_TSR> the_watchdog->id = id; the_watchdog->user_data = user_data; 20072f0: b0 10 20 00 clr %i0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20072f4: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 20072f8: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 20072fc: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2007300: c2 24 60 1c st %g1, [ %l1 + 0x1c ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2007304: e4 24 60 0c st %l2, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 2007308: 92 10 00 11 mov %l1, %o1 200730c: 11 00 80 65 sethi %hi(0x2019400), %o0 2007310: 40 00 14 4a call 200c438 <_Watchdog_Insert> 2007314: 90 12 23 88 or %o0, 0x388, %o0 ! 2019788 <_Watchdog_Seconds_chain> 2007318: 81 c7 e0 08 ret 200731c: 81 e8 00 00 restore 020055f0 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 20055f0: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 20055f4: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED 20055f8: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED 20055fc: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED 2005600: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2005604: 40 00 35 36 call 2012adc <== NOT EXECUTED 2005608: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 200560c: 01 00 00 00 nop 020200a8 : #include int chdir( const char *pathname ) { 20200a8: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 20200ac: 92 10 20 01 mov 1, %o1 20200b0: 90 10 00 18 mov %i0, %o0 20200b4: a0 07 bf e8 add %fp, -24, %l0 20200b8: 96 10 20 01 mov 1, %o3 20200bc: 94 10 00 10 mov %l0, %o2 20200c0: 7f ff 91 4f call 20045fc 20200c4: b0 10 3f ff mov -1, %i0 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 20200c8: 80 a2 20 00 cmp %o0, 0 20200cc: 12 80 00 2f bne 2020188 20200d0: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 20200d4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 20200d8: 80 a0 60 00 cmp %g1, 0 20200dc: 22 80 00 2d be,a 2020190 20200e0: 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 ) { 20200e4: 9f c0 40 00 call %g1 20200e8: 90 10 00 10 mov %l0, %o0 20200ec: 80 a2 20 01 cmp %o0, 1 20200f0: 12 80 00 19 bne 2020154 20200f4: 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 ); 20200f8: 21 00 81 28 sethi %hi(0x204a000), %l0 20200fc: d0 04 22 3c ld [ %l0 + 0x23c ], %o0 ! 204a23c 2020100: c2 02 20 0c ld [ %o0 + 0xc ], %g1 2020104: 80 a0 60 00 cmp %g1, 0 2020108: 22 80 00 09 be,a 202012c 202010c: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 2020110: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2020114: 80 a0 60 00 cmp %g1, 0 2020118: 22 80 00 05 be,a 202012c 202011c: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 2020120: 9f c0 40 00 call %g1 2020124: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 2020128: c2 07 bf e8 ld [ %fp + -24 ], %g1 202012c: c6 04 22 3c ld [ %l0 + 0x23c ], %g3 2020130: c2 20 e0 04 st %g1, [ %g3 + 4 ] 2020134: c4 07 bf ec ld [ %fp + -20 ], %g2 2020138: c4 20 e0 08 st %g2, [ %g3 + 8 ] 202013c: c2 07 bf f0 ld [ %fp + -16 ], %g1 2020140: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 2020144: c4 07 bf f4 ld [ %fp + -12 ], %g2 2020148: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] return 0; } 202014c: 81 c7 e0 08 ret 2020150: 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 ); 2020154: 80 a0 60 00 cmp %g1, 0 2020158: 02 80 00 08 be 2020178 202015c: 01 00 00 00 nop 2020160: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2020164: 80 a0 60 00 cmp %g1, 0 2020168: 02 80 00 04 be 2020178 202016c: 01 00 00 00 nop 2020170: 9f c0 40 00 call %g1 2020174: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2020178: 40 00 45 b8 call 2031858 <__errno> 202017c: b0 10 3f ff mov -1, %i0 2020180: 82 10 20 14 mov 0x14, %g1 2020184: c2 22 00 00 st %g1, [ %o0 ] 2020188: 81 c7 e0 08 ret 202018c: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 2020190: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020194: 02 80 00 04 be 20201a4 <== NOT EXECUTED 2020198: 01 00 00 00 nop <== NOT EXECUTED 202019c: 9f c0 40 00 call %g1 <== NOT EXECUTED 20201a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20201a4: 40 00 45 ad call 2031858 <__errno> <== NOT EXECUTED 20201a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20201ac: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20201b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20201b4: 81 c7 e0 08 ret <== NOT EXECUTED 20201b8: 81 e8 00 00 restore <== NOT EXECUTED 02004378 : int chmod( const char *path, mode_t mode ) { 2004378: 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 ); 200437c: 92 10 20 00 clr %o1 2004380: 90 10 00 18 mov %i0, %o0 2004384: a0 07 bf e8 add %fp, -24, %l0 2004388: 96 10 20 01 mov 1, %o3 200438c: 94 10 00 10 mov %l0, %o2 2004390: 40 00 00 9b call 20045fc 2004394: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 2004398: 80 a2 20 00 cmp %o0, 0 200439c: 12 80 00 16 bne 20043f4 20043a0: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers ){ 20043a4: 80 a0 60 00 cmp %g1, 0 20043a8: 22 80 00 25 be,a 200443c 20043ac: 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 ){ 20043b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20043b4: 80 a0 60 00 cmp %g1, 0 20043b8: 02 80 00 11 be 20043fc 20043bc: 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 ); 20043c0: 90 10 00 10 mov %l0, %o0 20043c4: 9f c0 40 00 call %g1 20043c8: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 20043cc: c2 07 bf f0 ld [ %fp + -16 ], %g1 20043d0: 80 a0 60 00 cmp %g1, 0 20043d4: 02 80 00 08 be 20043f4 20043d8: b0 10 00 08 mov %o0, %i0 20043dc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20043e0: 80 a0 60 00 cmp %g1, 0 20043e4: 02 80 00 23 be 2004470 20043e8: 01 00 00 00 nop 20043ec: 9f c0 40 00 call %g1 20043f0: 90 10 00 10 mov %l0, %o0 return result; } 20043f4: 81 c7 e0 08 ret 20043f8: 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 ); 20043fc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2004400: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004404: 02 80 00 08 be 2004424 <== NOT EXECUTED 2004408: 01 00 00 00 nop <== NOT EXECUTED 200440c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2004410: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004414: 02 80 00 04 be 2004424 <== NOT EXECUTED 2004418: 01 00 00 00 nop <== NOT EXECUTED 200441c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004420: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2004424: 40 00 b5 0d call 2031858 <__errno> <== NOT EXECUTED 2004428: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200442c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2004430: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004434: 81 c7 e0 08 ret <== NOT EXECUTED 2004438: 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 ); 200443c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004440: 02 80 00 08 be 2004460 <== NOT EXECUTED 2004444: 01 00 00 00 nop <== NOT EXECUTED 2004448: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200444c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004450: 02 80 00 04 be 2004460 <== NOT EXECUTED 2004454: 01 00 00 00 nop <== NOT EXECUTED 2004458: 9f c0 40 00 call %g1 <== NOT EXECUTED 200445c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 2004460: 40 00 b4 fe call 2031858 <__errno> <== NOT EXECUTED 2004464: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2004468: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 200446c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2004470: 81 c7 e0 08 ret <== NOT EXECUTED 2004474: 81 e8 00 00 restore <== NOT EXECUTED 020201bc : int chown( const char *path, uid_t owner, gid_t group ) { 20201bc: 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 ) ) 20201c0: 92 10 20 00 clr %o1 20201c4: 90 10 00 18 mov %i0, %o0 20201c8: a0 07 bf e8 add %fp, -24, %l0 20201cc: 96 10 20 01 mov 1, %o3 20201d0: 94 10 00 10 mov %l0, %o2 20201d4: 7f ff 91 0a call 20045fc 20201d8: b0 10 3f ff mov -1, %i0 20201dc: 80 a2 20 00 cmp %o0, 0 20201e0: 12 80 00 15 bne 2020234 20201e4: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !loc.ops->chown_h ) { 20201e8: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 20201ec: 80 a0 a0 00 cmp %g2, 0 20201f0: 02 80 00 13 be 202023c 20201f4: 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 ); 20201f8: 95 2e a0 10 sll %i2, 0x10, %o2 20201fc: 93 32 60 10 srl %o1, 0x10, %o1 2020200: 95 32 a0 10 srl %o2, 0x10, %o2 2020204: 9f c0 80 00 call %g2 2020208: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 202020c: c2 07 bf f0 ld [ %fp + -16 ], %g1 2020210: 80 a0 60 00 cmp %g1, 0 2020214: 02 80 00 08 be 2020234 2020218: b0 10 00 08 mov %o0, %i0 202021c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2020220: 80 a0 60 00 cmp %g1, 0 2020224: 02 80 00 10 be 2020264 2020228: 01 00 00 00 nop 202022c: 9f c0 40 00 call %g1 2020230: 90 10 00 10 mov %l0, %o0 return result; } 2020234: 81 c7 e0 08 ret 2020238: 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 ); 202023c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2020240: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020244: 02 80 00 04 be 2020254 <== NOT EXECUTED 2020248: 01 00 00 00 nop <== NOT EXECUTED 202024c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2020250: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2020254: 40 00 45 81 call 2031858 <__errno> <== NOT EXECUTED 2020258: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202025c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2020260: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020264: 81 c7 e0 08 ret <== NOT EXECUTED 2020268: 81 e8 00 00 restore <== NOT EXECUTED 0202026c : #include int chroot( const char *pathname ) { 202026c: 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) { 2020270: 23 00 81 28 sethi %hi(0x204a000), %l1 2020274: e0 04 62 3c ld [ %l1 + 0x23c ], %l0 ! 204a23c 2020278: 03 00 81 7c sethi %hi(0x205f000), %g1 202027c: 82 10 61 3c or %g1, 0x13c, %g1 ! 205f13c 2020280: 80 a4 00 01 cmp %l0, %g1 2020284: 02 80 00 24 be 2020314 2020288: 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); 202028c: 7f ff ff 87 call 20200a8 2020290: 90 10 00 18 mov %i0, %o0 if (result) { 2020294: 80 a2 20 00 cmp %o0, 0 2020298: 12 80 00 2b bne 2020344 202029c: 11 00 81 12 sethi %hi(0x2044800), %o0 rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 20202a0: 92 10 20 00 clr %o1 20202a4: 90 12 23 88 or %o0, 0x388, %o0 20202a8: 94 07 bf e8 add %fp, -24, %o2 20202ac: 7f ff 90 d4 call 20045fc 20202b0: 96 10 20 00 clr %o3 20202b4: 80 a2 20 00 cmp %o0, 0 20202b8: 12 80 00 23 bne 2020344 20202bc: d0 04 62 3c ld [ %l1 + 0x23c ], %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); 20202c0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 20202c4: 80 a0 60 00 cmp %g1, 0 20202c8: 22 80 00 09 be,a 20202ec 20202cc: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 20202d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20202d4: 80 a0 60 00 cmp %g1, 0 20202d8: 22 80 00 05 be,a 20202ec 20202dc: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 20202e0: 9f c0 40 00 call %g1 20202e4: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_root = loc; 20202e8: c2 07 bf e8 ld [ %fp + -24 ], %g1 20202ec: c6 04 62 3c ld [ %l1 + 0x23c ], %g3 20202f0: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] 20202f4: c4 07 bf ec ld [ %fp + -20 ], %g2 20202f8: c4 20 e0 18 st %g2, [ %g3 + 0x18 ] 20202fc: c2 07 bf f0 ld [ %fp + -16 ], %g1 2020300: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 2020304: c4 07 bf f4 ld [ %fp + -12 ], %g2 2020308: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] return 0; } 202030c: 81 c7 e0 08 ret 2020310: 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*/ 2020314: 40 00 07 f0 call 20222d4 2020318: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 202031c: c2 04 62 3c ld [ %l1 + 0x23c ], %g1 2020320: 80 a0 40 10 cmp %g1, %l0 2020324: 12 bf ff da bne 202028c 2020328: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 202032c: 40 00 45 4b call 2031858 <__errno> <== NOT EXECUTED 2020330: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 2020334: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2020338: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202033c: 81 c7 e0 08 ret <== NOT EXECUTED 2020340: 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 ); 2020344: 40 00 45 45 call 2031858 <__errno> <== NOT EXECUTED 2020348: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202034c: 40 00 45 43 call 2031858 <__errno> <== NOT EXECUTED 2020350: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 2020354: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2020358: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 202035c: 81 c7 e0 08 ret <== NOT EXECUTED 2020360: 81 e8 00 00 restore <== NOT EXECUTED 0202ebb4 : * close a directory. */ int closedir( DIR *dirp ) { 202ebb4: 9d e3 bf 98 save %sp, -104, %sp int fd; if ( !dirp ) 202ebb8: a0 96 20 00 orcc %i0, 0, %l0 202ebbc: 02 80 00 0b be 202ebe8 202ebc0: 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); 202ebc4: d0 04 20 0c ld [ %l0 + 0xc ], %o0 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 202ebc8: f0 04 00 00 ld [ %l0 ], %i0 dirp->dd_fd = -1; dirp->dd_loc = 0; 202ebcc: c0 24 20 04 clr [ %l0 + 4 ] (void)free((void *)dirp->dd_buf); 202ebd0: 7f ff 56 e9 call 2004774 202ebd4: c2 24 00 00 st %g1, [ %l0 ] (void)free((void *)dirp); 202ebd8: 7f ff 56 e7 call 2004774 202ebdc: 90 10 00 10 mov %l0, %o0 return(close(fd)); 202ebe0: 7f ff 56 26 call 2004478 202ebe4: 81 e8 00 00 restore DIR *dirp ) { int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 202ebe8: 40 00 0b 1c call 2031858 <__errno> <== NOT EXECUTED 202ebec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202ebf0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 202ebf4: 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)); } 202ebf8: 81 c7 e0 08 ret <== NOT EXECUTED 202ebfc: 81 e8 00 00 restore <== NOT EXECUTED 0200cc28 : */ int device_close( rtems_libio_t *iop ) { 200cc28: 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; 200cc2c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 200cc30: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 200cc34: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 200cc38: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 200cc3c: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 200cc40: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 200cc44: 94 07 bf ec add %fp, -20, %o2 200cc48: 40 00 02 4b call 200d574 200cc4c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 200cc50: 80 a2 20 00 cmp %o0, 0 200cc54: 12 80 00 04 bne 200cc64 200cc58: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 200cc5c: 81 c7 e0 08 ret 200cc60: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 200cc64: 7f ff ff a1 call 200cae8 <== NOT EXECUTED 200cc68: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 200cc6c: 81 c7 e0 08 ret <== NOT EXECUTED 200cc70: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 0200cb1c : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 200cb1c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 200cb20: 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; 200cb24: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 200cb28: 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; 200cb2c: 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( 200cb30: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 200cb34: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 200cb38: 40 00 02 a5 call 200d5cc <== NOT EXECUTED 200cb3c: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200cb40: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200cb44: 12 80 00 05 bne 200cb58 <== NOT EXECUTED 200cb48: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; 200cb4c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 200cb50: 81 c7 e0 08 ret <== NOT EXECUTED 200cb54: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 200cb58: 7f ff ff e4 call 200cae8 <== NOT EXECUTED 200cb5c: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 200cb60: 81 c7 e0 08 ret <== NOT EXECUTED 200cb64: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 0200cc74 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 200cc74: 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; 200cc78: 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; 200cc7c: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 200cc80: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 200cc84: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 200cc88: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 200cc8c: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 200cc90: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 200cc94: 94 07 bf ec add %fp, -20, %o2 200cc98: 40 00 02 63 call 200d624 200cc9c: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200cca0: 80 a2 20 00 cmp %o0, 0 200cca4: 12 80 00 04 bne 200ccb4 200cca8: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 200ccac: 81 c7 e0 08 ret 200ccb0: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 200ccb4: 7f ff ff 8d call 200cae8 <== NOT EXECUTED 200ccb8: 01 00 00 00 nop <== NOT EXECUTED return 0; } 200ccbc: 81 c7 e0 08 ret <== NOT EXECUTED 200ccc0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 0200cbc8 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 200cbc8: 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; 200cbcc: 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; 200cbd0: 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; 200cbd4: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 200cbd8: 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; 200cbdc: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 200cbe0: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 200cbe4: 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; 200cbe8: 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; 200cbec: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 200cbf0: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 200cbf4: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 200cbf8: 40 00 02 a1 call 200d67c <== NOT EXECUTED 200cbfc: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200cc00: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200cc04: 12 80 00 05 bne 200cc18 <== NOT EXECUTED 200cc08: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 200cc0c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 200cc10: 81 c7 e0 08 ret <== NOT EXECUTED 200cc14: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 200cc18: 7f ff ff b4 call 200cae8 <== NOT EXECUTED 200cc1c: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 200cc20: 81 c7 e0 08 ret <== NOT EXECUTED 200cc24: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 0200cb68 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 200cb68: 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; 200cb6c: 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; 200cb70: 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; 200cb74: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 200cb78: 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; 200cb7c: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 200cb80: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 200cb84: 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; 200cb88: 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; 200cb8c: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 200cb90: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 200cb94: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 200cb98: 40 00 02 cf call 200d6d4 200cb9c: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 200cba0: 80 a2 20 00 cmp %o0, 0 200cba4: 12 80 00 05 bne 200cbb8 200cba8: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 200cbac: d0 07 bf f4 ld [ %fp + -12 ], %o0 } 200cbb0: 81 c7 e0 08 ret 200cbb4: 91 e8 00 08 restore %g0, %o0, %o0 the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 200cbb8: 7f ff ff cc call 200cae8 <== NOT EXECUTED 200cbbc: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 200cbc0: 81 c7 e0 08 ret <== NOT EXECUTED 200cbc4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02003e38 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2003e38: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2003e3c: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 2003e40: 80 a0 60 00 cmp %g1, 0 2003e44: 12 80 00 04 bne 2003e54 2003e48: 01 00 00 00 nop 2003e4c: 81 c7 e0 08 ret 2003e50: 81 e8 00 00 restore rtems_interrupt_disable (level); 2003e54: 7f ff f7 d4 call 2001da4 <== NOT EXECUTED 2003e58: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 2003e5c: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 2003e60: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2003e64: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003e68: 02 80 00 14 be 2003eb8 <== NOT EXECUTED 2003e6c: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2003e70: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED 2003e74: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 2003e78: 7f ff f7 cf call 2001db4 <== NOT EXECUTED 2003e7c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2003e80: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 2003e84: 92 10 20 00 clr %o1 <== NOT EXECUTED 2003e88: 40 00 06 55 call 20057dc <== NOT EXECUTED 2003e8c: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2003e90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003e94: 12 80 00 0b bne 2003ec0 <== NOT EXECUTED 2003e98: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 2003e9c: 7f ff f7 c2 call 2001da4 <== NOT EXECUTED 2003ea0: 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) { 2003ea4: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 2003ea8: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2003eac: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003eb0: 32 bf ff f2 bne,a 2003e78 <== NOT EXECUTED 2003eb4: 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); 2003eb8: 7f ff f7 bf call 2001db4 <== NOT EXECUTED 2003ebc: 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); 2003ec0: 40 00 08 0a call 2005ee8 <== NOT EXECUTED 2003ec4: 01 00 00 00 nop 2003ec8: 01 00 00 00 nop 02002e70 : int dup2( int fildes, int fildes2 ) { 2002e70: 9d e3 bf 48 save %sp, -184, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 2002e74: a0 07 bf a8 add %fp, -88, %l0 2002e78: 90 10 00 18 mov %i0, %o0 2002e7c: 40 00 01 fe call 2003674 2002e80: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 2002e84: 80 a2 3f ff cmp %o0, -1 2002e88: 32 80 00 05 bne,a 2002e9c 2002e8c: 92 10 00 10 mov %l0, %o1 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2002e90: 90 10 3f ff mov -1, %o0 } 2002e94: 81 c7 e0 08 ret 2002e98: 91 e8 00 08 restore %g0, %o0, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 2002e9c: 40 00 01 f6 call 2003674 2002ea0: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 2002ea4: 80 a2 3f ff cmp %o0, -1 2002ea8: 02 bf ff fa be 2002e90 2002eac: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 2002eb0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 2002eb4: 40 00 00 a1 call 2003138 <== NOT EXECUTED 2002eb8: 92 10 20 00 clr %o1 <== NOT EXECUTED 2002ebc: 30 bf ff f6 b,a 2002e94 <== NOT EXECUTED 02003880 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 2003880: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2003884: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2003888: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 200388c: 02 80 00 0d be 20038c0 <== NOT EXECUTED 2003890: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 2003894: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED 2003898: c4 00 60 a8 ld [ %g1 + 0xa8 ], %g2 ! 20178a8 <__ctype_ptr> <== NOT EXECUTED 200389c: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 20038a0: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED 20038a4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 20038a8: 02 80 00 06 be 20038c0 <== NOT EXECUTED 20038ac: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 20038b0: 02 80 00 04 be 20038c0 <== NOT EXECUTED 20038b4: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 20038b8: 12 80 00 06 bne 20038d0 <== NOT EXECUTED 20038bc: 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); 20038c0: 7f ff ff 8f call 20036fc <== NOT EXECUTED 20038c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 20038c8: 81 c7 e0 08 ret <== NOT EXECUTED 20038cc: 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] = '^'; 20038d0: 84 10 20 5e mov 0x5e, %g2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 20038d4: 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] = '^'; 20038d8: c4 2f bf f0 stb %g2, [ %fp + -16 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 20038dc: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 20038e0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 20038e4: 7f ff ff 38 call 20035c4 <== NOT EXECUTED 20038e8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 20038ec: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 20038f0: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 20038f4: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 20038f8: 81 c7 e0 08 ret <== NOT EXECUTED 20038fc: 81 e8 00 00 restore <== NOT EXECUTED 02020ecc : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 2020ecc: 03 00 81 77 sethi %hi(0x205dc00), %g1 <== NOT EXECUTED 2020ed0: d0 00 63 bc ld [ %g1 + 0x3bc ], %o0 ! 205dfbc <== NOT EXECUTED 2020ed4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020ed8: 02 80 00 05 be 2020eec <== NOT EXECUTED 2020edc: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 2020ee0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2020ee4: 40 00 42 b5 call 20319b8 <== NOT EXECUTED 2020ee8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2020eec: 81 c3 e0 08 retl <== NOT EXECUTED 2020ef0: 01 00 00 00 nop 02020ef4 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 2020ef4: 03 00 81 77 sethi %hi(0x205dc00), %g1 <== NOT EXECUTED 2020ef8: d0 00 62 d4 ld [ %g1 + 0x2d4 ], %o0 ! 205ded4 <== NOT EXECUTED 2020efc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020f00: 02 80 00 05 be 2020f14 <== NOT EXECUTED 2020f04: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 2020f08: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2020f0c: 40 00 42 ab call 20319b8 <== NOT EXECUTED 2020f10: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2020f14: 81 c3 e0 08 retl <== NOT EXECUTED 2020f18: 01 00 00 00 nop 02003900 : * 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) { 2003900: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 2003904: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 <== NOT EXECUTED 2003908: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 200390c: 02 80 00 80 be 2003b0c <== NOT EXECUTED 2003910: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 2003914: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2003918: 12 80 00 28 bne 20039b8 <== NOT EXECUTED 200391c: 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)) { 2003920: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED 2003924: 05 00 80 59 sethi %hi(0x2016400), %g2 <== NOT EXECUTED 2003928: a4 10 60 a8 or %g1, 0xa8, %l2 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 200392c: a6 10 a0 98 or %g2, 0x98, %l3 <== NOT EXECUTED 2003930: 03 00 80 59 sethi %hi(0x2016400), %g1 <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 2003934: a2 10 60 90 or %g1, 0x90, %l1 ! 2016490 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2003938: da 04 20 1c ld [ %l0 + 0x1c ], %o5 <== NOT EXECUTED 200393c: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 2003940: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2003944: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 2003948: 02 80 00 13 be 2003994 <== NOT EXECUTED 200394c: c2 0b 40 03 ldub [ %o5 + %g3 ], %g1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2003950: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2003954: 12 80 00 05 bne 2003968 <== NOT EXECUTED 2003958: b0 08 60 ff and %g1, 0xff, %i0 <== NOT EXECUTED 200395c: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED 2003960: 22 80 00 6d be,a 2003b14 <== NOT EXECUTED 2003964: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 2003968: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED 200396c: 02 80 00 3f be 2003a68 <== NOT EXECUTED 2003970: 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)) { 2003974: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 2003978: c4 08 40 18 ldub [ %g1 + %i0 ], %g2 <== NOT EXECUTED 200397c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 2003980: 02 80 00 2f be 2003a3c <== NOT EXECUTED 2003984: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED 2003988: 80 89 22 00 btst 0x200, %g4 <== NOT EXECUTED 200398c: 12 80 00 1a bne 20039f4 <== NOT EXECUTED 2003990: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2003994: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2003998: 02 80 00 5d be 2003b0c <== NOT EXECUTED 200399c: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 20039a0: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 20039a4: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 20039a8: 02 80 00 59 be 2003b0c <== NOT EXECUTED 20039ac: 01 00 00 00 nop <== NOT EXECUTED 20039b0: 10 bf ff e2 b 2003938 <== NOT EXECUTED 20039b4: 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)) { 20039b8: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 20039bc: 02 80 00 53 be 2003b08 <== NOT EXECUTED 20039c0: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 20039c4: 12 bf ff d8 bne 2003924 <== NOT EXECUTED 20039c8: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 20039cc: 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; 20039d0: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 20039d4: 7f ff ff ab call 2003880 <== NOT EXECUTED 20039d8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 20039dc: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 20039e0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 20039e4: 02 80 00 4a be 2003b0c <== NOT EXECUTED 20039e8: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 20039ec: 7f ff ff a5 call 2003880 <== NOT EXECUTED 20039f0: 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); 20039f4: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 20039f8: 7f ff fe f3 call 20035c4 <== NOT EXECUTED 20039fc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 2003a00: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2003a04: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003a08: 22 80 00 05 be,a 2003a1c <== NOT EXECUTED 2003a0c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED tty->column--; 2003a10: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003a14: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2003a18: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 2003a1c: c4 08 40 18 ldub [ %g1 + %i0 ], %g2 <== NOT EXECUTED 2003a20: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 2003a24: 02 80 00 06 be 2003a3c <== NOT EXECUTED 2003a28: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED 2003a2c: c8 04 20 3c ld [ %l0 + 0x3c ], %g4 <== NOT EXECUTED 2003a30: 80 89 22 00 btst 0x200, %g4 <== NOT EXECUTED 2003a34: 02 bf ff d9 be 2003998 <== NOT EXECUTED 2003a38: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2003a3c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2003a40: 90 12 20 98 or %o0, 0x98, %o0 <== NOT EXECUTED 2003a44: 7f ff fe e0 call 20035c4 <== NOT EXECUTED 2003a48: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 2003a4c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2003a50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003a54: 02 bf ff d1 be 2003998 <== NOT EXECUTED 2003a58: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 2003a5c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003a60: 10 bf ff ce b 2003998 <== NOT EXECUTED 2003a64: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2003a68: 02 80 00 16 be 2003ac0 <== NOT EXECUTED 2003a6c: 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)) { 2003a70: d8 04 80 00 ld [ %l2 ], %o4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2003a74: 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)) { 2003a78: 10 80 00 07 b 2003a94 <== NOT EXECUTED 2003a7c: 84 10 20 00 clr %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 2003a80: 32 80 00 02 bne,a 2003a88 <== NOT EXECUTED 2003a84: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2003a88: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 2003a8c: 22 80 00 0e be,a 2003ac4 <== NOT EXECUTED 2003a90: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 2003a94: c2 0b 40 02 ldub [ %o5 + %g2 ], %g1 <== NOT EXECUTED if (c == '\t') { 2003a98: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 2003a9c: 02 80 00 18 be 2003afc <== NOT EXECUTED 2003aa0: 84 00 a0 01 inc %g2 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2003aa4: c2 0b 00 01 ldub [ %o4 + %g1 ], %g1 <== NOT EXECUTED 2003aa8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003aac: 12 bf ff f5 bne 2003a80 <== NOT EXECUTED 2003ab0: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2003ab4: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 2003ab8: 12 bf ff f7 bne 2003a94 <== NOT EXECUTED 2003abc: b0 06 20 01 inc %i0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2003ac0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2003ac4: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2003ac8: 04 bf ff b4 ble 2003998 <== NOT EXECUTED 2003acc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 2003ad0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2003ad4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2003ad8: 7f ff fe bb call 20035c4 <== NOT EXECUTED 2003adc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 2003ae0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 2003ae4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 2003ae8: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 2003aec: 14 bf ff f9 bg 2003ad0 <== NOT EXECUTED 2003af0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 2003af4: 10 bf ff a9 b 2003998 <== NOT EXECUTED 2003af8: 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; 2003afc: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 2003b00: 10 bf ff e2 b 2003a88 <== NOT EXECUTED 2003b04: 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; 2003b08: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED 2003b0c: 81 c7 e0 08 ret <== NOT EXECUTED 2003b10: 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); 2003b14: 7f ff ff 5b call 2003880 <== NOT EXECUTED 2003b18: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED 2003b1c: 01 00 00 00 nop 0202ec00 : #include int fchdir( int fd ) { 202ec00: 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 ); 202ec04: 03 00 81 25 sethi %hi(0x2049400), %g1 <== NOT EXECUTED 202ec08: c4 00 63 b8 ld [ %g1 + 0x3b8 ], %g2 ! 20497b8 <== NOT EXECUTED 202ec0c: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 202ec10: 1a 80 00 50 bcc 202ed50 <== NOT EXECUTED 202ec14: 03 00 81 7a sethi %hi(0x205e800), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 202ec18: c6 00 60 9c ld [ %g1 + 0x9c ], %g3 ! 205e89c <== NOT EXECUTED 202ec1c: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 202ec20: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 202ec24: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 202ec28: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 202ec2c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 202ec30: b0 00 c0 01 add %g3, %g1, %i0 <== NOT EXECUTED rtems_libio_check_is_open(iop); 202ec34: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 202ec38: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 202ec3c: 02 80 00 45 be 202ed50 <== NOT EXECUTED 202ec40: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 202ec44: 02 80 00 54 be 202ed94 <== NOT EXECUTED 202ec48: 01 00 00 00 nop <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 202ec4c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 202ec50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202ec54: 02 80 00 56 be 202edac <== NOT EXECUTED 202ec58: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 202ec5c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 202ec60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202ec64: 02 80 00 52 be 202edac <== NOT EXECUTED 202ec68: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 202ec6c: 9f c0 40 00 call %g1 <== NOT EXECUTED 202ec70: 90 06 20 10 add %i0, 0x10, %o0 <== NOT EXECUTED 202ec74: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 202ec78: 12 80 00 30 bne 202ed38 <== NOT EXECUTED 202ec7c: 21 00 81 28 sethi %hi(0x204a000), %l0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 202ec80: c6 04 22 3c ld [ %l0 + 0x23c ], %g3 ! 204a23c <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 202ec84: 11 00 81 12 sethi %hi(0x2044800), %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 202ec88: 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)) { 202ec8c: 90 12 23 88 or %o0, 0x388, %o0 <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 202ec90: c4 27 bf d8 st %g2, [ %fp + -40 ] <== NOT EXECUTED 202ec94: 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)) { 202ec98: 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; 202ec9c: c2 27 bf dc st %g1, [ %fp + -36 ] <== NOT EXECUTED 202eca0: 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)) { 202eca4: 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; 202eca8: c4 27 bf e0 st %g2, [ %fp + -32 ] <== NOT EXECUTED 202ecac: 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)) { 202ecb0: 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; 202ecb4: c8 27 bf e4 st %g4, [ %fp + -28 ] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 202ecb8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 202ecbc: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 202ecc0: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 <== NOT EXECUTED 202ecc4: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 202ecc8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 <== NOT EXECUTED 202eccc: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 202ecd0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 202ecd4: 7f ff 56 4a call 20045fc <== NOT EXECUTED 202ecd8: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED 202ecdc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202ece0: 12 80 00 22 bne 202ed68 <== NOT EXECUTED 202ece4: 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 ); 202ece8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202ecec: 22 80 00 09 be,a 202ed10 <== NOT EXECUTED 202ecf0: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 202ecf4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202ecf8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202ecfc: 22 80 00 05 be,a 202ed10 <== NOT EXECUTED 202ed00: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 202ed04: 9f c0 40 00 call %g1 <== NOT EXECUTED 202ed08: 90 07 bf d8 add %fp, -40, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 202ed0c: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 202ed10: c6 04 22 3c ld [ %l0 + 0x23c ], %g3 <== NOT EXECUTED 202ed14: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 202ed18: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED 202ed1c: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 202ed20: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 202ed24: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 202ed28: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 202ed2c: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED return 0; } 202ed30: 81 c7 e0 08 ret <== NOT EXECUTED 202ed34: 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 ); 202ed38: 40 00 0a c8 call 2031858 <__errno> <== NOT EXECUTED 202ed3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202ed40: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 202ed44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202ed48: 81 c7 e0 08 ret <== NOT EXECUTED 202ed4c: 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); 202ed50: 40 00 0a c2 call 2031858 <__errno> <== NOT EXECUTED 202ed54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202ed58: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 202ed5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202ed60: 81 c7 e0 08 ret <== NOT EXECUTED 202ed64: 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; 202ed68: c2 07 bf d8 ld [ %fp + -40 ], %g1 <== NOT EXECUTED 202ed6c: c6 04 22 3c ld [ %l0 + 0x23c ], %g3 <== NOT EXECUTED 202ed70: c2 20 e0 04 st %g1, [ %g3 + 4 ] <== NOT EXECUTED 202ed74: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED 202ed78: c4 20 e0 08 st %g2, [ %g3 + 8 ] <== NOT EXECUTED 202ed7c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED 202ed80: c2 20 e0 0c st %g1, [ %g3 + 0xc ] <== NOT EXECUTED 202ed84: c4 07 bf e4 ld [ %fp + -28 ], %g2 <== NOT EXECUTED 202ed88: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] <== NOT EXECUTED 202ed8c: 81 c7 e0 08 ret <== NOT EXECUTED 202ed90: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 202ed94: 40 00 0a b1 call 2031858 <__errno> <== NOT EXECUTED 202ed98: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202ed9c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 202eda0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202eda4: 81 c7 e0 08 ret <== NOT EXECUTED 202eda8: 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 ); 202edac: 40 00 0a ab call 2031858 <__errno> <== NOT EXECUTED 202edb0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202edb4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202edb8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202edbc: 81 c7 e0 08 ret <== NOT EXECUTED 202edc0: 81 e8 00 00 restore <== NOT EXECUTED 020205cc : int fchmod( int fd, mode_t mode ) { 20205cc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 20205d0: 03 00 81 25 sethi %hi(0x2049400), %g1 <== NOT EXECUTED 20205d4: c4 00 63 b8 ld [ %g1 + 0x3b8 ], %g2 ! 20497b8 <== NOT EXECUTED 20205d8: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 20205dc: 1a 80 00 1b bcc 2020648 <== NOT EXECUTED 20205e0: 03 00 81 7a sethi %hi(0x205e800), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 20205e4: c6 00 60 9c ld [ %g1 + 0x9c ], %g3 ! 205e89c <== NOT EXECUTED 20205e8: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 20205ec: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 20205f0: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20205f4: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 20205f8: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 20205fc: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED rtems_libio_check_is_open(iop); 2020600: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 <== NOT EXECUTED 2020604: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 2020608: 02 80 00 10 be 2020648 <== NOT EXECUTED 202060c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2020610: 02 80 00 14 be 2020660 <== NOT EXECUTED 2020614: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 2020618: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 <== NOT EXECUTED 202061c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 2020620: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2020624: 02 80 00 15 be 2020678 <== NOT EXECUTED 2020628: 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 ); 202062c: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 2020630: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 <== NOT EXECUTED 2020634: 90 00 e0 10 add %g3, 0x10, %o0 <== NOT EXECUTED 2020638: 9f c0 80 00 call %g2 <== NOT EXECUTED 202063c: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 2020640: 81 c7 e0 08 ret <== NOT EXECUTED 2020644: 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); 2020648: 40 00 44 84 call 2031858 <__errno> <== NOT EXECUTED 202064c: 01 00 00 00 nop <== NOT EXECUTED 2020650: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 2020654: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020658: 10 bf ff fa b 2020640 <== NOT EXECUTED 202065c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2020660: 40 00 44 7e call 2031858 <__errno> <== NOT EXECUTED 2020664: 01 00 00 00 nop <== NOT EXECUTED 2020668: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 202066c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020670: 10 bf ff f4 b 2020640 <== NOT EXECUTED 2020674: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2020678: 40 00 44 78 call 2031858 <__errno> <== NOT EXECUTED 202067c: 01 00 00 00 nop <== NOT EXECUTED 2020680: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2020684: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020688: 10 bf ff ee b 2020640 <== NOT EXECUTED 202068c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02020690 : int fchown( int fd, uid_t owner, gid_t group ) { 2020690: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2020694: 03 00 81 25 sethi %hi(0x2049400), %g1 <== NOT EXECUTED 2020698: c4 00 63 b8 ld [ %g1 + 0x3b8 ], %g2 ! 20497b8 <== NOT EXECUTED 202069c: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 20206a0: 1a 80 00 1b bcc 202070c <== NOT EXECUTED 20206a4: 03 00 81 7a sethi %hi(0x205e800), %g1 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 20206a8: c6 00 60 9c ld [ %g1 + 0x9c ], %g3 ! 205e89c <== NOT EXECUTED 20206ac: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 20206b0: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 20206b4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20206b8: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 20206bc: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 20206c0: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 20206c4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 20206c8: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 20206cc: 02 80 00 10 be 202070c <== NOT EXECUTED 20206d0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 20206d4: 02 80 00 14 be 2020724 <== NOT EXECUTED 20206d8: 01 00 00 00 nop <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 20206dc: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 20206e0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 20206e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20206e8: 02 80 00 15 be 202073c <== NOT EXECUTED 20206ec: 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 ); 20206f0: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 20206f4: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 20206f8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 20206fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 2020700: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 2020704: 81 c7 e0 08 ret <== NOT EXECUTED 2020708: 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); 202070c: 40 00 44 53 call 2031858 <__errno> <== NOT EXECUTED 2020710: 01 00 00 00 nop <== NOT EXECUTED 2020714: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 2020718: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202071c: 10 bf ff fa b 2020704 <== NOT EXECUTED 2020720: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 2020724: 40 00 44 4d call 2031858 <__errno> <== NOT EXECUTED 2020728: 01 00 00 00 nop <== NOT EXECUTED 202072c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2020730: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020734: 10 bf ff f4 b 2020704 <== NOT EXECUTED 2020738: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 202073c: 40 00 44 47 call 2031858 <__errno> <== NOT EXECUTED 2020740: 01 00 00 00 nop <== NOT EXECUTED 2020744: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2020748: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202074c: 10 bf ff ee b 2020704 <== NOT EXECUTED 2020750: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 0202edec : int fcntl( int fd, int cmd, ... ) { 202edec: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 202edf0: 03 00 81 25 sethi %hi(0x2049400), %g1 202edf4: c8 00 63 b8 ld [ %g1 + 0x3b8 ], %g4 ! 20497b8 ... ) { int ret; va_list ap; va_start( ap, cmd ); 202edf8: 90 07 a0 4c add %fp, 0x4c, %o0 202edfc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 202ee00: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 202ee04: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 202ee08: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 202ee0c: 80 a6 00 04 cmp %i0, %g4 202ee10: 1a 80 00 7c bcc 202f000 202ee14: d0 27 bf f4 st %o0, [ %fp + -12 ] iop = rtems_libio_iop( fd ); 202ee18: 39 00 81 7a sethi %hi(0x205e800), %i4 202ee1c: da 07 20 9c ld [ %i4 + 0x9c ], %o5 ! 205e89c 202ee20: 85 2e 20 02 sll %i0, 2, %g2 202ee24: 83 2e 20 04 sll %i0, 4, %g1 202ee28: 82 20 40 02 sub %g1, %g2, %g1 202ee2c: 82 00 40 18 add %g1, %i0, %g1 202ee30: 83 28 60 02 sll %g1, 2, %g1 202ee34: ba 03 40 01 add %o5, %g1, %i5 rtems_libio_check_is_open(iop); 202ee38: d8 07 60 0c ld [ %i5 + 0xc ], %o4 202ee3c: 80 8b 21 00 btst 0x100, %o4 202ee40: 02 80 00 70 be 202f000 202ee44: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 202ee48: 08 80 00 08 bleu 202ee68 202ee4c: 83 2e 60 02 sll %i1, 2, %g1 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 202ee50: 40 00 0a 82 call 2031858 <__errno> 202ee54: b0 10 3f ff mov -1, %i0 202ee58: 82 10 20 16 mov 0x16, %g1 202ee5c: c2 22 00 00 st %g1, [ %o0 ] 202ee60: 81 c7 e0 08 ret 202ee64: 81 e8 00 00 restore /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 202ee68: 05 00 80 bb sethi %hi(0x202ec00), %g2 202ee6c: 84 10 a1 c4 or %g2, 0x1c4, %g2 ! 202edc4 202ee70: c6 00 80 01 ld [ %g2 + %g1 ], %g3 202ee74: 81 c0 c0 00 jmp %g3 202ee78: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 202ee7c: 40 00 0a 77 call 2031858 <__errno> 202ee80: b0 10 3f ff mov -1, %i0 ! ffffffff 202ee84: 82 10 20 86 mov 0x86, %g1 202ee88: c2 22 00 00 st %g1, [ %o0 ] 202ee8c: 81 c7 e0 08 ret 202ee90: 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 ) ); 202ee94: d0 02 00 00 ld [ %o0 ], %o0 202ee98: 7f ff 57 6f call 2004c54 202ee9c: 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); 202eea0: c2 07 60 0c ld [ %i5 + 0xc ], %g1 202eea4: 90 0a 22 01 and %o0, 0x201, %o0 202eea8: 82 08 7d fe and %g1, -514, %g1 202eeac: 90 12 00 01 or %o0, %g1, %o0 202eeb0: 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) { 202eeb4: c2 07 60 30 ld [ %i5 + 0x30 ], %g1 202eeb8: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 202eebc: 80 a0 60 00 cmp %g1, 0 202eec0: 02 bf ff e8 be 202ee60 202eec4: 92 10 00 1d mov %i5, %o1 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 202eec8: 9f c0 40 00 call %g1 202eecc: 90 10 00 19 mov %i1, %o0 if (err) { 202eed0: ba 92 20 00 orcc %o0, 0, %i5 202eed4: 12 80 00 04 bne 202eee4 202eed8: 01 00 00 00 nop va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 202eedc: 81 c7 e0 08 ret 202eee0: 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; 202eee4: 40 00 0a 5d call 2031858 <__errno> <== NOT EXECUTED 202eee8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202eeec: 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; } 202eef0: 81 c7 e0 08 ret <== NOT EXECUTED 202eef4: 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 ); 202eef8: 7f ff 56 a9 call 200499c 202eefc: 90 10 00 0c mov %o4, %o0 202ef00: 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) { 202ef04: 80 a6 20 00 cmp %i0, 0 202ef08: 36 bf ff ec bge,a 202eeb8 202ef0c: 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; } 202ef10: 81 c7 e0 08 ret <== NOT EXECUTED 202ef14: 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 ) ) 202ef18: c2 02 00 00 ld [ %o0 ], %g1 202ef1c: 80 a0 60 00 cmp %g1, 0 202ef20: 02 80 00 2d be 202efd4 202ef24: 82 0b 37 ff and %o4, -2049, %g1 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 202ef28: 82 13 28 00 or %o4, 0x800, %g1 202ef2c: b0 10 20 00 clr %i0 202ef30: 10 bf ff e1 b 202eeb4 202ef34: 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); 202ef38: 83 33 20 0b srl %o4, 0xb, %g1 202ef3c: 10 bf ff de b 202eeb4 202ef40: 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 ); 202ef44: c6 02 00 00 ld [ %o0 ], %g3 if ( fd2 ) 202ef48: 80 a0 e0 00 cmp %g3, 0 202ef4c: 02 80 00 33 be 202f018 202ef50: 80 a1 00 03 cmp %g4, %g3 diop = rtems_libio_iop( fd2 ); 202ef54: 90 10 20 00 clr %o0 <== NOT EXECUTED 202ef58: 18 80 00 22 bgu 202efe0 <== NOT EXECUTED 202ef5c: 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; 202ef60: c2 07 60 10 ld [ %i5 + 0x10 ], %g1 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 202ef64: c6 07 60 2c ld [ %i5 + 0x2c ], %g3 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 202ef68: c2 22 20 10 st %g1, [ %o0 + 0x10 ] 202ef6c: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 ret = (int) (diop - rtems_libio_iops); 202ef70: c8 07 20 9c ld [ %i4 + 0x9c ], %g4 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 202ef74: c4 22 20 14 st %g2, [ %o0 + 0x14 ] 202ef78: c2 07 60 18 ld [ %i5 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 202ef7c: da 07 60 30 ld [ %i5 + 0x30 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 202ef80: c2 22 20 18 st %g1, [ %o0 + 0x18 ] 202ef84: c4 07 60 1c ld [ %i5 + 0x1c ], %g2 ret = (int) (diop - rtems_libio_iops); 202ef88: 88 22 c0 04 sub %o3, %g4, %g4 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 202ef8c: c6 22 20 2c st %g3, [ %o0 + 0x2c ] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 202ef90: 89 39 20 02 sra %g4, 2, %g4 202ef94: 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; 202ef98: c4 22 20 1c st %g2, [ %o0 + 0x1c ] ret = -1; break; } } diop->handlers = iop->handlers; 202ef9c: 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); 202efa0: 85 29 20 06 sll %g4, 6, %g2 } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; 202efa4: d8 22 20 0c st %o4, [ %o0 + 0xc ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 202efa8: 84 20 80 03 sub %g2, %g3, %g2 202efac: 83 28 a0 06 sll %g2, 6, %g1 202efb0: 82 20 40 02 sub %g1, %g2, %g1 202efb4: 87 28 60 0c sll %g1, 0xc, %g3 202efb8: 82 00 40 03 add %g1, %g3, %g1 202efbc: 82 00 40 04 add %g1, %g4, %g1 202efc0: 83 28 60 04 sll %g1, 4, %g1 202efc4: 82 20 40 04 sub %g1, %g4, %g1 202efc8: 83 28 60 02 sll %g1, 2, %g1 202efcc: 10 bf ff ce b 202ef04 202efd0: 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; 202efd4: b0 10 20 00 clr %i0 <== NOT EXECUTED 202efd8: 10 bf ff b7 b 202eeb4 <== NOT EXECUTED 202efdc: 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 ); 202efe0: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 202efe4: 83 28 e0 04 sll %g3, 4, %g1 <== NOT EXECUTED 202efe8: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 202efec: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED 202eff0: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 202eff4: 90 03 40 01 add %o5, %g1, %o0 <== NOT EXECUTED 202eff8: 10 bf ff da b 202ef60 <== NOT EXECUTED 202effc: 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); 202f000: 40 00 0a 16 call 2031858 <__errno> <== NOT EXECUTED 202f004: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 202f008: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 202f00c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202f010: 81 c7 e0 08 ret <== NOT EXECUTED 202f014: 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(); 202f018: 7f ff 56 d1 call 2004b5c 202f01c: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 202f020: 80 a2 20 00 cmp %o0, 0 202f024: 02 bf ff 8f be 202ee60 202f028: 96 10 00 08 mov %o0, %o3 202f02c: 10 bf ff cd b 202ef60 202f030: d8 07 60 0c ld [ %i5 + 0xc ], %o4 02022d34 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 2022d34: 03 00 81 7a sethi %hi(0x205e800), %g1 <== NOT EXECUTED 2022d38: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 205e940 <== NOT EXECUTED 2022d3c: 82 10 61 40 or %g1, 0x140, %g1 <== NOT EXECUTED 2022d40: 86 00 60 04 add %g1, 4, %g3 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 2022d44: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 2022d48: 02 80 00 10 be 2022d88 <== NOT EXECUTED 2022d4c: 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 ) { 2022d50: d2 02 60 0c ld [ %o1 + 0xc ], %o1 <== NOT EXECUTED 2022d54: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED 2022d58: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 2022d5c: 32 80 00 08 bne,a 2022d7c <== NOT EXECUTED 2022d60: 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 ); 2022d64: 81 c3 e0 08 retl <== NOT EXECUTED 2022d68: 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 ) { 2022d6c: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 2022d70: 02 80 00 08 be 2022d90 <== NOT EXECUTED 2022d74: 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 ) { 2022d78: 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 ); 2022d7c: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 2022d80: 32 bf ff fb bne,a 2022d6c <== NOT EXECUTED 2022d84: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED return true; } } return false; } 2022d88: 81 c3 e0 08 retl <== NOT EXECUTED 2022d8c: 90 10 20 00 clr %o0 <== NOT EXECUTED 2022d90: 81 c3 e0 08 retl <== NOT EXECUTED 2022d94: 01 00 00 00 nop 02003484 : long fpathconf( int fd, int name ) { 2003484: 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); 2003488: 03 00 80 5c sethi %hi(0x2017000), %g1 200348c: c4 00 63 08 ld [ %g1 + 0x308 ], %g2 ! 2017308 2003490: 80 a6 00 02 cmp %i0, %g2 2003494: 1a 80 00 41 bcc 2003598 2003498: 03 00 80 5f sethi %hi(0x2017c00), %g1 iop = rtems_libio_iop(fd); 200349c: c6 00 63 b4 ld [ %g1 + 0x3b4 ], %g3 ! 2017fb4 20034a0: 85 2e 20 02 sll %i0, 2, %g2 20034a4: 83 2e 20 04 sll %i0, 4, %g1 20034a8: 82 20 40 02 sub %g1, %g2, %g1 20034ac: 82 00 40 18 add %g1, %i0, %g1 20034b0: 83 28 60 02 sll %g1, 2, %g1 20034b4: 82 00 c0 01 add %g3, %g1, %g1 rtems_libio_check_is_open(iop); 20034b8: c8 00 60 0c ld [ %g1 + 0xc ], %g4 20034bc: 80 89 21 00 btst 0x100, %g4 20034c0: 02 80 00 36 be 2003598 20034c4: 80 89 20 02 btst 2, %g4 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 20034c8: 02 80 00 3a be 20035b0 20034cc: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 20034d0: 08 80 00 08 bleu 20034f0 20034d4: 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 ); 20034d8: 40 00 34 01 call 20104dc <__errno> 20034dc: b0 10 3f ff mov -1, %i0 20034e0: 82 10 20 16 mov 0x16, %g1 20034e4: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 20034e8: 81 c7 e0 08 ret 20034ec: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 20034f0: 83 2e 60 02 sll %i1, 2, %g1 20034f4: 05 00 80 0d sethi %hi(0x2003400), %g2 20034f8: 84 10 a0 54 or %g2, 0x54, %g2 ! 2003454 20034fc: c6 00 80 01 ld [ %g2 + %g1 ], %g3 2003500: 81 c0 c0 00 jmp %g3 2003504: 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; 2003508: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 200350c: 81 c7 e0 08 ret 2003510: 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; 2003514: f0 06 20 54 ld [ %i0 + 0x54 ], %i0 2003518: 81 c7 e0 08 ret 200351c: 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; 2003520: f0 06 20 48 ld [ %i0 + 0x48 ], %i0 2003524: 81 c7 e0 08 ret 2003528: 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; 200352c: f0 06 20 5c ld [ %i0 + 0x5c ], %i0 2003530: 81 c7 e0 08 ret 2003534: 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; 2003538: f0 06 20 50 ld [ %i0 + 0x50 ], %i0 200353c: 81 c7 e0 08 ret 2003540: 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; 2003544: f0 06 20 4c ld [ %i0 + 0x4c ], %i0 2003548: 81 c7 e0 08 ret 200354c: 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; 2003550: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 2003554: 81 c7 e0 08 ret 2003558: 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; 200355c: f0 06 20 40 ld [ %i0 + 0x40 ], %i0 2003560: 81 c7 e0 08 ret 2003564: 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; 2003568: f0 06 20 3c ld [ %i0 + 0x3c ], %i0 200356c: 81 c7 e0 08 ret 2003570: 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; 2003574: f0 06 20 38 ld [ %i0 + 0x38 ], %i0 2003578: 81 c7 e0 08 ret 200357c: 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; 2003580: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 2003584: 81 c7 e0 08 ret 2003588: 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; 200358c: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 2003590: 81 c7 e0 08 ret 2003594: 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); 2003598: 40 00 33 d1 call 20104dc <__errno> 200359c: b0 10 3f ff mov -1, %i0 20035a0: 82 10 20 09 mov 9, %g1 20035a4: c2 22 00 00 st %g1, [ %o0 ] 20035a8: 81 c7 e0 08 ret 20035ac: 81 e8 00 00 restore rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 20035b0: 40 00 33 cb call 20104dc <__errno> <== NOT EXECUTED 20035b4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20035b8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20035bc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20035c0: 81 c7 e0 08 ret <== NOT EXECUTED 20035c4: 81 e8 00 00 restore <== NOT EXECUTED 0200a8ec : void free( void *ptr ) { MSBUMP(free_calls, 1); 200a8ec: 9d e3 bf 98 save %sp, -104, %sp 200a8f0: 05 00 80 60 sethi %hi(0x2018000), %g2 200a8f4: 84 10 a0 58 or %g2, 0x58, %g2 ! 2018058 200a8f8: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 200a8fc: b2 10 00 18 mov %i0, %i1 200a900: 82 00 60 01 inc %g1 if ( !ptr ) 200a904: 80 a6 20 00 cmp %i0, 0 200a908: 02 80 00 15 be 200a95c 200a90c: 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()) && 200a910: 03 00 80 60 sethi %hi(0x2018000), %g1 200a914: c4 00 63 74 ld [ %g1 + 0x374 ], %g2 ! 2018374 <_System_state_Current> 200a918: 80 a0 a0 03 cmp %g2, 3 200a91c: 02 80 00 17 be 200a978 200a920: 03 00 80 5f sethi %hi(0x2017c00), %g1 #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 200a924: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 2017d54 200a928: 80 a0 60 00 cmp %g1, 0 200a92c: 02 80 00 06 be 200a944 200a930: 37 00 80 60 sethi %hi(0x2018000), %i3 (*rtems_malloc_statistics_helpers->at_free)(ptr); 200a934: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 200a938: 9f c0 40 00 call %g1 <== NOT EXECUTED 200a93c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 200a940: 37 00 80 60 sethi %hi(0x2018000), %i3 <== NOT EXECUTED 200a944: 92 10 00 19 mov %i1, %o1 200a948: 40 00 06 f1 call 200c50c <_Protected_heap_Free> 200a94c: 90 16 e0 00 mov %i3, %o0 200a950: 80 8a 20 ff btst 0xff, %o0 200a954: 02 80 00 04 be 200a964 200a958: 82 16 e0 00 mov %i3, %g1 200a95c: 81 c7 e0 08 ret 200a960: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 200a964: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 200a968: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 200a96c: 31 00 80 59 sethi %hi(0x2016400), %i0 <== NOT EXECUTED 200a970: 7f ff e1 78 call 2002f50 <== NOT EXECUTED 200a974: 91 ee 23 d0 restore %i0, 0x3d0, %o0 <== NOT EXECUTED /* * Do not attempt to free memory if in a critical section or ISR. */ if ( _System_state_Is_up(_System_state_Get()) && 200a978: 40 00 01 35 call 200ae4c 200a97c: 01 00 00 00 nop 200a980: 80 8a 20 ff btst 0xff, %o0 200a984: 12 bf ff e8 bne 200a924 200a988: 03 00 80 5f sethi %hi(0x2017c00), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 200a98c: 40 00 01 43 call 200ae98 <== NOT EXECUTED 200a990: 81 e8 00 00 restore <== NOT EXECUTED 200a994: 01 00 00 00 nop 020221a8 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 20221a8: 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 20221ac: 03 00 81 7c sethi %hi(0x205f000), %g1 <== NOT EXECUTED 20221b0: 82 10 61 3c or %g1, 0x13c, %g1 ! 205f13c <== NOT EXECUTED 20221b4: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 20221b8: 02 80 00 18 be 2022218 <== NOT EXECUTED 20221bc: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 20221c0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 20221c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20221c8: 22 80 00 09 be,a 20221ec <== NOT EXECUTED 20221cc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 20221d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20221d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20221d8: 22 80 00 05 be,a 20221ec <== NOT EXECUTED 20221dc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 20221e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 20221e4: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 20221e8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 20221ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20221f0: 02 80 00 08 be 2022210 <== NOT EXECUTED 20221f4: 01 00 00 00 nop <== NOT EXECUTED 20221f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 20221fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022200: 02 80 00 04 be 2022210 <== NOT EXECUTED 2022204: 01 00 00 00 nop <== NOT EXECUTED 2022208: 9f c0 40 00 call %g1 <== NOT EXECUTED 202220c: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 2022210: 7f ff 89 59 call 2004774 <== NOT EXECUTED 2022214: 81 e8 00 00 restore <== NOT EXECUTED 2022218: 81 c7 e0 08 ret <== NOT EXECUTED 202221c: 81 e8 00 00 restore <== NOT EXECUTED 02015278 : int fstat( int fd, struct stat *sbuf ) { 2015278: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 201527c: 92 96 60 00 orcc %i1, 0, %o1 2015280: 02 80 00 3f be 201537c 2015284: 03 00 80 5c sethi %hi(0x2017000), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 2015288: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 20172f8 201528c: 80 a6 00 02 cmp %i0, %g2 2015290: 1a 80 00 2f bcc 201534c 2015294: 03 00 80 5f sethi %hi(0x2017c00), %g1 2015298: c6 00 63 f4 ld [ %g1 + 0x3f4 ], %g3 ! 2017ff4 201529c: 85 2e 20 02 sll %i0, 2, %g2 20152a0: 83 2e 20 04 sll %i0, 4, %g1 20152a4: 82 20 40 02 sub %g1, %g2, %g1 20152a8: 82 00 40 18 add %g1, %i0, %g1 20152ac: 83 28 60 02 sll %g1, 2, %g1 20152b0: 86 00 c0 01 add %g3, %g1, %g3 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 20152b4: c4 00 e0 0c ld [ %g3 + 0xc ], %g2 20152b8: 80 88 a1 00 btst 0x100, %g2 20152bc: 02 80 00 24 be 201534c 20152c0: 01 00 00 00 nop if ( !iop->handlers ) 20152c4: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 20152c8: 80 a0 60 00 cmp %g1, 0 20152cc: 02 80 00 20 be 201534c 20152d0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 20152d4: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 20152d8: 80 a0 60 00 cmp %g1, 0 20152dc: 02 80 00 22 be 2015364 20152e0: 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) ); 20152e4: c0 22 40 00 clr [ %o1 ] 20152e8: c0 22 60 04 clr [ %o1 + 4 ] 20152ec: c0 22 60 08 clr [ %o1 + 8 ] 20152f0: c0 22 60 0c clr [ %o1 + 0xc ] 20152f4: c0 22 60 10 clr [ %o1 + 0x10 ] 20152f8: c0 22 60 14 clr [ %o1 + 0x14 ] 20152fc: c0 22 60 18 clr [ %o1 + 0x18 ] 2015300: c0 22 60 1c clr [ %o1 + 0x1c ] 2015304: c0 22 60 20 clr [ %o1 + 0x20 ] 2015308: c0 22 60 24 clr [ %o1 + 0x24 ] 201530c: c0 22 60 28 clr [ %o1 + 0x28 ] 2015310: c0 22 60 2c clr [ %o1 + 0x2c ] 2015314: c0 22 60 30 clr [ %o1 + 0x30 ] 2015318: c0 22 60 34 clr [ %o1 + 0x34 ] 201531c: c0 22 60 38 clr [ %o1 + 0x38 ] 2015320: c0 22 60 3c clr [ %o1 + 0x3c ] 2015324: c0 22 60 40 clr [ %o1 + 0x40 ] 2015328: c0 22 60 44 clr [ %o1 + 0x44 ] 201532c: c0 22 60 48 clr [ %o1 + 0x48 ] 2015330: c0 22 60 4c clr [ %o1 + 0x4c ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 2015334: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 2015338: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 201533c: 9f c0 80 00 call %g2 2015340: 90 00 e0 10 add %g3, 0x10, %o0 } 2015344: 81 c7 e0 08 ret 2015348: 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 ); 201534c: 7f ff e1 ba call 200da34 <__errno> 2015350: 01 00 00 00 nop 2015354: 82 10 20 09 mov 9, %g1 ! 9 2015358: c2 22 00 00 st %g1, [ %o0 ] 201535c: 10 bf ff fa b 2015344 2015360: 90 10 3f ff mov -1, %o0 if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 2015364: 7f ff e1 b4 call 200da34 <__errno> <== NOT EXECUTED 2015368: 01 00 00 00 nop <== NOT EXECUTED 201536c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2015370: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015374: 10 bf ff f4 b 2015344 <== NOT EXECUTED 2015378: 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 ); 201537c: 7f ff e1 ae call 200da34 <__errno> 2015380: 01 00 00 00 nop 2015384: 82 10 20 0e mov 0xe, %g1 ! e 2015388: c2 22 00 00 st %g1, [ %o0 ] 201538c: 10 bf ff ee b 2015344 2015390: 90 10 3f ff mov -1, %o0 02020888 : #include int fsync( int fd ) { 2020888: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 202088c: 03 00 81 25 sethi %hi(0x2049400), %g1 2020890: c4 00 63 b8 ld [ %g1 + 0x3b8 ], %g2 ! 20497b8 2020894: 80 a6 00 02 cmp %i0, %g2 2020898: 1a 80 00 1b bcc 2020904 202089c: 03 00 81 7a sethi %hi(0x205e800), %g1 iop = rtems_libio_iop( fd ); 20208a0: c6 00 60 9c ld [ %g1 + 0x9c ], %g3 ! 205e89c 20208a4: 85 2e 20 02 sll %i0, 2, %g2 20208a8: 83 2e 20 04 sll %i0, 4, %g1 20208ac: 82 20 40 02 sub %g1, %g2, %g1 20208b0: 82 00 40 18 add %g1, %i0, %g1 20208b4: 83 28 60 02 sll %g1, 2, %g1 20208b8: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 20208bc: c8 02 20 0c ld [ %o0 + 0xc ], %g4 20208c0: 80 89 21 00 btst 0x100, %g4 20208c4: 02 80 00 10 be 2020904 20208c8: 80 89 20 04 btst 4, %g4 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 20208cc: 02 80 00 14 be 202091c 20208d0: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 20208d4: c8 02 20 30 ld [ %o0 + 0x30 ], %g4 20208d8: 80 a1 20 00 cmp %g4, 0 20208dc: 02 80 00 0a be 2020904 20208e0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 20208e4: c8 01 20 28 ld [ %g4 + 0x28 ], %g4 20208e8: 80 a1 20 00 cmp %g4, 0 20208ec: 02 80 00 12 be 2020934 20208f0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 20208f4: 9f c1 00 00 call %g4 20208f8: 01 00 00 00 nop } 20208fc: 81 c7 e0 08 ret 2020900: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 2020904: 40 00 43 d5 call 2031858 <__errno> <== NOT EXECUTED 2020908: 01 00 00 00 nop <== NOT EXECUTED 202090c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 2020910: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020914: 10 bf ff fa b 20208fc <== NOT EXECUTED 2020918: 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 ); 202091c: 40 00 43 cf call 2031858 <__errno> 2020920: 01 00 00 00 nop 2020924: 82 10 20 16 mov 0x16, %g1 ! 16 2020928: c2 22 00 00 st %g1, [ %o0 ] 202092c: 10 bf ff f4 b 20208fc 2020930: 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 ); 2020934: 40 00 43 c9 call 2031858 <__errno> 2020938: 01 00 00 00 nop 202093c: 82 10 20 86 mov 0x86, %g1 ! 86 2020940: c2 22 00 00 st %g1, [ %o0 ] 2020944: 10 bf ff ee b 20208fc 2020948: 90 10 3f ff mov -1, %o0 0200a998 : int ftruncate( int fd, off_t length ) { 200a998: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 200a99c: 03 00 80 5c sethi %hi(0x2017000), %g1 200a9a0: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 20172f8 200a9a4: 80 a6 00 02 cmp %i0, %g2 200a9a8: 1a 80 00 2b bcc 200aa54 200a9ac: 03 00 80 5f sethi %hi(0x2017c00), %g1 iop = rtems_libio_iop( fd ); 200a9b0: c6 00 63 f4 ld [ %g1 + 0x3f4 ], %g3 ! 2017ff4 200a9b4: 85 2e 20 02 sll %i0, 2, %g2 200a9b8: 83 2e 20 04 sll %i0, 4, %g1 200a9bc: 82 20 40 02 sub %g1, %g2, %g1 200a9c0: 82 00 40 18 add %g1, %i0, %g1 200a9c4: 83 28 60 02 sll %g1, 2, %g1 200a9c8: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 200a9cc: c4 06 20 0c ld [ %i0 + 0xc ], %g2 200a9d0: 80 88 a1 00 btst 0x100, %g2 200a9d4: 02 80 00 20 be 200aa54 200a9d8: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 200a9dc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 200a9e0: c2 27 bf e8 st %g1, [ %fp + -24 ] 200a9e4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 200a9e8: c4 27 bf ec st %g2, [ %fp + -20 ] 200a9ec: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 200a9f0: c2 27 bf f0 st %g1, [ %fp + -16 ] 200a9f4: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 if ( !loc.ops->node_type_h ) 200a9f8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200a9fc: 80 a0 60 00 cmp %g1, 0 200aa00: 02 80 00 21 be 200aa84 200aa04: 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 ) 200aa08: 9f c0 40 00 call %g1 200aa0c: 90 07 bf e8 add %fp, -24, %o0 200aa10: 80 a2 20 01 cmp %o0, 1 200aa14: 02 80 00 22 be 200aa9c 200aa18: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 200aa1c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 200aa20: 80 88 60 04 btst 4, %g1 200aa24: 02 80 00 12 be 200aa6c 200aa28: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 200aa2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 200aa30: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 200aa34: 80 a0 60 00 cmp %g1, 0 200aa38: 02 80 00 13 be 200aa84 200aa3c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 200aa40: 90 10 00 18 mov %i0, %o0 200aa44: 9f c0 40 00 call %g1 200aa48: 92 10 00 19 mov %i1, %o1 } 200aa4c: 81 c7 e0 08 ret 200aa50: 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); 200aa54: 40 00 0b f8 call 200da34 <__errno> <== NOT EXECUTED 200aa58: 01 00 00 00 nop <== NOT EXECUTED 200aa5c: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 200aa60: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200aa64: 10 bf ff fa b 200aa4c <== NOT EXECUTED 200aa68: 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 ); 200aa6c: 40 00 0b f2 call 200da34 <__errno> <== NOT EXECUTED 200aa70: 01 00 00 00 nop <== NOT EXECUTED 200aa74: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 200aa78: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200aa7c: 10 bf ff f4 b 200aa4c <== NOT EXECUTED 200aa80: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 200aa84: 40 00 0b ec call 200da34 <__errno> <== NOT EXECUTED 200aa88: 01 00 00 00 nop <== NOT EXECUTED 200aa8c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 200aa90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200aa94: 10 bf ff ee b 200aa4c <== NOT EXECUTED 200aa98: 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 ); 200aa9c: 40 00 0b e6 call 200da34 <__errno> 200aaa0: 01 00 00 00 nop 200aaa4: 82 10 20 15 mov 0x15, %g1 ! 15 200aaa8: c2 22 00 00 st %g1, [ %o0 ] 200aaac: 10 bf ff e8 b 200aa4c 200aab0: 90 10 3f ff mov -1, %o0 02020a68 : char * getcwd ( char *pt, size_t size) { 2020a68: 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) 2020a6c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2020a70: 02 80 00 fa be 2020e58 <== NOT EXECUTED 2020a74: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 2020a78: ae 10 20 00 clr %l7 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 2020a7c: 02 80 00 f1 be 2020e40 <== NOT EXECUTED 2020a80: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; *bpt = '\0'; 2020a84: 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))) 2020a88: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 2020a8c: 7f ff 90 de call 2004e04 <== NOT EXECUTED 2020a90: b8 06 7f ff add %i1, -1, %i4 <== NOT EXECUTED 2020a94: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 2020a98: 02 80 00 0c be 2020ac8 <== NOT EXECUTED 2020a9c: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 2020aa0: c0 2c 60 01 clrb [ %l1 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 2020aa4: c2 2c 40 00 stb %g1, [ %l1 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 2020aa8: ac 07 bf a8 add %fp, -88, %l6 <== NOT EXECUTED 2020aac: 11 00 81 11 sethi %hi(0x2044400), %o0 <== NOT EXECUTED 2020ab0: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 2020ab4: 7f ff 95 70 call 2006074 <== NOT EXECUTED 2020ab8: 90 12 21 d8 or %o0, 0x1d8, %o0 <== NOT EXECUTED 2020abc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020ac0: 02 80 00 0e be 2020af8 <== NOT EXECUTED 2020ac4: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 2020ac8: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 2020acc: 12 80 00 07 bne 2020ae8 <== NOT EXECUTED 2020ad0: 01 00 00 00 nop <== NOT EXECUTED free (pt); free (up); 2020ad4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2020ad8: 7f ff 8f 27 call 2004774 <== NOT EXECUTED 2020adc: b0 10 20 00 clr %i0 <== NOT EXECUTED return (char *) NULL; } 2020ae0: 81 c7 e0 08 ret <== NOT EXECUTED 2020ae4: 81 e8 00 00 restore <== NOT EXECUTED err: if(dir) (void) _closedir (dir); if (ptsize) free (pt); 2020ae8: 7f ff 8f 23 call 2004774 <== NOT EXECUTED 2020aec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 2020af0: 10 bf ff fa b 2020ad8 <== NOT EXECUTED 2020af4: 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; 2020af8: c4 07 bf ac ld [ %fp + -84 ], %g2 <== NOT EXECUTED root_ino = s.st_ino; 2020afc: 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; 2020b00: c2 27 bf 98 st %g1, [ %fp + -104 ] <== NOT EXECUTED 2020b04: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 2020b08: 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. */ 2020b0c: 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; 2020b10: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 2020b14: 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. */ 2020b18: c4 27 bf 9c st %g2, [ %fp + -100 ] <== NOT EXECUTED 2020b1c: 40 00 43 4f call 2031858 <__errno> <== NOT EXECUTED 2020b20: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED 2020b24: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED 2020b28: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 2020b2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2020b30: 7f ff 95 51 call 2006074 <== NOT EXECUTED 2020b34: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 2020b38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020b3c: 12 bf ff e3 bne 2020ac8 <== NOT EXECUTED 2020b40: 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) 2020b44: 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; 2020b48: 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) 2020b4c: 80 a0 c0 15 cmp %g3, %l5 <== NOT EXECUTED 2020b50: 02 80 00 a8 be 2020df0 <== NOT EXECUTED 2020b54: 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) 2020b58: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 2020b5c: 82 04 a4 04 add %l2, 0x404, %g1 <== NOT EXECUTED 2020b60: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 2020b64: 08 80 00 5a bleu 2020ccc <== NOT EXECUTED 2020b68: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 2020b6c: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 2020b70: c0 2c a0 02 clrb [ %l2 + 2 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 2020b74: c4 2c 80 00 stb %g2, [ %l2 ] <== NOT EXECUTED *bup++ = '.'; 2020b78: 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)) 2020b7c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2020b80: 40 00 05 66 call 2022118 <== NOT EXECUTED 2020b84: a0 04 a0 02 add %l2, 2, %l0 <== NOT EXECUTED 2020b88: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 2020b8c: 02 bf ff d0 be 2020acc <== NOT EXECUTED 2020b90: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 2020b94: d0 04 c0 00 ld [ %l3 ], %o0 <== NOT EXECUTED 2020b98: 7f ff fe ef call 2020754 <== NOT EXECUTED 2020b9c: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 2020ba0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020ba4: 12 80 00 34 bne 2020c74 <== NOT EXECUTED 2020ba8: 86 10 20 2f mov 0x2f, %g3 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 2020bac: 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) 2020bb0: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 2020bb4: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 2020bb8: 02 80 00 4e be 2020cf0 <== NOT EXECUTED 2020bbc: a4 04 a0 03 add %l2, 3, %l2 <== NOT EXECUTED 2020bc0: a8 10 20 00 clr %l4 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 2020bc4: 40 00 06 17 call 2022420 <== NOT EXECUTED 2020bc8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2020bcc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020bd0: 02 80 00 23 be 2020c5c <== NOT EXECUTED 2020bd4: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 2020bd8: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED 2020bdc: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 2020be0: 12 80 00 08 bne 2020c00 <== NOT EXECUTED 2020be4: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED 2020be8: c2 4a 20 0d ldsb [ %o0 + 0xd ], %g1 <== NOT EXECUTED 2020bec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020bf0: 02 bf ff f5 be 2020bc4 <== NOT EXECUTED 2020bf4: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 2020bf8: 22 80 00 31 be,a 2020cbc <== NOT EXECUTED 2020bfc: c2 4a 20 0e ldsb [ %o0 + 0xe ], %g1 <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 2020c00: 40 00 59 b8 call 20372e0 <== NOT EXECUTED 2020c04: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2020c08: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2020c0c: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 2020c10: 40 00 4d 38 call 20340f0 <== NOT EXECUTED 2020c14: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 2020c18: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2020c1c: 7f ff 95 16 call 2006074 <== NOT EXECUTED 2020c20: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 2020c24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020c28: 02 80 00 17 be 2020c84 <== NOT EXECUTED 2020c2c: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 2020c30: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2020c34: 02 80 00 1e be 2020cac <== NOT EXECUTED 2020c38: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; errno = 0; 2020c3c: 40 00 43 07 call 2031858 <__errno> <== NOT EXECUTED 2020c40: 01 00 00 00 nop <== NOT EXECUTED 2020c44: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 2020c48: 40 00 05 f6 call 2022420 <== NOT EXECUTED 2020c4c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2020c50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020c54: 32 bf ff e2 bne,a 2020bdc <== NOT EXECUTED 2020c58: 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) 2020c5c: 40 00 42 ff call 2031858 <__errno> <== NOT EXECUTED 2020c60: 01 00 00 00 nop <== NOT EXECUTED 2020c64: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2020c68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020c6c: 02 80 00 5a be 2020dd4 <== NOT EXECUTED 2020c70: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 2020c74: 40 00 37 d0 call 202ebb4 <== NOT EXECUTED 2020c78: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (ptsize) 2020c7c: 10 bf ff 94 b 2020acc <== NOT EXECUTED 2020c80: 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) 2020c84: 80 a0 40 15 cmp %g1, %l5 <== NOT EXECUTED 2020c88: 12 bf ff cf bne 2020bc4 <== NOT EXECUTED 2020c8c: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 2020c90: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 2020c94: 12 bf ff cc bne 2020bc4 <== NOT EXECUTED 2020c98: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 2020c9c: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 2020ca0: 12 bf ff c9 bne 2020bc4 <== NOT EXECUTED 2020ca4: 01 00 00 00 nop <== NOT EXECUTED 2020ca8: 30 80 00 1f b,a 2020d24 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) { if (!save_errno) save_errno = errno; 2020cac: 40 00 42 eb call 2031858 <__errno> <== NOT EXECUTED 2020cb0: 01 00 00 00 nop <== NOT EXECUTED 2020cb4: 10 bf ff e2 b 2020c3c <== NOT EXECUTED 2020cb8: e8 02 00 00 ld [ %o0 ], %l4 <== NOT EXECUTED else for (;;) { if (!(dp = _readdir (dir))) goto notfound; if (ISDOT (dp)) 2020cbc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020cc0: 02 bf ff c1 be 2020bc4 <== NOT EXECUTED 2020cc4: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED 2020cc8: 30 bf ff ce b,a 2020c00 <== NOT EXECUTED * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) { if (!(up = (char *) realloc (up, upsize *= 2))) 2020ccc: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 2020cd0: 40 00 06 4c call 2022600 <== NOT EXECUTED 2020cd4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 2020cd8: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 2020cdc: 02 bf ff 7b be 2020ac8 <== NOT EXECUTED 2020ce0: 82 04 40 1a add %l1, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 2020ce4: a4 10 00 11 mov %l1, %l2 <== NOT EXECUTED 2020ce8: 10 bf ff a1 b 2020b6c <== NOT EXECUTED 2020cec: 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) 2020cf0: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 2020cf4: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 2020cf8: 12 bf ff b3 bne 2020bc4 <== NOT EXECUTED 2020cfc: a8 10 20 00 clr %l4 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 2020d00: 40 00 05 c8 call 2022420 <== NOT EXECUTED 2020d04: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2020d08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2020d0c: 02 bf ff d4 be 2020c5c <== NOT EXECUTED 2020d10: a8 10 20 00 clr %l4 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 2020d14: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2020d18: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 2020d1c: 12 bf ff f9 bne 2020d00 <== NOT EXECUTED 2020d20: 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)) 2020d24: 40 00 59 6f call 20372e0 <== NOT EXECUTED 2020d28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2020d2c: c6 07 bf 9c ld [ %fp + -100 ], %g3 <== NOT EXECUTED 2020d30: a8 27 00 18 sub %i4, %i0, %l4 <== NOT EXECUTED 2020d34: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 2020d38: 82 20 80 03 sub %g2, %g3, %g1 <== NOT EXECUTED 2020d3c: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 2020d40: 80 a5 00 01 cmp %l4, %g1 <== NOT EXECUTED 2020d44: 18 80 00 13 bgu 2020d90 <== NOT EXECUTED 2020d48: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED { size_t len, off; if (!ptsize) 2020d4c: 80 a5 e0 00 cmp %l7, 0 <== NOT EXECUTED 2020d50: 02 80 00 49 be 2020e74 <== NOT EXECUTED 2020d54: 01 00 00 00 nop <== NOT EXECUTED errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 2020d58: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2020d5c: af 2d e0 01 sll %l7, 1, %l7 <== NOT EXECUTED 2020d60: 40 00 06 28 call 2022600 <== NOT EXECUTED 2020d64: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 2020d68: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2020d6c: 02 bf ff c2 be 2020c74 <== NOT EXECUTED 2020d70: 82 26 40 1c sub %i1, %i4, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 2020d74: 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; 2020d78: b2 06 00 17 add %i0, %l7, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 2020d7c: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 2020d80: b8 26 40 01 sub %i1, %g1, %i4 <== NOT EXECUTED 2020d84: 40 00 4c db call 20340f0 <== NOT EXECUTED 2020d88: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 2020d8c: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 2020d90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020d94: 12 80 00 04 bne 2020da4 <== NOT EXECUTED 2020d98: 84 10 20 2f mov 0x2f, %g2 <== NOT EXECUTED *--bpt = '/'; 2020d9c: b8 07 3f ff add %i4, -1, %i4 <== NOT EXECUTED 2020da0: c4 2f 00 00 stb %g2, [ %i4 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 2020da4: 40 00 59 4f call 20372e0 <== NOT EXECUTED 2020da8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 2020dac: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2020db0: 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); 2020db4: 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'; 2020db8: 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)); 2020dbc: 40 00 4c cd call 20340f0 <== NOT EXECUTED 2020dc0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED (void) _closedir (dir); 2020dc4: 40 00 37 7c call 202ebb4 <== NOT EXECUTED 2020dc8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 2020dcc: 10 bf ff 58 b 2020b2c <== NOT EXECUTED 2020dd0: 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; 2020dd4: 40 00 42 a1 call 2031858 <__errno> <== NOT EXECUTED 2020dd8: 01 00 00 00 nop <== NOT EXECUTED 2020ddc: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2020de0: 22 80 00 16 be,a 2020e38 <== NOT EXECUTED 2020de4: a8 10 20 02 mov 2, %l4 <== NOT EXECUTED 2020de8: 10 bf ff a3 b 2020c74 <== NOT EXECUTED 2020dec: 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) 2020df0: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 2020df4: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 2020df8: 12 bf ff 59 bne 2020b5c <== NOT EXECUTED 2020dfc: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 2020e00: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 2020e04: 80 a0 80 1d cmp %g2, %i5 <== NOT EXECUTED 2020e08: 12 bf ff 56 bne 2020b60 <== NOT EXECUTED 2020e0c: 82 04 a4 04 add %l2, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 2020e10: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 2020e14: 92 07 3f ff add %i4, -1, %o1 <== NOT EXECUTED 2020e18: 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); 2020e1c: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 2020e20: 40 00 4c b4 call 20340f0 <== NOT EXECUTED 2020e24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 2020e28: 7f ff 8e 53 call 2004774 <== NOT EXECUTED 2020e2c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2020e30: 81 c7 e0 08 ret <== NOT EXECUTED 2020e34: 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; 2020e38: 10 bf ff 8f b 2020c74 <== NOT EXECUTED 2020e3c: e8 22 00 00 st %l4, [ %o0 ] <== NOT EXECUTED if (pt) { ptsize = 0; if (!size) { errno = EINVAL; 2020e40: 40 00 42 86 call 2031858 <__errno> <== NOT EXECUTED 2020e44: b0 10 20 00 clr %i0 <== NOT EXECUTED 2020e48: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2020e4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2020e50: 81 c7 e0 08 ret <== NOT EXECUTED 2020e54: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 2020e58: 7f ff 8f eb call 2004e04 <== NOT EXECUTED 2020e5c: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 2020e60: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2020e64: 02 bf ff 1f be 2020ae0 <== NOT EXECUTED 2020e68: b2 06 23 fc add %i0, 0x3fc, %i1 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 2020e6c: 10 bf ff 06 b 2020a84 <== NOT EXECUTED 2020e70: ae 10 23 fc mov 0x3fc, %l7 <== NOT EXECUTED { size_t len, off; if (!ptsize) { errno = ERANGE; 2020e74: 40 00 42 79 call 2031858 <__errno> <== NOT EXECUTED 2020e78: 01 00 00 00 nop <== NOT EXECUTED 2020e7c: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 2020e80: 10 bf ff 7d b 2020c74 <== NOT EXECUTED 2020e84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 0202f050 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 202f050: 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 ); 202f054: 03 00 81 25 sethi %hi(0x2049400), %g1 202f058: c4 00 63 b8 ld [ %g1 + 0x3b8 ], %g2 ! 20497b8 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 202f05c: 88 10 00 18 mov %i0, %g4 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 202f060: 80 a6 00 02 cmp %i0, %g2 202f064: 1a 80 00 0a bcc 202f08c 202f068: b0 10 20 00 clr %i0 202f06c: 03 00 81 7a sethi %hi(0x205e800), %g1 202f070: c6 00 60 9c ld [ %g1 + 0x9c ], %g3 ! 205e89c 202f074: 85 29 20 02 sll %g4, 2, %g2 202f078: 83 29 20 04 sll %g4, 4, %g1 202f07c: 82 20 40 02 sub %g1, %g2, %g1 202f080: 82 00 40 04 add %g1, %g4, %g1 202f084: 83 28 60 02 sll %g1, 2, %g1 202f088: b0 00 c0 01 add %g3, %g1, %i0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 202f08c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 202f090: c2 27 bf e8 st %g1, [ %fp + -24 ] 202f094: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 202f098: c4 27 bf ec st %g2, [ %fp + -20 ] 202f09c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 202f0a0: c2 27 bf f0 st %g1, [ %fp + -16 ] 202f0a4: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 if ( !loc.ops->node_type_h ) 202f0a8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 202f0ac: 80 a0 60 00 cmp %g1, 0 202f0b0: 02 80 00 17 be 202f10c 202f0b4: 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 ) 202f0b8: 9f c0 40 00 call %g1 202f0bc: 90 07 bf e8 add %fp, -24, %o0 202f0c0: 80 a2 20 01 cmp %o0, 1 202f0c4: 12 80 00 0c bne 202f0f4 202f0c8: 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 ) 202f0cc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 202f0d0: c2 00 60 08 ld [ %g1 + 8 ], %g1 202f0d4: 80 a0 60 00 cmp %g1, 0 202f0d8: 02 80 00 0d be 202f10c 202f0dc: 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 ); 202f0e0: 90 10 00 18 mov %i0, %o0 202f0e4: 9f c0 40 00 call %g1 202f0e8: 94 10 00 1a mov %i2, %o2 } 202f0ec: 81 c7 e0 08 ret 202f0f0: 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 ); 202f0f4: 40 00 09 d9 call 2031858 <__errno> 202f0f8: 01 00 00 00 nop 202f0fc: 82 10 20 14 mov 0x14, %g1 ! 14 202f100: c2 22 00 00 st %g1, [ %o0 ] 202f104: 10 bf ff fa b 202f0ec 202f108: 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 ); 202f10c: 40 00 09 d3 call 2031858 <__errno> <== NOT EXECUTED 202f110: 01 00 00 00 nop <== NOT EXECUTED 202f114: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 202f118: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202f11c: 10 bf ff f4 b 202f0ec <== NOT EXECUTED 202f120: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02020ea8 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 2020ea8: 03 00 81 28 sethi %hi(0x204a000), %g1 <== NOT EXECUTED 2020eac: c4 00 62 3c ld [ %g1 + 0x23c ], %g2 ! 204a23c <== NOT EXECUTED return _POSIX_types_Gid; } 2020eb0: 81 c3 e0 08 retl <== NOT EXECUTED 2020eb4: d0 10 a0 2a lduh [ %g2 + 0x2a ], %o0 <== NOT EXECUTED 02021590 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2021590: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 2021594: 7f ff ff b3 call 2021460 <== NOT EXECUTED 2021598: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 202159c: 11 00 81 1a sethi %hi(0x2046800), %o0 <== NOT EXECUTED 20215a0: 13 00 81 24 sethi %hi(0x2049000), %o1 <== NOT EXECUTED 20215a4: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED 20215a8: 40 00 43 1e call 2032220 <== NOT EXECUTED 20215ac: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED 20215b0: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 20215b4: 12 80 00 0b bne 20215e0 <== NOT EXECUTED 20215b8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20215bc: 30 80 00 27 b,a 2021658 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 20215c0: 40 00 55 2a call 2036a68 <== NOT EXECUTED 20215c4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 20215c8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 20215cc: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); } if (match) { 20215d0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20215d4: 12 80 00 14 bne 2021624 <== NOT EXECUTED 20215d8: 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)) { 20215dc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20215e0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 20215e4: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 20215e8: 7f ff fe d1 call 202112c <== NOT EXECUTED 20215ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20215f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20215f4: 02 80 00 11 be 2021638 <== NOT EXECUTED 20215f8: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 20215fc: 32 bf ff f1 bne,a 20215c0 <== NOT EXECUTED 2021600: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 2021604: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 2021608: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 202160c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 2021610: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 2021614: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021618: 02 bf ff f2 be 20215e0 <== NOT EXECUTED 202161c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 2021620: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2021624: 40 00 40 e5 call 20319b8 <== NOT EXECUTED 2021628: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 202162c: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 2021630: 81 c7 e0 08 ret <== NOT EXECUTED 2021634: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 2021638: 40 00 40 88 call 2031858 <__errno> <== NOT EXECUTED 202163c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2021640: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2021644: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 2021648: 40 00 40 dc call 20319b8 <== NOT EXECUTED 202164c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2021650: 81 c7 e0 08 ret <== NOT EXECUTED 2021654: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 2021658: 40 00 40 80 call 2031858 <__errno> <== NOT EXECUTED 202165c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2021660: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2021664: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2021668: 81 c7 e0 08 ret <== NOT EXECUTED 202166c: 81 e8 00 00 restore <== NOT EXECUTED 020212ac : return NULL; return p; } struct group *getgrent() { 20212ac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 20212b0: 03 00 81 77 sethi %hi(0x205dc00), %g1 <== NOT EXECUTED 20212b4: d0 00 63 bc ld [ %g1 + 0x3bc ], %o0 ! 205dfbc <== NOT EXECUTED 20212b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20212bc: 02 80 00 0d be 20212f0 <== NOT EXECUTED 20212c0: 21 00 81 78 sethi %hi(0x205e000), %l0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 20212c4: 15 00 81 77 sethi %hi(0x205dc00), %o2 <== NOT EXECUTED 20212c8: 92 14 20 88 or %l0, 0x88, %o1 <== NOT EXECUTED 20212cc: 94 12 a3 c0 or %o2, 0x3c0, %o2 <== NOT EXECUTED 20212d0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 20212d4: 7f ff ff 96 call 202112c <== NOT EXECUTED 20212d8: b0 14 20 88 or %l0, 0x88, %i0 <== NOT EXECUTED 20212dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20212e0: 02 80 00 04 be 20212f0 <== NOT EXECUTED 20212e4: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 20212e8: 81 c7 e0 08 ret <== NOT EXECUTED 20212ec: 81 e8 00 00 restore <== NOT EXECUTED 20212f0: 81 c7 e0 08 ret <== NOT EXECUTED 20212f4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 020216a8 : } struct group *getgrgid( gid_t gid ) { 20216a8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 20216ac: 13 00 81 78 sethi %hi(0x205e000), %o1 <== NOT EXECUTED 20216b0: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 20216b4: 92 12 60 88 or %o1, 0x88, %o1 <== NOT EXECUTED 20216b8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 20216bc: 15 00 81 77 sethi %hi(0x205dc00), %o2 <== NOT EXECUTED 20216c0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 20216c4: 94 12 a3 c0 or %o2, 0x3c0, %o2 <== NOT EXECUTED 20216c8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 20216cc: 7f ff ff e9 call 2021670 <== NOT EXECUTED 20216d0: b0 10 20 00 clr %i0 <== NOT EXECUTED 20216d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20216d8: 22 80 00 02 be,a 20216e0 <== NOT EXECUTED 20216dc: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 20216e0: 81 c7 e0 08 ret <== NOT EXECUTED 20216e4: 81 e8 00 00 restore <== NOT EXECUTED 02021670 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2021670: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 2021674: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 2021678: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 202167c: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 2021680: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 2021684: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 2021688: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 202168c: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 2021690: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 2021694: 90 10 20 00 clr %o0 <== NOT EXECUTED 2021698: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202169c: 7f ff ff bd call 2021590 <== NOT EXECUTED 20216a0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 20216a4: 01 00 00 00 nop 02021714 : } struct group *getgrnam( const char *name ) { 2021714: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 2021718: 13 00 81 78 sethi %hi(0x205e000), %o1 <== NOT EXECUTED 202171c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2021720: 92 12 60 88 or %o1, 0x88, %o1 <== NOT EXECUTED 2021724: 15 00 81 77 sethi %hi(0x205dc00), %o2 <== NOT EXECUTED 2021728: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 202172c: 94 12 a3 c0 or %o2, 0x3c0, %o2 <== NOT EXECUTED 2021730: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 2021734: 7f ff ff ed call 20216e8 <== NOT EXECUTED 2021738: b0 10 20 00 clr %i0 <== NOT EXECUTED 202173c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021740: 22 80 00 02 be,a 2021748 <== NOT EXECUTED 2021744: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 2021748: 81 c7 e0 08 ret <== NOT EXECUTED 202174c: 81 e8 00 00 restore <== NOT EXECUTED 020216e8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 20216e8: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 20216ec: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 20216f0: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 20216f4: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 20216f8: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 20216fc: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 2021700: 92 10 20 00 clr %o1 <== NOT EXECUTED 2021704: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2021708: 7f ff ff a2 call 2021590 <== NOT EXECUTED 202170c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2021710: 01 00 00 00 nop 02021794 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2021794: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 2021798: 7f ff ff 32 call 2021460 <== NOT EXECUTED 202179c: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 20217a0: 11 00 81 1a sethi %hi(0x2046800), %o0 <== NOT EXECUTED 20217a4: 13 00 81 24 sethi %hi(0x2049000), %o1 <== NOT EXECUTED 20217a8: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED 20217ac: 40 00 42 9d call 2032220 <== NOT EXECUTED 20217b0: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED 20217b4: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 20217b8: 12 80 00 0b bne 20217e4 <== NOT EXECUTED 20217bc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20217c0: 30 80 00 27 b,a 202185c <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 20217c4: 40 00 54 a9 call 2036a68 <== NOT EXECUTED 20217c8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 20217cc: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 20217d0: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); } if (match) { 20217d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20217d8: 12 80 00 14 bne 2021828 <== NOT EXECUTED 20217dc: 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)) { 20217e0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 20217e4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 20217e8: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 20217ec: 7f ff fe c3 call 20212f8 <== NOT EXECUTED 20217f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20217f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20217f8: 02 80 00 11 be 202183c <== NOT EXECUTED 20217fc: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 2021800: 32 bf ff f1 bne,a 20217c4 <== NOT EXECUTED 2021804: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 2021808: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 202180c: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 2021810: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 2021814: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 2021818: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202181c: 02 bf ff f2 be 20217e4 <== NOT EXECUTED 2021820: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 2021824: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2021828: 40 00 40 64 call 20319b8 <== NOT EXECUTED 202182c: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 2021830: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 2021834: 81 c7 e0 08 ret <== NOT EXECUTED 2021838: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 202183c: 40 00 40 07 call 2031858 <__errno> <== NOT EXECUTED 2021840: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2021844: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2021848: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 202184c: 40 00 40 5b call 20319b8 <== NOT EXECUTED 2021850: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2021854: 81 c7 e0 08 ret <== NOT EXECUTED 2021858: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 202185c: 40 00 3f ff call 2031858 <__errno> <== NOT EXECUTED 2021860: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2021864: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 2021868: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202186c: 81 c7 e0 08 ret <== NOT EXECUTED 2021870: 81 e8 00 00 restore <== NOT EXECUTED 02021414 : return NULL; return p; } struct passwd *getpwent() { 2021414: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 2021418: 03 00 81 77 sethi %hi(0x205dc00), %g1 <== NOT EXECUTED 202141c: d0 00 62 d4 ld [ %g1 + 0x2d4 ], %o0 ! 205ded4 <== NOT EXECUTED 2021420: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021424: 02 80 00 0d be 2021458 <== NOT EXECUTED 2021428: 21 00 81 77 sethi %hi(0x205dc00), %l0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 202142c: 15 00 81 77 sethi %hi(0x205dc00), %o2 <== NOT EXECUTED 2021430: 92 14 23 a0 or %l0, 0x3a0, %o1 <== NOT EXECUTED 2021434: 94 12 a2 d8 or %o2, 0x2d8, %o2 <== NOT EXECUTED 2021438: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 202143c: 7f ff ff af call 20212f8 <== NOT EXECUTED 2021440: b0 14 23 a0 or %l0, 0x3a0, %i0 <== NOT EXECUTED 2021444: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021448: 02 80 00 04 be 2021458 <== NOT EXECUTED 202144c: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 2021450: 81 c7 e0 08 ret <== NOT EXECUTED 2021454: 81 e8 00 00 restore <== NOT EXECUTED 2021458: 81 c7 e0 08 ret <== NOT EXECUTED 202145c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02021918 : } struct passwd *getpwnam( const char *name ) { 2021918: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 202191c: 13 00 81 77 sethi %hi(0x205dc00), %o1 <== NOT EXECUTED 2021920: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2021924: 92 12 63 a0 or %o1, 0x3a0, %o1 <== NOT EXECUTED 2021928: 15 00 81 77 sethi %hi(0x205dc00), %o2 <== NOT EXECUTED 202192c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 2021930: 94 12 a2 d8 or %o2, 0x2d8, %o2 <== NOT EXECUTED 2021934: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 2021938: 7f ff ff ed call 20218ec <== NOT EXECUTED 202193c: b0 10 20 00 clr %i0 <== NOT EXECUTED 2021940: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021944: 22 80 00 02 be,a 202194c <== NOT EXECUTED 2021948: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 202194c: 81 c7 e0 08 ret <== NOT EXECUTED 2021950: 81 e8 00 00 restore <== NOT EXECUTED 020218ec : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 20218ec: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 20218f0: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 20218f4: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 20218f8: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 20218fc: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 2021900: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 2021904: 92 10 20 00 clr %o1 <== NOT EXECUTED 2021908: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 202190c: 7f ff ff a2 call 2021794 <== NOT EXECUTED 2021910: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2021914: 01 00 00 00 nop 020218ac : } struct passwd *getpwuid( uid_t uid ) { 20218ac: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 20218b0: 13 00 81 77 sethi %hi(0x205dc00), %o1 <== NOT EXECUTED 20218b4: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 20218b8: 92 12 63 a0 or %o1, 0x3a0, %o1 <== NOT EXECUTED 20218bc: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 20218c0: 15 00 81 77 sethi %hi(0x205dc00), %o2 <== NOT EXECUTED 20218c4: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 20218c8: 94 12 a2 d8 or %o2, 0x2d8, %o2 <== NOT EXECUTED 20218cc: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 20218d0: 7f ff ff e9 call 2021874 <== NOT EXECUTED 20218d4: b0 10 20 00 clr %i0 <== NOT EXECUTED 20218d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20218dc: 22 80 00 02 be,a 20218e4 <== NOT EXECUTED 20218e0: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 20218e4: 81 c7 e0 08 ret <== NOT EXECUTED 20218e8: 81 e8 00 00 restore <== NOT EXECUTED 02021874 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2021874: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 2021878: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 202187c: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 2021880: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 2021884: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 2021888: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 202188c: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 2021890: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 2021894: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 2021898: 90 10 20 00 clr %o0 <== NOT EXECUTED 202189c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 20218a0: 7f ff ff bd call 2021794 <== NOT EXECUTED 20218a4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 20218a8: 01 00 00 00 nop 0200aad4 : int gettimeofday( struct timeval *tp, void * __tz ) { 200aad4: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 200aad8: 80 a6 20 00 cmp %i0, 0 200aadc: 02 80 00 11 be 200ab20 200aae0: 01 00 00 00 nop ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 200aae4: 7f ff dc b0 call 2001da4 200aae8: 01 00 00 00 nop 200aaec: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 200aaf0: 7f ff ef 35 call 20067c4 <_TOD_Get> 200aaf4: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 200aaf8: 7f ff dc af call 2001db4 200aafc: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 200ab00: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 200ab04: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 200ab08: 92 10 23 e8 mov 0x3e8, %o1 200ab0c: 40 00 26 95 call 2014560 <.udiv> 200ab10: c2 26 00 00 st %g1, [ %i0 ] 200ab14: 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; } 200ab18: 81 c7 e0 08 ret 200ab1c: 91 e8 20 00 restore %g0, 0, %o0 void * __tz ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 200ab20: 40 00 0b c5 call 200da34 <__errno> <== NOT EXECUTED 200ab24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200ab28: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 200ab2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200ab30: 81 c7 e0 08 ret <== NOT EXECUTED 200ab34: 81 e8 00 00 restore <== NOT EXECUTED 020048ac : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 20048ac: 03 00 81 28 sethi %hi(0x204a000), %g1 <== NOT EXECUTED 20048b0: c4 00 62 3c ld [ %g1 + 0x23c ], %g2 ! 204a23c <== NOT EXECUTED return _POSIX_types_Uid; } 20048b4: 81 c3 e0 08 retl <== NOT EXECUTED 20048b8: d0 10 a0 28 lduh [ %g2 + 0x28 ], %o0 <== NOT EXECUTED 0202e71c : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 202e71c: c4 02 20 2c ld [ %o0 + 0x2c ], %g2 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 202e720: 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 ) 202e724: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 202e728: 80 a0 60 01 cmp %g1, 1 202e72c: 02 80 00 04 be 202e73c 202e730: 90 10 3f ff mov -1, %o0 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 202e734: 81 c3 e0 08 retl <== NOT EXECUTED 202e738: 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; 202e73c: c0 20 e0 08 clr [ %g3 + 8 ] return 0; } 202e740: 81 c3 e0 08 retl 202e744: 90 10 20 00 clr %o0 0202e838 : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 202e838: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 202e83c: 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 ) ) 202e840: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 202e844: 82 04 20 50 add %l0, 0x50, %g1 202e848: 80 a0 80 01 cmp %g2, %g1 202e84c: 12 80 00 30 bne 202e90c 202e850: 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 ) 202e854: c2 06 20 0c ld [ %i0 + 0xc ], %g1 202e858: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 202e85c: 80 a4 00 02 cmp %l0, %g2 202e860: 02 80 00 31 be 202e924 202e864: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 202e868: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 202e86c: 80 a0 60 00 cmp %g1, 0 202e870: 12 80 00 2d bne 202e924 202e874: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 202e878: c2 04 20 08 ld [ %l0 + 8 ], %g1 202e87c: 80 a0 60 00 cmp %g1, 0 202e880: 22 80 00 06 be,a 202e898 202e884: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 202e888: 7f ff d7 61 call 202460c <_Chain_Extract> 202e88c: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 202e890: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 202e894: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 202e898: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 202e89c: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 202e8a0: 90 07 bf f0 add %fp, -16, %o0 202e8a4: 7f ff 57 df call 2004820 202e8a8: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 202e8ac: 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) ) { 202e8b0: 90 10 00 10 mov %l0, %o0 202e8b4: 7f ff 58 51 call 20049f8 202e8b8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 202e8bc: 80 a2 20 00 cmp %o0, 0 202e8c0: 12 80 00 11 bne 202e904 202e8c4: 01 00 00 00 nop 202e8c8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 202e8cc: 80 a0 60 00 cmp %g1, 0 202e8d0: 12 80 00 0d bne 202e904 202e8d4: 03 00 81 28 sethi %hi(0x204a000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 202e8d8: c6 00 62 3c ld [ %g1 + 0x23c ], %g3 ! 204a23c 202e8dc: c4 06 00 00 ld [ %i0 ], %g2 202e8e0: c2 00 e0 04 ld [ %g3 + 4 ], %g1 202e8e4: 80 a0 40 02 cmp %g1, %g2 202e8e8: 22 80 00 02 be,a 202e8f0 202e8ec: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 202e8f0: 90 10 00 10 mov %l0, %o0 202e8f4: 7f ff 57 a0 call 2004774 202e8f8: b0 10 20 00 clr %i0 202e8fc: 81 c7 e0 08 ret 202e900: 81 e8 00 00 restore } return 0; } 202e904: 81 c7 e0 08 ret 202e908: 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 ); 202e90c: 40 00 0b d3 call 2031858 <__errno> 202e910: b0 10 3f ff mov -1, %i0 202e914: 82 10 20 5a mov 0x5a, %g1 202e918: c2 22 00 00 st %g1, [ %o0 ] 202e91c: 81 c7 e0 08 ret 202e920: 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 ); 202e924: 40 00 0b cd call 2031858 <__errno> 202e928: b0 10 3f ff mov -1, %i0 202e92c: 82 10 20 10 mov 0x10, %g1 202e930: c2 22 00 00 st %g1, [ %o0 ] 202e934: 81 c7 e0 08 ret 202e938: 81 e8 00 00 restore 02021460 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 2021460: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 2021464: 05 00 81 77 sethi %hi(0x205dc00), %g2 <== NOT EXECUTED 2021468: c2 48 a2 d0 ldsb [ %g2 + 0x2d0 ], %g1 ! 205ded0 <== NOT EXECUTED 202146c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021470: 02 80 00 04 be 2021480 <== NOT EXECUTED 2021474: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2021478: 81 c7 e0 08 ret <== NOT EXECUTED 202147c: 81 e8 00 00 restore <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 2021480: 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; 2021484: c2 28 a2 d0 stb %g1, [ %g2 + 0x2d0 ] <== NOT EXECUTED mkdir("/etc", 0777); 2021488: 11 00 81 19 sethi %hi(0x2046400), %o0 <== NOT EXECUTED 202148c: 7f ff 8e d4 call 2004fdc <== NOT EXECUTED 2021490: 90 12 23 f8 or %o0, 0x3f8, %o0 ! 20467f8 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 2021494: 31 00 81 1a sethi %hi(0x2046800), %i0 <== NOT EXECUTED 2021498: 21 00 81 24 sethi %hi(0x2049000), %l0 <== NOT EXECUTED 202149c: 90 16 20 00 mov %i0, %o0 <== NOT EXECUTED 20214a0: 40 00 43 60 call 2032220 <== NOT EXECUTED 20214a4: 92 14 22 78 or %l0, 0x278, %o1 <== NOT EXECUTED 20214a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20214ac: 22 80 00 0d be,a 20214e0 <== NOT EXECUTED 20214b0: 90 16 20 00 mov %i0, %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); 20214b4: 40 00 41 41 call 20319b8 <== NOT EXECUTED 20214b8: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 20214bc: 92 14 22 78 or %l0, 0x278, %o1 <== NOT EXECUTED 20214c0: 31 00 81 1a sethi %hi(0x2046800), %i0 <== NOT EXECUTED 20214c4: 40 00 43 57 call 2032220 <== NOT EXECUTED 20214c8: 90 16 20 78 or %i0, 0x78, %o0 ! 2046878 <== NOT EXECUTED 20214cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20214d0: 22 80 00 11 be,a 2021514 <== NOT EXECUTED 20214d4: 90 16 20 78 or %i0, 0x78, %o0 <== NOT EXECUTED fclose(fp); 20214d8: 40 00 41 38 call 20319b8 <== NOT EXECUTED 20214dc: 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) { 20214e0: 13 00 81 16 sethi %hi(0x2045800), %o1 <== NOT EXECUTED 20214e4: 40 00 43 4f call 2032220 <== NOT EXECUTED 20214e8: 92 12 61 78 or %o1, 0x178, %o1 ! 2045978 <_CPU_Trap_slot_template+0x1510> <== NOT EXECUTED 20214ec: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 20214f0: 02 bf ff f3 be 20214bc <== NOT EXECUTED 20214f4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 20214f8: 94 10 20 66 mov 0x66, %o2 <== NOT EXECUTED 20214fc: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 2021500: 11 00 81 1a sethi %hi(0x2046800), %o0 <== NOT EXECUTED 2021504: 40 00 46 71 call 2032ec8 <== NOT EXECUTED 2021508: 90 12 20 10 or %o0, 0x10, %o0 ! 2046810 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 202150c: 10 bf ff ea b 20214b4 <== NOT EXECUTED 2021510: 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) { 2021514: 13 00 81 16 sethi %hi(0x2045800), %o1 <== NOT EXECUTED 2021518: 40 00 43 42 call 2032220 <== NOT EXECUTED 202151c: 92 12 61 78 or %o1, 0x178, %o1 ! 2045978 <_CPU_Trap_slot_template+0x1510> <== NOT EXECUTED 2021520: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2021524: 02 bf ff d5 be 2021478 <== NOT EXECUTED 2021528: 11 00 81 1a sethi %hi(0x2046800), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 202152c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2021530: 94 10 20 2a mov 0x2a, %o2 <== NOT EXECUTED 2021534: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 2021538: 40 00 46 64 call 2032ec8 <== NOT EXECUTED 202153c: 90 12 20 88 or %o0, 0x88, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 2021540: 40 00 41 1e call 20319b8 <== NOT EXECUTED 2021544: 81 e8 00 00 restore <== NOT EXECUTED 2021548: 01 00 00 00 nop 02017928 : int ioctl( int fd, ioctl_command_t command, ... ) { 2017928: 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 ); 201792c: 03 00 80 9c sethi %hi(0x2027000), %g1 2017930: c4 00 63 38 ld [ %g1 + 0x338 ], %g2 ! 2027338 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 2017934: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 2017938: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 201793c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 2017940: 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 ); 2017944: 80 a6 00 02 cmp %i0, %g2 2017948: 1a 80 00 1b bcc 20179b4 201794c: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 2017950: 03 00 80 a4 sethi %hi(0x2029000), %g1 2017954: c6 00 61 74 ld [ %g1 + 0x174 ], %g3 ! 2029174 2017958: 85 2e 20 02 sll %i0, 2, %g2 201795c: 83 2e 20 04 sll %i0, 4, %g1 2017960: 82 20 40 02 sub %g1, %g2, %g1 2017964: 82 00 40 18 add %g1, %i0, %g1 2017968: 83 28 60 02 sll %g1, 2, %g1 201796c: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 2017970: c4 02 20 0c ld [ %o0 + 0xc ], %g2 2017974: 80 88 a1 00 btst 0x100, %g2 2017978: 02 80 00 0f be 20179b4 201797c: 82 07 a0 50 add %fp, 0x50, %g1 /* * Now process the ioctl(). */ if ( !iop->handlers ) 2017980: 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 *); 2017984: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 2017988: 80 a0 a0 00 cmp %g2, 0 201798c: 02 80 00 0a be 20179b4 2017990: d4 07 a0 4c ld [ %fp + 0x4c ], %o2 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 2017994: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 2017998: 80 a0 60 00 cmp %g1, 0 201799c: 02 80 00 0c be 20179cc 20179a0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 20179a4: 9f c0 40 00 call %g1 20179a8: 01 00 00 00 nop return rc; } 20179ac: 81 c7 e0 08 ret 20179b0: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 20179b4: 40 00 03 2c call 2018664 <__errno> <== NOT EXECUTED 20179b8: 01 00 00 00 nop <== NOT EXECUTED 20179bc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 20179c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20179c4: 10 bf ff fa b 20179ac <== NOT EXECUTED 20179c8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 20179cc: 40 00 03 26 call 2018664 <__errno> <== NOT EXECUTED 20179d0: 01 00 00 00 nop <== NOT EXECUTED 20179d4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 20179d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20179dc: 10 bf ff f4 b 20179ac <== NOT EXECUTED 20179e0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02003b20 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 2003b20: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 2003b24: c6 06 60 30 ld [ %i1 + 0x30 ], %g3 <== NOT EXECUTED 2003b28: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 2003b2c: 02 80 00 03 be 2003b38 <== NOT EXECUTED 2003b30: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 2003b34: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 2003b38: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 2003b3c: 02 80 00 0b be 2003b68 <== NOT EXECUTED 2003b40: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 2003b44: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED 2003b48: c4 00 60 a8 ld [ %g1 + 0xa8 ], %g2 ! 20178a8 <__ctype_ptr> <== NOT EXECUTED 2003b4c: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2003b50: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED 2003b54: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2003b58: 32 80 00 02 bne,a 2003b60 <== NOT EXECUTED 2003b5c: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 2003b60: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == '\r') { 2003b64: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED 2003b68: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 2003b6c: 02 80 00 41 be 2003c70 <== NOT EXECUTED 2003b70: 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)) { 2003b74: 02 80 00 14 be 2003bc4 <== NOT EXECUTED 2003b78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2003b7c: 32 80 00 16 bne,a 2003bd4 <== NOT EXECUTED 2003b80: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 2003b84: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED 2003b88: 05 00 80 5e sethi %hi(0x2017800), %g2 <== NOT EXECUTED 2003b8c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 ! 2017804 <== NOT EXECUTED 2003b90: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2003b94: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 2003b98: 16 80 00 09 bge 2003bbc <== NOT EXECUTED 2003b9c: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 2003ba0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2003ba4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 2003ba8: 12 80 00 3b bne 2003c94 <== NOT EXECUTED 2003bac: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 2003bb0: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 2003bb4: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 2003bb8: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 2003bbc: 81 c7 e0 08 ret <== NOT EXECUTED 2003bc0: 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)) { 2003bc4: 80 88 e0 40 btst 0x40, %g3 <== NOT EXECUTED 2003bc8: 32 80 00 02 bne,a 2003bd0 <== NOT EXECUTED 2003bcc: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2003bd0: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 2003bd4: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 2003bd8: 22 bf ff ec be,a 2003b88 <== NOT EXECUTED 2003bdc: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 2003be0: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 2003be4: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2003be8: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2003bec: 22 80 00 34 be,a 2003cbc <== NOT EXECUTED 2003bf0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2003bf4: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 2003bf8: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2003bfc: 22 80 00 41 be,a 2003d00 <== NOT EXECUTED 2003c00: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 2003c04: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED 2003c08: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2003c0c: 02 bf ff ec be 2003bbc <== NOT EXECUTED 2003c10: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 2003c14: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 2003c18: 02 80 00 2e be 2003cd0 <== NOT EXECUTED 2003c1c: 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]) 2003c20: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED 2003c24: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2003c28: 02 80 00 07 be 2003c44 <== NOT EXECUTED 2003c2c: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 2003c30: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 2003c34: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED 2003c38: 32 bf ff d4 bne,a 2003b88 <== NOT EXECUTED 2003c3c: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 2003c40: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 2003c44: 22 80 00 05 be,a 2003c58 <== NOT EXECUTED 2003c48: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2003c4c: 7f ff ff 0d call 2003880 <== NOT EXECUTED 2003c50: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2003c54: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2003c58: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 2003c5c: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 2003c60: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 2003c64: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 2003c68: 81 c7 e0 08 ret <== NOT EXECUTED 2003c6c: 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) 2003c70: 80 88 e0 80 btst 0x80, %g3 <== NOT EXECUTED 2003c74: 02 80 00 04 be 2003c84 <== NOT EXECUTED 2003c78: 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; } 2003c7c: 81 c7 e0 08 ret <== NOT EXECUTED 2003c80: 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) 2003c84: 32 bf ff d3 bne,a 2003bd0 <== NOT EXECUTED 2003c88: 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)) { 2003c8c: 10 bf ff d2 b 2003bd4 <== NOT EXECUTED 2003c90: 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); 2003c94: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 2003c98: 7f ff fe fa call 2003880 <== NOT EXECUTED 2003c9c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2003ca0: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2003ca4: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 2003ca8: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED 2003cac: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 2003cb0: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 2003cb4: 81 c7 e0 08 ret <== NOT EXECUTED 2003cb8: 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); 2003cbc: 92 10 20 00 clr %o1 <== NOT EXECUTED 2003cc0: 7f ff ff 10 call 2003900 <== NOT EXECUTED 2003cc4: b0 10 20 00 clr %i0 <== NOT EXECUTED 2003cc8: 81 c7 e0 08 ret <== NOT EXECUTED 2003ccc: 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)) 2003cd0: 22 80 00 05 be,a 2003ce4 <== NOT EXECUTED 2003cd4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 2003cd8: 7f ff fe ea call 2003880 <== NOT EXECUTED 2003cdc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2003ce0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 2003ce4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 2003ce8: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED 2003cec: c4 28 c0 01 stb %g2, [ %g3 + %g1 ] <== NOT EXECUTED 2003cf0: 82 00 60 01 inc %g1 <== NOT EXECUTED 2003cf4: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED 2003cf8: 81 c7 e0 08 ret <== NOT EXECUTED 2003cfc: 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); 2003d00: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2003d04: 7f ff fe ff call 2003900 <== NOT EXECUTED 2003d08: b0 10 20 00 clr %i0 <== NOT EXECUTED 2003d0c: 81 c7 e0 08 ret <== NOT EXECUTED 2003d10: 81 e8 00 00 restore <== NOT EXECUTED 02022948 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 2022948: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 202294c: 7f ff ff 0c call 202257c 2022950: 01 00 00 00 nop 2022954: 80 a2 00 18 cmp %o0, %i0 2022958: 12 80 00 c6 bne 2022c70 202295c: 80 a6 60 00 cmp %i1, 0 /* * Validate the signal passed. */ if ( !sig ) 2022960: 02 80 00 ca be 2022c88 2022964: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 2022968: 80 a0 e0 1f cmp %g3, 0x1f 202296c: 18 80 00 c7 bgu 2022c88 2022970: 03 00 80 a6 sethi %hi(0x2029800), %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 2022974: a1 2e 60 02 sll %i1, 2, %l0 2022978: a4 10 61 9c or %g1, 0x19c, %l2 202297c: a3 2e 60 04 sll %i1, 4, %l1 2022980: 82 24 40 10 sub %l1, %l0, %g1 2022984: 82 04 80 01 add %l2, %g1, %g1 2022988: c4 00 60 08 ld [ %g1 + 8 ], %g2 202298c: 80 a0 a0 01 cmp %g2, 1 2022990: 02 80 00 95 be 2022be4 2022994: 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 ) ) 2022998: 80 a6 60 08 cmp %i1, 8 202299c: 02 80 00 94 be 2022bec 20229a0: 80 a6 60 04 cmp %i1, 4 20229a4: 02 80 00 92 be 2022bec 20229a8: 80 a6 60 0b cmp %i1, 0xb 20229ac: 02 80 00 90 be 2022bec 20229b0: 82 10 20 01 mov 1, %g1 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 20229b4: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 20229b8: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 20229bc: 80 a6 a0 00 cmp %i2, 0 20229c0: 02 80 00 a3 be 2022c4c 20229c4: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 20229c8: c2 06 80 00 ld [ %i2 ], %g1 20229cc: c2 27 bf f4 st %g1, [ %fp + -12 ] 20229d0: 05 00 80 a4 sethi %hi(0x2029000), %g2 20229d4: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 2029360 <_Thread_Dispatch_disable_level> 20229d8: 82 00 60 01 inc %g1 20229dc: c2 20 a3 60 st %g1, [ %g2 + 0x360 ] /* * 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; 20229e0: 03 00 80 a5 sethi %hi(0x2029400), %g1 20229e4: c8 00 60 24 ld [ %g1 + 0x24 ], %g4 ! 2029424 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 20229e8: c4 01 21 6c ld [ %g4 + 0x16c ], %g2 20229ec: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 20229f0: 80 ae 00 01 andncc %i0, %g1, %g0 20229f4: 12 80 00 69 bne 2022b98 20229f8: 03 00 80 a6 sethi %hi(0x2029800), %g1 goto process_it; 20229fc: 98 10 63 28 or %g1, 0x328, %o4 ! 2029b28 <_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 ; 2022a00: 96 03 20 30 add %o4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 2022a04: 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; 2022a08: 9a 03 20 04 add %o4, 4, %o5 !_Chain_Is_tail( the_chain, the_node ) ; 2022a0c: 80 a0 80 0d cmp %g2, %o5 2022a10: 22 80 00 1a be,a 2022a78 2022a14: 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)) { 2022a18: 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; 2022a1c: 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)) { 2022a20: 80 8e 00 01 btst %i0, %g1 2022a24: 12 80 00 5d bne 2022b98 2022a28: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1 2022a2c: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 2022a30: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 2022a34: 22 80 00 0d be,a 2022a68 <== NOT EXECUTED 2022a38: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2022a3c: 10 80 00 58 b 2022b9c <== NOT EXECUTED 2022a40: 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 ]; 2022a44: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 <== NOT EXECUTED if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 2022a48: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 2022a4c: 12 80 00 53 bne 2022b98 <== NOT EXECUTED 2022a50: 88 10 00 02 mov %g2, %g4 <== NOT EXECUTED 2022a54: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 <== NOT EXECUTED 2022a58: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 2022a5c: 12 80 00 50 bne 2022b9c <== NOT EXECUTED 2022a60: 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 ) { 2022a64: 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 ) ; 2022a68: 80 a0 80 0d cmp %g2, %o5 <== NOT EXECUTED 2022a6c: 32 bf ff f6 bne,a 2022a44 <== NOT EXECUTED 2022a70: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 2022a74: 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 ; 2022a78: 80 a3 00 0b cmp %o4, %o3 2022a7c: 12 bf ff e2 bne 2022a04 2022a80: 03 00 80 9c sethi %hi(0x2027000), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 2022a84: c4 08 63 e4 ldub [ %g1 + 0x3e4 ], %g2 ! 20273e4 2022a88: 90 10 20 00 clr %o0 2022a8c: 03 00 80 a4 sethi %hi(0x2029000), %g1 2022a90: 84 00 a0 01 inc %g2 2022a94: 94 10 62 c8 or %g1, 0x2c8, %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 ) 2022a98: 35 04 00 00 sethi %hi(0x10000000), %i2 2022a9c: 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 ] ) 2022aa0: c2 02 80 00 ld [ %o2 ], %g1 2022aa4: 80 a0 60 00 cmp %g1, 0 2022aa8: 22 80 00 35 be,a 2022b7c 2022aac: 9a 10 00 02 mov %g2, %o5 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 2022ab0: 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 ) 2022ab4: 80 a0 60 00 cmp %g1, 0 2022ab8: 22 80 00 31 be,a 2022b7c 2022abc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED continue; maximum = the_info->maximum; 2022ac0: d8 10 60 10 lduh [ %g1 + 0x10 ], %o4 object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2022ac4: 80 a3 20 00 cmp %o4, 0 2022ac8: 02 80 00 5f be 2022c44 2022acc: d6 00 60 1c ld [ %g1 + 0x1c ], %o3 2022ad0: 88 10 20 01 mov 1, %g4 the_thread = (Thread_Control *) object_table[ index ]; 2022ad4: 83 29 20 02 sll %g4, 2, %g1 2022ad8: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 2022adc: 80 a0 e0 00 cmp %g3, 0 2022ae0: 02 80 00 23 be 2022b6c 2022ae4: 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 ) 2022ae8: da 00 e0 14 ld [ %g3 + 0x14 ], %o5 2022aec: 80 a3 40 02 cmp %o5, %g2 2022af0: 38 80 00 1f bgu,a 2022b6c 2022af4: 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 ]; 2022af8: c2 00 e1 6c ld [ %g3 + 0x16c ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 2022afc: 80 a0 60 00 cmp %g1, 0 2022b00: 22 80 00 1b be,a 2022b6c 2022b04: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED 2022b08: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 2022b0c: 80 ae 00 01 andncc %i0, %g1, %g0 2022b10: 22 80 00 17 be,a 2022b6c 2022b14: 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 ) { 2022b18: 80 a3 40 02 cmp %o5, %g2 2022b1c: 2a 80 00 0b bcs,a 2022b48 2022b20: 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 ) ) 2022b24: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 <== NOT EXECUTED 2022b28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022b2c: 22 80 00 10 be,a 2022b6c <== NOT EXECUTED 2022b30: 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 ) ) { 2022b34: d2 00 e0 10 ld [ %g3 + 0x10 ], %o1 <== NOT EXECUTED 2022b38: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED 2022b3c: 12 80 00 46 bne 2022c54 <== NOT EXECUTED 2022b40: 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++ ) { 2022b44: 88 01 20 01 inc %g4 <== NOT EXECUTED 2022b48: 80 a3 00 04 cmp %o4, %g4 2022b4c: 0a 80 00 0c bcs 2022b7c 2022b50: 90 10 00 03 mov %g3, %o0 the_thread = (Thread_Control *) object_table[ index ]; 2022b54: 83 29 20 02 sll %g4, 2, %g1 2022b58: c6 02 c0 01 ld [ %o3 + %g1 ], %g3 if ( !the_thread ) 2022b5c: 80 a0 e0 00 cmp %g3, 0 2022b60: 12 bf ff e2 bne 2022ae8 2022b64: 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 ) { 2022b68: 9a 10 00 02 mov %g2, %o5 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2022b6c: 88 01 20 01 inc %g4 2022b70: 80 a3 00 04 cmp %o4, %g4 2022b74: 1a bf ff f9 bcc 2022b58 2022b78: 83 29 20 02 sll %g4, 2, %g1 2022b7c: 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; 2022b80: 80 a2 80 0f cmp %o2, %o7 2022b84: 12 bf ff c7 bne 2022aa0 2022b88: 84 10 00 0d mov %o5, %g2 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 2022b8c: 80 a2 20 00 cmp %o0, 0 2022b90: 02 80 00 0b be 2022bbc 2022b94: 88 10 00 08 mov %o0, %g4 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2022b98: 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 ) ) { 2022b9c: 90 10 00 04 mov %g4, %o0 2022ba0: 92 10 00 19 mov %i1, %o1 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 2022ba4: 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 ) ) { 2022ba8: 40 00 00 54 call 2022cf8 <_POSIX_signals_Unblock_thread> 2022bac: 94 07 bf ec add %fp, -20, %o2 2022bb0: 80 8a 20 ff btst 0xff, %o0 2022bb4: 12 80 00 09 bne 2022bd8 2022bb8: 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 ); 2022bbc: 40 00 00 3f call 2022cb8 <_POSIX_signals_Set_process_signals> 2022bc0: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 2022bc4: b4 24 40 10 sub %l1, %l0, %i2 2022bc8: c2 04 80 1a ld [ %l2 + %i2 ], %g1 2022bcc: 80 a0 60 02 cmp %g1, 2 2022bd0: 02 80 00 0d be 2022c04 2022bd4: 11 00 80 a6 sethi %hi(0x2029800), %o0 psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); 2022bd8: 7f ff ad 89 call 200e1fc <_Thread_Enable_dispatch> 2022bdc: 01 00 00 00 nop 2022be0: 90 10 20 00 clr %o0 ! 0 return 0; } 2022be4: 81 c7 e0 08 ret 2022be8: 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 ); 2022bec: 40 00 00 d1 call 2022f30 2022bf0: 01 00 00 00 nop 2022bf4: 40 00 00 92 call 2022e3c 2022bf8: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 2022bfc: 81 c7 e0 08 ret 2022c00: 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 *) 2022c04: 7f ff a7 4a call 200c92c <_Chain_Get> 2022c08: 90 12 23 1c or %o0, 0x31c, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 2022c0c: 80 a2 20 00 cmp %o0, 0 2022c10: 02 80 00 24 be 2022ca0 2022c14: 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 ); 2022c18: 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; 2022c1c: c2 22 20 08 st %g1, [ %o0 + 8 ] 2022c20: c4 07 bf f0 ld [ %fp + -16 ], %g2 2022c24: c4 22 20 0c st %g2, [ %o0 + 0xc ] 2022c28: c2 07 bf f4 ld [ %fp + -12 ], %g1 2022c2c: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 2022c30: 11 00 80 a6 sethi %hi(0x2029800), %o0 2022c34: 90 12 23 6c or %o0, 0x36c, %o0 ! 2029b6c <_POSIX_signals_Siginfo> 2022c38: 7f ff a7 31 call 200c8fc <_Chain_Append> 2022c3c: 90 02 00 1a add %o0, %i2, %o0 2022c40: 30 bf ff e6 b,a 2022bd8 continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 2022c44: 10 bf ff ce b 2022b7c 2022c48: 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; 2022c4c: 10 bf ff 61 b 20229d0 2022c50: 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 ) 2022c54: 32 bf ff c6 bne,a 2022b6c <== NOT EXECUTED 2022c58: 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 ) { 2022c5c: 80 8a 40 1a btst %o1, %i2 <== NOT EXECUTED 2022c60: 32 bf ff ba bne,a 2022b48 <== NOT EXECUTED 2022c64: 88 01 20 01 inc %g4 <== NOT EXECUTED 2022c68: 10 bf ff c1 b 2022b6c <== NOT EXECUTED 2022c6c: 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 ); 2022c70: 7f ff d6 7d call 2018664 <__errno> 2022c74: 01 00 00 00 nop 2022c78: 82 10 20 03 mov 3, %g1 ! 3 2022c7c: c2 22 00 00 st %g1, [ %o0 ] 2022c80: 10 bf ff d9 b 2022be4 2022c84: 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 ); 2022c88: 7f ff d6 77 call 2018664 <__errno> 2022c8c: 01 00 00 00 nop 2022c90: 82 10 20 16 mov 0x16, %g1 ! 16 2022c94: c2 22 00 00 st %g1, [ %o0 ] 2022c98: 10 bf ff d3 b 2022be4 2022c9c: 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 ); 2022ca0: 7f ff d6 71 call 2018664 <__errno> <== NOT EXECUTED 2022ca4: 01 00 00 00 nop <== NOT EXECUTED 2022ca8: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 2022cac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2022cb0: 10 bf ff cd b 2022be4 <== NOT EXECUTED 2022cb4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02015524 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 2015524: 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())) 2015528: 03 00 80 60 sethi %hi(0x2018000), %g1 201552c: c4 00 63 74 ld [ %g1 + 0x374 ], %g2 ! 2018374 <_System_state_Current> 2015530: 80 a0 a0 03 cmp %g2, 3 2015534: 02 80 00 04 be 2015544 2015538: 21 00 80 5e sethi %hi(0x2017800), %l0 201553c: 81 c7 e0 08 ret <== NOT EXECUTED 2015540: 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) { 2015544: c4 04 20 b0 ld [ %l0 + 0xb0 ], %g2 2015548: 03 00 80 5d sethi %hi(0x2017400), %g1 201554c: b0 10 60 00 mov %g1, %i0 ! 2017400 2015550: 80 a0 80 18 cmp %g2, %i0 2015554: 02 80 00 06 be 201556c 2015558: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 _wrapup_reent(&libc_global_reent); 201555c: 40 00 01 ce call 2015c94 <_wrapup_reent> 2015560: 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; 2015564: f0 24 20 b0 st %i0, [ %l0 + 0xb0 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 2015568: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 201556c: 7f ff e1 8a call 200db94 2015570: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 2015574: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 2015578: 7f ff e1 87 call 200db94 201557c: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 2015580: c2 04 20 b0 ld [ %l0 + 0xb0 ], %g1 2015584: f0 00 60 0c ld [ %g1 + 0xc ], %i0 2015588: 7f ff e1 83 call 200db94 201558c: 81 e8 00 00 restore 2015590: 01 00 00 00 nop 02021a50 : int link( const char *existing, const char *new ) { 2021a50: 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 ); 2021a54: 92 10 20 00 clr %o1 2021a58: 90 10 00 18 mov %i0, %o0 2021a5c: a0 07 bf e4 add %fp, -28, %l0 2021a60: 96 10 20 01 mov 1, %o3 2021a64: 94 10 00 10 mov %l0, %o2 2021a68: 7f ff 8a e5 call 20045fc 2021a6c: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 2021a70: 80 a2 20 00 cmp %o0, 0 2021a74: 12 80 00 84 bne 2021c84 2021a78: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 2021a7c: c2 4e 40 00 ldsb [ %i1 ], %g1 2021a80: 80 a0 60 2f cmp %g1, 0x2f 2021a84: 02 80 00 06 be 2021a9c 2021a88: 80 a0 60 5c cmp %g1, 0x5c 2021a8c: 02 80 00 04 be 2021a9c 2021a90: 80 a0 60 00 cmp %g1, 0 2021a94: 12 80 00 3a bne 2021b7c 2021a98: 03 00 81 28 sethi %hi(0x204a000), %g1 2021a9c: 03 00 81 28 sethi %hi(0x204a000), %g1 2021aa0: c6 00 62 3c ld [ %g1 + 0x23c ], %g3 ! 204a23c 2021aa4: 88 10 20 01 mov 1, %g4 2021aa8: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 2021aac: c2 27 bf d4 st %g1, [ %fp + -44 ] 2021ab0: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 2021ab4: c4 27 bf d8 st %g2, [ %fp + -40 ] 2021ab8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 2021abc: c2 27 bf dc st %g1, [ %fp + -36 ] 2021ac0: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 2021ac4: c4 27 bf e0 st %g2, [ %fp + -32 ] if ( !parent_loc.ops->evalformake_h ) { 2021ac8: c2 07 bf dc ld [ %fp + -36 ], %g1 2021acc: c2 00 60 04 ld [ %g1 + 4 ], %g1 2021ad0: 80 a0 60 00 cmp %g1, 0 2021ad4: 02 80 00 5e be 2021c4c 2021ad8: 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 ); 2021adc: a2 07 bf d4 add %fp, -44, %l1 2021ae0: 94 07 bf f4 add %fp, -12, %o2 2021ae4: 9f c0 40 00 call %g1 2021ae8: 92 10 00 11 mov %l1, %o1 if ( result != 0 ) { 2021aec: b2 92 20 00 orcc %o0, 0, %i1 2021af0: 12 80 00 48 bne 2021c10 2021af4: 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 ) { 2021af8: c2 07 bf e0 ld [ %fp + -32 ], %g1 2021afc: 80 a0 40 02 cmp %g1, %g2 2021b00: 12 80 00 2a bne 2021ba8 2021b04: 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 ) { 2021b08: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2021b0c: 80 a0 60 00 cmp %g1, 0 2021b10: 02 80 00 5f be 2021c8c 2021b14: 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 ); 2021b18: 90 10 00 10 mov %l0, %o0 2021b1c: 9f c0 40 00 call %g1 2021b20: 92 10 00 11 mov %l1, %o1 rtems_filesystem_freenode( &existing_loc ); 2021b24: c2 07 bf ec ld [ %fp + -20 ], %g1 2021b28: 80 a0 60 00 cmp %g1, 0 2021b2c: 02 80 00 08 be 2021b4c 2021b30: b0 10 00 08 mov %o0, %i0 2021b34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2021b38: 80 a0 60 00 cmp %g1, 0 2021b3c: 22 80 00 05 be,a 2021b50 2021b40: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 2021b44: 9f c0 40 00 call %g1 2021b48: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 2021b4c: c2 07 bf dc ld [ %fp + -36 ], %g1 2021b50: 80 a0 60 00 cmp %g1, 0 2021b54: 02 80 00 4c be 2021c84 2021b58: 01 00 00 00 nop 2021b5c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2021b60: 80 a0 60 00 cmp %g1, 0 2021b64: 02 80 00 48 be 2021c84 2021b68: 01 00 00 00 nop 2021b6c: 9f c0 40 00 call %g1 2021b70: 90 10 00 11 mov %l1, %o0 return result; } 2021b74: 81 c7 e0 08 ret 2021b78: 81 e8 00 00 restore /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 2021b7c: c6 00 62 3c ld [ %g1 + 0x23c ], %g3 2021b80: 88 10 20 00 clr %g4 2021b84: c2 00 e0 04 ld [ %g3 + 4 ], %g1 2021b88: c2 27 bf d4 st %g1, [ %fp + -44 ] 2021b8c: c4 00 e0 08 ld [ %g3 + 8 ], %g2 2021b90: c4 27 bf d8 st %g2, [ %fp + -40 ] 2021b94: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 2021b98: c2 27 bf dc st %g1, [ %fp + -36 ] 2021b9c: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 2021ba0: 10 bf ff ca b 2021ac8 2021ba4: 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 ); 2021ba8: c2 07 bf ec ld [ %fp + -20 ], %g1 2021bac: 80 a0 60 00 cmp %g1, 0 2021bb0: 22 80 00 09 be,a 2021bd4 2021bb4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 2021bb8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2021bbc: 80 a0 60 00 cmp %g1, 0 2021bc0: 22 80 00 05 be,a 2021bd4 2021bc4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 2021bc8: 9f c0 40 00 call %g1 2021bcc: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 2021bd0: c2 07 bf dc ld [ %fp + -36 ], %g1 2021bd4: 80 a0 60 00 cmp %g1, 0 2021bd8: 02 80 00 08 be 2021bf8 2021bdc: 01 00 00 00 nop 2021be0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2021be4: 80 a0 60 00 cmp %g1, 0 2021be8: 02 80 00 04 be 2021bf8 2021bec: 01 00 00 00 nop 2021bf0: 9f c0 40 00 call %g1 2021bf4: 90 10 00 11 mov %l1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 2021bf8: 40 00 3f 18 call 2031858 <__errno> 2021bfc: b0 10 3f ff mov -1, %i0 2021c00: 82 10 20 12 mov 0x12, %g1 2021c04: c2 22 00 00 st %g1, [ %o0 ] 2021c08: 81 c7 e0 08 ret 2021c0c: 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 ); 2021c10: c2 07 bf ec ld [ %fp + -20 ], %g1 2021c14: 80 a0 60 00 cmp %g1, 0 2021c18: 02 80 00 08 be 2021c38 2021c1c: 01 00 00 00 nop 2021c20: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2021c24: 80 a0 60 00 cmp %g1, 0 2021c28: 02 80 00 04 be 2021c38 2021c2c: 01 00 00 00 nop 2021c30: 9f c0 40 00 call %g1 2021c34: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 2021c38: 40 00 3f 08 call 2031858 <__errno> 2021c3c: b0 10 3f ff mov -1, %i0 2021c40: f2 22 00 00 st %i1, [ %o0 ] 2021c44: 81 c7 e0 08 ret 2021c48: 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 ); 2021c4c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 2021c50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021c54: 02 80 00 08 be 2021c74 <== NOT EXECUTED 2021c58: 01 00 00 00 nop <== NOT EXECUTED 2021c5c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2021c60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021c64: 02 80 00 04 be 2021c74 <== NOT EXECUTED 2021c68: 01 00 00 00 nop <== NOT EXECUTED 2021c6c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2021c70: 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 ); 2021c74: 40 00 3e f9 call 2031858 <__errno> <== NOT EXECUTED 2021c78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2021c7c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2021c80: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2021c84: 81 c7 e0 08 ret 2021c88: 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 ); 2021c8c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 2021c90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021c94: 02 80 00 0a be 2021cbc <== NOT EXECUTED 2021c98: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2021c9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2021ca0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021ca4: 02 80 00 06 be 2021cbc <== NOT EXECUTED 2021ca8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2021cac: 9f c0 40 00 call %g1 <== NOT EXECUTED 2021cb0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2021cb4: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 2021cb8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2021cbc: 02 bf ff ee be 2021c74 <== NOT EXECUTED 2021cc0: 01 00 00 00 nop <== NOT EXECUTED 2021cc4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2021cc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021ccc: 02 bf ff ea be 2021c74 <== NOT EXECUTED 2021cd0: 01 00 00 00 nop <== NOT EXECUTED 2021cd4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2021cd8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2021cdc: 30 bf ff e6 b,a 2021c74 <== NOT EXECUTED 020153ec : off_t lseek( int fd, off_t offset, int whence ) { 20153ec: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 20153f0: 03 00 80 5c sethi %hi(0x2017000), %g1 20153f4: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 20172f8 off_t lseek( int fd, off_t offset, int whence ) { 20153f8: 92 10 00 19 mov %i1, %o1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 20153fc: 80 a6 00 02 cmp %i0, %g2 2015400: 1a 80 00 31 bcc 20154c4 2015404: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 2015408: 03 00 80 5f sethi %hi(0x2017c00), %g1 201540c: c6 00 63 f4 ld [ %g1 + 0x3f4 ], %g3 ! 2017ff4 2015410: 85 2e 20 02 sll %i0, 2, %g2 2015414: 83 2e 20 04 sll %i0, 4, %g1 2015418: 82 20 40 02 sub %g1, %g2, %g1 201541c: 82 00 40 18 add %g1, %i0, %g1 2015420: 83 28 60 02 sll %g1, 2, %g1 2015424: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 2015428: c4 06 20 0c ld [ %i0 + 0xc ], %g2 201542c: 80 88 a1 00 btst 0x100, %g2 2015430: 02 80 00 25 be 20154c4 2015434: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 2015438: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 201543c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2015440: 80 a0 60 00 cmp %g1, 0 2015444: 02 80 00 26 be 20154dc 2015448: 80 a6 a0 01 cmp %i2, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 201544c: 02 80 00 1b be 20154b8 2015450: f4 06 20 08 ld [ %i0 + 8 ], %i2 2015454: 80 a2 a0 02 cmp %o2, 2 2015458: 02 80 00 0d be 201548c 201545c: 80 a2 a0 00 cmp %o2, 0 2015460: 12 80 00 0f bne 201549c 2015464: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 2015468: 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 ); 201546c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2015470: 9f c0 40 00 call %g1 2015474: 90 10 00 18 mov %i0, %o0 if ( status == (off_t) -1 ) 2015478: 80 a2 3f ff cmp %o0, -1 201547c: 22 80 00 02 be,a 2015484 2015480: f4 26 20 08 st %i2, [ %i0 + 8 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 2015484: 81 c7 e0 08 ret 2015488: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 201548c: c2 06 20 04 ld [ %i0 + 4 ], %g1 2015490: 82 06 40 01 add %i1, %g1, %g1 2015494: 10 bf ff f6 b 201546c 2015498: c2 26 20 08 st %g1, [ %i0 + 8 ] break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 201549c: 7f ff e1 66 call 200da34 <__errno> 20154a0: 01 00 00 00 nop 20154a4: 82 10 20 16 mov 0x16, %g1 ! 16 20154a8: c2 22 00 00 st %g1, [ %o0 ] 20154ac: 90 10 3f ff mov -1, %o0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 20154b0: 81 c7 e0 08 ret 20154b4: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 20154b8: 82 06 40 1a add %i1, %i2, %g1 20154bc: 10 bf ff ec b 201546c 20154c0: 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); 20154c4: 7f ff e1 5c call 200da34 <__errno> <== NOT EXECUTED 20154c8: 01 00 00 00 nop <== NOT EXECUTED 20154cc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 20154d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20154d4: 10 bf ff ec b 2015484 <== NOT EXECUTED 20154d8: 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 ); 20154dc: 7f ff e1 56 call 200da34 <__errno> <== NOT EXECUTED 20154e0: 01 00 00 00 nop <== NOT EXECUTED 20154e4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 20154e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20154ec: 10 bf ff e6 b 2015484 <== NOT EXECUTED 20154f0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02021e1c : int _STAT_NAME( const char *path, struct stat *buf ) { 2021e1c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2021e20: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2021e24: 02 80 00 32 be 2021eec <== NOT EXECUTED 2021e28: 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 ); 2021e2c: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 2021e30: 92 10 20 00 clr %o1 <== NOT EXECUTED 2021e34: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 2021e38: 96 10 20 00 clr %o3 <== NOT EXECUTED 2021e3c: 7f ff 89 f0 call 20045fc <== NOT EXECUTED 2021e40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( status != 0 ) 2021e44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021e48: 12 80 00 27 bne 2021ee4 <== NOT EXECUTED 2021e4c: c4 07 bf ec ld [ %fp + -20 ], %g2 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 2021e50: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 2021e54: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021e58: 02 80 00 2b be 2021f04 <== NOT EXECUTED 2021e5c: 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) ); 2021e60: c0 26 40 00 clr [ %i1 ] <== NOT EXECUTED 2021e64: c0 26 60 04 clr [ %i1 + 4 ] <== NOT EXECUTED 2021e68: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED 2021e6c: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED 2021e70: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED 2021e74: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED 2021e78: c0 26 60 18 clr [ %i1 + 0x18 ] <== NOT EXECUTED 2021e7c: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED 2021e80: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 2021e84: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED 2021e88: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED 2021e8c: c0 26 60 2c clr [ %i1 + 0x2c ] <== NOT EXECUTED 2021e90: c0 26 60 30 clr [ %i1 + 0x30 ] <== NOT EXECUTED 2021e94: c0 26 60 34 clr [ %i1 + 0x34 ] <== NOT EXECUTED 2021e98: c0 26 60 38 clr [ %i1 + 0x38 ] <== NOT EXECUTED 2021e9c: c0 26 60 3c clr [ %i1 + 0x3c ] <== NOT EXECUTED 2021ea0: c0 26 60 40 clr [ %i1 + 0x40 ] <== NOT EXECUTED 2021ea4: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED 2021ea8: c0 26 60 48 clr [ %i1 + 0x48 ] <== NOT EXECUTED 2021eac: c0 26 60 4c clr [ %i1 + 0x4c ] <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 2021eb0: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 2021eb4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2021eb8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2021ebc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2021ec0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021ec4: 02 80 00 08 be 2021ee4 <== NOT EXECUTED 2021ec8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 2021ecc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2021ed0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021ed4: 02 80 00 1a be 2021f3c <== NOT EXECUTED 2021ed8: 01 00 00 00 nop <== NOT EXECUTED 2021edc: 9f c0 40 00 call %g1 <== NOT EXECUTED 2021ee0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 2021ee4: 81 c7 e0 08 ret <== NOT EXECUTED 2021ee8: 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 ); 2021eec: 40 00 3e 5b call 2031858 <__errno> <== NOT EXECUTED 2021ef0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2021ef4: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2021ef8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2021efc: 81 c7 e0 08 ret <== NOT EXECUTED 2021f00: 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 ); 2021f04: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2021f08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021f0c: 02 80 00 08 be 2021f2c <== NOT EXECUTED 2021f10: 01 00 00 00 nop <== NOT EXECUTED 2021f14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2021f18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021f1c: 02 80 00 04 be 2021f2c <== NOT EXECUTED 2021f20: 01 00 00 00 nop <== NOT EXECUTED 2021f24: 9f c0 40 00 call %g1 <== NOT EXECUTED 2021f28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2021f2c: 40 00 3e 4b call 2031858 <__errno> <== NOT EXECUTED 2021f30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2021f34: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2021f38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2021f3c: 81 c7 e0 08 ret <== NOT EXECUTED 2021f40: 81 e8 00 00 restore <== NOT EXECUTED 0200aee8 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 200aee8: 9d e3 bf 98 save %sp, -104, %sp 200aeec: 05 00 80 60 sethi %hi(0x2018000), %g2 200aef0: 84 10 a0 58 or %g2, 0x58, %g2 ! 2018058 200aef4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 200aef8: a2 10 00 18 mov %i0, %l1 200aefc: 82 00 60 01 inc %g1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 200af00: 7f ff ff ed call 200aeb4 200af04: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* * Validate the parameters */ if ( !size ) 200af08: 80 a6 20 00 cmp %i0, 0 200af0c: 02 80 00 23 be 200af98 200af10: 03 00 80 60 sethi %hi(0x2018000), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 200af14: c4 00 63 74 ld [ %g1 + 0x374 ], %g2 ! 2018374 <_System_state_Current> 200af18: 80 a0 a0 03 cmp %g2, 3 200af1c: 02 80 00 1a be 200af84 200af20: 11 00 80 60 sethi %hi(0x2018000), %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 ); 200af24: 92 10 00 11 mov %l1, %o1 200af28: 40 00 05 6d call 200c4dc <_Protected_heap_Allocate> 200af2c: 90 12 20 00 mov %o0, %o0 if ( !return_this ) { 200af30: b0 92 20 00 orcc %o0, 0, %i0 200af34: 02 80 00 1b be 200afa0 200af38: 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 ) 200af3c: 03 00 80 5f sethi %hi(0x2017c00), %g1 200af40: c2 00 61 5c ld [ %g1 + 0x15c ], %g1 ! 2017d5c 200af44: 80 a0 60 00 cmp %g1, 0 200af48: 02 80 00 04 be 200af58 200af4c: 92 10 00 11 mov %l1, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 200af50: 9f c0 40 00 call %g1 <== NOT EXECUTED 200af54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 200af58: 03 00 80 5f sethi %hi(0x2017c00), %g1 200af5c: c2 00 61 54 ld [ %g1 + 0x154 ], %g1 ! 2017d54 200af60: 80 a0 60 00 cmp %g1, 0 200af64: 02 80 00 06 be 200af7c 200af68: b0 10 00 10 mov %l0, %i0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 200af6c: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 200af70: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED 200af74: 9f c0 40 00 call %g1 <== NOT EXECUTED 200af78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 200af7c: 81 c7 e0 08 ret 200af80: 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()) && 200af84: 7f ff ff b2 call 200ae4c 200af88: 01 00 00 00 nop 200af8c: 80 8a 20 ff btst 0xff, %o0 200af90: 12 bf ff e5 bne 200af24 200af94: 11 00 80 60 sethi %hi(0x2018000), %o0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 200af98: 81 c7 e0 08 ret 200af9c: 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) 200afa0: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED 200afa4: c2 00 61 58 ld [ %g1 + 0x158 ], %g1 ! 2017d58 <== NOT EXECUTED 200afa8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200afac: 02 80 00 08 be 200afcc <== NOT EXECUTED 200afb0: 01 00 00 00 nop <== NOT EXECUTED return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 200afb4: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 200afb8: 9f c0 40 00 call %g1 <== NOT EXECUTED 200afbc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( !return_this ) { 200afc0: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 200afc4: 12 bf ff df bne 200af40 <== NOT EXECUTED 200afc8: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED errno = ENOMEM; 200afcc: 40 00 0a 9a call 200da34 <__errno> <== NOT EXECUTED 200afd0: 01 00 00 00 nop <== NOT EXECUTED 200afd4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 200afd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200afdc: 81 c7 e0 08 ret <== NOT EXECUTED 200afe0: 81 e8 00 00 restore <== NOT EXECUTED 0200ae98 : } void malloc_deferred_free( void *pointer ) { 200ae98: 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 ); 200ae9c: 11 00 80 61 sethi %hi(0x2018400), %o0 <== NOT EXECUTED 200aea0: 90 12 23 88 or %o0, 0x388, %o0 ! 2018788 <== NOT EXECUTED 200aea4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 200aea8: 7f ff ed 24 call 2006338 <_Chain_Append> <== NOT EXECUTED 200aeac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 200aeb0: 01 00 00 00 nop 0200aeb4 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 200aeb4: 9d e3 bf 98 save %sp, -104, %sp 200aeb8: 03 00 80 61 sethi %hi(0x2018400), %g1 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 200aebc: 10 80 00 04 b 200aecc 200aec0: a0 10 63 88 or %g1, 0x388, %l0 ! 2018788 /* * 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); 200aec4: 7f ff fe 8a call 200a8ec <== NOT EXECUTED 200aec8: 01 00 00 00 nop <== NOT EXECUTED 200aecc: 40 00 04 16 call 200bf24 <_Chain_Get> 200aed0: 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) 200aed4: 80 a2 20 00 cmp %o0, 0 200aed8: 12 bf ff fb bne 200aec4 200aedc: 01 00 00 00 nop free(to_be_freed); } 200aee0: 81 c7 e0 08 ret 200aee4: 81 e8 00 00 restore 020280d8 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 20280d8: 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) ) { 20280dc: 7f ff 72 47 call 20049f8 20280e0: 90 10 00 18 mov %i0, %o0 20280e4: 80 a2 20 00 cmp %o0, 0 20280e8: 12 80 00 13 bne 2028134 20280ec: 01 00 00 00 nop 20280f0: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 20280f4: 80 a0 60 00 cmp %g1, 0 20280f8: 12 80 00 0f bne 2028134 20280fc: 03 00 81 28 sethi %hi(0x204a000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 2028100: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 204a23c 2028104: c4 00 60 04 ld [ %g1 + 4 ], %g2 2028108: 80 a0 80 18 cmp %g2, %i0 202810c: 22 80 00 02 be,a 2028114 2028110: 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) 2028114: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 2028118: 80 a0 60 06 cmp %g1, 6 202811c: 02 80 00 04 be 202812c 2028120: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 2028124: 7f ff ff 7d call 2027f18 2028128: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 202812c: 7f ff 71 92 call 2004774 2028130: 90 10 00 18 mov %i0, %o0 } return 0; } 2028134: 81 c7 e0 08 ret 2028138: 91 e8 20 00 restore %g0, 0, %o0 02027e94 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 2027e94: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( block_table ); 2027e98: 80 a6 20 00 cmp %i0, 0 2027e9c: 02 80 00 16 be 2027ef4 2027ea0: 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 2027ea8: d0 06 00 00 ld [ %i0 ], %o0 2027eac: a0 10 00 08 mov %o0, %l0 2027eb0: a2 10 20 00 clr %l1 if ( b[i] ) { 2027eb4: d0 04 00 00 ld [ %l0 ], %o0 2027eb8: 80 a2 20 00 cmp %o0, 0 2027ebc: 02 80 00 05 be 2027ed0 2027ec0: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 2027ec4: 7f ff ff 25 call 2027b58 2027ec8: 01 00 00 00 nop b[i] = 0; 2027ecc: 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 2027ed8: a0 04 20 04 add %l0, 4, %l0 2027edc: 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 ); 2027ee0: 7f ff ff 1e call 2027b58 2027ee4: 01 00 00 00 nop *block_table = 0; 2027ee8: c0 26 00 00 clr [ %i0 ] } 2027eec: 81 c7 e0 08 ret 2027ef0: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 2027ef4: 11 00 81 1b sethi %hi(0x2046c00), %o0 <== NOT EXECUTED 2027ef8: 15 00 81 1b sethi %hi(0x2046c00), %o2 <== NOT EXECUTED 2027efc: 17 00 81 1b sethi %hi(0x2046c00), %o3 <== NOT EXECUTED 2027f00: 90 12 20 a8 or %o0, 0xa8, %o0 <== NOT EXECUTED 2027f04: 94 12 a2 18 or %o2, 0x218, %o2 <== NOT EXECUTED 2027f08: 96 12 e1 30 or %o3, 0x130, %o3 <== NOT EXECUTED 2027f0c: 7f ff 70 ee call 20042c4 <__assert_func> <== NOT EXECUTED 2027f10: 92 10 21 b1 mov 0x1b1, %o1 <== NOT EXECUTED 2027f14: 01 00 00 00 nop 020283b8 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 20283b8: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 20283bc: 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 ) 20283c0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 20283c4: 80 a0 40 19 cmp %g1, %i1 20283c8: 06 80 00 0c bl 20283f8 20283cc: 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; 20283d0: f2 24 20 4c st %i1, [ %l0 + 0x4c ] iop->size = the_jnode->info.file.size; 20283d4: f2 26 20 04 st %i1, [ %i0 + 4 ] IMFS_update_atime( the_jnode ); 20283d8: 90 07 bf f0 add %fp, -16, %o0 20283dc: 7f ff 71 11 call 2004820 20283e0: 92 10 20 00 clr %o1 20283e4: c2 07 bf f0 ld [ %fp + -16 ], %g1 20283e8: 90 10 20 00 clr %o0 20283ec: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 20283f0: 81 c7 e0 08 ret 20283f4: 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 ); 20283f8: 7f ff ff 9b call 2028264 <== NOT EXECUTED 20283fc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 2028400: 81 c7 e0 08 ret <== NOT EXECUTED 2028404: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02028408 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 2028408: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 202840c: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 2028410: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2028414: 80 a0 60 06 cmp %g1, 6 2028418: 12 80 00 0a bne 2028440 202841c: a2 10 00 18 mov %i0, %l1 if (iop->offset > the_jnode->info.linearfile.size) 2028420: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 2028424: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 2028428: 80 a6 00 08 cmp %i0, %o0 <== NOT EXECUTED 202842c: 04 80 00 14 ble 202847c <== NOT EXECUTED 2028430: 01 00 00 00 nop <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 2028434: d0 24 60 08 st %o0, [ %l1 + 8 ] <== NOT EXECUTED 2028438: 81 c7 e0 08 ret <== NOT EXECUTED 202843c: 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 )) 2028440: d2 06 20 08 ld [ %i0 + 8 ], %o1 2028444: 7f ff ff 88 call 2028264 2028448: 90 10 00 10 mov %l0, %o0 202844c: 80 a2 20 00 cmp %o0, 0 2028450: 12 80 00 07 bne 202846c 2028454: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 2028458: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 202845c: f0 06 20 08 ld [ %i0 + 8 ], %i0 2028460: c2 24 60 04 st %g1, [ %l1 + 4 ] } return iop->offset; } 2028464: 81 c7 e0 08 ret 2028468: 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 ); 202846c: 40 00 24 fb call 2031858 <__errno> <== NOT EXECUTED 2028470: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2028474: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 2028478: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202847c: 81 c7 e0 08 ret <== NOT EXECUTED 2028480: 81 e8 00 00 restore <== NOT EXECUTED 02028744 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 2028744: 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)) 2028748: c4 06 20 0c ld [ %i0 + 0xc ], %g2 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 202874c: 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)) 2028750: 80 88 a2 04 btst 0x204, %g2 2028754: 02 80 00 06 be 202876c 2028758: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 202875c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 2028760: 80 a0 60 06 cmp %g1, 6 2028764: 22 80 00 0b be,a 2028790 2028768: 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) 202876c: 80 88 a2 00 btst 0x200, %g2 2028770: 02 80 00 04 be 2028780 2028774: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 iop->offset = the_jnode->info.file.size; 2028778: c2 24 60 08 st %g1, [ %l1 + 8 ] iop->size = the_jnode->info.file.size; 202877c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 2028780: b0 10 20 00 clr %i0 2028784: c2 24 60 04 st %g1, [ %l1 + 4 ] return 0; } 2028788: 81 c7 e0 08 ret 202878c: 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; 2028790: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 2028794: 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; 2028798: 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; 202879c: 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; 20287a0: 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; 20287a4: 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) 20287a8: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 20287ac: 12 80 00 08 bne 20287cc <== NOT EXECUTED 20287b0: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 20287b4: 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) 20287b8: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 20287bc: 02 bf ff f1 be 2028780 <== NOT EXECUTED 20287c0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED iop->offset = the_jnode->info.file.size; 20287c4: 10 bf ff ee b 202877c <== NOT EXECUTED 20287c8: 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) 20287cc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20287d0: 92 10 20 00 clr %o1 <== NOT EXECUTED 20287d4: 7f ff ff 2c call 2028484 <== NOT EXECUTED 20287d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20287dc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 20287e0: 02 bf ff ea be 2028788 <== NOT EXECUTED 20287e4: 01 00 00 00 nop <== NOT EXECUTED 20287e8: 10 bf ff f4 b 20287b8 <== NOT EXECUTED 20287ec: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED 02028ac0 : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2028ac0: 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 ); 2028ac4: d2 02 20 08 ld [ %o0 + 8 ], %o1 2028ac8: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 2028acc: 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 ); 2028ad0: 94 10 00 01 mov %g1, %o2 2028ad4: 82 13 c0 00 mov %o7, %g1 2028ad8: 7f ff ff 46 call 20287f0 2028adc: 9e 10 40 00 mov %g1, %o7 2028ae0: 01 00 00 00 nop <== NOT EXECUTED 0202813c : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 202813c: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 2028140: 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 ) { 2028144: c2 06 20 08 ld [ %i0 + 8 ], %g1 2028148: 80 a0 60 00 cmp %g1, 0 202814c: 22 80 00 06 be,a 2028164 2028150: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 2028154: 7f ff f1 2e call 202460c <_Chain_Extract> 2028158: 90 10 00 18 mov %i0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 202815c: c0 26 20 08 clr [ %i0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 2028160: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 2028164: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 2028168: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 202816c: 90 07 bf f0 add %fp, -16, %o0 2028170: 7f ff 71 ac call 2004820 2028174: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] 2028178: c2 07 bf f0 ld [ %fp + -16 ], %g1 return memfile_check_rmnod( the_jnode ); 202817c: 90 10 00 18 mov %i0, %o0 2028180: 7f ff ff d6 call 20280d8 2028184: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } 2028188: 81 c7 e0 08 ret 202818c: 91 e8 00 08 restore %g0, %o0, %o0 02009924 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 2009924: 13 00 80 59 sethi %hi(0x2016400), %o1 2009928: 15 00 80 5f sethi %hi(0x2017c00), %o2 200992c: 92 12 62 80 or %o1, 0x280, %o1 2009930: 94 12 a2 a8 or %o2, 0x2a8, %o2 2009934: 96 10 00 0a mov %o2, %o3 2009938: 82 13 c0 00 mov %o7, %g1 200993c: 40 00 02 91 call 200a380 2009940: 9e 10 40 00 mov %g1, %o7 2009944: 01 00 00 00 nop <== NOT EXECUTED 02002324 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2002324: 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) ) ) 2002328: 03 00 00 3c sethi %hi(0xf000), %g1 200232c: b3 2e 60 10 sll %i1, 0x10, %i1 2002330: b3 36 60 10 srl %i1, 0x10, %i1 2002334: 84 8e 40 01 andcc %i1, %g1, %g2 2002338: 02 80 00 4e be 2002470 200233c: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) 2002340: 80 a0 80 01 cmp %g2, %g1 2002344: 02 80 00 18 be 20023a4 2002348: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 200234c: c2 4e 00 00 ldsb [ %i0 ], %g1 2002350: 80 a0 60 2f cmp %g1, 0x2f 2002354: 02 80 00 1a be 20023bc 2002358: 80 a0 60 5c cmp %g1, 0x5c 200235c: 02 80 00 18 be 20023bc 2002360: 80 a0 60 00 cmp %g1, 0 2002364: 02 80 00 17 be 20023c0 2002368: 03 00 80 5e sethi %hi(0x2017800), %g1 200236c: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 ! 2017814 2002370: 88 10 20 00 clr %g4 2002374: c2 00 e0 04 ld [ %g3 + 4 ], %g1 2002378: c2 27 bf e4 st %g1, [ %fp + -28 ] 200237c: c4 00 e0 08 ld [ %g3 + 8 ], %g2 2002380: c4 27 bf e8 st %g2, [ %fp + -24 ] 2002384: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 2002388: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 200238c: 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 ); 2002390: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 2002394: c2 00 60 04 ld [ %g1 + 4 ], %g1 2002398: 80 a0 60 00 cmp %g1, 0 200239c: 12 80 00 17 bne 20023f8 20023a0: 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 ); 20023a4: 40 00 2d a4 call 200da34 <__errno> 20023a8: b0 10 3f ff mov -1, %i0 20023ac: 82 10 20 86 mov 0x86, %g1 20023b0: c2 22 00 00 st %g1, [ %o0 ] 20023b4: 81 c7 e0 08 ret 20023b8: 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 ); 20023bc: 03 00 80 5e sethi %hi(0x2017800), %g1 20023c0: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 ! 2017814 20023c4: 88 10 20 01 mov 1, %g4 20023c8: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 20023cc: c2 27 bf e4 st %g1, [ %fp + -28 ] 20023d0: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 20023d4: c4 27 bf e8 st %g2, [ %fp + -24 ] 20023d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 20023dc: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 20023e0: 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 ); 20023e4: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 20023e8: c2 00 60 04 ld [ %g1 + 4 ], %g1 20023ec: 80 a0 60 00 cmp %g1, 0 20023f0: 02 bf ff ed be 20023a4 20023f4: c4 27 bf f0 st %g2, [ %fp + -16 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 20023f8: 90 06 00 04 add %i0, %g4, %o0 20023fc: a0 07 bf e4 add %fp, -28, %l0 2002400: 94 07 bf f4 add %fp, -12, %o2 2002404: 92 10 00 10 mov %l0, %o1 2002408: 9f c0 40 00 call %g1 200240c: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 2002410: 80 a2 20 00 cmp %o0, 0 2002414: 12 bf ff e8 bne 20023b4 2002418: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 200241c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 2002420: 80 a0 a0 00 cmp %g2, 0 2002424: 02 80 00 19 be 2002488 2002428: 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 ); 200242c: 92 10 00 19 mov %i1, %o1 2002430: 94 10 00 1a mov %i2, %o2 2002434: 96 10 00 1b mov %i3, %o3 2002438: 9f c0 80 00 call %g2 200243c: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 2002440: c2 07 bf ec ld [ %fp + -20 ], %g1 2002444: 80 a0 60 00 cmp %g1, 0 2002448: 02 bf ff db be 20023b4 200244c: b0 10 00 08 mov %o0, %i0 2002450: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2002454: 80 a0 60 00 cmp %g1, 0 2002458: 02 80 00 0a be 2002480 200245c: 01 00 00 00 nop 2002460: 9f c0 40 00 call %g1 2002464: 90 10 00 10 mov %l0, %o0 return result; } 2002468: 81 c7 e0 08 ret 200246c: 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 ); 2002470: 40 00 2d 71 call 200da34 <__errno> <== NOT EXECUTED 2002474: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002478: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 200247c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002480: 81 c7 e0 08 ret 2002484: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 2002488: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 200248c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002490: 02 bf ff c5 be 20023a4 <== NOT EXECUTED 2002494: 01 00 00 00 nop <== NOT EXECUTED 2002498: 9f c0 40 00 call %g1 <== NOT EXECUTED 200249c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20024a0: 30 bf ff c1 b,a 20023a4 <== NOT EXECUTED 0200b02c : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 200b02c: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 200b030: 80 a6 60 00 cmp %i1, 0 200b034: 02 80 00 a1 be 200b2b8 200b038: a4 10 00 18 mov %i0, %l2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 200b03c: 80 a6 a0 01 cmp %i2, 1 200b040: 18 80 00 9e bgu 200b2b8 200b044: 01 00 00 00 nop errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 200b048: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 200b04c: 80 a0 60 00 cmp %g1, 0 200b050: 02 80 00 35 be 200b124 200b054: 80 a6 e0 00 cmp %i3, 0 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 200b058: 02 80 00 05 be 200b06c 200b05c: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 200b060: 40 00 0f 97 call 200eebc <== NOT EXECUTED 200b064: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 200b068: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 200b06c: 7f ff ff 9f call 200aee8 200b070: 01 00 00 00 nop if ( !temp_mt_entry ) { 200b074: a0 92 20 00 orcc %o0, 0, %l0 200b078: 02 80 00 96 be 200b2d0 200b07c: 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; 200b080: f4 24 20 28 st %i2, [ %l0 + 0x28 ] if ( device ) { 200b084: 80 a6 e0 00 cmp %i3, 0 200b088: 02 80 00 4b be 200b1b4 200b08c: e0 24 20 24 st %l0, [ %l0 + 0x24 ] temp_mt_entry->dev = 200b090: 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 ); 200b094: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 200b098: 40 00 0f 67 call 200ee34 <== NOT EXECUTED 200b09c: 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 ) { 200b0a0: 80 a7 20 00 cmp %i4, 0 200b0a4: 02 80 00 29 be 200b148 200b0a8: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 200b0ac: b6 07 bf e8 add %fp, -24, %i3 200b0b0: 92 10 20 07 mov 7, %o1 200b0b4: 94 10 00 1b mov %i3, %o2 200b0b8: 7f ff db da call 2002020 200b0bc: 96 10 20 01 mov 1, %o3 200b0c0: 80 a2 3f ff cmp %o0, -1 200b0c4: 02 80 00 1c be 200b134 200b0c8: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 200b0cc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 200b0d0: 80 a0 60 00 cmp %g1, 0 200b0d4: 02 80 00 6d be 200b288 200b0d8: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 200b0dc: 9f c0 40 00 call %g1 200b0e0: 90 10 00 1b mov %i3, %o0 200b0e4: 80 a2 20 01 cmp %o0, 1 200b0e8: 02 80 00 35 be 200b1bc 200b0ec: 03 00 80 61 sethi %hi(0x2018400), %g1 errno = ENOTDIR; 200b0f0: 40 00 0a 51 call 200da34 <__errno> 200b0f4: 01 00 00 00 nop 200b0f8: 82 10 20 14 mov 0x14, %g1 ! 14 200b0fc: c2 22 00 00 st %g1, [ %o0 ] return 0; cleanup_and_bail: free( temp_mt_entry ); 200b100: 90 10 00 10 mov %l0, %o0 200b104: 7f ff fd fa call 200a8ec 200b108: b8 10 00 1b mov %i3, %i4 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 200b10c: c2 07 20 08 ld [ %i4 + 8 ], %g1 200b110: 80 a0 60 00 cmp %g1, 0 200b114: 32 80 00 62 bne,a 200b29c 200b118: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 return -1; } 200b11c: 81 c7 e0 08 ret <== NOT EXECUTED 200b120: 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; 200b124: 40 00 0a 44 call 200da34 <__errno> <== NOT EXECUTED 200b128: a2 10 20 00 clr %l1 <== NOT EXECUTED 200b12c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200b130: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 200b134: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200b138: 7f ff fd ed call 200a8ec <== NOT EXECUTED 200b13c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200b140: 81 c7 e0 08 ret <== NOT EXECUTED 200b144: 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; 200b148: c0 24 20 18 clr [ %l0 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 200b14c: c0 24 20 1c clr [ %l0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 200b150: c0 24 20 20 clr [ %l0 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 200b154: c0 24 20 08 clr [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 200b158: c0 24 20 0c clr [ %l0 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 200b15c: c0 24 20 10 clr [ %l0 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 200b160: c0 24 20 14 clr [ %l0 + 0x14 ] 200b164: b8 10 20 00 clr %i4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 200b168: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 200b16c: 9f c0 40 00 call %g1 200b170: 90 10 00 10 mov %l0, %o0 200b174: 80 a2 20 00 cmp %o0, 0 200b178: 02 80 00 35 be 200b24c 200b17c: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 200b180: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 200b184: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200b188: 02 80 00 04 be 200b198 <== NOT EXECUTED 200b18c: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 200b190: 9f c0 40 00 call %g1 <== NOT EXECUTED 200b194: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 200b198: 7f ff fd d5 call 200a8ec <== NOT EXECUTED 200b19c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( loc_to_free ) 200b1a0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 200b1a4: 32 bf ff db bne,a 200b110 <== NOT EXECUTED 200b1a8: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( loc_to_free ); 200b1ac: 81 c7 e0 08 ret <== NOT EXECUTED 200b1b0: 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; 200b1b4: 10 bf ff bb b 200b0a0 200b1b8: c0 24 20 60 clr [ %l0 + 0x60 ] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 200b1bc: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 200b1c0: 82 10 63 94 or %g1, 0x394, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 200b1c4: 88 00 60 04 add %g1, 4, %g4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 200b1c8: 80 a0 80 04 cmp %g2, %g4 200b1cc: 02 80 00 0e be 200b204 200b1d0: 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 ) 200b1d4: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 200b1d8: 80 a0 40 03 cmp %g1, %g3 200b1dc: 32 80 00 07 bne,a 200b1f8 200b1e0: c4 00 80 00 ld [ %g2 ], %g2 200b1e4: 30 80 00 24 b,a 200b274 <== NOT EXECUTED 200b1e8: 80 a0 40 03 cmp %g1, %g3 200b1ec: 02 80 00 22 be 200b274 200b1f0: 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 ) { 200b1f4: 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 ); 200b1f8: 80 a0 80 04 cmp %g2, %g4 200b1fc: 32 bf ff fb bne,a 200b1e8 200b200: 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; 200b204: 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; 200b208: c6 24 20 08 st %g3, [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = loc.handlers; 200b20c: 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; 200b210: 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 ){ 200b214: 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; 200b218: 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; 200b21c: 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 ){ 200b220: 80 a1 20 00 cmp %g4, 0 200b224: 02 80 00 19 be 200b288 200b228: c2 24 20 10 st %g1, [ %l0 + 0x10 ] errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 200b22c: 90 10 00 10 mov %l0, %o0 200b230: 9f c1 00 00 call %g4 200b234: b8 10 00 1b mov %i3, %i4 200b238: 80 a2 20 00 cmp %o0, 0 200b23c: 22 bf ff cc be,a 200b16c 200b240: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return 0; cleanup_and_bail: free( temp_mt_entry ); 200b244: 10 bf ff b0 b 200b104 <== NOT EXECUTED 200b248: 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 ); 200b24c: 11 00 80 61 sethi %hi(0x2018400), %o0 200b250: 92 10 00 10 mov %l0, %o1 200b254: 7f ff ec 39 call 2006338 <_Chain_Append> 200b258: 90 12 23 94 or %o0, 0x394, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 200b25c: 80 a4 a0 00 cmp %l2, 0 200b260: 02 bf ff b8 be 200b140 200b264: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 200b268: e0 24 80 00 st %l0, [ %l2 ] 200b26c: 81 c7 e0 08 ret 200b270: 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; 200b274: 40 00 09 f0 call 200da34 <__errno> 200b278: 01 00 00 00 nop 200b27c: 82 10 20 10 mov 0x10, %g1 ! 10 200b280: 10 bf ff a0 b 200b100 200b284: 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; 200b288: 40 00 09 eb call 200da34 <__errno> <== NOT EXECUTED 200b28c: 01 00 00 00 nop <== NOT EXECUTED 200b290: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 200b294: 10 bf ff 9b b 200b100 <== NOT EXECUTED 200b298: 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 ); 200b29c: 80 a0 60 00 cmp %g1, 0 200b2a0: 02 bf ff a8 be 200b140 200b2a4: b0 10 3f ff mov -1, %i0 200b2a8: 9f c0 40 00 call %g1 200b2ac: 90 10 00 1c mov %i4, %o0 200b2b0: 81 c7 e0 08 ret 200b2b4: 81 e8 00 00 restore * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 200b2b8: 40 00 09 df call 200da34 <__errno> 200b2bc: b0 10 3f ff mov -1, %i0 200b2c0: 82 10 20 16 mov 0x16, %g1 200b2c4: c2 22 00 00 st %g1, [ %o0 ] 200b2c8: 81 c7 e0 08 ret 200b2cc: 81 e8 00 00 restore if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 200b2d0: 40 00 09 d9 call 200da34 <__errno> <== NOT EXECUTED 200b2d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200b2d8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 200b2dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 200b2e0: 81 c7 e0 08 ret <== NOT EXECUTED 200b2e4: 81 e8 00 00 restore <== NOT EXECUTED 02009e1c : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 2009e1c: 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 ) ) { 2009e20: 90 10 00 1c mov %i4, %o0 2009e24: 40 00 00 4c call 2009f54 <_POSIX_Absolute_timeout_to_ticks> 2009e28: 92 07 bf f4 add %fp, -12, %o1 2009e2c: 80 a2 20 02 cmp %o0, 2 2009e30: 18 80 00 03 bgu 2009e3c 2009e34: 98 10 20 01 mov 1, %o4 2009e38: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 2009e3c: da 07 bf f4 ld [ %fp + -12 ], %o5 2009e40: 90 10 00 18 mov %i0, %o0 2009e44: 92 10 00 19 mov %i1, %o1 2009e48: 94 10 00 1a mov %i2, %o2 2009e4c: 7f ff ff 21 call 2009ad0 <_POSIX_Message_queue_Receive_support> 2009e50: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 2009e54: 81 c7 e0 08 ret 2009e58: 91 e8 00 08 restore %g0, %o0, %o0 02009e5c : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 2009e5c: 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 ) ) { 2009e60: 90 10 00 1c mov %i4, %o0 2009e64: 40 00 00 3c call 2009f54 <_POSIX_Absolute_timeout_to_ticks> 2009e68: 92 07 bf f4 add %fp, -12, %o1 2009e6c: 80 a2 20 02 cmp %o0, 2 2009e70: 18 80 00 03 bgu 2009e7c 2009e74: 98 10 20 01 mov 1, %o4 2009e78: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 2009e7c: da 07 bf f4 ld [ %fp + -12 ], %o5 2009e80: 90 10 00 18 mov %i0, %o0 2009e84: 92 10 00 19 mov %i1, %o1 2009e88: 94 10 00 1a mov %i2, %o2 2009e8c: 7f ff ff 65 call 2009c20 <_POSIX_Message_queue_Send_support> 2009e90: 96 10 00 1b mov %i3, %o3 msg_len, msg_prio, do_wait, ticks ); } 2009e94: 81 c7 e0 08 ret 2009e98: 91 e8 00 08 restore %g0, %o0, %o0 0200252c : */ int newlib_free_buffers( FILE *fp ) { 200252c: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 2002530: 40 00 2e 22 call 200ddb8 2002534: 90 10 00 18 mov %i0, %o0 2002538: 80 a2 20 02 cmp %o0, 2 200253c: 28 80 00 06 bleu,a 2002554 2002540: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 2002544: 40 00 2d 94 call 200db94 <== NOT EXECUTED 2002548: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 200254c: 81 c7 e0 08 ret 2002550: 91 e8 20 00 restore %g0, 0, %o0 { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 2002554: 80 88 60 80 btst 0x80, %g1 2002558: 02 bf ff fd be 200254c 200255c: 01 00 00 00 nop free( fp->_bf._base ); 2002560: 40 00 20 e3 call 200a8ec 2002564: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 2002568: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 200256c: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 2002570: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 2002574: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 2002578: c2 36 20 0c sth %g1, [ %i0 + 0xc ] break; default: fclose(fp); } return 0; } 200257c: 81 c7 e0 08 ret 2002580: 91 e8 20 00 restore %g0, 0, %o0 020027dc : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 20027dc: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 20027e0: 05 00 80 6f sethi %hi(0x201bc00), %g2 20027e4: c2 48 a3 34 ldsb [ %g2 + 0x334 ], %g1 ! 201bf34 20027e8: 80 a0 60 00 cmp %g1, 0 20027ec: 02 80 00 04 be 20027fc 20027f0: 82 10 20 01 mov 1, %g1 NULL_major = major; } return RTEMS_SUCCESSFUL; } 20027f4: 81 c7 e0 08 ret 20027f8: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 20027fc: 11 00 80 65 sethi %hi(0x2019400), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 2002800: c2 28 a3 34 stb %g1, [ %g2 + 0x334 ] status = rtems_io_register_name( 2002804: 90 12 23 d8 or %o0, 0x3d8, %o0 2002808: 92 10 00 18 mov %i0, %o1 200280c: 40 00 00 4e call 2002944 2002810: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 2002814: 80 a2 20 00 cmp %o0, 0 2002818: 12 80 00 05 bne 200282c 200281c: 03 00 80 70 sethi %hi(0x201c000), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 2002820: f0 20 61 b0 st %i0, [ %g1 + 0x1b0 ] ! 201c1b0 } return RTEMS_SUCCESSFUL; } 2002824: 81 c7 e0 08 ret 2002828: 91 e8 20 00 restore %g0, 0, %o0 major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 200282c: 40 00 10 ff call 2006c28 <== NOT EXECUTED 2002830: 01 00 00 00 nop 2002834: 01 00 00 00 nop 020027b8 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 20027b8: 80 a2 a0 00 cmp %o2, 0 20027bc: 02 80 00 04 be 20027cc 20027c0: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 20027c4: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 20027c8: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 20027cc: 81 c3 e0 08 retl 20027d0: 90 10 20 00 clr %o0 020027a0 : int open( const char *pathname, int flags, ... ) { 20027a0: 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); 20027a4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 20027a8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 20027ac: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 20027b0: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 20027b4: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 20027b8: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 20027bc: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 20027c0: 02 80 00 03 be 20027cc 20027c4: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 20027c8: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 20027cc: 82 07 a0 50 add %fp, 0x50, %g1 20027d0: f4 07 a0 4c ld [ %fp + 0x4c ], %i2 20027d4: 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(); 20027d8: 40 00 21 52 call 200ad20 20027dc: b8 10 20 17 mov 0x17, %i4 if ( iop == 0 ) { 20027e0: ba 92 20 00 orcc %o0, 0, %i5 20027e4: 02 80 00 3b be 20028d0 20027e8: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 20027ec: b6 07 bf e4 add %fp, -28, %i3 20027f0: 90 10 00 18 mov %i0, %o0 20027f4: 94 10 00 1b mov %i3, %o2 20027f8: 7f ff fe 0a call 2002020 20027fc: 96 10 20 01 mov 1, %o3 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 2002800: 80 a2 3f ff cmp %o0, -1 2002804: 02 80 00 4d be 2002938 2002808: 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)) { 200280c: b8 10 20 11 mov 0x11, %i4 2002810: 80 a0 6a 00 cmp %g1, 0xa00 2002814: 02 80 00 69 be 20029b8 2002818: 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; 200281c: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; 2002820: 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; 2002824: c2 27 60 30 st %g1, [ %i5 + 0x30 ] iop->file_info = loc.node_access; 2002828: c4 27 60 2c st %g2, [ %i5 + 0x2c ] iop->flags |= rtems_libio_fcntl_flags( flags ); 200282c: e0 07 60 0c ld [ %i5 + 0xc ], %l0 2002830: 40 00 21 7a call 200ae18 2002834: 90 10 00 19 mov %i1, %o0 iop->pathinfo = loc; 2002838: c2 07 bf e4 ld [ %fp + -28 ], %g1 if ( !iop->handlers->open_h ) { 200283c: 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; 2002840: c2 27 60 10 st %g1, [ %i5 + 0x10 ] 2002844: c2 07 bf e8 ld [ %fp + -24 ], %g1 if ( !iop->handlers->open_h ) { 2002848: 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; 200284c: c2 27 60 14 st %g1, [ %i5 + 0x14 ] 2002850: 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 ); 2002854: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 2002858: c2 27 60 18 st %g1, [ %i5 + 0x18 ] 200285c: 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 ); 2002860: d0 27 60 0c st %o0, [ %i5 + 0xc ] iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 2002864: 80 a0 a0 00 cmp %g2, 0 2002868: 02 80 00 52 be 20029b0 200286c: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 2002870: 92 10 00 18 mov %i0, %o1 2002874: 96 10 00 1a mov %i2, %o3 2002878: 90 10 00 1d mov %i5, %o0 200287c: 94 10 00 19 mov %i1, %o2 2002880: 9f c0 80 00 call %g2 2002884: a0 10 00 1b mov %i3, %l0 if ( rc ) 2002888: 80 a2 20 00 cmp %o0, 0 200288c: 02 80 00 16 be 20028e4 2002890: b8 10 00 08 mov %o0, %i4 done: va_end(ap); if ( rc ) { if ( iop ) rtems_libio_free( iop ); 2002894: 40 00 21 0c call 200acc4 2002898: 90 10 00 1d mov %i5, %o0 if ( loc_to_free ) 200289c: 80 a4 20 00 cmp %l0, 0 20028a0: 02 80 00 0c be 20028d0 20028a4: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 20028a8: c2 04 20 08 ld [ %l0 + 8 ], %g1 20028ac: 80 a0 60 00 cmp %g1, 0 20028b0: 02 80 00 08 be 20028d0 20028b4: 01 00 00 00 nop 20028b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20028bc: 80 a0 60 00 cmp %g1, 0 20028c0: 02 80 00 04 be 20028d0 20028c4: 01 00 00 00 nop 20028c8: 9f c0 40 00 call %g1 20028cc: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( rc ); 20028d0: 40 00 2c 59 call 200da34 <__errno> 20028d4: b0 10 3f ff mov -1, %i0 20028d8: f8 22 00 00 st %i4, [ %o0 ] 20028dc: 81 c7 e0 08 ret 20028e0: 81 e8 00 00 restore 20028e4: 03 00 80 5f sethi %hi(0x2017c00), %g1 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 20028e8: 80 8e 64 00 btst 0x400, %i1 20028ec: 12 80 00 40 bne 20029ec 20028f0: a0 10 63 f4 or %g1, 0x3f4, %l0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 20028f4: c6 04 00 00 ld [ %l0 ], %g3 20028f8: 86 27 40 03 sub %i5, %g3, %g3 20028fc: 87 38 e0 02 sra %g3, 2, %g3 2002900: 89 28 e0 02 sll %g3, 2, %g4 2002904: 85 28 e0 06 sll %g3, 6, %g2 2002908: 84 20 80 04 sub %g2, %g4, %g2 200290c: 83 28 a0 06 sll %g2, 6, %g1 2002910: 82 20 40 02 sub %g1, %g2, %g1 2002914: 89 28 60 0c sll %g1, 0xc, %g4 2002918: 82 00 40 04 add %g1, %g4, %g1 200291c: 82 00 40 03 add %g1, %g3, %g1 2002920: 83 28 60 04 sll %g1, 4, %g1 2002924: 82 20 40 03 sub %g1, %g3, %g1 2002928: 83 28 60 02 sll %g1, 2, %g1 200292c: b0 20 c0 01 sub %g3, %g1, %i0 } 2002930: 81 c7 e0 08 ret 2002934: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( pathname, eval_flags, &loc, true ); if ( status == -1 ) { if ( errno != ENOENT ) { 2002938: 40 00 2c 3f call 200da34 <__errno> 200293c: 01 00 00 00 nop 2002940: c2 02 00 00 ld [ %o0 ], %g1 2002944: 80 a0 60 02 cmp %g1, 2 2002948: 12 80 00 20 bne 20029c8 200294c: 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) ) { 2002950: b8 10 20 02 mov 2, %i4 2002954: 02 80 00 19 be 20029b8 2002958: 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 ); 200295c: 13 3f ff e0 sethi %hi(0xffff8000), %o1 2002960: 90 10 00 18 mov %i0, %o0 2002964: 92 16 80 09 or %i2, %o1, %o1 2002968: 94 10 20 00 clr %o2 200296c: 93 2a 60 10 sll %o1, 0x10, %o1 2002970: 96 10 20 00 clr %o3 2002974: 7f ff fe 6c call 2002324 2002978: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 200297c: 80 a2 20 00 cmp %o0, 0 2002980: 12 80 00 12 bne 20029c8 2002984: 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 ); 2002988: 92 10 20 00 clr %o1 200298c: 94 10 00 1b mov %i3, %o2 2002990: 96 10 20 01 mov 1, %o3 2002994: 7f ff fd a3 call 2002020 2002998: b8 10 20 0d mov 0xd, %i4 if ( status != 0 ) { /* The file did not exist */ 200299c: 80 a2 20 00 cmp %o0, 0 20029a0: 12 80 00 06 bne 20029b8 20029a4: 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; 20029a8: 10 bf ff 9e b 2002820 20029ac: 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; 20029b0: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED 20029b4: b8 10 20 86 mov 0x86, %i4 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 20029b8: 80 a7 60 00 cmp %i5, 0 20029bc: 02 bf ff b9 be 20028a0 20029c0: 80 a4 20 00 cmp %l0, 0 20029c4: 30 bf ff b4 b,a 2002894 } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 20029c8: 40 00 2c 1b call 200da34 <__errno> 20029cc: 01 00 00 00 nop 20029d0: f8 02 00 00 ld [ %o0 ], %i4 20029d4: 03 00 80 5f sethi %hi(0x2017c00), %g1 */ done: va_end(ap); if ( rc ) { 20029d8: 80 a7 20 00 cmp %i4, 0 20029dc: 02 bf ff c6 be 20028f4 20029e0: a0 10 63 f4 or %g1, 0x3f4, %l0 20029e4: 10 bf ff f5 b 20029b8 20029e8: a0 10 20 00 clr %l0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); 20029ec: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %g2 20029f0: 92 10 20 00 clr %o1 20029f4: 84 27 40 02 sub %i5, %g2, %g2 20029f8: 85 38 a0 02 sra %g2, 2, %g2 20029fc: 87 28 a0 02 sll %g2, 2, %g3 2002a00: 83 28 a0 06 sll %g2, 6, %g1 2002a04: 82 20 40 03 sub %g1, %g3, %g1 2002a08: 91 28 60 06 sll %g1, 6, %o0 2002a0c: 90 22 00 01 sub %o0, %g1, %o0 2002a10: 87 2a 20 0c sll %o0, 0xc, %g3 2002a14: 90 02 00 03 add %o0, %g3, %o0 2002a18: 90 02 00 02 add %o0, %g2, %o0 2002a1c: 91 2a 20 04 sll %o0, 4, %o0 2002a20: 90 22 00 02 sub %o0, %g2, %o0 2002a24: 91 2a 20 02 sll %o0, 2, %o0 2002a28: 40 00 1f dc call 200a998 2002a2c: 90 20 80 08 sub %g2, %o0, %o0 if ( rc ) { 2002a30: b8 92 20 00 orcc %o0, 0, %i4 2002a34: 22 bf ff b1 be,a 20028f8 2002a38: c6 04 00 00 ld [ %l0 ], %g3 if(errno) rc = errno; 2002a3c: 40 00 2b fe call 200da34 <__errno> <== NOT EXECUTED 2002a40: 01 00 00 00 nop <== NOT EXECUTED 2002a44: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2002a48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002a4c: 12 80 00 15 bne 2002aa0 <== NOT EXECUTED 2002a50: 01 00 00 00 nop <== NOT EXECUTED close( iop - rtems_libio_iops ); 2002a54: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 2002a58: 84 27 40 02 sub %i5, %g2, %g2 <== NOT EXECUTED 2002a5c: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 2002a60: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 2002a64: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 2002a68: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 2002a6c: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 2002a70: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 2002a74: 87 2a 20 0c sll %o0, 0xc, %g3 <== NOT EXECUTED 2002a78: ba 10 20 00 clr %i5 <== NOT EXECUTED 2002a7c: 90 02 00 03 add %o0, %g3, %o0 <== NOT EXECUTED 2002a80: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 2002a84: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 2002a88: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 2002a8c: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 2002a90: 40 00 1f 66 call 200a828 <== NOT EXECUTED 2002a94: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED 2002a98: 10 bf ff d0 b 20029d8 <== NOT EXECUTED 2002a9c: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 2002aa0: 40 00 2b e5 call 200da34 <__errno> <== NOT EXECUTED 2002aa4: 01 00 00 00 nop <== NOT EXECUTED 2002aa8: 10 bf ff eb b 2002a54 <== NOT EXECUTED 2002aac: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED 0200272c : /* * This is a replaceable stub */ void open_dev_console(void) { 200272c: 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) { 2002730: 21 00 80 58 sethi %hi(0x2016000), %l0 2002734: 92 10 20 00 clr %o1 2002738: 90 14 20 d0 or %l0, 0xd0, %o0 200273c: 40 00 00 19 call 20027a0 2002740: 94 10 20 00 clr %o2 2002744: 80 a2 3f ff cmp %o0, -1 2002748: 02 80 00 0e be 2002780 200274c: 90 14 20 d0 or %l0, 0xd0, %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) 2002750: 92 10 20 01 mov 1, %o1 2002754: 40 00 00 13 call 20027a0 2002758: 94 10 20 00 clr %o2 200275c: 80 a2 3f ff cmp %o0, -1 2002760: 02 80 00 0c be 2002790 2002764: 92 10 20 01 mov 1, %o1 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 2002768: 90 14 20 d0 or %l0, 0xd0, %o0 200276c: 40 00 00 0d call 20027a0 2002770: 94 10 20 00 clr %o2 2002774: 80 a2 3f ff cmp %o0, -1 2002778: 02 80 00 04 be 2002788 200277c: 11 14 d5 11 sethi %hi(0x53544400), %o0 2002780: 81 c7 e0 08 ret 2002784: 81 e8 00 00 restore rtems_fatal_error_occurred( error_code | '2' ); 2002788: 40 00 0d d8 call 2005ee8 <== NOT EXECUTED 200278c: 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' ); 2002790: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED 2002794: 40 00 0d d5 call 2005ee8 <== NOT EXECUTED 2002798: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <== NOT EXECUTED 200279c: 01 00 00 00 nop 02022118 : * open a directory. */ DIR * opendir( const char *name ) { 2022118: 9d e3 bf 98 save %sp, -104, %sp register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 202211c: 92 10 20 00 clr %o1 2022120: 90 10 00 18 mov %i0, %o0 2022124: 7f ff 8d 8e call 200575c 2022128: b0 10 20 00 clr %i0 202212c: 80 a2 3f ff cmp %o0, -1 2022130: 02 80 00 17 be 202218c 2022134: a0 10 00 08 mov %o0, %l0 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 2022138: 92 10 20 02 mov 2, %o1 202213c: 40 00 33 2c call 202edec 2022140: 94 10 20 01 mov 1, %o2 2022144: 80 a2 3f ff cmp %o0, -1 2022148: 02 80 00 14 be 2022198 202214c: 90 10 00 10 mov %l0, %o0 2022150: 7f ff 8b 2d call 2004e04 2022154: 90 10 20 18 mov 0x18, %o0 2022158: b0 92 20 00 orcc %o0, 0, %i0 202215c: 02 80 00 0f be 2022198 2022160: 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); 2022164: 7f ff 8b 28 call 2004e04 2022168: 90 10 22 00 mov 0x200, %o0 dirp->dd_len = 512; 202216c: 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); 2022170: d0 26 20 0c st %o0, [ %i0 + 0xc ] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 2022174: 80 a2 20 00 cmp %o0, 0 2022178: 02 80 00 07 be 2022194 202217c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] close (fd); return NULL; } dirp->dd_fd = fd; 2022180: e0 26 00 00 st %l0, [ %i0 ] dirp->dd_loc = 0; 2022184: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_seek = 0; 2022188: c0 26 20 14 clr [ %i0 + 0x14 ] /* * Set up seek point for rewinddir. */ return dirp; } 202218c: 81 c7 e0 08 ret 2022190: 81 e8 00 00 restore */ dirp->dd_buf = malloc (512); dirp->dd_len = 512; if (dirp->dd_buf == NULL) { close (fd); 2022194: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2022198: 7f ff 88 b8 call 2004478 <== NOT EXECUTED 202219c: b0 10 20 00 clr %i0 <== NOT EXECUTED 20221a0: 81 c7 e0 08 ret <== NOT EXECUTED 20221a4: 81 e8 00 00 restore <== NOT EXECUTED 020036fc : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 20036fc: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 2003700: c6 06 60 34 ld [ %i1 + 0x34 ], %g3 2003704: 80 88 e0 01 btst 1, %g3 2003708: 02 80 00 10 be 2003748 200370c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 2003710: b0 0e 20 ff and %i0, 0xff, %i0 2003714: 80 a6 20 09 cmp %i0, 9 2003718: 22 80 00 28 be,a 20037b8 200371c: c8 06 60 28 ld [ %i1 + 0x28 ], %g4 2003720: 18 80 00 10 bgu 2003760 2003724: 80 a6 20 0a cmp %i0, 0xa 2003728: 80 a6 20 08 cmp %i0, 8 <== NOT EXECUTED 200372c: 12 80 00 11 bne 2003770 <== NOT EXECUTED 2003730: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 2003734: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 2003738: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200373c: 04 80 00 03 ble 2003748 <== NOT EXECUTED 2003740: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->column--; 2003744: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 2003748: 94 10 00 19 mov %i1, %o2 200374c: 90 07 a0 44 add %fp, 0x44, %o0 2003750: 7f ff ff 9d call 20035c4 2003754: 92 10 20 01 mov 1, %o1 2003758: 81 c7 e0 08 ret 200375c: 81 e8 00 00 restore oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 2003760: 02 80 00 24 be 20037f0 2003764: 80 a6 20 0d cmp %i0, 0xd 2003768: 02 80 00 2f be 2003824 200376c: 80 88 e0 02 btst 2, %g3 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 2003770: 02 80 00 08 be 2003790 2003774: 07 00 80 5e sethi %hi(0x2017800), %g3 c = toupper(c); 2003778: c4 00 e0 a8 ld [ %g3 + 0xa8 ], %g2 ! 20178a8 <__ctype_ptr> <== NOT EXECUTED 200377c: c2 08 80 18 ldub [ %g2 + %i0 ], %g1 <== NOT EXECUTED 2003780: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2003784: 32 80 00 02 bne,a 200378c <== NOT EXECUTED 2003788: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 200378c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 2003790: c2 00 e0 a8 ld [ %g3 + 0xa8 ], %g1 2003794: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 2003798: c6 08 40 02 ldub [ %g1 + %g2 ], %g3 200379c: 80 88 e0 20 btst 0x20, %g3 20037a0: 12 bf ff eb bne 200374c 20037a4: 94 10 00 19 mov %i1, %o2 tty->column++; 20037a8: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 20037ac: 82 00 60 01 inc %g1 20037b0: 10 bf ff e7 b 200374c 20037b4: 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) { 20037b8: 05 00 00 06 sethi %hi(0x1800), %g2 20037bc: 82 08 c0 02 and %g3, %g2, %g1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 20037c0: 86 09 20 07 and %g4, 7, %g3 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 20037c4: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 20037c8: 82 10 20 08 mov 8, %g1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 20037cc: 02 80 00 25 be 2003860 20037d0: 92 20 40 03 sub %g1, %g3, %o1 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 20037d4: 82 02 40 04 add %o1, %g4, %g1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 20037d8: 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; 20037dc: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 20037e0: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 20037e4: 7f ff ff 78 call 20035c4 <== NOT EXECUTED 20037e8: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 20037ec: 30 80 00 23 b,a 2003878 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 20037f0: 80 88 e0 20 btst 0x20, %g3 20037f4: 32 80 00 02 bne,a 20037fc 20037f8: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 20037fc: 80 88 e0 04 btst 4, %g3 2003800: 02 bf ff d3 be 200374c 2003804: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 2003808: 11 00 80 59 sethi %hi(0x2016400), %o0 200380c: 92 10 20 01 mov 1, %o1 2003810: 90 12 20 78 or %o0, 0x78, %o0 2003814: 7f ff ff 6c call 20035c4 2003818: 94 10 00 19 mov %i1, %o2 tty->column = 0; 200381c: 10 bf ff cb b 2003748 2003820: c0 26 60 28 clr [ %i1 + 0x28 ] } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 2003824: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 2003828: 02 80 00 06 be 2003840 <== NOT EXECUTED 200382c: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 2003830: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 2003834: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003838: 02 bf ff c8 be 2003758 <== NOT EXECUTED 200383c: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2003840: 22 bf ff c2 be,a 2003748 <== NOT EXECUTED 2003844: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 2003848: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 200384c: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 2003850: 02 bf ff be be 2003748 <== NOT EXECUTED 2003854: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 2003858: 10 bf ff bc b 2003748 <== NOT EXECUTED 200385c: 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; 2003860: 82 02 40 04 add %o1, %g4, %g1 rtems_termios_puts ( " ", i, tty); 2003864: 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; 2003868: c2 26 60 28 st %g1, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 200386c: 11 00 80 59 sethi %hi(0x2016400), %o0 2003870: 7f ff ff 55 call 20035c4 2003874: 90 12 20 80 or %o0, 0x80, %o0 ! 2016480 2003878: 81 c7 e0 08 ret 200387c: 81 e8 00 00 restore 02005488 : */ void pthread_cleanup_pop( int execute ) { 2005488: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200548c: 09 00 80 5c sethi %hi(0x2017000), %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 ]; 2005490: 05 00 80 5c sethi %hi(0x2017000), %g2 2005494: c2 01 21 b0 ld [ %g4 + 0x1b0 ], %g1 2005498: c6 00 a2 74 ld [ %g2 + 0x274 ], %g3 200549c: 82 00 60 01 inc %g1 20054a0: e0 00 e1 6c ld [ %g3 + 0x16c ], %l0 20054a4: c2 21 21 b0 st %g1, [ %g4 + 0x1b0 ] */ void pthread_cleanup_pop( int execute ) { 20054a8: 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 ); 20054ac: 7f ff f3 cc call 20023dc 20054b0: 01 00 00 00 nop 20054b4: b0 10 00 08 mov %o0, %i0 if ( _Chain_Is_empty( handler_stack ) ) { 20054b8: 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; 20054bc: a0 04 20 dc add %l0, 0xdc, %l0 20054c0: 80 a0 40 10 cmp %g1, %l0 20054c4: 02 80 00 18 be 2005524 20054c8: 01 00 00 00 nop _Thread_Enable_dispatch(); _ISR_Enable( level ); return; } handler = (POSIX_Cancel_Handler_control *) 20054cc: e0 04 20 04 ld [ %l0 + 4 ], %l0 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 20054d0: c4 04 00 00 ld [ %l0 ], %g2 previous = the_node->previous; 20054d4: c2 04 20 04 ld [ %l0 + 4 ], %g1 next->previous = previous; previous->next = next; 20054d8: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 20054dc: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 20054e0: 7f ff f3 c3 call 20023ec 20054e4: 01 00 00 00 nop tmp_handler = *handler; _Workspace_Free( handler ); 20054e8: 90 10 00 10 mov %l0, %o0 _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); tmp_handler = *handler; 20054ec: e2 04 20 0c ld [ %l0 + 0xc ], %l1 _Workspace_Free( handler ); 20054f0: 40 00 14 0e call 200a528 <_Workspace_Free> 20054f4: e0 04 20 08 ld [ %l0 + 8 ], %l0 _Thread_Enable_dispatch(); 20054f8: 40 00 0e 5e call 2008e70 <_Thread_Enable_dispatch> 20054fc: 01 00 00 00 nop if ( execute ) 2005500: 80 a4 a0 00 cmp %l2, 0 2005504: 12 80 00 04 bne 2005514 2005508: 01 00 00 00 nop 200550c: 81 c7 e0 08 ret <== NOT EXECUTED 2005510: 81 e8 00 00 restore <== NOT EXECUTED (*tmp_handler.routine)( tmp_handler.arg ); 2005514: 9f c4 00 00 call %l0 2005518: 90 10 00 11 mov %l1, %o0 200551c: 81 c7 e0 08 ret 2005520: 81 e8 00 00 restore _Thread_Disable_dispatch(); _ISR_Disable( level ); if ( _Chain_Is_empty( handler_stack ) ) { _Thread_Enable_dispatch(); 2005524: 40 00 0e 53 call 2008e70 <_Thread_Enable_dispatch> 2005528: 01 00 00 00 nop _ISR_Enable( level ); 200552c: 7f ff f3 b0 call 20023ec 2005530: 81 e8 00 00 restore 2005534: 01 00 00 00 nop 02006580 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 2006580: 9d e3 bf 60 save %sp, -160, %sp 2006584: 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 ) 2006588: 80 a6 a0 00 cmp %i2, 0 200658c: 02 80 00 6f be 2006748 2006590: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 2006594: 03 00 80 69 sethi %hi(0x201a400), %g1 2006598: 80 a6 60 00 cmp %i1, 0 200659c: 02 80 00 03 be 20065a8 20065a0: a2 10 63 38 or %g1, 0x338, %l1 20065a4: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 20065a8: c2 04 40 00 ld [ %l1 ], %g1 20065ac: 80 a0 60 00 cmp %g1, 0 20065b0: 22 80 00 66 be,a 2006748 20065b4: 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) ) 20065b8: c2 04 60 04 ld [ %l1 + 4 ], %g1 20065bc: 80 a0 60 00 cmp %g1, 0 20065c0: 02 80 00 07 be 20065dc 20065c4: 03 00 80 6d sethi %hi(0x201b400), %g1 20065c8: c4 04 60 08 ld [ %l1 + 8 ], %g2 20065cc: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 20065d0: 80 a0 80 03 cmp %g2, %g3 20065d4: 2a 80 00 5d bcs,a 2006748 20065d8: 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 ) { 20065dc: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 20065e0: 80 a0 60 01 cmp %g1, 1 20065e4: 02 80 00 5b be 2006750 20065e8: 80 a0 60 02 cmp %g1, 2 20065ec: 22 80 00 04 be,a 20065fc 20065f0: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; } 20065f4: 81 c7 e0 08 ret 20065f8: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 20065fc: f2 04 60 14 ld [ %l1 + 0x14 ], %i1 schedparam = the_attr->schedparam; 2006600: c4 27 bf e0 st %g2, [ %fp + -32 ] 2006604: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 2006608: c2 27 bf e4 st %g1, [ %fp + -28 ] 200660c: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 2006610: c4 27 bf e8 st %g2, [ %fp + -24 ] 2006614: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 2006618: c2 27 bf ec st %g1, [ %fp + -20 ] 200661c: c4 04 60 28 ld [ %l1 + 0x28 ], %g2 2006620: c4 27 bf f0 st %g2, [ %fp + -16 ] 2006624: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 2006628: 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 ) 200662c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 2006630: 80 a0 60 00 cmp %g1, 0 2006634: 12 80 00 45 bne 2006748 2006638: b0 10 20 86 mov 0x86, %i0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 200663c: e8 07 bf e0 ld [ %fp + -32 ], %l4 2006640: 82 05 3f ff add %l4, -1, %g1 2006644: 80 a0 60 fd cmp %g1, 0xfd 2006648: 18 bf ff eb bgu 20065f4 200664c: 80 a6 60 01 cmp %i1, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006650: 02 80 00 54 be 20067a0 2006654: a6 10 20 00 clr %l3 2006658: 04 80 00 7c ble 2006848 200665c: 80 a6 60 02 cmp %i1, 2 2006660: 02 80 00 4d be 2006794 2006664: 80 a6 60 03 cmp %i1, 3 2006668: 32 80 00 38 bne,a 2006748 200666c: 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 ) < 2006670: 40 00 11 eb call 200ae1c <_Timespec_To_ticks> 2006674: 90 07 bf e8 add %fp, -24, %o0 2006678: a0 10 00 08 mov %o0, %l0 200667c: 40 00 11 e8 call 200ae1c <_Timespec_To_ticks> 2006680: 90 07 bf f0 add %fp, -16, %o0 2006684: 80 a4 00 08 cmp %l0, %o0 2006688: 0a 80 00 30 bcs 2006748 200668c: 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 ) ) 2006690: c2 07 bf e4 ld [ %fp + -28 ], %g1 2006694: 82 00 7f ff add %g1, -1, %g1 2006698: 80 a0 60 fd cmp %g1, 0xfd 200669c: 18 80 00 2b bgu 2006748 20066a0: a6 10 20 03 mov 3, %l3 20066a4: 03 00 80 1b sethi %hi(0x2006c00), %g1 20066a8: a0 10 60 08 or %g1, 8, %l0 ! 2006c08 <_POSIX_Threads_Sporadic_budget_callout> #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 20066ac: 2d 00 80 71 sethi %hi(0x201c400), %l6 20066b0: d0 05 a1 ec ld [ %l6 + 0x1ec ], %o0 ! 201c5ec <_RTEMS_Allocator_Mutex> 20066b4: 40 00 07 56 call 200840c <_API_Mutex_Lock> 20066b8: 31 00 80 71 sethi %hi(0x201c400), %i0 * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 20066bc: 40 00 09 e1 call 2008e40 <_Objects_Allocate> 20066c0: 90 16 23 c0 or %i0, 0x3c0, %o0 ! 201c7c0 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 20066c4: a4 92 20 00 orcc %o0, 0, %l2 20066c8: 02 80 00 1d be 200673c 20066cc: 03 00 80 6d sethi %hi(0x201b400), %g1 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 20066d0: c6 04 60 08 ld [ %l1 + 8 ], %g3 20066d4: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 20066d8: c0 27 bf dc clr [ %fp + -36 ] 20066dc: 97 28 a0 01 sll %g2, 1, %o3 20066e0: 80 a2 c0 03 cmp %o3, %g3 20066e4: 1a 80 00 03 bcc 20066f0 20066e8: d4 04 60 04 ld [ %l1 + 4 ], %o2 20066ec: 96 10 00 03 mov %g3, %o3 20066f0: 82 07 bf dc add %fp, -36, %g1 20066f4: e6 23 a0 60 st %l3, [ %sp + 0x60 ] 20066f8: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 20066fc: c0 23 a0 68 clr [ %sp + 0x68 ] 2006700: 9a 10 20 ff mov 0xff, %o5 2006704: a6 10 20 01 mov 1, %l3 2006708: 9a 23 40 14 sub %o5, %l4, %o5 200670c: e6 23 a0 5c st %l3, [ %sp + 0x5c ] 2006710: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 2006714: 90 16 23 c0 or %i0, 0x3c0, %o0 2006718: 92 10 00 12 mov %l2, %o1 200671c: 40 00 0d d6 call 2009e74 <_Thread_Initialize> 2006720: 98 10 20 01 mov 1, %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 2006724: 80 8a 20 ff btst 0xff, %o0 2006728: 12 80 00 20 bne 20067a8 200672c: 11 00 80 71 sethi %hi(0x201c400), %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 2006730: 92 10 00 12 mov %l2, %o1 2006734: 40 00 0a be call 200922c <_Objects_Free> 2006738: 90 12 23 c0 or %o0, 0x3c0, %o0 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 200673c: d0 05 a1 ec ld [ %l6 + 0x1ec ], %o0 2006740: 40 00 07 49 call 2008464 <_API_Mutex_Unlock> 2006744: b0 10 20 0b mov 0xb, %i0 2006748: 81 c7 e0 08 ret 200674c: 81 e8 00 00 restore * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 2006750: 03 00 80 71 sethi %hi(0x201c400), %g1 2006754: c4 00 61 f4 ld [ %g1 + 0x1f4 ], %g2 ! 201c5f4 <_Thread_Executing> 2006758: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 200675c: 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; 2006760: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1 schedparam = api->schedparam; 2006764: c8 27 bf e0 st %g4, [ %fp + -32 ] 2006768: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 200676c: c2 27 bf e4 st %g1, [ %fp + -28 ] 2006770: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 2006774: c4 27 bf e8 st %g2, [ %fp + -24 ] 2006778: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 200677c: c2 27 bf ec st %g1, [ %fp + -20 ] 2006780: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 2006784: c4 27 bf f0 st %g2, [ %fp + -16 ] 2006788: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 200678c: 10 bf ff a8 b 200662c 2006790: c2 27 bf f4 st %g1, [ %fp + -12 ] */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006794: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 2006798: 10 bf ff c5 b 20066ac <== NOT EXECUTED 200679c: a0 10 20 00 clr %l0 <== NOT EXECUTED 20067a0: 10 bf ff c3 b 20066ac 20067a4: a0 10 20 00 clr %l0 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 20067a8: e0 04 a1 6c ld [ %l2 + 0x16c ], %l0 api->Attributes = *the_attr; 20067ac: 92 10 00 11 mov %l1, %o1 20067b0: 94 10 20 38 mov 0x38, %o2 20067b4: 40 00 26 6d call 2010168 20067b8: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 20067bc: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; 20067c0: 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; 20067c4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 20067c8: 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; 20067cc: 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; 20067d0: c2 24 20 80 st %g1, [ %l0 + 0x80 ] 20067d4: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20067d8: 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; 20067dc: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 20067e0: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20067e4: 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; 20067e8: c2 24 20 88 st %g1, [ %l0 + 0x88 ] 20067ec: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20067f0: 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; 20067f4: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 20067f8: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 20067fc: 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; 2006800: c2 24 20 90 st %g1, [ %l0 + 0x90 ] 2006804: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 2006808: 98 10 20 00 clr %o4 200680c: 40 00 10 c6 call 200ab24 <_Thread_Start> 2006810: c2 24 20 94 st %g1, [ %l0 + 0x94 ] start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 2006814: 80 a6 60 03 cmp %i1, 3 2006818: 02 80 00 19 be 200687c 200681c: 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 ) { 2006820: 80 8c 60 ff btst 0xff, %l1 2006824: 12 80 00 0f bne 2006860 2006828: 90 16 23 c0 or %i0, 0x3c0, %o0 200682c: 40 00 0a 80 call 200922c <_Objects_Free> <== NOT EXECUTED 2006830: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 2006834: d0 05 a1 ec ld [ %l6 + 0x1ec ], %o0 <== NOT EXECUTED 2006838: 40 00 07 0b call 2008464 <_API_Mutex_Unlock> <== NOT EXECUTED 200683c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 2006840: 81 c7 e0 08 ret <== NOT EXECUTED 2006844: 81 e8 00 00 restore <== NOT EXECUTED */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 2006848: 80 a6 60 00 cmp %i1, 0 200684c: a6 10 20 01 mov 1, %l3 2006850: 02 bf ff 97 be 20066ac 2006854: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 2006858: 81 c7 e0 08 ret 200685c: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 2006860: c2 04 a0 08 ld [ %l2 + 8 ], %g1 _RTEMS_Unlock_allocator(); 2006864: d0 05 a1 ec ld [ %l6 + 0x1ec ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 2006868: c2 25 40 00 st %g1, [ %l5 ] _RTEMS_Unlock_allocator(); 200686c: 40 00 06 fe call 2008464 <_API_Mutex_Unlock> 2006870: b0 10 20 00 clr %i0 2006874: 81 c7 e0 08 ret 2006878: 81 e8 00 00 restore arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 200687c: 40 00 11 68 call 200ae1c <_Timespec_To_ticks> 2006880: 90 04 20 88 add %l0, 0x88, %o0 2006884: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006888: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 200688c: 11 00 80 71 sethi %hi(0x201c400), %o0 2006890: 40 00 12 78 call 200b270 <_Watchdog_Insert> 2006894: 90 12 22 14 or %o0, 0x214, %o0 ! 201c614 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 2006898: 10 bf ff e3 b 2006824 200689c: 80 8c 60 ff btst 0xff, %l1 020054d4 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 20054d4: 9d e3 bf 98 save %sp, -104, %sp 20054d8: 05 00 80 58 sethi %hi(0x2016000), %g2 20054dc: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 ! 20163b0 <_Thread_Dispatch_disable_level> 20054e0: 82 00 60 01 inc %g1 20054e4: c2 20 a3 b0 st %g1, [ %g2 + 0x3b0 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 20054e8: 29 00 80 5a sethi %hi(0x2016800), %l4 20054ec: 40 00 09 d4 call 2007c3c <_Objects_Allocate> 20054f0: 90 15 20 04 or %l4, 4, %o0 ! 2016804 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 20054f4: a4 92 20 00 orcc %o0, 0, %l2 20054f8: 02 80 00 2b be 20055a4 20054fc: 03 00 80 58 sethi %hi(0x2016000), %g1 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 2005500: f2 24 a0 14 st %i1, [ %l2 + 0x14 ] 2005504: a2 10 00 12 mov %l2, %l1 2005508: a6 10 63 10 or %g1, 0x310, %l3 200550c: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 2005510: 83 2e 60 02 sll %i1, 2, %g1 2005514: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 2005518: 80 a0 60 00 cmp %g1, 0 200551c: 22 80 00 0e be,a 2005554 2005520: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 2005524: c4 00 60 04 ld [ %g1 + 4 ], %g2 2005528: c2 10 a0 10 lduh [ %g2 + 0x10 ], %g1 200552c: 82 00 60 01 inc %g1 2005530: a1 28 60 02 sll %g1, 2, %l0 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 2005534: 40 00 13 64 call 200a2c4 <_Workspace_Allocate> 2005538: 90 10 00 10 mov %l0, %o0 if ( !table ) { 200553c: 82 92 20 00 orcc %o0, 0, %g1 2005540: 02 80 00 1d be 20055b4 2005544: 94 10 00 10 mov %l0, %o2 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 2005548: c2 24 60 1c st %g1, [ %l1 + 0x1c ] memset( table, '\0', bytes_to_allocate ); 200554c: 40 00 27 5e call 200f2c4 2005550: 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++ ) { 2005554: 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; 2005558: 80 a6 60 05 cmp %i1, 5 200555c: 12 bf ff ed bne 2005510 2005560: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005564: c4 04 a0 08 ld [ %l2 + 8 ], %g2 2005568: 82 15 20 04 or %l4, 4, %g1 200556c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2005570: 03 00 00 3f sethi %hi(0xfc00), %g1 2005574: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2005578: 82 08 80 01 and %g2, %g1, %g1 200557c: 83 28 60 02 sll %g1, 2, %g1 2005580: 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; 2005584: c0 24 a0 0c clr [ %l2 + 0xc ] } } the_key->is_active = TRUE; 2005588: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 200558c: c4 26 00 00 st %g2, [ %i0 ] } } the_key->is_active = TRUE; 2005590: 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(); 2005594: 40 00 0d 67 call 2008b30 <_Thread_Enable_dispatch> 2005598: b0 10 20 00 clr %i0 return 0; } 200559c: 81 c7 e0 08 ret 20055a0: 81 e8 00 00 restore _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { _Thread_Enable_dispatch(); 20055a4: 40 00 0d 63 call 2008b30 <_Thread_Enable_dispatch> 20055a8: b0 10 20 0b mov 0xb, %i0 20055ac: 81 c7 e0 08 ret 20055b0: 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; 20055b4: a0 86 7f ff addcc %i1, -1, %l0 20055b8: 02 80 00 0a be 20055e0 20055bc: 82 06 60 05 add %i1, 5, %g1 20055c0: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 20055c4: b2 04 80 01 add %l2, %g1, %i1 <== NOT EXECUTED the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 20055c8: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 20055cc: 40 00 13 37 call 200a2a8 <_Workspace_Free> <== NOT EXECUTED 20055d0: 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; 20055d4: a0 84 3f ff addcc %l0, -1, %l0 <== NOT EXECUTED 20055d8: 32 bf ff fd bne,a 20055cc <== NOT EXECUTED 20055dc: 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 ); 20055e0: 90 15 20 04 or %l4, 4, %o0 20055e4: 92 10 00 12 mov %l2, %o1 20055e8: 40 00 0a 90 call 2008028 <_Objects_Free> 20055ec: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 20055f0: 40 00 0d 50 call 2008b30 <_Thread_Enable_dispatch> 20055f4: 01 00 00 00 nop 20055f8: 81 c7 e0 08 ret 20055fc: 81 e8 00 00 restore 02005600 : */ int pthread_key_delete( pthread_key_t key ) { 2005600: 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 *) 2005604: 23 00 80 5a sethi %hi(0x2016800), %l1 2005608: 92 10 00 18 mov %i0, %o1 200560c: 94 07 bf f4 add %fp, -12, %o2 2005610: 40 00 0a f3 call 20081dc <_Objects_Get> 2005614: 90 14 60 04 or %l1, 4, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 2005618: c2 07 bf f4 ld [ %fp + -12 ], %g1 200561c: a0 10 00 08 mov %o0, %l0 2005620: 80 a0 60 00 cmp %g1, 0 2005624: 12 80 00 23 bne 20056b0 2005628: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 200562c: 90 14 60 04 or %l1, 4, %o0 2005630: 40 00 09 af call 2007cec <_Objects_Close> 2005634: 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 ] ) 2005638: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 200563c: 80 a2 20 00 cmp %o0, 0 2005640: 02 80 00 04 be 2005650 2005644: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 2005648: 40 00 13 18 call 200a2a8 <_Workspace_Free> 200564c: 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 ] ) 2005650: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 2005654: 80 a2 20 00 cmp %o0, 0 2005658: 22 80 00 05 be,a 200566c 200565c: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005660: 40 00 13 12 call 200a2a8 <_Workspace_Free> 2005664: 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 ] ) 2005668: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 200566c: 80 a2 20 00 cmp %o0, 0 2005670: 22 80 00 05 be,a 2005684 2005674: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 2005678: 40 00 13 0c call 200a2a8 <_Workspace_Free> 200567c: 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 ] ) 2005680: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 2005684: 80 a2 20 00 cmp %o0, 0 2005688: 22 80 00 05 be,a 200569c 200568c: 90 14 60 04 or %l1, 4, %o0 _Workspace_Free( the_key->Values[ the_api ] ); 2005690: 40 00 13 06 call 200a2a8 <_Workspace_Free> <== NOT EXECUTED 2005694: 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 ); 2005698: 90 14 60 04 or %l1, 4, %o0 <== NOT EXECUTED 200569c: 92 10 00 10 mov %l0, %o1 20056a0: 40 00 0a 62 call 2008028 <_Objects_Free> 20056a4: 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(); 20056a8: 40 00 0d 22 call 2008b30 <_Thread_Enable_dispatch> 20056ac: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 20056b0: 81 c7 e0 08 ret 20056b4: 81 e8 00 00 restore 02022e3c : int pthread_kill( pthread_t thread, int sig ) { 2022e3c: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 2022e40: 80 a6 60 00 cmp %i1, 0 2022e44: 02 80 00 2f be 2022f00 2022e48: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 2022e4c: a0 06 7f ff add %i1, -1, %l0 2022e50: 80 a4 20 1f cmp %l0, 0x1f 2022e54: 18 80 00 2b bgu 2022f00 2022e58: 11 00 80 a5 sethi %hi(0x2029400), %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 2022e5c: 94 07 bf f4 add %fp, -12, %o2 2022e60: 7f ff aa 4c call 200d790 <_Objects_Get> 2022e64: 90 12 22 30 or %o0, 0x230, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2022e68: c2 07 bf f4 ld [ %fp + -12 ], %g1 2022e6c: 80 a0 60 00 cmp %g1, 0 2022e70: 12 80 00 2a bne 2022f18 2022e74: 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 ) { 2022e78: 87 2e 60 02 sll %i1, 2, %g3 2022e7c: 85 2e 60 04 sll %i1, 4, %g2 2022e80: 03 00 80 a6 sethi %hi(0x2029800), %g1 2022e84: 84 20 80 03 sub %g2, %g3, %g2 2022e88: 82 10 61 9c or %g1, 0x19c, %g1 2022e8c: 82 00 40 02 add %g1, %g2, %g1 2022e90: c6 00 60 08 ld [ %g1 + 8 ], %g3 2022e94: 80 a0 e0 01 cmp %g3, 1 2022e98: 02 80 00 14 be 2022ee8 2022e9c: c8 02 21 6c ld [ %o0 + 0x16c ], %g4 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 2022ea0: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 2022ea4: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 2022ea8: b2 10 20 01 mov 1, %i1 2022eac: 83 2e 40 10 sll %i1, %l0, %g1 2022eb0: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 2022eb4: 94 10 20 00 clr %o2 2022eb8: 7f ff ff 90 call 2022cf8 <_POSIX_signals_Unblock_thread> 2022ebc: 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 ) ) 2022ec0: 03 00 80 a5 sethi %hi(0x2029400), %g1 2022ec4: c4 00 60 00 ld [ %g1 ], %g2 2022ec8: 80 a0 a0 00 cmp %g2, 0 2022ecc: 02 80 00 07 be 2022ee8 2022ed0: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 2022ed4: 03 00 80 a5 sethi %hi(0x2029400), %g1 2022ed8: c4 00 60 24 ld [ %g1 + 0x24 ], %g2 ! 2029424 <_Thread_Executing> 2022edc: 80 a6 00 02 cmp %i0, %g2 2022ee0: 02 80 00 06 be 2022ef8 2022ee4: 03 00 80 a5 sethi %hi(0x2029400), %g1 _ISR_Signals_to_thread_executing = TRUE; } _Thread_Enable_dispatch(); 2022ee8: 7f ff ac c5 call 200e1fc <_Thread_Enable_dispatch> 2022eec: b0 10 20 00 clr %i0 2022ef0: 81 c7 e0 08 ret 2022ef4: 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; 2022ef8: 10 bf ff fc b 2022ee8 <== NOT EXECUTED 2022efc: f2 28 60 b8 stb %i1, [ %g1 + 0xb8 ] <== 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 ); 2022f00: 7f ff d5 d9 call 2018664 <__errno> 2022f04: b0 10 3f ff mov -1, %i0 2022f08: 82 10 20 16 mov 0x16, %g1 2022f0c: c2 22 00 00 st %g1, [ %o0 ] 2022f10: 81 c7 e0 08 ret 2022f14: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 2022f18: 7f ff d5 d3 call 2018664 <__errno> 2022f1c: b0 10 3f ff mov -1, %i0 2022f20: 82 10 20 03 mov 3, %g1 2022f24: c2 22 00 00 st %g1, [ %o0 ] } 2022f28: 81 c7 e0 08 ret 2022f2c: 81 e8 00 00 restore 02007348 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 2007348: 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; 200734c: 03 00 80 5e sethi %hi(0x2017800), %g1 2007350: 80 a6 60 00 cmp %i1, 0 2007354: 02 80 00 03 be 2007360 2007358: a0 10 60 8c or %g1, 0x8c, %l0 200735c: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 2007360: 80 a6 20 00 cmp %i0, 0 2007364: 02 80 00 17 be 20073c0 2007368: 01 00 00 00 nop break; } } #endif if ( !the_attr->is_initialized ) 200736c: c2 04 00 00 ld [ %l0 ], %g1 2007370: 80 a0 60 00 cmp %g1, 0 2007374: 02 80 00 13 be 20073c0 2007378: 01 00 00 00 nop /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 200737c: c2 04 20 04 ld [ %l0 + 4 ], %g1 2007380: 80 a0 60 00 cmp %g1, 0 2007384: 12 80 00 4d bne 20074b8 2007388: 11 00 80 5e sethi %hi(0x2017800), %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 200738c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 2007390: 80 a0 60 01 cmp %g1, 1 2007394: 02 80 00 37 be 2007470 2007398: 80 a0 60 02 cmp %g1, 2 200739c: 02 80 00 3c be 200748c 20073a0: 80 a0 60 00 cmp %g1, 0 20073a4: 12 80 00 07 bne 20073c0 20073a8: a2 10 20 00 clr %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 20073ac: c2 04 20 08 ld [ %l0 + 8 ], %g1 20073b0: 82 00 7f ff add %g1, -1, %g1 20073b4: 80 a0 60 fd cmp %g1, 0xfd 20073b8: 08 80 00 04 bleu 20073c8 20073bc: 05 00 80 65 sethi %hi(0x2019400), %g2 *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; } 20073c0: 81 c7 e0 08 ret 20073c4: 91 e8 20 16 restore %g0, 0x16, %o0 20073c8: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 20073cc: 82 00 60 01 inc %g1 20073d0: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 20073d4: 25 00 80 66 sethi %hi(0x2019800), %l2 20073d8: 40 00 0a 8e call 2009e10 <_Objects_Allocate> 20073dc: 90 14 a0 80 or %l2, 0x80, %o0 ! 2019880 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 20073e0: b2 92 20 00 orcc %o0, 0, %i1 20073e4: 02 80 00 31 be 20074a8 20073e8: 01 00 00 00 nop _Thread_Enable_dispatch(); return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 20073ec: c2 04 20 04 ld [ %l0 + 4 ], %g1 20073f0: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 20073f4: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 20073f8: 80 a0 a0 00 cmp %g2, 0 20073fc: 32 80 00 04 bne,a 200740c 2007400: 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; 2007404: 82 10 20 01 mov 1, %g1 2007408: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 200740c: 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; 2007410: 84 10 20 01 mov 1, %g2 the_mutex_attr->priority_ceiling = 2007414: 82 10 20 ff mov 0xff, %g1 2007418: 82 20 40 03 sub %g1, %g3, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 200741c: 92 06 60 54 add %i1, 0x54, %o1 2007420: 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; 2007424: c4 2e 60 58 stb %g2, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 2007428: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 200742c: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 2007430: 40 00 08 36 call 2009508 <_CORE_mutex_Initialize> 2007434: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2007438: c4 06 60 08 ld [ %i1 + 8 ], %g2 200743c: 82 14 a0 80 or %l2, 0x80, %g1 2007440: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2007444: 03 00 00 3f sethi %hi(0xfc00), %g1 2007448: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 200744c: 82 08 80 01 and %g2, %g1, %g1 2007450: 83 28 60 02 sll %g1, 2, %g1 2007454: 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; 2007458: 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; 200745c: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 2007460: 40 00 0e 29 call 200ad04 <_Thread_Enable_dispatch> 2007464: b0 10 20 00 clr %i0 2007468: 81 c7 e0 08 ret 200746c: 81 e8 00 00 restore break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 2007470: c2 04 20 08 ld [ %l0 + 8 ], %g1 2007474: 82 00 7f ff add %g1, -1, %g1 2007478: 80 a0 60 fd cmp %g1, 0xfd 200747c: 18 bf ff d1 bgu 20073c0 2007480: a2 10 20 02 mov 2, %l1 2007484: 10 bf ff d1 b 20073c8 2007488: 05 00 80 65 sethi %hi(0x2019400), %g2 200748c: c2 04 20 08 ld [ %l0 + 8 ], %g1 2007490: 82 00 7f ff add %g1, -1, %g1 2007494: 80 a0 60 fd cmp %g1, 0xfd 2007498: 18 bf ff ca bgu 20073c0 200749c: a2 10 20 03 mov 3, %l1 20074a0: 10 bf ff ca b 20073c8 20074a4: 05 00 80 65 sethi %hi(0x2019400), %g2 _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { _Thread_Enable_dispatch(); 20074a8: 40 00 0e 17 call 200ad04 <_Thread_Enable_dispatch> 20074ac: b0 10 20 0b mov 0xb, %i0 20074b0: 81 c7 e0 08 ret 20074b4: 81 e8 00 00 restore /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 20074b8: 15 00 80 5e sethi %hi(0x2017800), %o2 <== NOT EXECUTED 20074bc: 17 00 80 5e sethi %hi(0x2017800), %o3 <== NOT EXECUTED 20074c0: 90 12 20 a0 or %o0, 0xa0, %o0 <== NOT EXECUTED 20074c4: 94 12 a1 20 or %o2, 0x120, %o2 <== NOT EXECUTED 20074c8: 96 12 e0 e8 or %o3, 0xe8, %o3 <== NOT EXECUTED 20074cc: 7f ff f2 a4 call 2003f5c <__assert_func> <== NOT EXECUTED 20074d0: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED 20074d4: 01 00 00 00 nop 02007548 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 2007548: 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 ) 200754c: 80 a6 a0 00 cmp %i2, 0 2007550: 02 80 00 06 be 2007568 2007554: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 2007558: 82 06 7f ff add %i1, -1, %g1 200755c: 80 a0 60 fd cmp %g1, 0xfd 2007560: 08 80 00 04 bleu 2007570 2007564: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 2007568: 81 c7 e0 08 ret 200756c: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 2007570: 7f ff ff da call 20074d8 2007574: 90 10 00 18 mov %i0, %o0 if ( status ) 2007578: b0 92 20 00 orcc %o0, 0, %i0 200757c: 12 80 00 14 bne 20075cc 2007580: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 2007584: 7f ff ff 46 call 200729c <_POSIX_Mutex_Get> 2007588: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 200758c: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007590: 80 a0 60 00 cmp %g1, 0 2007594: 32 80 00 0e bne,a 20075cc 2007598: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 200759c: 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( 20075a0: 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( 20075a4: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 20075a8: 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( 20075ac: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 20075b0: 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( 20075b4: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 20075b8: 94 10 20 00 clr %o2 20075bc: 40 00 08 5e call 2009734 <_CORE_mutex_Surrender> 20075c0: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 20075c4: 40 00 0d d0 call 200ad04 <_Thread_Enable_dispatch> 20075c8: 01 00 00 00 nop 20075cc: 81 c7 e0 08 ret 20075d0: 81 e8 00 00 restore 020075d4 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 20075d4: 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 ); 20075d8: 90 10 00 19 mov %i1, %o0 20075dc: 40 00 00 2f call 2007698 <_POSIX_Absolute_timeout_to_ticks> 20075e0: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 20075e4: 80 a2 20 02 cmp %o0, 2 20075e8: 08 80 00 05 bleu 20075fc 20075ec: d4 07 bf f4 ld [ %fp + -12 ], %o2 20075f0: 80 a2 20 03 cmp %o0, 3 20075f4: 02 80 00 07 be 2007610 20075f8: 90 10 00 18 mov %i0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 20075fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2007600: 7f ff ff bc call 20074f0 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 2007604: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 2007608: 81 c7 e0 08 ret <== NOT EXECUTED 200760c: 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( 2007610: 7f ff ff b8 call 20074f0 <_POSIX_Mutex_Lock_support> 2007614: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 2007618: 81 c7 e0 08 ret 200761c: 91 e8 00 08 restore %g0, %o0, %o0 02006cdc : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 2006cdc: 9d e3 bf 90 save %sp, -112, %sp if ( !once_control || !init_routine ) 2006ce0: a0 96 20 00 orcc %i0, 0, %l0 2006ce4: 02 80 00 0a be 2006d0c 2006ce8: 80 a6 60 00 cmp %i1, 0 2006cec: 02 80 00 08 be 2006d0c 2006cf0: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 2006cf4: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006cf8: 80 a0 60 00 cmp %g1, 0 2006cfc: 02 80 00 06 be 2006d14 2006d00: b0 10 20 00 clr %i0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 2006d04: 81 c7 e0 08 ret 2006d08: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 2006d0c: 81 c7 e0 08 ret 2006d10: 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); 2006d14: b0 07 bf f4 add %fp, -12, %i0 2006d18: 90 10 21 00 mov 0x100, %o0 2006d1c: 92 10 21 00 mov 0x100, %o1 2006d20: 40 00 03 ba call 2007c08 2006d24: 94 10 00 18 mov %i0, %o2 if ( !once_control->init_executed ) { 2006d28: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006d2c: 80 a0 60 00 cmp %g1, 0 2006d30: 02 80 00 09 be 2006d54 2006d34: 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); 2006d38: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 2006d3c: 94 10 00 18 mov %i0, %o2 2006d40: 92 10 21 00 mov 0x100, %o1 2006d44: 40 00 03 b1 call 2007c08 2006d48: b0 10 20 00 clr %i0 } return 0; } 2006d4c: 81 c7 e0 08 ret 2006d50: 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; 2006d54: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 2006d58: 9f c6 40 00 call %i1 2006d5c: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 2006d60: 10 bf ff f7 b 2006d3c 2006d64: d0 07 bf f4 ld [ %fp + -12 ], %o0 02005fe4 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 2005fe4: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 2005fe8: 80 a6 20 00 cmp %i0, 0 2005fec: 02 80 00 26 be 2006084 2005ff0: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 2005ff4: 80 a6 60 00 cmp %i1, 0 2005ff8: 22 80 00 29 be,a 200609c 2005ffc: 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 ) 2006000: c2 04 00 00 ld [ %l0 ], %g1 2006004: 80 a0 60 00 cmp %g1, 0 2006008: 02 80 00 1f be 2006084 200600c: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 2006010: c2 04 20 04 ld [ %l0 + 4 ], %g1 2006014: 80 a0 60 00 cmp %g1, 0 2006018: 12 80 00 1b bne 2006084 200601c: 05 00 80 6b sethi %hi(0x201ac00), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2006020: c2 00 a0 b0 ld [ %g2 + 0xb0 ], %g1 ! 201acb0 <_Thread_Dispatch_disable_level> 2006024: 82 00 60 01 inc %g1 2006028: c2 20 a0 b0 st %g1, [ %g2 + 0xb0 ] * 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 *) 200602c: 33 00 80 6b sethi %hi(0x201ac00), %i1 2006030: 40 00 0b 03 call 2008c3c <_Objects_Allocate> 2006034: 90 16 63 00 or %i1, 0x300, %o0 ! 201af00 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 2006038: a0 92 20 00 orcc %o0, 0, %l0 200603c: 02 80 00 14 be 200608c 2006040: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 2006044: 40 00 09 03 call 2008450 <_CORE_RWLock_Initialize> 2006048: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 200604c: c4 04 20 08 ld [ %l0 + 8 ], %g2 2006050: 82 16 63 00 or %i1, 0x300, %g1 2006054: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 2006058: 03 00 00 3f sethi %hi(0xfc00), %g1 200605c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2006060: 82 08 80 01 and %g2, %g1, %g1 2006064: 83 28 60 02 sll %g1, 2, %g1 2006068: 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; 200606c: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 2006070: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 2006074: 40 00 0e af call 2009b30 <_Thread_Enable_dispatch> 2006078: b0 10 20 00 clr %i0 200607c: 81 c7 e0 08 ret 2006080: 81 e8 00 00 restore return 0; } 2006084: 81 c7 e0 08 ret 2006088: 91 e8 20 16 restore %g0, 0x16, %o0 _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 200608c: 40 00 0e a9 call 2009b30 <_Thread_Enable_dispatch> 2006090: b0 10 20 0b mov 0xb, %i0 2006094: 81 c7 e0 08 ret 2006098: 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 ); 200609c: 40 00 02 b5 call 2006b70 <== NOT EXECUTED 20060a0: 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 ) 20060a4: 10 bf ff d8 b 2006004 <== NOT EXECUTED 20060a8: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 0200611c : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 200611c: 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 ) 2006120: 80 a6 20 00 cmp %i0, 0 2006124: 02 80 00 11 be 2006168 2006128: 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 ); 200612c: 92 07 bf f0 add %fp, -16, %o1 2006130: 40 00 1d f2 call 200d8f8 <_POSIX_Absolute_timeout_to_ticks> 2006134: a0 10 20 00 clr %l0 switch (status) { 2006138: 80 a2 20 02 cmp %o0, 2 200613c: 18 80 00 0e bgu 2006174 2006140: b2 10 00 08 mov %o0, %i1 2006144: d2 06 00 00 ld [ %i0 ], %o1 2006148: 11 00 80 6b sethi %hi(0x201ac00), %o0 200614c: 94 07 bf f4 add %fp, -12, %o2 2006150: 40 00 0c 23 call 20091dc <_Objects_Get> 2006154: 90 12 23 00 or %o0, 0x300, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006158: c2 07 bf f4 ld [ %fp + -12 ], %g1 200615c: 80 a0 60 00 cmp %g1, 0 2006160: 22 80 00 11 be,a 20061a4 2006164: 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( 2006168: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 200616c: 81 c7 e0 08 ret 2006170: 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) { 2006174: 80 a2 20 03 cmp %o0, 3 2006178: 12 bf ff f4 bne 2006148 200617c: d2 06 00 00 ld [ %i0 ], %o1 2006180: 11 00 80 6b sethi %hi(0x201ac00), %o0 2006184: 94 07 bf f4 add %fp, -12, %o2 2006188: 40 00 0c 15 call 20091dc <_Objects_Get> 200618c: 90 12 23 00 or %o0, 0x300, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006190: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006194: 80 a0 60 00 cmp %g1, 0 2006198: 12 bf ff f4 bne 2006168 200619c: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 20061a0: d2 06 00 00 ld [ %i0 ], %o1 20061a4: d6 07 bf f0 ld [ %fp + -16 ], %o3 20061a8: a0 0c 20 ff and %l0, 0xff, %l0 20061ac: 90 02 20 10 add %o0, 0x10, %o0 20061b0: 94 10 00 10 mov %l0, %o2 20061b4: 40 00 08 b2 call 200847c <_CORE_RWLock_Obtain_for_reading> 20061b8: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 20061bc: 40 00 0e 5d call 2009b30 <_Thread_Enable_dispatch> 20061c0: 01 00 00 00 nop 20061c4: 03 00 80 6b sethi %hi(0x201ac00), %g1 if ( !do_wait && 20061c8: 80 a4 20 00 cmp %l0, 0 20061cc: 12 80 00 0f bne 2006208 20061d0: 86 10 61 74 or %g1, 0x174, %g3 20061d4: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED 20061d8: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 201ad74 <_Thread_Executing> <== NOT EXECUTED 20061dc: 86 10 61 74 or %g1, 0x174, %g3 <== NOT EXECUTED 20061e0: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 20061e4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 20061e8: 32 80 00 09 bne,a 200620c <== NOT EXECUTED 20061ec: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 20061f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20061f4: 02 bf ff de be 200616c <== NOT EXECUTED 20061f8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 20061fc: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 2006200: 08 bf ff db bleu 200616c <== NOT EXECUTED 2006204: 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( 2006208: c2 00 c0 00 ld [ %g3 ], %g1 200620c: 40 00 00 44 call 200631c <_POSIX_RWLock_Translate_core_RWLock_return_code> 2006210: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2006214: 81 c7 e0 08 ret 2006218: 91 e8 00 08 restore %g0, %o0, %o0 0200621c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 200621c: 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 ) 2006220: 80 a6 20 00 cmp %i0, 0 2006224: 02 80 00 11 be 2006268 2006228: 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 ); 200622c: 92 07 bf f0 add %fp, -16, %o1 2006230: 40 00 1d b2 call 200d8f8 <_POSIX_Absolute_timeout_to_ticks> 2006234: a0 10 20 00 clr %l0 switch (status) { 2006238: 80 a2 20 02 cmp %o0, 2 200623c: 18 80 00 0e bgu 2006274 2006240: b2 10 00 08 mov %o0, %i1 2006244: d2 06 00 00 ld [ %i0 ], %o1 2006248: 11 00 80 6b sethi %hi(0x201ac00), %o0 200624c: 94 07 bf f4 add %fp, -12, %o2 2006250: 40 00 0b e3 call 20091dc <_Objects_Get> 2006254: 90 12 23 00 or %o0, 0x300, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006258: c2 07 bf f4 ld [ %fp + -12 ], %g1 200625c: 80 a0 60 00 cmp %g1, 0 2006260: 22 80 00 11 be,a 20062a4 2006264: 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( 2006268: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 200626c: 81 c7 e0 08 ret 2006270: 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) { 2006274: 80 a2 20 03 cmp %o0, 3 2006278: 12 bf ff f4 bne 2006248 200627c: d2 06 00 00 ld [ %i0 ], %o1 2006280: 11 00 80 6b sethi %hi(0x201ac00), %o0 2006284: 94 07 bf f4 add %fp, -12, %o2 2006288: 40 00 0b d5 call 20091dc <_Objects_Get> 200628c: 90 12 23 00 or %o0, 0x300, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 2006290: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006294: 80 a0 60 00 cmp %g1, 0 2006298: 12 bf ff f4 bne 2006268 200629c: a0 10 20 01 mov 1, %l0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 20062a0: d2 06 00 00 ld [ %i0 ], %o1 20062a4: d6 07 bf f0 ld [ %fp + -16 ], %o3 20062a8: a0 0c 20 ff and %l0, 0xff, %l0 20062ac: 90 02 20 10 add %o0, 0x10, %o0 20062b0: 94 10 00 10 mov %l0, %o2 20062b4: 40 00 08 a7 call 2008550 <_CORE_RWLock_Obtain_for_writing> 20062b8: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 20062bc: 40 00 0e 1d call 2009b30 <_Thread_Enable_dispatch> 20062c0: 01 00 00 00 nop 20062c4: 03 00 80 6b sethi %hi(0x201ac00), %g1 if ( !do_wait && 20062c8: 80 a4 20 00 cmp %l0, 0 20062cc: 12 80 00 0f bne 2006308 20062d0: 86 10 61 74 or %g1, 0x174, %g3 20062d4: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED 20062d8: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 201ad74 <_Thread_Executing> <== NOT EXECUTED 20062dc: 86 10 61 74 or %g1, 0x174, %g3 <== NOT EXECUTED 20062e0: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED 20062e4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 20062e8: 32 80 00 09 bne,a 200630c <== NOT EXECUTED 20062ec: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 20062f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20062f4: 02 bf ff de be 200626c <== NOT EXECUTED 20062f8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 20062fc: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 2006300: 08 bf ff db bleu 200626c <== NOT EXECUTED 2006304: 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( 2006308: c2 00 c0 00 ld [ %g3 ], %g1 200630c: 40 00 00 04 call 200631c <_POSIX_RWLock_Translate_core_RWLock_return_code> 2006310: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 2006314: 81 c7 e0 08 ret 2006318: 91 e8 00 08 restore %g0, %o0, %o0 0200573c : int pthread_setcancelstate( int state, int *oldstate ) { 200573c: 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() ) 2005740: 03 00 80 59 sethi %hi(0x2016400), %g1 2005744: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 20164b0 <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 2005748: 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() ) 200574c: 80 a0 a0 00 cmp %g2, 0 2005750: 12 80 00 1a bne 20057b8 2005754: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 2005758: 80 a6 60 00 cmp %i1, 0 200575c: 02 80 00 04 be 200576c 2005760: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 2005764: 08 80 00 04 bleu 2005774 2005768: 07 00 80 59 sethi %hi(0x2016400), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 200576c: 81 c7 e0 08 ret <== NOT EXECUTED 2005770: 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 ]; 2005774: 31 00 80 59 sethi %hi(0x2016400), %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2005778: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 200577c: c4 06 20 d4 ld [ %i0 + 0xd4 ], %g2 2005780: 82 00 60 01 inc %g1 2005784: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2 2005788: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 200578c: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005790: 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; 2005794: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005798: 12 80 00 06 bne 20057b0 200579c: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 20057a0: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 20057a4: 80 a0 60 01 cmp %g1, 1 20057a8: 22 80 00 06 be,a 20057c0 20057ac: 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(); 20057b0: 40 00 0b 6b call 200855c <_Thread_Enable_dispatch> 20057b4: b0 10 20 00 clr %i0 20057b8: 81 c7 e0 08 ret 20057bc: 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 && 20057c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20057c4: 02 bf ff fb be 20057b0 <== NOT EXECUTED 20057c8: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 20057cc: 40 00 0b 64 call 200855c <_Thread_Enable_dispatch> <== NOT EXECUTED 20057d0: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 20057d4: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 <== NOT EXECUTED 20057d8: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 20057dc: 7f ff fe ca call 2005304 <_POSIX_Thread_Exit> <== NOT EXECUTED 20057e0: b0 10 20 00 clr %i0 <== NOT EXECUTED 20057e4: 81 c7 e0 08 ret <== NOT EXECUTED 20057e8: 81 e8 00 00 restore <== NOT EXECUTED 020057ec : int pthread_setcanceltype( int type, int *oldtype ) { 20057ec: 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() ) 20057f0: 03 00 80 59 sethi %hi(0x2016400), %g1 20057f4: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 20164b0 <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 20057f8: 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() ) 20057fc: 80 a0 a0 00 cmp %g2, 0 2005800: 12 80 00 1a bne 2005868 2005804: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 2005808: 80 a6 60 00 cmp %i1, 0 200580c: 02 80 00 04 be 200581c 2005810: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 2005814: 08 80 00 04 bleu 2005824 2005818: 07 00 80 59 sethi %hi(0x2016400), %g3 _Thread_Enable_dispatch(); if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); return 0; } 200581c: 81 c7 e0 08 ret <== NOT EXECUTED 2005820: 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 ]; 2005824: 31 00 80 59 sethi %hi(0x2016400), %i0 2005828: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 200582c: c4 06 20 d4 ld [ %i0 + 0xd4 ], %g2 2005830: 82 00 60 01 inc %g1 2005834: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] 2005838: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 200583c: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 2005840: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 2005844: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 2005848: 80 a0 a0 00 cmp %g2, 0 200584c: 12 80 00 05 bne 2005860 2005850: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ] 2005854: 80 a1 20 01 cmp %g4, 1 2005858: 22 80 00 06 be,a 2005870 200585c: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1 thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 2005860: 40 00 0b 3f call 200855c <_Thread_Enable_dispatch> 2005864: b0 10 20 00 clr %i0 2005868: 81 c7 e0 08 ret 200586c: 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 && 2005870: 80 a0 60 00 cmp %g1, 0 2005874: 02 bf ff fb be 2005860 2005878: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 200587c: 40 00 0b 38 call 200855c <_Thread_Enable_dispatch> <== NOT EXECUTED 2005880: 01 00 00 00 nop <== NOT EXECUTED if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 2005884: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 <== NOT EXECUTED 2005888: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 200588c: 7f ff fe 9e call 2005304 <_POSIX_Thread_Exit> <== NOT EXECUTED 2005890: b0 10 20 00 clr %i0 <== NOT EXECUTED 2005894: 81 c7 e0 08 ret <== NOT EXECUTED 2005898: 81 e8 00 00 restore <== NOT EXECUTED 02007f10 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 2007f10: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 2007f14: 80 a6 a0 00 cmp %i2, 0 2007f18: 22 80 00 41 be,a 200801c 2007f1c: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 2007f20: c2 06 80 00 ld [ %i2 ], %g1 2007f24: 82 00 7f ff add %g1, -1, %g1 2007f28: 80 a0 60 fd cmp %g1, 0xfd 2007f2c: 18 80 00 0a bgu 2007f54 2007f30: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2007f34: 02 80 00 0a be 2007f5c 2007f38: a4 10 20 00 clr %l2 2007f3c: 04 80 00 4d ble 2008070 2007f40: 80 a6 60 02 cmp %i1, 2 2007f44: 02 80 00 48 be 2008064 2007f48: 80 a6 60 03 cmp %i1, 3 2007f4c: 02 80 00 36 be 2008024 2007f50: 01 00 00 00 nop case OBJECTS_ERROR: break; } return ESRCH; } 2007f54: 81 c7 e0 08 ret 2007f58: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2007f5c: a6 10 20 00 clr %l3 2007f60: 92 10 00 18 mov %i0, %o1 2007f64: 11 00 80 65 sethi %hi(0x2019400), %o0 2007f68: 94 07 bf f4 add %fp, -12, %o2 2007f6c: 40 00 09 11 call 200a3b0 <_Objects_Get> 2007f70: 90 12 23 40 or %o0, 0x340, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 2007f74: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007f78: a2 10 00 08 mov %o0, %l1 2007f7c: 80 a0 60 00 cmp %g1, 0 2007f80: 12 80 00 27 bne 200801c 2007f84: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 2007f88: e0 02 21 6c ld [ %o0 + 0x16c ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 2007f8c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 2007f90: 80 a0 60 03 cmp %g1, 3 2007f94: 02 80 00 46 be 20080ac 2007f98: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 2007f9c: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 2007fa0: c6 06 80 00 ld [ %i2 ], %g3 the_thread->budget_algorithm = budget_algorithm; 2007fa4: 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; 2007fa8: c6 24 20 80 st %g3, [ %l0 + 0x80 ] 2007fac: c2 06 a0 04 ld [ %i2 + 4 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 2007fb0: 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; 2007fb4: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 2007fb8: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2007fbc: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 2007fc0: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 2007fc4: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 2007fc8: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 2007fcc: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 2007fd0: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 2007fd4: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 2007fd8: 06 80 00 0f bl 2008014 2007fdc: c2 24 20 94 st %g1, [ %l0 + 0x94 ] 2007fe0: 80 a6 60 02 cmp %i1, 2 2007fe4: 14 80 00 29 bg 2008088 2007fe8: 80 a6 60 03 cmp %i1, 3 2007fec: 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; 2007ff0: 03 00 80 65 sethi %hi(0x2019400), %g1 2007ff4: c4 00 60 08 ld [ %g1 + 8 ], %g2 ! 2019408 <_Thread_Ticks_per_timeslice> 2007ff8: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 2007ffc: 90 10 00 11 mov %l1, %o0 2008000: 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; 2008004: c4 24 60 78 st %g2, [ %l1 + 0x78 ] the_thread->real_priority = 2008008: d2 24 60 18 st %o1, [ %l1 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 200800c: 40 00 09 a8 call 200a6ac <_Thread_Change_priority> 2008010: 94 10 20 01 mov 1, %o2 _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 2008014: 40 00 0b 3c call 200ad04 <_Thread_Enable_dispatch> 2008018: b0 10 20 00 clr %i0 200801c: 81 c7 e0 08 ret 2008020: 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 ) < 2008024: 40 00 0f 59 call 200bd88 <_Timespec_To_ticks> 2008028: 90 06 a0 08 add %i2, 8, %o0 200802c: a0 10 00 08 mov %o0, %l0 2008030: 40 00 0f 56 call 200bd88 <_Timespec_To_ticks> 2008034: 90 06 a0 10 add %i2, 0x10, %o0 2008038: 80 a4 00 08 cmp %l0, %o0 200803c: 2a bf ff f8 bcs,a 200801c 2008040: 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 ) ) 2008044: c2 06 a0 04 ld [ %i2 + 4 ], %g1 2008048: 82 00 7f ff add %g1, -1, %g1 200804c: 80 a0 60 fd cmp %g1, 0xfd 2008050: 18 bf ff c1 bgu 2007f54 2008054: 03 00 80 1f sethi %hi(0x2007c00), %g1 2008058: a4 10 20 03 mov 3, %l2 200805c: 10 bf ff c1 b 2007f60 2008060: a6 10 62 2c or %g1, 0x22c, %l3 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 2008064: a4 10 20 02 mov 2, %l2 2008068: 10 bf ff be b 2007f60 200806c: a6 10 20 00 clr %l3 2008070: 80 a6 60 00 cmp %i1, 0 2008074: a4 10 20 01 mov 1, %l2 2008078: 02 bf ff ba be 2007f60 200807c: a6 10 20 00 clr %l3 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 2008080: 81 c7 e0 08 ret 2008084: 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 ) { 2008088: 12 bf ff e3 bne 2008014 200808c: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 2008090: c6 24 20 98 st %g3, [ %l0 + 0x98 ] _Watchdog_Remove( &api->Sporadic_timer ); 2008094: 40 00 10 bd call 200c388 <_Watchdog_Remove> 2008098: 90 04 20 9c add %l0, 0x9c, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 200809c: 92 10 00 11 mov %l1, %o1 20080a0: 7f ff ff 77 call 2007e7c <_POSIX_Threads_Sporadic_budget_TSR> 20080a4: 90 10 20 00 clr %o0 20080a8: 30 bf ff db b,a 2008014 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 20080ac: 40 00 10 b7 call 200c388 <_Watchdog_Remove> 20080b0: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 20080b4: 10 bf ff bb b 2007fa0 20080b8: f2 24 20 7c st %i1, [ %l0 + 0x7c ] 020058c0 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 20058c0: 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() ) 20058c4: 03 00 80 59 sethi %hi(0x2016400), %g1 20058c8: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 20164b0 <_ISR_Nest_level> 20058cc: 80 a0 a0 00 cmp %g2, 0 20058d0: 12 80 00 15 bne 2005924 20058d4: 07 00 80 59 sethi %hi(0x2016400), %g3 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 20058d8: 33 00 80 59 sethi %hi(0x2016400), %i1 20058dc: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 20058e0: c4 06 60 d4 ld [ %i1 + 0xd4 ], %g2 20058e4: 82 00 60 01 inc %g1 20058e8: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2 20058ec: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 20058f0: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 20058f4: 80 a0 60 00 cmp %g1, 0 20058f8: 12 80 00 0d bne 200592c 20058fc: 01 00 00 00 nop 2005900: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 2005904: 80 a0 60 00 cmp %g1, 0 2005908: 02 80 00 09 be 200592c 200590c: 01 00 00 00 nop thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 2005910: 40 00 0b 13 call 200855c <_Thread_Enable_dispatch> 2005914: 01 00 00 00 nop if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 2005918: f0 06 60 d4 ld [ %i1 + 0xd4 ], %i0 200591c: 7f ff fe 7a call 2005304 <_POSIX_Thread_Exit> 2005920: 93 e8 3f ff restore %g0, -1, %o1 2005924: 81 c7 e0 08 ret <== NOT EXECUTED 2005928: 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(); 200592c: 40 00 0b 0c call 200855c <_Thread_Enable_dispatch> 2005930: 81 e8 00 00 restore 2005934: 01 00 00 00 nop <== NOT EXECUTED 020155b4 : ssize_t read( int fd, void *buffer, size_t count ) { 20155b4: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 20155b8: 03 00 80 5c sethi %hi(0x2017000), %g1 20155bc: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 20172f8 ssize_t read( int fd, void *buffer, size_t count ) { 20155c0: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 20155c4: 80 a6 00 02 cmp %i0, %g2 20155c8: 1a 80 00 24 bcc 2015658 20155cc: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 20155d0: 03 00 80 5f sethi %hi(0x2017c00), %g1 20155d4: c6 00 63 f4 ld [ %g1 + 0x3f4 ], %g3 ! 2017ff4 20155d8: 85 2e 20 02 sll %i0, 2, %g2 20155dc: 83 2e 20 04 sll %i0, 4, %g1 20155e0: 82 20 40 02 sub %g1, %g2, %g1 20155e4: 82 00 40 18 add %g1, %i0, %g1 20155e8: 83 28 60 02 sll %g1, 2, %g1 20155ec: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 20155f0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 20155f4: 80 88 61 00 btst 0x100, %g1 20155f8: 02 80 00 18 be 2015658 20155fc: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 2015600: 02 80 00 1c be 2015670 2015604: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 2015608: 02 80 00 12 be 2015650 201560c: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 2015610: 80 88 60 02 btst 2, %g1 2015614: 02 80 00 17 be 2015670 2015618: 01 00 00 00 nop /* * Now process the read(). */ if ( !iop->handlers->read_h ) 201561c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 2015620: c2 00 60 08 ld [ %g1 + 8 ], %g1 2015624: 80 a0 60 00 cmp %g1, 0 2015628: 02 80 00 18 be 2015688 201562c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 2015630: 9f c0 40 00 call %g1 2015634: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 2015638: 80 a2 20 00 cmp %o0, 0 201563c: 04 80 00 05 ble 2015650 2015640: 01 00 00 00 nop iop->offset += rc; 2015644: c2 06 20 08 ld [ %i0 + 8 ], %g1 2015648: 82 00 40 08 add %g1, %o0, %g1 201564c: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 2015650: 81 c7 e0 08 ret 2015654: 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 ); 2015658: 7f ff e0 f7 call 200da34 <__errno> <== NOT EXECUTED 201565c: 01 00 00 00 nop <== NOT EXECUTED 2015660: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 2015664: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015668: 10 bf ff fa b 2015650 <== NOT EXECUTED 201566c: 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 ); 2015670: 7f ff e0 f1 call 200da34 <__errno> <== NOT EXECUTED 2015674: 01 00 00 00 nop <== NOT EXECUTED 2015678: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 201567c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015680: 10 bf ff f4 b 2015650 <== NOT EXECUTED 2015684: 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 ); 2015688: 7f ff e0 eb call 200da34 <__errno> <== NOT EXECUTED 201568c: 01 00 00 00 nop <== NOT EXECUTED 2015690: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2015694: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015698: 10 bf ff ee b 2015650 <== NOT EXECUTED 201569c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02022420 : /* * get next entry in a directory. */ struct dirent * readdir( DIR *dirp ) { 2022420: 9d e3 bf 98 save %sp, -104, %sp register struct dirent *dp; if ( !dirp ) 2022424: 80 a6 20 00 cmp %i0, 0 2022428: 02 80 00 29 be 20224cc 202242c: 88 10 20 00 clr %g4 2022430: d2 06 20 0c ld [ %i0 + 0xc ], %o1 return NULL; for (;;) { if (dirp->dd_loc == 0) { 2022434: c4 06 20 04 ld [ %i0 + 4 ], %g2 2022438: 80 a0 a0 00 cmp %g2, 0 202243c: 22 80 00 1b be,a 20224a8 2022440: d0 06 00 00 ld [ %i0 ], %o0 dirp->dd_len); if (dirp->dd_size <= 0) return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 2022444: c2 06 20 08 ld [ %i0 + 8 ], %g1 2022448: 80 a0 40 02 cmp %g1, %g2 202244c: 24 bf ff fa ble,a 2022434 2022450: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_loc = 0; continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 2022454: 88 02 40 02 add %o1, %g2, %g4 if ((intptr_t)dp & 03) /* bogus pointer check */ 2022458: 80 89 20 03 btst 3, %g4 202245c: 32 80 00 1c bne,a 20224cc 2022460: 88 10 20 00 clr %g4 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 2022464: c6 11 20 08 lduh [ %g4 + 8 ], %g3 2022468: 80 a0 e0 00 cmp %g3, 0 202246c: 02 80 00 17 be 20224c8 2022470: 9a 00 80 03 add %g2, %g3, %o5 2022474: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2022478: 82 00 60 01 inc %g1 202247c: 82 20 40 02 sub %g1, %g2, %g1 2022480: 80 a0 c0 01 cmp %g3, %g1 2022484: 34 80 00 12 bg,a 20224cc 2022488: 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; 202248c: da 26 20 04 st %o5, [ %i0 + 4 ] if (dp->d_ino == 0) 2022490: c2 01 00 00 ld [ %g4 ], %g1 2022494: 80 a0 60 00 cmp %g1, 0 2022498: 22 bf ff e8 be,a 2022438 202249c: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED continue; return (dp); } } 20224a0: 81 c7 e0 08 ret 20224a4: 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, 20224a8: 40 00 32 ea call 202f050 20224ac: d4 06 20 10 ld [ %i0 + 0x10 ], %o2 dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 20224b0: 80 a2 20 00 cmp %o0, 0 20224b4: 04 80 00 05 ble 20224c8 20224b8: d0 26 20 08 st %o0, [ %i0 + 8 ] 20224bc: c4 06 20 04 ld [ %i0 + 4 ], %g2 20224c0: 10 bf ff e1 b 2022444 20224c4: 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) 20224c8: 88 10 20 00 clr %g4 continue; return (dp); } } 20224cc: 81 c7 e0 08 ret 20224d0: 91 e8 00 04 restore %g0, %g4, %o0 020224d4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 20224d4: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 20224d8: 80 a6 60 00 cmp %i1, 0 20224dc: 02 80 00 27 be 2022578 20224e0: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 20224e4: a0 07 bf e8 add %fp, -24, %l0 20224e8: 92 10 20 00 clr %o1 20224ec: 94 10 00 10 mov %l0, %o2 20224f0: 96 10 20 00 clr %o3 20224f4: 7f ff 88 42 call 20045fc 20224f8: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 20224fc: 80 a2 20 00 cmp %o0, 0 2022500: 12 80 00 1c bne 2022570 2022504: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 2022508: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 202250c: 80 a0 60 00 cmp %g1, 0 2022510: 22 80 00 31 be,a 20225d4 2022514: 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 ){ 2022518: 9f c0 40 00 call %g1 202251c: 90 10 00 10 mov %l0, %o0 2022520: 80 a2 20 04 cmp %o0, 4 2022524: 12 80 00 1b bne 2022590 2022528: 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 ){ 202252c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 2022530: 80 a0 60 00 cmp %g1, 0 2022534: 02 80 00 27 be 20225d0 2022538: 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 ); 202253c: 94 10 00 1a mov %i2, %o2 2022540: 9f c0 40 00 call %g1 2022544: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2022548: c2 07 bf f0 ld [ %fp + -16 ], %g1 202254c: 80 a0 60 00 cmp %g1, 0 2022550: 02 80 00 08 be 2022570 2022554: b0 10 00 08 mov %o0, %i0 2022558: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 202255c: 80 a0 60 00 cmp %g1, 0 2022560: 02 80 00 26 be 20225f8 2022564: 01 00 00 00 nop 2022568: 9f c0 40 00 call %g1 202256c: 90 10 00 10 mov %l0, %o0 return result; } 2022570: 81 c7 e0 08 ret 2022574: 81 e8 00 00 restore { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 2022578: 40 00 3c b8 call 2031858 <__errno> <== NOT EXECUTED 202257c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2022580: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 2022584: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2022588: 81 c7 e0 08 ret <== NOT EXECUTED 202258c: 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 ); 2022590: c2 07 bf f0 ld [ %fp + -16 ], %g1 2022594: 80 a0 60 00 cmp %g1, 0 2022598: 02 80 00 08 be 20225b8 202259c: 01 00 00 00 nop 20225a0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20225a4: 80 a0 60 00 cmp %g1, 0 20225a8: 02 80 00 04 be 20225b8 20225ac: 01 00 00 00 nop 20225b0: 9f c0 40 00 call %g1 20225b4: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 20225b8: 40 00 3c a8 call 2031858 <__errno> 20225bc: b0 10 3f ff mov -1, %i0 20225c0: 82 10 20 16 mov 0x16, %g1 20225c4: c2 22 00 00 st %g1, [ %o0 ] 20225c8: 81 c7 e0 08 ret 20225cc: 81 e8 00 00 restore } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 20225d0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 20225d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20225d8: 02 80 00 04 be 20225e8 <== NOT EXECUTED 20225dc: 01 00 00 00 nop <== NOT EXECUTED 20225e0: 9f c0 40 00 call %g1 <== NOT EXECUTED 20225e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20225e8: 40 00 3c 9c call 2031858 <__errno> <== NOT EXECUTED 20225ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20225f0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20225f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20225f8: 81 c7 e0 08 ret <== NOT EXECUTED 20225fc: 81 e8 00 00 restore <== NOT EXECUTED 02015724 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 2015724: 9d e3 bf 90 save %sp, -112, %sp 2015728: 03 00 80 60 sethi %hi(0x2018000), %g1 201572c: a2 10 60 58 or %g1, 0x58, %l1 ! 2018058 2015730: 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())) { 2015734: 03 00 80 60 sethi %hi(0x2018000), %g1 2015738: c6 00 63 74 ld [ %g1 + 0x374 ], %g3 ! 2018374 <_System_state_Current> { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 201573c: 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())) { 2015740: 80 a0 e0 03 cmp %g3, 3 2015744: 02 80 00 3b be 2015830 2015748: c4 24 60 10 st %g2, [ %l1 + 0x10 ] } /* * Continue with realloc(). */ if ( !ptr ) 201574c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 2015750: 02 80 00 13 be 201579c 2015754: 80 a6 60 00 cmp %i1, 0 return malloc( size ); if ( !size ) { 2015758: 02 80 00 2b be 2015804 201575c: 21 00 80 60 sethi %hi(0x2018000), %l0 free( ptr ); return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 2015760: 92 10 00 18 mov %i0, %o1 2015764: 90 14 20 00 mov %l0, %o0 2015768: 40 00 00 78 call 2015948 <_Protected_heap_Get_block_size> 201576c: 94 07 bf f4 add %fp, -12, %o2 2015770: 80 8a 20 ff btst 0xff, %o0 2015774: 02 80 00 29 be 2015818 2015778: 90 14 20 00 mov %l0, %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 ) ) { 201577c: 92 10 00 18 mov %i0, %o1 2015780: 40 00 00 7f call 201597c <_Protected_heap_Resize_block> 2015784: 94 10 00 19 mov %i1, %o2 2015788: 80 8a 20 ff btst 0xff, %o0 201578c: 02 80 00 08 be 20157ac 2015790: 01 00 00 00 nop memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 2015794: 81 c7 e0 08 ret 2015798: 81 e8 00 00 restore /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 201579c: 7f ff d5 d3 call 200aee8 <== NOT EXECUTED 20157a0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 20157a4: 81 c7 e0 08 ret <== NOT EXECUTED 20157a8: 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 ); 20157ac: 7f ff d5 cf call 200aee8 20157b0: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 20157b4: 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 ); 20157b8: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 20157bc: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 20157c0: 80 a2 20 00 cmp %o0, 0 20157c4: 02 80 00 24 be 2015854 20157c8: c2 24 60 04 st %g1, [ %l1 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 20157cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 20157d0: 80 a6 40 01 cmp %i1, %g1 20157d4: 08 80 00 03 bleu 20157e0 20157d8: 90 10 00 19 mov %i1, %o0 20157dc: 90 10 00 01 mov %g1, %o0 20157e0: 94 10 00 08 mov %o0, %o2 20157e4: 92 10 00 18 mov %i0, %o1 20157e8: 7f ff e2 85 call 200e1fc 20157ec: 90 10 00 10 mov %l0, %o0 free( ptr ); 20157f0: 90 10 00 18 mov %i0, %o0 20157f4: 7f ff d4 3e call 200a8ec 20157f8: b0 10 00 10 mov %l0, %i0 20157fc: 81 c7 e0 08 ret 2015800: 81 e8 00 00 restore */ if ( !ptr ) return malloc( size ); if ( !size ) { free( ptr ); 2015804: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2015808: 7f ff d4 39 call 200a8ec <== NOT EXECUTED 201580c: b0 10 20 00 clr %i0 <== NOT EXECUTED 2015810: 81 c7 e0 08 ret <== NOT EXECUTED 2015814: 81 e8 00 00 restore <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 2015818: 7f ff e0 87 call 200da34 <__errno> 201581c: b0 10 20 00 clr %i0 2015820: 82 10 20 16 mov 0x16, %g1 2015824: c2 22 00 00 st %g1, [ %o0 ] 2015828: 81 c7 e0 08 ret 201582c: 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) 2015830: 03 00 80 60 sethi %hi(0x2018000), %g1 2015834: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20181d0 <_Thread_Dispatch_disable_level> 2015838: 80 a0 a0 00 cmp %g2, 0 201583c: 12 80 00 06 bne 2015854 2015840: 03 00 80 60 sethi %hi(0x2018000), %g1 return (void *) 0; if (_ISR_Nest_level > 0) 2015844: c4 00 62 70 ld [ %g1 + 0x270 ], %g2 ! 2018270 <_ISR_Nest_level> 2015848: 80 a0 a0 00 cmp %g2, 0 201584c: 02 bf ff c1 be 2015750 2015850: 80 a6 20 00 cmp %i0, 0 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 2015854: 81 c7 e0 08 ret <== NOT EXECUTED 2015858: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02022738 : #include int rmdir( const char *pathname ) { 2022738: 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 ); 202273c: 92 10 20 00 clr %o1 2022740: 90 10 00 18 mov %i0, %o0 2022744: a0 07 bf e8 add %fp, -24, %l0 2022748: 96 10 20 00 clr %o3 202274c: 7f ff 87 ac call 20045fc 2022750: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 2022754: 80 a2 20 00 cmp %o0, 0 2022758: 02 80 00 04 be 2022768 202275c: 90 10 20 02 mov 2, %o0 result = (*loc.handlers->rmnod_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 2022760: 81 c7 e0 08 ret 2022764: 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 ); 2022768: 7f ff 87 75 call 200453c 202276c: 92 10 00 10 mov %l0, %o1 if (result != 0) { 2022770: 80 a2 20 00 cmp %o0, 0 2022774: 12 80 00 2d bne 2022828 2022778: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 202277c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 2022780: 80 a0 60 00 cmp %g1, 0 2022784: 22 80 00 35 be,a 2022858 2022788: 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 ){ 202278c: 9f c0 40 00 call %g1 2022790: 90 10 00 10 mov %l0, %o0 2022794: 80 a2 20 01 cmp %o0, 1 2022798: 12 80 00 14 bne 20227e8 202279c: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 20227a0: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 20227a4: 80 a0 60 00 cmp %g1, 0 20227a8: 22 80 00 37 be,a 2022884 20227ac: 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 ); 20227b0: 9f c0 40 00 call %g1 20227b4: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 20227b8: c2 07 bf f0 ld [ %fp + -16 ], %g1 20227bc: 80 a0 60 00 cmp %g1, 0 20227c0: 02 80 00 08 be 20227e0 20227c4: b0 10 00 08 mov %o0, %i0 20227c8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20227cc: 80 a0 60 00 cmp %g1, 0 20227d0: 02 80 00 2b be 202287c 20227d4: 01 00 00 00 nop 20227d8: 9f c0 40 00 call %g1 20227dc: 90 10 00 10 mov %l0, %o0 20227e0: 81 c7 e0 08 ret 20227e4: 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 ); 20227e8: c2 07 bf f0 ld [ %fp + -16 ], %g1 20227ec: 80 a0 60 00 cmp %g1, 0 20227f0: 02 80 00 08 be 2022810 20227f4: 01 00 00 00 nop 20227f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 20227fc: 80 a0 60 00 cmp %g1, 0 2022800: 02 80 00 04 be 2022810 2022804: 01 00 00 00 nop 2022808: 9f c0 40 00 call %g1 202280c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 2022810: 40 00 3c 12 call 2031858 <__errno> 2022814: b0 10 3f ff mov -1, %i0 2022818: 82 10 20 14 mov 0x14, %g1 202281c: c2 22 00 00 st %g1, [ %o0 ] 2022820: 81 c7 e0 08 ret 2022824: 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 ); 2022828: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 202282c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022830: 02 bf ff ec be 20227e0 <== NOT EXECUTED 2022834: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2022838: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 202283c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022840: 02 bf ff e8 be 20227e0 <== NOT EXECUTED 2022844: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2022848: 9f c0 40 00 call %g1 <== NOT EXECUTED 202284c: 01 00 00 00 nop <== NOT EXECUTED 2022850: 81 c7 e0 08 ret <== NOT EXECUTED 2022854: 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 ); 2022858: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202285c: 02 80 00 04 be 202286c <== NOT EXECUTED 2022860: 01 00 00 00 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 2022864: 9f c0 40 00 call %g1 <== NOT EXECUTED 2022868: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 202286c: 40 00 3b fb call 2031858 <__errno> <== NOT EXECUTED 2022870: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2022874: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2022878: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 202287c: 81 c7 e0 08 ret <== NOT EXECUTED 2022880: 81 e8 00 00 restore <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 2022884: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022888: 02 bf ff f9 be 202286c <== NOT EXECUTED 202288c: 01 00 00 00 nop <== NOT EXECUTED 2022890: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2022894: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022898: 12 bf ff f3 bne 2022864 <== NOT EXECUTED 202289c: 01 00 00 00 nop <== NOT EXECUTED 20228a0: 30 bf ff f3 b,a 202286c <== NOT EXECUTED 02017864 : const char * rtems_assoc_name_bad( uint32_t bad_value ) { 2017864: 11 00 80 a0 sethi %hi(0x2028000), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 2017868: 81 c3 e0 08 retl <== NOT EXECUTED 201786c: 90 12 22 f8 or %o0, 0x2f8, %o0 ! 20282f8 <== NOT EXECUTED 02012c20 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 2012c20: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 2012c24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2012c28: 40 00 00 0b call 2012c54 <== NOT EXECUTED 2012c2c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 2012c30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2012c34: 02 80 00 05 be 2012c48 <== NOT EXECUTED 2012c38: 01 00 00 00 nop <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 2012c3c: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED 2012c40: 81 c7 e0 08 ret <== NOT EXECUTED 2012c44: 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); 2012c48: 40 00 13 07 call 2017864 <== NOT EXECUTED 2012c4c: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 2012c50: 01 00 00 00 nop 0200d944 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 200d944: 9d e3 bf 98 save %sp, -104, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 200d948: d0 06 00 00 ld [ %i0 ], %o0 200d94c: 80 a2 20 00 cmp %o0, 0 200d950: 02 80 00 1d be 200d9c4 200d954: 13 00 80 5b sethi %hi(0x2016c00), %o1 200d958: 40 00 05 07 call 200ed74 200d95c: 92 12 60 10 or %o1, 0x10, %o1 ! 2016c10 <__func__.5619+0x18> 200d960: 80 a2 20 00 cmp %o0, 0 200d964: 02 80 00 11 be 200d9a8 200d968: 86 10 20 00 clr %g3 default_ap = ap++; for ( ; ap->name; ap++) if (ap->local_value == local_value) 200d96c: c2 06 20 04 ld [ %i0 + 4 ], %g1 200d970: 80 a0 40 19 cmp %g1, %i1 200d974: 32 80 00 07 bne,a 200d990 200d978: b0 06 20 0c add %i0, 0xc, %i0 200d97c: 30 80 00 14 b,a 200d9cc 200d980: 80 a0 40 19 cmp %g1, %i1 200d984: 02 80 00 12 be 200d9cc 200d988: 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++) 200d98c: b0 06 20 0c add %i0, 0xc, %i0 200d990: c2 06 00 00 ld [ %i0 ], %g1 200d994: 80 a0 60 00 cmp %g1, 0 200d998: 32 bf ff fa bne,a 200d980 200d99c: c2 06 20 04 ld [ %i0 + 4 ], %g1 if (ap->local_value == local_value) return ap; return default_ap; } 200d9a0: 81 c7 e0 08 ret 200d9a4: 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++) 200d9a8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 200d9ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200d9b0: 02 80 00 07 be 200d9cc <== NOT EXECUTED 200d9b4: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED 200d9b8: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED 200d9bc: 10 bf ff ec b 200d96c <== NOT EXECUTED 200d9c0: 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)) 200d9c4: 81 c7 e0 08 ret <== NOT EXECUTED 200d9c8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 200d9cc: 81 c7 e0 08 ret 200d9d0: 81 e8 00 00 restore 0200cf30 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 200cf30: 9d e3 bf 98 save %sp, -104, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 200cf34: d0 06 00 00 ld [ %i0 ], %o0 200cf38: 80 a2 20 00 cmp %o0, 0 200cf3c: 02 80 00 1d be 200cfb0 200cf40: 13 00 80 5b sethi %hi(0x2016c00), %o1 200cf44: 40 00 07 8c call 200ed74 200cf48: 92 12 60 10 or %o1, 0x10, %o1 ! 2016c10 <__func__.5619+0x18> 200cf4c: 80 a2 20 00 cmp %o0, 0 200cf50: 02 80 00 11 be 200cf94 200cf54: 86 10 20 00 clr %g3 default_ap = ap++; for ( ; ap->name; ap++) if (ap->remote_value == remote_value) 200cf58: c2 06 20 08 ld [ %i0 + 8 ], %g1 200cf5c: 80 a0 40 19 cmp %g1, %i1 200cf60: 32 80 00 07 bne,a 200cf7c 200cf64: b0 06 20 0c add %i0, 0xc, %i0 200cf68: 30 80 00 14 b,a 200cfb8 200cf6c: 80 a0 40 19 cmp %g1, %i1 200cf70: 02 80 00 12 be 200cfb8 200cf74: 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++) 200cf78: b0 06 20 0c add %i0, 0xc, %i0 200cf7c: c2 06 00 00 ld [ %i0 ], %g1 200cf80: 80 a0 60 00 cmp %g1, 0 200cf84: 32 bf ff fa bne,a 200cf6c 200cf88: c2 06 20 08 ld [ %i0 + 8 ], %g1 if (ap->remote_value == remote_value) return ap; return default_ap; } 200cf8c: 81 c7 e0 08 ret 200cf90: 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++) 200cf94: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 200cf98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200cf9c: 02 80 00 07 be 200cfb8 <== NOT EXECUTED 200cfa0: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED 200cfa4: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED 200cfa8: 10 bf ff ec b 200cf58 <== NOT EXECUTED 200cfac: 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)) 200cfb0: 81 c7 e0 08 ret <== NOT EXECUTED 200cfb4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 200cfb8: 81 c7 e0 08 ret 200cfbc: 81 e8 00 00 restore 0200cfc0 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 200cfc0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 200cfc4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 200cfc8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 200cfcc: 40 00 02 5e call 200d944 <== NOT EXECUTED 200cfd0: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 200cfd4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200cfd8: 32 80 00 02 bne,a 200cfe0 <== NOT EXECUTED 200cfdc: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 200cfe0: 81 c7 e0 08 ret <== NOT EXECUTED 200cfe4: 81 e8 00 00 restore <== NOT EXECUTED 02002a38 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 2002a38: 9d e3 bf 60 save %sp, -160, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 2002a3c: 80 a6 60 00 cmp %i1, 0 2002a40: 02 80 00 6e be 2002bf8 2002a44: 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 ); 2002a48: 40 00 15 2e call 2007f00 <_TOD_Get_uptime> 2002a4c: 90 07 bf e8 add %fp, -24, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 2002a50: 92 07 bf e8 add %fp, -24, %o1 2002a54: b4 07 bf e0 add %fp, -32, %i2 2002a58: 11 00 80 94 sethi %hi(0x2025000), %o0 2002a5c: 94 10 00 1a mov %i2, %o2 2002a60: 40 00 1f c0 call 200a960 <_Timespec_Subtract> 2002a64: 90 12 21 c8 or %o0, 0x1c8, %o0 } } } #endif (*print)( context, "CPU Usage by thread\n" 2002a68: 90 10 00 18 mov %i0, %o0 2002a6c: 13 00 80 68 sethi %hi(0x201a000), %o1 2002a70: 9f c6 40 00 call %i1 2002a74: 92 12 62 18 or %o1, 0x218, %o1 ! 201a218 2002a78: 03 00 80 92 sethi %hi(0x2024800), %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 2002a7c: 05 00 80 68 sethi %hi(0x201a000), %g2 } } } #endif (*print)( context, "CPU Usage by thread\n" 2002a80: a6 10 63 74 or %g1, 0x374, %l3 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( 2002a84: b6 10 a2 60 or %g2, 0x260, %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 ) { 2002a88: 03 00 80 93 sethi %hi(0x2024c00), %g1 /* * Print the information */ (*print)( context, 2002a8c: 05 00 80 68 sethi %hi(0x201a000), %g2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2002a90: 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 ) { 2002a94: b8 10 60 d4 or %g1, 0xd4, %i4 /* * Print the information */ (*print)( context, 2002a98: ba 10 a2 78 or %g2, 0x278, %i5 2002a9c: 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 ); 2002aa0: ae 07 bf f4 add %fp, -12, %l7 2002aa4: 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 ] ) 2002aa8: c2 04 c0 00 ld [ %l3 ], %g1 2002aac: 80 a0 60 00 cmp %g1, 0 2002ab0: 22 80 00 44 be,a 2002bc0 2002ab4: a6 04 e0 04 add %l3, 4, %l3 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2002ab8: e4 00 60 04 ld [ %g1 + 4 ], %l2 if ( information ) { 2002abc: 80 a4 a0 00 cmp %l2, 0 2002ac0: 22 80 00 40 be,a 2002bc0 2002ac4: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 2002ac8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 2002acc: 86 90 60 00 orcc %g1, 0, %g3 2002ad0: 02 80 00 3b be 2002bbc 2002ad4: a2 10 20 01 mov 1, %l1 the_thread = (Thread_Control *)information->local_table[ i ]; 2002ad8: 10 80 00 17 b 2002b34 2002adc: 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 ); 2002ae0: 96 10 00 16 mov %l6, %o3 2002ae4: 90 10 00 15 mov %l5, %o0 2002ae8: 40 00 1f 0b call 200a714 <_Timespec_Divide> 2002aec: 92 10 00 1a mov %i2, %o1 /* * Print the information */ (*print)( context, 2002af0: d0 07 bf dc ld [ %fp + -36 ], %o0 2002af4: 40 00 54 80 call 2017cf4 <.udiv> 2002af8: 92 10 23 e8 mov 0x3e8, %o1 2002afc: d4 07 bf d8 ld [ %fp + -40 ], %o2 2002b00: d8 07 bf f4 ld [ %fp + -12 ], %o4 2002b04: da 07 bf f0 ld [ %fp + -16 ], %o5 2002b08: 96 10 00 08 mov %o0, %o3 2002b0c: 92 10 00 1d mov %i5, %o1 2002b10: 9f c6 40 00 call %i1 2002b14: 90 10 00 18 mov %i0, %o0 2002b18: 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++ ) { 2002b1c: 83 28 e0 10 sll %g3, 0x10, %g1 2002b20: 83 30 60 10 srl %g1, 0x10, %g1 2002b24: 80 a0 40 11 cmp %g1, %l1 2002b28: 2a 80 00 26 bcs,a 2002bc0 2002b2c: a6 04 e0 04 add %l3, 4, %l3 the_thread = (Thread_Control *)information->local_table[ i ]; 2002b30: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2 2002b34: 83 2c 60 02 sll %l1, 2, %g1 2002b38: e0 00 80 01 ld [ %g2 + %g1 ], %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2002b3c: 94 10 00 14 mov %l4, %o2 2002b40: 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 ) 2002b44: 80 a4 20 00 cmp %l0, 0 2002b48: 02 bf ff f5 be 2002b1c 2002b4c: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2002b50: 40 00 0f 7e call 2006948 2002b54: d0 04 20 08 ld [ %l0 + 8 ], %o0 (*print)( 2002b58: d4 04 20 08 ld [ %l0 + 8 ], %o2 2002b5c: 90 10 00 18 mov %i0, %o0 2002b60: 92 10 00 1b mov %i3, %o1 2002b64: 9f c6 40 00 call %i1 2002b68: 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; 2002b6c: c4 04 20 84 ld [ %l0 + 0x84 ], %g2 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2002b70: 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; 2002b74: c4 27 bf d8 st %g2, [ %fp + -40 ] 2002b78: c2 04 20 88 ld [ %l0 + 0x88 ], %g1 2002b7c: c2 27 bf dc st %g1, [ %fp + -36 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2002b80: c4 00 e0 08 ld [ %g3 + 8 ], %g2 2002b84: c2 04 20 08 ld [ %l0 + 8 ], %g1 2002b88: 80 a0 80 01 cmp %g2, %g1 2002b8c: 32 bf ff d5 bne,a 2002ae0 2002b90: 94 10 00 17 mov %l7, %o2 struct timespec used; _Timespec_Subtract( 2002b94: 92 07 bf e8 add %fp, -24, %o1 2002b98: 94 07 bf d0 add %fp, -48, %o2 2002b9c: 11 00 80 93 sethi %hi(0x2024c00), %o0 2002ba0: 40 00 1f 70 call 200a960 <_Timespec_Subtract> 2002ba4: 90 12 20 dc or %o0, 0xdc, %o0 ! 2024cdc <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 2002ba8: 90 10 00 15 mov %l5, %o0 2002bac: 40 00 1e c0 call 200a6ac <_Timespec_Add_to> 2002bb0: 92 07 bf d0 add %fp, -48, %o1 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 2002bb4: 10 bf ff cb b 2002ae0 2002bb8: 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++ ) { 2002bbc: a6 04 e0 04 add %l3, 4, %l3 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2002bc0: 03 00 80 92 sethi %hi(0x2024800), %g1 2002bc4: 82 10 63 84 or %g1, 0x384, %g1 ! 2024b84 <_Objects_Information_table+0x14> 2002bc8: 80 a4 c0 01 cmp %l3, %g1 2002bcc: 32 bf ff b8 bne,a 2002aac 2002bd0: c2 04 c0 00 ld [ %l3 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 2002bd4: d0 07 bf e4 ld [ %fp + -28 ], %o0 2002bd8: 40 00 54 47 call 2017cf4 <.udiv> 2002bdc: 92 10 23 e8 mov 0x3e8, %o1 2002be0: d4 07 bf e0 ld [ %fp + -32 ], %o2 2002be4: 96 10 00 08 mov %o0, %o3 2002be8: 13 00 80 68 sethi %hi(0x201a000), %o1 2002bec: 90 10 00 18 mov %i0, %o0 2002bf0: 9f c6 40 00 call %i1 2002bf4: 92 12 62 90 or %o1, 0x290, %o1 2002bf8: 81 c7 e0 08 ret 2002bfc: 81 e8 00 00 restore 0200cae8 : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 200cae8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) 200caec: 11 00 80 5a sethi %hi(0x2016800), %o0 <== NOT EXECUTED 200caf0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 200caf4: 40 00 01 33 call 200cfc0 <== NOT EXECUTED 200caf8: 90 12 22 ec or %o0, 0x2ec, %o0 <== NOT EXECUTED 200cafc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 200cb00: 02 80 00 05 be 200cb14 <== NOT EXECUTED 200cb04: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 200cb08: 40 00 03 cb call 200da34 <__errno> <== NOT EXECUTED 200cb0c: 01 00 00 00 nop <== NOT EXECUTED 200cb10: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 200cb14: 81 c7 e0 08 ret <== NOT EXECUTED 200cb18: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 02007e40 : int rtems_error( int error_flag, const char *printf_format, ... ) { 2007e40: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 2007e44: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 2007e48: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 2007e4c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 2007e50: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 2007e54: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 2007e58: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2007e5c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2007e60: 7f ff ff 71 call 2007c24 <== NOT EXECUTED 2007e64: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 2007e68: 81 c7 e0 08 ret <== NOT EXECUTED 2007e6c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02001f60 : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 2001f60: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 2001f64: 80 a6 60 00 cmp %i1, 0 2001f68: 02 80 00 28 be 2002008 2001f6c: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 2001f70: c8 06 60 08 ld [ %i1 + 8 ], %g4 2001f74: da 01 00 00 ld [ %g4 ], %o5 2001f78: 80 a3 60 00 cmp %o5, 0 2001f7c: 02 80 00 1d be 2001ff0 2001f80: 11 00 80 59 sethi %hi(0x2016400), %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 2001f84: c6 06 60 0c ld [ %i1 + 0xc ], %g3 2001f88: c2 06 40 00 ld [ %i1 ], %g1 2001f8c: c4 06 60 04 ld [ %i1 + 4 ], %g2 2001f90: c2 27 bf e8 st %g1, [ %fp + -24 ] 2001f94: c4 27 bf ec st %g2, [ %fp + -20 ] 2001f98: c8 27 bf f0 st %g4, [ %fp + -16 ] 2001f9c: c6 27 bf f4 st %g3, [ %fp + -12 ] result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 2001fa0: b2 07 bf e8 add %fp, -24, %i1 2001fa4: 90 12 20 50 or %o0, 0x50, %o0 2001fa8: 9f c3 40 00 call %o5 2001fac: 94 10 00 19 mov %i1, %o2 if (result != 0){ 2001fb0: b0 92 20 00 orcc %o0, 0, %i0 2001fb4: 12 80 00 0d bne 2001fe8 2001fb8: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; } rtems_filesystem_freenode( &parent ); 2001fbc: 80 a0 60 00 cmp %g1, 0 2001fc0: 02 80 00 16 be 2002018 2001fc4: 01 00 00 00 nop 2001fc8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2001fcc: 80 a0 60 00 cmp %g1, 0 2001fd0: 02 80 00 12 be 2002018 2001fd4: 01 00 00 00 nop 2001fd8: 9f c0 40 00 call %g1 2001fdc: 90 10 00 19 mov %i1, %o0 return result; } 2001fe0: 81 c7 e0 08 ret 2001fe4: 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){ 2001fe8: 81 c7 e0 08 ret <== NOT EXECUTED 2001fec: 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 ); 2001ff0: 40 00 2e 91 call 200da34 <__errno> <== NOT EXECUTED 2001ff4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2001ff8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2001ffc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002000: 81 c7 e0 08 ret <== NOT EXECUTED 2002004: 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 */ 2002008: 40 00 2e 8b call 200da34 <__errno> <== NOT EXECUTED 200200c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002010: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 2002014: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002018: 81 c7 e0 08 ret <== NOT EXECUTED 200201c: 81 e8 00 00 restore <== NOT EXECUTED 02002020 : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 2002020: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 2002024: 80 a6 20 00 cmp %i0, 0 2002028: 02 80 00 50 be 2002168 200202c: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 2002030: 02 80 00 54 be 2002180 2002034: 01 00 00 00 nop /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 2002038: c2 4e 00 00 ldsb [ %i0 ], %g1 200203c: 80 a0 60 2f cmp %g1, 0x2f 2002040: 02 80 00 06 be 2002058 2002044: 80 a0 60 5c cmp %g1, 0x5c 2002048: 02 80 00 04 be 2002058 200204c: 80 a0 60 00 cmp %g1, 0 2002050: 12 80 00 27 bne 20020ec 2002054: 03 00 80 5e sethi %hi(0x2017800), %g1 2002058: 03 00 80 5e sethi %hi(0x2017800), %g1 200205c: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 ! 2017814 2002060: 88 10 20 01 mov 1, %g4 2002064: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 2002068: c2 26 80 00 st %g1, [ %i2 ] 200206c: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 2002070: c4 26 a0 04 st %g2, [ %i2 + 4 ] 2002074: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 2002078: c2 26 a0 08 st %g1, [ %i2 + 8 ] 200207c: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 2002080: c4 26 a0 0c st %g2, [ %i2 + 0xc ] if ( !pathloc->ops->evalpath_h ) 2002084: c2 06 a0 08 ld [ %i2 + 8 ], %g1 2002088: c2 00 40 00 ld [ %g1 ], %g1 200208c: 80 a0 60 00 cmp %g1, 0 2002090: 02 80 00 30 be 2002150 2002094: 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 ); 2002098: 92 10 00 19 mov %i1, %o1 200209c: 9f c0 40 00 call %g1 20020a0: 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 ) { 20020a4: b0 92 20 00 orcc %o0, 0, %i0 20020a8: 12 80 00 0f bne 20020e4 20020ac: 80 a6 e0 00 cmp %i3, 0 20020b0: 02 80 00 38 be 2002190 20020b4: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 20020b8: c4 06 a0 08 ld [ %i2 + 8 ], %g2 20020bc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 20020c0: 80 a0 60 00 cmp %g1, 0 20020c4: 22 80 00 1e be,a 200213c 20020c8: 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 ); 20020cc: 9f c0 40 00 call %g1 20020d0: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 20020d4: 90 02 3f fd add %o0, -3, %o0 20020d8: 80 a2 20 01 cmp %o0, 1 20020dc: 28 80 00 0f bleu,a 2002118 20020e0: c4 06 a0 08 ld [ %i2 + 8 ], %g2 } } return result; } 20020e4: 81 c7 e0 08 ret 20020e8: 81 e8 00 00 restore /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 20020ec: c6 00 60 14 ld [ %g1 + 0x14 ], %g3 20020f0: 88 10 20 00 clr %g4 20020f4: c2 00 e0 04 ld [ %g3 + 4 ], %g1 20020f8: c2 26 80 00 st %g1, [ %i2 ] 20020fc: c4 00 e0 08 ld [ %g3 + 8 ], %g2 2002100: c4 26 a0 04 st %g2, [ %i2 + 4 ] 2002104: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 2002108: c2 26 a0 08 st %g1, [ %i2 + 8 ] 200210c: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 2002110: 10 bf ff dd b 2002084 2002114: 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 ){ 2002118: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 200211c: 80 a0 60 00 cmp %g1, 0 2002120: 02 80 00 06 be 2002138 2002124: 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 ); 2002128: 9f c0 40 00 call %g1 200212c: 92 10 00 19 mov %i1, %o1 } } return result; } 2002130: 81 c7 e0 08 ret 2002134: 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 ); 2002138: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 200213c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2002140: 02 80 00 04 be 2002150 <== NOT EXECUTED 2002144: 01 00 00 00 nop <== NOT EXECUTED 2002148: 9f c0 40 00 call %g1 <== NOT EXECUTED 200214c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2002150: 40 00 2e 39 call 200da34 <__errno> <== NOT EXECUTED 2002154: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002158: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 200215c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002160: 81 c7 e0 08 ret <== NOT EXECUTED 2002164: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 2002168: 40 00 2e 33 call 200da34 <__errno> 200216c: b0 10 3f ff mov -1, %i0 2002170: 82 10 20 0e mov 0xe, %g1 2002174: c2 22 00 00 st %g1, [ %o0 ] 2002178: 81 c7 e0 08 ret 200217c: 81 e8 00 00 restore if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 2002180: 40 00 2e 2d call 200da34 <__errno> <== NOT EXECUTED 2002184: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2002188: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 200218c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2002190: 81 c7 e0 08 ret 2002194: 81 e8 00 00 restore 0200a698 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 200a698: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 200a69c: 25 00 80 5e sethi %hi(0x2017800), %l2 200a6a0: c4 04 a0 14 ld [ %l2 + 0x14 ], %g2 ! 2017814 200a6a4: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 200a6a8: 40 00 02 59 call 200b00c 200a6ac: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 200a6b0: 03 00 80 57 sethi %hi(0x2015c00), %g1 200a6b4: c4 00 63 8c ld [ %g1 + 0x38c ], %g2 ! 2015f8c 200a6b8: 80 a0 a0 00 cmp %g2, 0 200a6bc: 02 80 00 3d be 200a7b0 200a6c0: 03 00 80 5c sethi %hi(0x2017000), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 200a6c4: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 2017300 status = mount( 200a6c8: 90 07 bf f4 add %fp, -12, %o0 200a6cc: d8 00 a0 0c ld [ %g2 + 0xc ], %o4 200a6d0: d2 00 80 00 ld [ %g2 ], %o1 200a6d4: d4 00 a0 04 ld [ %g2 + 4 ], %o2 200a6d8: 40 00 02 55 call 200b02c 200a6dc: d6 00 a0 08 ld [ %g2 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 200a6e0: 80 a2 3f ff cmp %o0, -1 200a6e4: 02 80 00 36 be 200a7bc 200a6e8: c8 07 bf f4 ld [ %fp + -12 ], %g4 rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 200a6ec: c2 04 a0 14 ld [ %l2 + 0x14 ], %g1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 200a6f0: 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; 200a6f4: 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; 200a6f8: c4 20 60 14 st %g2, [ %g1 + 0x14 ] 200a6fc: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a700: 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; 200a704: c6 20 60 18 st %g3, [ %g1 + 0x18 ] 200a708: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a70c: 23 00 80 59 sethi %hi(0x2016400), %l1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 200a710: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 200a714: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a718: 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; 200a71c: c6 20 60 20 st %g3, [ %g1 + 0x20 ] /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a720: 94 10 00 10 mov %l0, %o2 200a724: 96 10 20 00 clr %o3 200a728: 7f ff de 3e call 2002020 200a72c: 90 14 63 c0 or %l1, 0x3c0, %o0 rtems_filesystem_root = loc; 200a730: c4 04 a0 14 ld [ %l2 + 0x14 ], %g2 200a734: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a738: 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; 200a73c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 200a740: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a744: 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; 200a748: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 200a74c: c2 07 bf ec ld [ %fp + -20 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a750: 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; 200a754: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 200a758: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 200a75c: 90 14 63 c0 or %l1, 0x3c0, %o0 200a760: 7f ff de 30 call 2002020 200a764: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 200a768: c2 07 bf e4 ld [ %fp + -28 ], %g1 200a76c: c6 04 a0 14 ld [ %l2 + 0x14 ], %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); 200a770: 11 00 80 59 sethi %hi(0x2016400), %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; 200a774: c2 20 e0 04 st %g1, [ %g3 + 4 ] 200a778: 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); 200a77c: 90 12 23 c8 or %o0, 0x3c8, %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; 200a780: c2 20 e0 08 st %g1, [ %g3 + 8 ] 200a784: 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); 200a788: 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; 200a78c: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 200a790: 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); 200a794: 40 00 02 14 call 200afe4 200a798: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] if ( status != 0 ) 200a79c: 80 a2 20 00 cmp %o0, 0 200a7a0: 12 80 00 0a bne 200a7c8 200a7a4: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 200a7a8: 81 c7 e0 08 ret 200a7ac: 81 e8 00 00 restore /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 200a7b0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 200a7b4: 7f ff ed cd call 2005ee8 <== NOT EXECUTED 200a7b8: 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 ); 200a7bc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 200a7c0: 7f ff ed ca call 2005ee8 <== NOT EXECUTED 200a7c4: 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 ); 200a7c8: 7f ff ed c8 call 2005ee8 <== NOT EXECUTED 200a7cc: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED 200a7d0: 01 00 00 00 nop 02022d1c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 2022d1c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2022d20: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 2022d24: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 2022d28: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 2022d2c: 81 c3 e0 08 retl <== NOT EXECUTED 2022d30: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 02001dc4 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 2001dc4: 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 ); 2001dc8: 92 10 20 00 clr %o1 <== NOT EXECUTED 2001dcc: a2 07 bf e8 add %fp, -24, %l1 <== NOT EXECUTED 2001dd0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2001dd4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 2001dd8: 40 00 00 92 call 2002020 <== NOT EXECUTED 2001ddc: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 2001de0: 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 ); 2001de4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 2001de8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 2001dec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001df0: 02 80 00 28 be 2001e90 <== NOT EXECUTED 2001df4: 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 ); 2001df8: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001dfc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 2001e00: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 2001e04: 02 80 00 0e be 2001e3c <== NOT EXECUTED 2001e08: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2001e0c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2001e10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001e14: 02 80 00 2b be 2001ec0 <== NOT EXECUTED 2001e18: 01 00 00 00 nop <== NOT EXECUTED 2001e1c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2001e20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001e24: 02 80 00 27 be 2001ec0 <== NOT EXECUTED 2001e28: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2001e2c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001e30: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED 2001e34: 81 c7 e0 08 ret <== NOT EXECUTED 2001e38: 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 ) { 2001e3c: 12 bf ff f5 bne 2001e10 <== NOT EXECUTED 2001e40: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 2001e44: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 2001e48: 40 00 34 1d call 200eebc <== NOT EXECUTED 2001e4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2001e50: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 2001e54: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 2001e58: 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; 2001e5c: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 2001e60: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2001e64: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2001e68: 02 80 00 18 be 2001ec8 <== NOT EXECUTED 2001e6c: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 2001e70: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 2001e74: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001e78: 02 80 00 14 be 2001ec8 <== NOT EXECUTED 2001e7c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2001e80: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001e84: b0 10 20 00 clr %i0 <== NOT EXECUTED 2001e88: 81 c7 e0 08 ret <== NOT EXECUTED 2001e8c: 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 ); 2001e90: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 2001e94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2001e98: 02 80 00 04 be 2001ea8 <== NOT EXECUTED 2001e9c: 01 00 00 00 nop <== NOT EXECUTED 2001ea0: 9f c0 40 00 call %g1 <== NOT EXECUTED 2001ea4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2001ea8: 40 00 2e e3 call 200da34 <__errno> <== NOT EXECUTED 2001eac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2001eb0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2001eb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2001eb8: 81 c7 e0 08 ret <== NOT EXECUTED 2001ebc: 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 ); 2001ec0: 81 c7 e0 08 ret <== NOT EXECUTED 2001ec4: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 2001ec8: 81 c7 e0 08 ret <== NOT EXECUTED 2001ecc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02006f00 : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 2006f00: 9a 92 60 00 orcc %o1, 0, %o5 2006f04: 02 80 00 4d be 2007038 2006f08: 80 a2 a0 00 cmp %o2, 0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 2006f0c: 02 80 00 4c be 200703c 2006f10: 82 10 20 09 mov 9, %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 2006f14: c2 03 40 00 ld [ %o5 ], %g1 2006f18: 80 a0 60 00 cmp %g1, 0 2006f1c: 22 80 00 44 be,a 200702c 2006f20: 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 ) 2006f24: 03 00 80 71 sethi %hi(0x201c400), %g1 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 2006f28: c0 22 80 00 clr [ %o2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 2006f2c: c8 00 61 e0 ld [ %g1 + 0x1e0 ], %g4 2006f30: 80 a1 00 08 cmp %g4, %o0 2006f34: 08 80 00 39 bleu 2007018 2006f38: 82 10 20 0a mov 0xa, %g1 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 2006f3c: 80 a2 20 00 cmp %o0, 0 2006f40: 12 80 00 29 bne 2006fe4 2006f44: 03 00 80 71 sethi %hi(0x201c400), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 2006f48: 90 81 3f ff addcc %g4, -1, %o0 2006f4c: 02 80 00 35 be 2007020 2006f50: 05 00 80 71 sethi %hi(0x201c400), %g2 2006f54: c6 00 a1 e4 ld [ %g2 + 0x1e4 ], %g3 ! 201c5e4 <_IO_Driver_address_table> 2006f58: 85 29 20 03 sll %g4, 3, %g2 2006f5c: 83 29 20 05 sll %g4, 5, %g1 2006f60: 82 20 40 02 sub %g1, %g2, %g1 2006f64: 82 00 7f e8 add %g1, -24, %g1 2006f68: 10 80 00 05 b 2006f7c 2006f6c: 84 00 c0 01 add %g3, %g1, %g2 2006f70: 90 82 3f ff addcc %o0, -1, %o0 2006f74: 02 80 00 2b be 2007020 2006f78: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 2006f7c: c2 00 80 00 ld [ %g2 ], %g1 2006f80: 80 a0 60 00 cmp %g1, 0 2006f84: 12 bf ff fb bne 2006f70 2006f88: 88 10 00 02 mov %g2, %g4 2006f8c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 2006f90: 80 a0 60 00 cmp %g1, 0 2006f94: 32 bf ff f8 bne,a 2006f74 2006f98: 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; 2006f9c: c2 03 40 00 ld [ %o5 ], %g1 *registered_major = major; 2006fa0: 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; 2006fa4: c2 21 00 00 st %g1, [ %g4 ] 2006fa8: c4 03 60 04 ld [ %o5 + 4 ], %g2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fac: 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; 2006fb0: c4 21 20 04 st %g2, [ %g4 + 4 ] 2006fb4: c2 03 60 08 ld [ %o5 + 8 ], %g1 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fb8: 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; 2006fbc: c2 21 20 08 st %g1, [ %g4 + 8 ] 2006fc0: c4 03 60 0c ld [ %o5 + 0xc ], %g2 2006fc4: c4 21 20 0c st %g2, [ %g4 + 0xc ] 2006fc8: c2 03 60 10 ld [ %o5 + 0x10 ], %g1 2006fcc: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 2006fd0: c4 03 60 14 ld [ %o5 + 0x14 ], %g2 2006fd4: c4 21 20 14 st %g2, [ %g4 + 0x14 ] *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2006fd8: 82 13 c0 00 mov %o7, %g1 2006fdc: 7f ff ff 48 call 2006cfc 2006fe0: 9e 10 40 00 mov %g1, %o7 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 2006fe4: c8 00 61 e4 ld [ %g1 + 0x1e4 ], %g4 2006fe8: 85 2a 20 03 sll %o0, 3, %g2 2006fec: 83 2a 20 05 sll %o0, 5, %g1 2006ff0: 82 20 40 02 sub %g1, %g2, %g1 2006ff4: c6 01 00 01 ld [ %g4 + %g1 ], %g3 2006ff8: 80 a0 e0 00 cmp %g3, 0 2006ffc: 12 80 00 06 bne 2007014 2007000: 88 01 00 01 add %g4, %g1, %g4 2007004: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED 2007008: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200700c: 22 bf ff e5 be,a 2006fa0 <== NOT EXECUTED 2007010: 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 ); 2007014: 82 10 20 0c mov 0xc, %g1 } 2007018: 81 c3 e0 08 retl 200701c: 90 10 00 01 mov %g1, %o0 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007020: 82 10 20 05 mov 5, %g1 } 2007024: 81 c3 e0 08 retl 2007028: 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 ) 200702c: 80 a0 60 00 cmp %g1, 0 2007030: 12 bf ff be bne 2006f28 2007034: 03 00 80 71 sethi %hi(0x201c400), %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 2007038: 82 10 20 09 mov 9, %g1 } 200703c: 81 c3 e0 08 retl 2007040: 90 10 00 01 mov %g1, %o0 020083bc : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 20083bc: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 20083c0: 80 a6 20 00 cmp %i0, 0 20083c4: 02 80 00 23 be 2008450 20083c8: 03 00 80 92 sethi %hi(0x2024800), %g1 return; 20083cc: a4 10 63 74 or %g1, 0x374, %l2 ! 2024b74 <_Objects_Information_table+0x4> 20083d0: 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 ] ) 20083d4: c2 04 80 00 ld [ %l2 ], %g1 20083d8: 80 a0 60 00 cmp %g1, 0 20083dc: 22 80 00 1a be,a 2008444 20083e0: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 20083e4: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 20083e8: 80 a4 60 00 cmp %l1, 0 20083ec: 22 80 00 16 be,a 2008444 20083f0: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 20083f4: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 20083f8: 86 90 60 00 orcc %g1, 0, %g3 20083fc: 22 80 00 12 be,a 2008444 2008400: a4 04 a0 04 add %l2, 4, %l2 2008404: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 2008408: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 200840c: 83 2c 20 02 sll %l0, 2, %g1 2008410: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 2008414: 80 a2 20 00 cmp %o0, 0 2008418: 02 80 00 05 be 200842c 200841c: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 2008420: 9f c6 00 00 call %i0 2008424: 01 00 00 00 nop 2008428: 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++ ) { 200842c: 83 28 e0 10 sll %g3, 0x10, %g1 2008430: 83 30 60 10 srl %g1, 0x10, %g1 2008434: 80 a0 40 10 cmp %g1, %l0 2008438: 3a bf ff f5 bcc,a 200840c 200843c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 2008440: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 2008444: 80 a4 80 13 cmp %l2, %l3 2008448: 32 bf ff e4 bne,a 20083d8 200844c: c2 04 80 00 ld [ %l2 ], %g1 2008450: 81 c7 e0 08 ret 2008454: 81 e8 00 00 restore 0200ad20 : * 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 ) { 200ad20: 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 ); 200ad24: 23 00 80 5f sethi %hi(0x2017c00), %l1 200ad28: d0 04 63 fc ld [ %l1 + 0x3fc ], %o0 ! 2017ffc 200ad2c: 92 10 20 00 clr %o1 200ad30: 7f ff ea ab call 20057dc 200ad34: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 200ad38: 21 00 80 5f sethi %hi(0x2017c00), %l0 200ad3c: c4 04 23 f8 ld [ %l0 + 0x3f8 ], %g2 ! 2017ff8 200ad40: 80 a0 a0 00 cmp %g2, 0 200ad44: 12 80 00 07 bne 200ad60 200ad48: 03 00 80 5f sethi %hi(0x2017c00), %g1 } failed: iop = 0; done: 200ad4c: b0 10 20 00 clr %i0 rtems_semaphore_release( rtems_libio_semaphore ); 200ad50: 7f ff ea eb call 20058fc 200ad54: d0 04 63 fc ld [ %l1 + 0x3fc ], %o0 return iop; } 200ad58: 81 c7 e0 08 ret 200ad5c: 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( 200ad60: c6 00 63 f4 ld [ %g1 + 0x3f4 ], %g3 200ad64: 92 10 20 01 mov 1, %o1 200ad68: 86 20 80 03 sub %g2, %g3, %g3 200ad6c: 87 38 e0 02 sra %g3, 2, %g3 200ad70: 83 28 e0 02 sll %g3, 2, %g1 200ad74: 85 28 e0 06 sll %g3, 6, %g2 200ad78: 84 20 80 01 sub %g2, %g1, %g2 200ad7c: 83 28 a0 06 sll %g2, 6, %g1 200ad80: 82 20 40 02 sub %g1, %g2, %g1 200ad84: 85 28 60 0c sll %g1, 0xc, %g2 200ad88: 82 00 40 02 add %g1, %g2, %g1 200ad8c: 82 00 40 03 add %g1, %g3, %g1 200ad90: 83 28 60 04 sll %g1, 4, %g1 200ad94: 82 20 40 03 sub %g1, %g3, %g1 200ad98: 83 28 60 02 sll %g1, 2, %g1 200ad9c: 86 20 c0 01 sub %g3, %g1, %g3 200ada0: 94 10 20 54 mov 0x54, %o2 200ada4: 96 10 20 00 clr %o3 200ada8: 11 13 10 92 sethi %hi(0x4c424800), %o0 200adac: 98 07 bf f4 add %fp, -12, %o4 200adb0: 90 12 21 00 or %o0, 0x100, %o0 200adb4: 7f ff e9 e3 call 2005540 200adb8: 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) 200adbc: 80 a2 20 00 cmp %o0, 0 200adc0: 32 bf ff e4 bne,a 200ad50 200adc4: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 200adc8: f0 04 23 f8 ld [ %l0 + 0x3f8 ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; 200adcc: 84 10 21 00 mov 0x100, %g2 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 200add0: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 200add4: c0 26 20 20 clr [ %i0 + 0x20 ] 200add8: c0 26 00 00 clr [ %i0 ] 200addc: c0 26 20 04 clr [ %i0 + 4 ] 200ade0: c0 26 20 08 clr [ %i0 + 8 ] 200ade4: c0 26 20 10 clr [ %i0 + 0x10 ] 200ade8: c0 26 20 14 clr [ %i0 + 0x14 ] 200adec: c0 26 20 18 clr [ %i0 + 0x18 ] 200adf0: c0 26 20 1c clr [ %i0 + 0x1c ] 200adf4: c0 26 20 24 clr [ %i0 + 0x24 ] 200adf8: c0 26 20 2c clr [ %i0 + 0x2c ] 200adfc: c0 26 20 30 clr [ %i0 + 0x30 ] 200ae00: c0 26 20 28 clr [ %i0 + 0x28 ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 200ae04: c2 24 23 f8 st %g1, [ %l0 + 0x3f8 ] 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; 200ae08: 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; 200ae0c: c4 26 20 0c st %g2, [ %i0 + 0xc ] iop->sem = sema; 200ae10: 10 bf ff d0 b 200ad50 200ae14: c2 26 20 20 st %g1, [ %i0 + 0x20 ] 02002198 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 2002198: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 200219c: 21 00 80 5c sethi %hi(0x2017000), %l0 20021a0: d0 04 22 f8 ld [ %l0 + 0x2f8 ], %o0 ! 20172f8 20021a4: 80 a2 20 00 cmp %o0, 0 20021a8: 22 80 00 1e be,a 2002220 20021ac: 11 13 10 92 sethi %hi(0x4c424800), %o0 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 20021b0: 40 00 21 89 call 200a7d4 20021b4: 92 10 20 34 mov 0x34, %o1 20021b8: 03 00 80 5f sethi %hi(0x2017c00), %g1 20021bc: d0 20 63 f4 st %o0, [ %g1 + 0x3f4 ] ! 2017ff4 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 20021c0: 80 a2 20 00 cmp %o0, 0 20021c4: 02 80 00 23 be 2002250 20021c8: 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++) 20021cc: 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; 20021d0: 03 00 80 5f sethi %hi(0x2017c00), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 20021d4: 80 a1 20 01 cmp %g4, 1 20021d8: 02 80 00 10 be 2002218 20021dc: d0 20 63 f8 st %o0, [ %g1 + 0x3f8 ] 20021e0: 82 02 20 34 add %o0, 0x34, %g1 20021e4: 86 10 20 01 mov 1, %g3 iop->data1 = iop + 1; 20021e8: c2 20 7f f4 st %g1, [ %g1 + -12 ] 20021ec: 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++) 20021f0: 80 a0 c0 04 cmp %g3, %g4 20021f4: 12 bf ff fd bne 20021e8 20021f8: 82 00 60 34 add %g1, 0x34, %g1 20021fc: 85 28 e0 02 sll %g3, 2, %g2 2002200: 83 28 e0 04 sll %g3, 4, %g1 2002204: 82 20 40 02 sub %g1, %g2, %g1 2002208: 82 00 40 03 add %g1, %g3, %g1 200220c: 83 28 60 02 sll %g1, 2, %g1 2002210: 82 00 7f cc add %g1, -52, %g1 2002214: 84 02 00 01 add %o0, %g1, %g2 iop->data1 = iop + 1; iop->data1 = NULL; 2002218: c0 20 a0 28 clr [ %g2 + 0x28 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 200221c: 11 13 10 92 sethi %hi(0x4c424800), %o0 2002220: 92 10 20 01 mov 1, %o1 2002224: 90 12 21 4f or %o0, 0x14f, %o0 2002228: 94 10 20 54 mov 0x54, %o2 200222c: 96 10 20 00 clr %o3 2002230: 19 00 80 5f sethi %hi(0x2017c00), %o4 2002234: 40 00 0c c3 call 2005540 2002238: 98 13 23 fc or %o4, 0x3fc, %o4 ! 2017ffc 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 200223c: 80 a2 20 00 cmp %o0, 0 2002240: 12 80 00 06 bne 2002258 2002244: 01 00 00 00 nop /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 2002248: 40 00 21 14 call 200a698 200224c: 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); 2002250: 40 00 0f 26 call 2005ee8 <== NOT EXECUTED 2002254: 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 ); 2002258: 40 00 0f 24 call 2005ee8 <== NOT EXECUTED 200225c: 01 00 00 00 nop 2002260: 01 00 00 00 nop 020222d4 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 20222d4: 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); 20222d8: 90 10 20 00 clr %o0 20222dc: 92 10 20 00 clr %o1 20222e0: 40 00 06 ec call 2023e90 20222e4: 94 07 bf f4 add %fp, -12, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 20222e8: b0 92 20 00 orcc %o0, 0, %i0 20222ec: 12 80 00 37 bne 20223c8 20222f0: 25 00 81 28 sethi %hi(0x204a000), %l2 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 20222f4: c4 04 a2 3c ld [ %l2 + 0x23c ], %g2 ! 204a23c 20222f8: 03 00 81 7c sethi %hi(0x205f000), %g1 20222fc: a6 10 61 3c or %g1, 0x13c, %l3 ! 205f13c 2022300: 80 a0 80 13 cmp %g2, %l3 2022304: 02 80 00 33 be 20223d0 2022308: a2 14 a2 3c or %l2, 0x23c, %l1 return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 202230c: d0 04 a2 3c ld [ %l2 + 0x23c ], %o0 2022310: 92 10 00 13 mov %l3, %o1 2022314: 40 00 47 3e call 203400c 2022318: 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; 202231c: 03 00 81 7a sethi %hi(0x205e800), %g1 2022320: c8 00 61 40 ld [ %g1 + 0x140 ], %g4 ! 205e940 } 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*/ 2022324: c4 04 a2 3c ld [ %l2 + 0x23c ], %g2 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 2022328: 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); 202232c: 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; 2022330: 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*/ 2022334: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 2022338: 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*/ 202233c: c2 20 80 00 st %g1, [ %g2 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 2022340: c6 20 a0 18 st %g3, [ %g2 + 0x18 ] 2022344: 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); 2022348: 21 00 81 11 sethi %hi(0x2044400), %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; 202234c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 2022350: 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); 2022354: 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; 2022358: 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); 202235c: 94 10 00 11 mov %l1, %o2 2022360: 96 10 20 00 clr %o3 2022364: 7f ff 88 a6 call 20045fc 2022368: 90 14 21 d8 or %l0, 0x1d8, %o0 rtems_filesystem_root = loc; 202236c: c4 04 a2 3c ld [ %l2 + 0x23c ], %g2 2022370: c2 07 bf e4 ld [ %fp + -28 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 2022374: 90 14 21 d8 or %l0, 0x1d8, %o0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 2022378: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 202237c: c2 07 bf e8 ld [ %fp + -24 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 2022380: 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; 2022384: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 2022388: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 202238c: 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; 2022390: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 2022394: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 2022398: 96 10 20 00 clr %o3 202239c: 7f ff 88 98 call 20045fc 20223a0: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 20223a4: c2 07 bf e4 ld [ %fp + -28 ], %g1 20223a8: c6 04 a2 3c ld [ %l2 + 0x23c ], %g3 20223ac: c2 20 e0 04 st %g1, [ %g3 + 4 ] 20223b0: c4 07 bf e8 ld [ %fp + -24 ], %g2 20223b4: c4 20 e0 08 st %g2, [ %g3 + 8 ] 20223b8: c2 07 bf ec ld [ %fp + -20 ], %g1 20223bc: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 20223c0: c4 07 bf f0 ld [ %fp + -16 ], %g2 20223c4: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] return RTEMS_SUCCESSFUL; } 20223c8: 81 c7 e0 08 ret 20223cc: 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)); 20223d0: 7f ff 8a 8d call 2004e04 20223d4: 90 10 20 40 mov 0x40, %o0 if (!tmp) 20223d8: a0 92 20 00 orcc %o0, 0, %l0 20223dc: 02 80 00 0b be 2022408 20223e0: 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); 20223e4: 90 10 20 00 clr %o0 20223e8: 15 00 80 88 sethi %hi(0x2022000), %o2 20223ec: 40 00 07 c0 call 20242ec 20223f0: 94 12 a1 a8 or %o2, 0x1a8, %o2 ! 20221a8 if (sc != RTEMS_SUCCESSFUL) { 20223f4: 82 92 20 00 orcc %o0, 0, %g1 20223f8: 32 80 00 06 bne,a 2022410 20223fc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 2022400: 10 bf ff c3 b 202230c 2022404: e0 24 a2 3c st %l0, [ %l2 + 0x23c ] 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) 2022408: 81 c7 e0 08 ret <== NOT EXECUTED 202240c: 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); 2022410: 7f ff 88 d9 call 2004774 <== NOT EXECUTED 2022414: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 2022418: 81 c7 e0 08 ret <== NOT EXECUTED 202241c: 81 e8 00 00 restore <== NOT EXECUTED 02022220 : * 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) { 2022220: 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); 2022224: 90 10 20 00 clr %o0 <== NOT EXECUTED 2022228: 92 10 20 00 clr %o1 <== NOT EXECUTED 202222c: 40 00 07 19 call 2023e90 <== NOT EXECUTED 2022230: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 2022234: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 2022238: 12 80 00 13 bne 2022284 <== NOT EXECUTED 202223c: 25 00 81 28 sethi %hi(0x204a000), %l2 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 2022240: e2 04 a2 3c ld [ %l2 + 0x23c ], %l1 ! 204a23c <== NOT EXECUTED 2022244: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2022248: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED 202224c: 86 14 a2 3c or %l2, 0x23c, %g3 <== NOT EXECUTED 2022250: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2022254: 02 80 00 0e be 202228c <== NOT EXECUTED 2022258: 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, 202225c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2022260: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2022264: 40 00 08 7d call 2024458 <== NOT EXECUTED 2022268: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 202226c: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 2022270: 02 80 00 10 be 20222b0 <== NOT EXECUTED 2022274: 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; 2022278: 03 00 81 7c sethi %hi(0x205f000), %g1 <== NOT EXECUTED 202227c: 82 10 61 3c or %g1, 0x13c, %g1 ! 205f13c <== NOT EXECUTED 2022280: c2 24 a2 3c st %g1, [ %l2 + 0x23c ] <== NOT EXECUTED return sc; } 2022284: 81 c7 e0 08 ret <== NOT EXECUTED 2022288: 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); 202228c: 40 00 08 49 call 20243b0 <== NOT EXECUTED 2022290: 92 10 00 03 mov %g3, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 2022294: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 2022298: 12 bf ff fb bne 2022284 <== NOT EXECUTED 202229c: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 20222a0: 7f ff ff c2 call 20221a8 <== NOT EXECUTED 20222a4: 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, 20222a8: 10 bf ff ee b 2022260 <== NOT EXECUTED 20222ac: 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); 20222b0: 15 00 80 88 sethi %hi(0x2022000), %o2 <== NOT EXECUTED 20222b4: 40 00 08 0e call 20242ec <== NOT EXECUTED 20222b8: 94 12 a1 a8 or %o2, 0x1a8, %o2 ! 20221a8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 20222bc: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 20222c0: 12 bf ff ef bne 202227c <== NOT EXECUTED 20222c4: 03 00 81 7c sethi %hi(0x205f000), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 20222c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 20222cc: 10 bf ff ee b 2022284 <== NOT EXECUTED 20222d0: c2 24 a2 3c st %g1, [ %l2 + 0x23c ] <== NOT EXECUTED 02004f00 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 2004f00: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 2004f04: 11 00 81 7a sethi %hi(0x205e800), %o0 <== NOT EXECUTED 2004f08: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2004f0c: 90 12 20 b8 or %o0, 0xb8, %o0 <== NOT EXECUTED 2004f10: 40 00 16 96 call 200a968 <_Protected_heap_Get_block_size> <== NOT EXECUTED 2004f14: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 2004f18: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 2004f1c: 02 80 00 08 be 2004f3c <== NOT EXECUTED 2004f20: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 2004f24: 03 00 81 7a sethi %hi(0x205e800), %g1 <== NOT EXECUTED 2004f28: 82 10 61 10 or %g1, 0x110, %g1 ! 205e910 <== NOT EXECUTED 2004f2c: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4 <== NOT EXECUTED 2004f30: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 2004f34: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 2004f38: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 2004f3c: 81 c7 e0 08 ret <== NOT EXECUTED 2004f40: 81 e8 00 00 restore <== NOT EXECUTED 02004f44 : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 2004f44: 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 ) 2004f48: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 2004f4c: 02 80 00 13 be 2004f98 <== NOT EXECUTED 2004f50: 11 00 81 7a sethi %hi(0x205e800), %o0 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 2004f54: 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); 2004f58: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 2004f5c: 40 00 16 83 call 200a968 <_Protected_heap_Get_block_size> <== NOT EXECUTED 2004f60: 90 12 20 b8 or %o0, 0xb8, %o0 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 2004f64: 03 00 81 7a sethi %hi(0x205e800), %g1 <== NOT EXECUTED 2004f68: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 2004f6c: 96 10 61 10 or %g1, 0x110, %o3 <== NOT EXECUTED 2004f70: d8 1a e0 20 ldd [ %o3 + 0x20 ], %o4 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 2004f74: c2 02 e0 2c ld [ %o3 + 0x2c ], %g1 <== NOT EXECUTED if (current_depth > s->max_depth) 2004f78: 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); 2004f7c: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 2004f80: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 2004f84: c4 3a e0 20 std %g2, [ %o3 + 0x20 ] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 2004f88: 86 20 c0 01 sub %g3, %g1, %g3 <== NOT EXECUTED if (current_depth > s->max_depth) 2004f8c: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 2004f90: 38 80 00 02 bgu,a 2004f98 <== NOT EXECUTED 2004f94: c6 22 e0 18 st %g3, [ %o3 + 0x18 ] <== NOT EXECUTED 2004f98: 81 c7 e0 08 ret <== NOT EXECUTED 2004f9c: 81 e8 00 00 restore <== NOT EXECUTED 02004fa0 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 2004fa0: 03 00 81 7a sethi %hi(0x205e800), %g1 <== NOT EXECUTED 2004fa4: c0 20 61 10 clr [ %g1 + 0x110 ] ! 205e910 <== NOT EXECUTED 2004fa8: c0 20 61 14 clr [ %g1 + 0x114 ] <== NOT EXECUTED 2004fac: 82 10 61 10 or %g1, 0x110, %g1 <== NOT EXECUTED 2004fb0: c0 20 60 28 clr [ %g1 + 0x28 ] <== NOT EXECUTED 2004fb4: c0 20 60 2c clr [ %g1 + 0x2c ] <== NOT EXECUTED 2004fb8: c0 20 60 08 clr [ %g1 + 8 ] <== NOT EXECUTED 2004fbc: c0 20 60 0c clr [ %g1 + 0xc ] <== NOT EXECUTED 2004fc0: c0 20 60 10 clr [ %g1 + 0x10 ] <== NOT EXECUTED 2004fc4: c0 20 60 14 clr [ %g1 + 0x14 ] <== NOT EXECUTED 2004fc8: c0 20 60 18 clr [ %g1 + 0x18 ] <== NOT EXECUTED 2004fcc: c0 20 60 1c clr [ %g1 + 0x1c ] <== NOT EXECUTED 2004fd0: c0 20 60 20 clr [ %g1 + 0x20 ] <== NOT EXECUTED } 2004fd4: 81 c3 e0 08 retl <== NOT EXECUTED 2004fd8: c0 20 60 24 clr [ %g1 + 0x24 ] <== NOT EXECUTED 02004ddc : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 2004ddc: 9d e3 bf 98 save %sp, -104, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 2004de0: a0 96 20 00 orcc %i0, 0, %l0 2004de4: 02 80 00 1f be 2004e60 2004de8: 03 00 80 79 sethi %hi(0x201e400), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 2004dec: c4 00 61 74 ld [ %g1 + 0x174 ], %g2 ! 201e574 <_System_state_Current> 2004df0: 80 a0 a0 03 cmp %g2, 3 2004df4: 02 80 00 16 be 2004e4c 2004df8: c0 24 00 00 clr [ %l0 ] /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 2004dfc: 7f ff fb 7e call 2003bf4 2004e00: b0 10 20 0c mov 0xc, %i0 /* * Perform the aligned allocation requested */ return_this = _Protected_heap_Allocate_aligned( 2004e04: 92 10 00 1a mov %i2, %o1 2004e08: 94 10 00 19 mov %i1, %o2 2004e0c: 11 00 80 78 sethi %hi(0x201e000), %o0 2004e10: 40 00 14 0a call 2009e38 <_Protected_heap_Allocate_aligned> 2004e14: 90 12 22 08 or %o0, 0x208, %o0 ! 201e208 &RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 2004e18: b4 92 20 00 orcc %o0, 0, %i2 2004e1c: 02 80 00 12 be 2004e64 2004e20: 03 00 80 76 sethi %hi(0x201d800), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 2004e24: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 201dac4 2004e28: 80 a0 60 00 cmp %g1, 0 2004e2c: 22 80 00 06 be,a 2004e44 2004e30: f4 24 00 00 st %i2, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 2004e34: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 2004e38: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004e3c: 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; 2004e40: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED 2004e44: 81 c7 e0 08 ret 2004e48: 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()) && 2004e4c: 7f ff fb 50 call 2003b8c 2004e50: 01 00 00 00 nop 2004e54: 80 8a 20 ff btst 0xff, %o0 2004e58: 12 bf ff e9 bne 2004dfc 2004e5c: 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; 2004e60: b0 10 20 16 mov 0x16, %i0 ! 16 } 2004e64: 81 c7 e0 08 ret 2004e68: 81 e8 00 00 restore 02007e0c : void rtems_panic( const char *printf_format, ... ) { 2007e0c: 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); 2007e10: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 2007e14: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 2007e18: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 2007e1c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 2007e20: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 2007e24: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 2007e28: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 2007e2c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2007e30: 7f ff ff 7d call 2007c24 <== NOT EXECUTED 2007e34: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 2007e38: 81 c7 e0 08 ret <== NOT EXECUTED 2007e3c: 81 e8 00 00 restore <== NOT EXECUTED 02006968 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 2006968: 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 *) 200696c: 11 00 80 74 sethi %hi(0x201d000), %o0 2006970: 92 10 00 18 mov %i0, %o1 2006974: 90 12 21 0c or %o0, 0x10c, %o0 2006978: 40 00 09 4e call 2008eb0 <_Objects_Get> 200697c: 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 ) { 2006980: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006984: 80 a0 60 00 cmp %g1, 0 2006988: 02 80 00 04 be 2006998 200698c: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006990: 81 c7 e0 08 ret 2006994: 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 ) ) { 2006998: 25 00 80 74 sethi %hi(0x201d000), %l2 200699c: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 20069a0: c2 04 a3 44 ld [ %l2 + 0x344 ], %g1 20069a4: 80 a0 80 01 cmp %g2, %g1 20069a8: 02 80 00 06 be 20069c0 20069ac: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 20069b0: 40 00 0b c3 call 20098bc <_Thread_Enable_dispatch> 20069b4: b0 10 20 17 mov 0x17, %i0 20069b8: 81 c7 e0 08 ret 20069bc: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 20069c0: 12 80 00 0f bne 20069fc 20069c4: 01 00 00 00 nop switch ( the_period->state ) { 20069c8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 20069cc: 80 a0 60 00 cmp %g1, 0 20069d0: 02 80 00 07 be 20069ec 20069d4: b0 10 20 0b mov 0xb, %i0 20069d8: 82 00 7f fd add %g1, -3, %g1 20069dc: 80 a0 60 01 cmp %g1, 1 20069e0: 18 80 00 03 bgu 20069ec 20069e4: b0 10 20 00 clr %i0 20069e8: b0 10 20 06 mov 6, %i0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 20069ec: 40 00 0b b4 call 20098bc <_Thread_Enable_dispatch> 20069f0: 01 00 00 00 nop 20069f4: 81 c7 e0 08 ret 20069f8: 81 e8 00 00 restore } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 20069fc: 7f ff f0 77 call 2002bd8 2006a00: 01 00 00 00 nop 2006a04: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 2006a08: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 2006a0c: 80 a4 e0 02 cmp %l3, 2 2006a10: 02 80 00 1a be 2006a78 2006a14: 80 a4 e0 04 cmp %l3, 4 2006a18: 02 80 00 32 be 2006ae0 2006a1c: 80 a4 e0 00 cmp %l3, 0 2006a20: 12 bf ff dc bne 2006990 2006a24: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 2006a28: 7f ff f0 70 call 2002be8 2006a2c: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 2006a30: 7f ff ff 58 call 2006790 <_Rate_monotonic_Initiate_statistics> 2006a34: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006a38: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006a3c: 03 00 80 1b sethi %hi(0x2006c00), %g1 2006a40: 82 10 62 3c or %g1, 0x23c, %g1 ! 2006e3c <_Rate_monotonic_Timeout> the_watchdog->id = id; 2006a44: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a48: 92 04 60 10 add %l1, 0x10, %o1 2006a4c: 11 00 80 74 sethi %hi(0x201d000), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006a50: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a54: 90 12 23 64 or %o0, 0x364, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006a58: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2006a5c: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 2006a60: 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; 2006a64: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006a68: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a6c: 40 00 11 2f call 200af28 <_Watchdog_Insert> 2006a70: b0 10 20 00 clr %i0 2006a74: 30 bf ff de b,a 20069ec case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 2006a78: 7f ff ff 62 call 2006800 <_Rate_monotonic_Update_statistics> 2006a7c: 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; 2006a80: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 2006a84: 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; 2006a88: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 2006a8c: 7f ff f0 57 call 2002be8 2006a90: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 2006a94: c2 04 a3 44 ld [ %l2 + 0x344 ], %g1 2006a98: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006a9c: 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; 2006aa0: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 2006aa4: 40 00 0e 3a call 200a38c <_Thread_Set_state> 2006aa8: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 2006aac: 7f ff f0 4b call 2002bd8 2006ab0: 01 00 00 00 nop local_state = the_period->state; 2006ab4: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006ab8: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 2006abc: 7f ff f0 4b call 2002be8 2006ac0: 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 ) 2006ac4: 80 a4 20 03 cmp %l0, 3 2006ac8: 02 80 00 17 be 2006b24 2006acc: d0 04 a3 44 ld [ %l2 + 0x344 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 2006ad0: 40 00 0b 7b call 20098bc <_Thread_Enable_dispatch> 2006ad4: b0 10 20 00 clr %i0 2006ad8: 81 c7 e0 08 ret 2006adc: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 2006ae0: 7f ff ff 48 call 2006800 <_Rate_monotonic_Update_statistics> 2006ae4: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 2006ae8: 7f ff f0 40 call 2002be8 2006aec: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 2006af0: 82 10 20 02 mov 2, %g1 2006af4: 92 04 60 10 add %l1, 0x10, %o1 2006af8: 11 00 80 74 sethi %hi(0x201d000), %o0 2006afc: 90 12 23 64 or %o0, 0x364, %o0 ! 201d364 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 2006b00: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 2006b04: f2 24 60 4c st %i1, [ %l1 + 0x4c ] */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 2006b08: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006b0c: 40 00 11 07 call 200af28 <_Watchdog_Insert> 2006b10: b0 10 20 06 mov 6, %i0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 2006b14: 40 00 0b 6a call 20098bc <_Thread_Enable_dispatch> 2006b18: 01 00 00 00 nop 2006b1c: 81 c7 e0 08 ret 2006b20: 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 ); 2006b24: 40 00 0a 4d call 2009458 <_Thread_Clear_state> <== NOT EXECUTED 2006b28: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 2006b2c: 30 bf ff e9 b,a 2006ad0 <== NOT EXECUTED 02023a6c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 2023a6c: 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 ) 2023a70: 80 a6 60 00 cmp %i1, 0 2023a74: 02 80 00 4a be 2023b9c 2023a78: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 2023a7c: 13 00 81 1a sethi %hi(0x2046800), %o1 2023a80: 9f c6 40 00 call %i1 2023a84: 92 12 63 28 or %o1, 0x328, %o1 ! 2046b28 <_POSIX_Threads_Default_attributes+0x38> #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 2023a88: 90 10 00 18 mov %i0, %o0 2023a8c: 13 00 81 1a sethi %hi(0x2046800), %o1 2023a90: 9f c6 40 00 call %i1 2023a94: 92 12 63 48 or %o1, 0x348, %o1 ! 2046b48 <_POSIX_Threads_Default_attributes+0x58> #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 2023a98: 90 10 00 18 mov %i0, %o0 2023a9c: 13 00 81 1a sethi %hi(0x2046800), %o1 2023aa0: 9f c6 40 00 call %i1 2023aa4: 92 12 63 70 or %o1, 0x370, %o1 ! 2046b70 <_POSIX_Threads_Default_attributes+0x80> Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 2023aa8: 90 10 00 18 mov %i0, %o0 2023aac: 13 00 81 1a sethi %hi(0x2046800), %o1 2023ab0: 9f c6 40 00 call %i1 2023ab4: 92 12 63 98 or %o1, 0x398, %o1 ! 2046b98 <_POSIX_Threads_Default_attributes+0xa8> #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 2023ab8: 90 10 00 18 mov %i0, %o0 2023abc: 13 00 81 1a sethi %hi(0x2046800), %o1 2023ac0: 9f c6 40 00 call %i1 2023ac4: 92 12 63 e8 or %o1, 0x3e8, %o1 ! 2046be8 <_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 ; 2023ac8: 03 00 81 7d sethi %hi(0x205f400), %g1 2023acc: a6 10 62 5c or %g1, 0x25c, %l3 ! 205f65c <_Rate_monotonic_Information> 2023ad0: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 2023ad4: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 2023ad8: 80 a4 80 01 cmp %l2, %g1 2023adc: 18 80 00 30 bgu 2023b9c 2023ae0: 03 00 81 1b sethi %hi(0x2046c00), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2023ae4: 05 00 81 1c sethi %hi(0x2047000), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2023ae8: b6 10 60 38 or %g1, 0x38, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 2023aec: b8 10 a0 40 or %g2, 0x40, %i4 2023af0: 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 ); 2023af4: ae 07 bf d0 add %fp, -48, %l7 2023af8: ac 07 bf f0 add %fp, -16, %l6 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2023afc: ba 07 bf b0 add %fp, -80, %i5 2023b00: 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( 2023b04: 10 80 00 06 b 2023b1c 2023b08: 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++ ) { 2023b0c: 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 ; 2023b10: 80 a0 40 12 cmp %g1, %l2 2023b14: 0a 80 00 22 bcs 2023b9c 2023b18: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 2023b1c: 90 10 00 12 mov %l2, %o0 2023b20: 40 00 2e eb call 202f6cc 2023b24: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 2023b28: 80 a2 20 00 cmp %o0, 0 2023b2c: 32 bf ff f8 bne,a 2023b0c 2023b30: 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 ); 2023b34: 92 10 00 17 mov %l7, %o1 2023b38: 40 00 2e fa call 202f720 2023b3c: 90 10 00 12 mov %l2, %o0 continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 2023b40: d0 07 bf d0 ld [ %fp + -48 ], %o0 2023b44: 80 a2 20 00 cmp %o0, 0 2023b48: 12 80 00 4b bne 2023c74 2023b4c: c0 2f bf f0 clrb [ %fp + -16 ] /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2023b50: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 2023b54: 94 10 00 12 mov %l2, %o2 2023b58: 92 10 00 1b mov %i3, %o1 2023b5c: 96 10 00 16 mov %l6, %o3 2023b60: 9f c6 40 00 call %i1 2023b64: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2023b68: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2023b6c: 94 10 00 15 mov %l5, %o2 2023b70: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 2023b74: 80 a0 60 00 cmp %g1, 0 2023b78: 12 80 00 0b bne 2023ba4 2023b7c: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 2023b80: 9f c6 40 00 call %i1 2023b84: 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 ; 2023b88: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 2023b8c: 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 ; 2023b90: 80 a0 40 12 cmp %g1, %l2 2023b94: 1a bf ff e3 bcc 2023b20 2023b98: 90 10 00 12 mov %l2, %o0 2023b9c: 81 c7 e0 08 ret 2023ba0: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2023ba4: 40 00 06 05 call 20253b8 <_Timespec_Divide_by_integer> 2023ba8: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 2023bac: d0 07 bf a4 ld [ %fp + -92 ], %o0 2023bb0: 40 00 77 bb call 2041a9c <.div> 2023bb4: 92 10 23 e8 mov 0x3e8, %o1 2023bb8: a2 10 00 08 mov %o0, %l1 2023bbc: d0 07 bf ac ld [ %fp + -84 ], %o0 2023bc0: 40 00 77 b7 call 2041a9c <.div> 2023bc4: 92 10 23 e8 mov 0x3e8, %o1 2023bc8: c2 07 bf e8 ld [ %fp + -24 ], %g1 2023bcc: a0 10 00 08 mov %o0, %l0 2023bd0: d0 07 bf ec ld [ %fp + -20 ], %o0 2023bd4: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2023bd8: 40 00 77 b1 call 2041a9c <.div> 2023bdc: 92 10 23 e8 mov 0x3e8, %o1 2023be0: d8 07 bf a8 ld [ %fp + -88 ], %o4 2023be4: d4 07 bf a0 ld [ %fp + -96 ], %o2 2023be8: 96 10 00 11 mov %l1, %o3 2023bec: 9a 10 00 10 mov %l0, %o5 2023bf0: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2023bf4: 13 00 81 1b sethi %hi(0x2046c00), %o1 2023bf8: 90 10 00 18 mov %i0, %o0 2023bfc: 9f c6 40 00 call %i1 2023c00: 92 12 60 50 or %o1, 0x50, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 2023c04: d2 07 bf 98 ld [ %fp + -104 ], %o1 2023c08: 94 10 00 15 mov %l5, %o2 2023c0c: 40 00 05 eb call 20253b8 <_Timespec_Divide_by_integer> 2023c10: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 2023c14: d0 07 bf bc ld [ %fp + -68 ], %o0 2023c18: 40 00 77 a1 call 2041a9c <.div> 2023c1c: 92 10 23 e8 mov 0x3e8, %o1 2023c20: a2 10 00 08 mov %o0, %l1 2023c24: d0 07 bf c4 ld [ %fp + -60 ], %o0 2023c28: 40 00 77 9d call 2041a9c <.div> 2023c2c: 92 10 23 e8 mov 0x3e8, %o1 2023c30: c2 07 bf e8 ld [ %fp + -24 ], %g1 2023c34: a0 10 00 08 mov %o0, %l0 2023c38: d0 07 bf ec ld [ %fp + -20 ], %o0 2023c3c: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 2023c40: 40 00 77 97 call 2041a9c <.div> 2023c44: 92 10 23 e8 mov 0x3e8, %o1 2023c48: d4 07 bf b8 ld [ %fp + -72 ], %o2 2023c4c: d8 07 bf c0 ld [ %fp + -64 ], %o4 2023c50: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 2023c54: 96 10 00 11 mov %l1, %o3 2023c58: 9a 10 00 10 mov %l0, %o5 2023c5c: 90 10 00 18 mov %i0, %o0 2023c60: 13 00 81 1b sethi %hi(0x2046c00), %o1 2023c64: 9f c6 40 00 call %i1 2023c68: 92 12 60 70 or %o1, 0x70, %o1 ! 2046c70 <_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 ; 2023c6c: 10 bf ff a8 b 2023b0c 2023c70: 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 ); 2023c74: 94 10 00 16 mov %l6, %o2 2023c78: 7f ff 92 fa call 2008860 2023c7c: 92 10 20 05 mov 5, %o1 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 2023c80: 10 bf ff b5 b 2023b54 2023c84: d8 1f bf 98 ldd [ %fp + -104 ], %o4 020100c4 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 20100c4: 9d e3 bf 90 save %sp, -112, %sp 20100c8: 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 ) 20100cc: 80 a6 60 00 cmp %i1, 0 20100d0: 02 80 00 28 be 2010170 20100d4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 20100d8: 23 00 80 c8 sethi %hi(0x2032000), %l1 20100dc: 40 00 09 38 call 20125bc <_API_Mutex_Lock> 20100e0: d0 04 61 fc ld [ %l1 + 0x1fc ], %o0 ! 20321fc <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 20100e4: 92 10 00 10 mov %l0, %o1 20100e8: 11 00 80 c7 sethi %hi(0x2031c00), %o0 20100ec: 94 07 bf f0 add %fp, -16, %o2 20100f0: 40 00 10 4f call 201422c <_Objects_Get_no_protection> 20100f4: 90 12 23 74 or %o0, 0x374, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20100f8: c2 07 bf f0 ld [ %fp + -16 ], %g1 20100fc: 80 a0 60 00 cmp %g1, 0 2010100: 12 80 00 16 bne 2010158 2010104: a0 10 00 08 mov %o0, %l0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 2010108: 92 10 00 19 mov %i1, %o1 201010c: 94 10 00 1a mov %i2, %o2 2010110: 90 02 20 68 add %o0, 0x68, %o0 2010114: 96 07 bf f4 add %fp, -12, %o3 2010118: 40 00 0c 6e call 20132d0 <_Heap_Extend> 201011c: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 2010120: 80 a2 20 01 cmp %o0, 1 2010124: 02 80 00 11 be 2010168 2010128: 01 00 00 00 nop 201012c: 1a 80 00 13 bcc 2010178 2010130: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010134: c6 07 bf f4 ld [ %fp + -12 ], %g3 2010138: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 201013c: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010140: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 2010144: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 2010148: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 201014c: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 2010150: 10 80 00 06 b 2010168 2010154: b0 10 20 00 clr %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 2010158: 80 a0 60 01 cmp %g1, 1 201015c: 02 80 00 03 be 2010168 2010160: 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; 2010164: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010168: 40 00 09 2b call 2012614 <_API_Mutex_Unlock> 201016c: d0 04 61 fc ld [ %l1 + 0x1fc ], %o0 return return_status; } 2010170: 81 c7 e0 08 ret 2010174: 81 e8 00 00 restore starting_address, length, &amount_extended ); switch ( heap_status ) { 2010178: 12 bf ff fb bne 2010164 201017c: b0 10 20 18 mov 0x18, %i0 2010180: 30 bf ff fa b,a 2010168 02010480 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 2010480: 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 ) 2010484: 80 a6 e0 00 cmp %i3, 0 2010488: 02 80 00 2e be 2010540 201048c: 21 00 80 c8 sethi %hi(0x2032000), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 2010490: 40 00 08 4b call 20125bc <_API_Mutex_Lock> 2010494: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 ! 20321fc <_RTEMS_Allocator_Mutex> 2010498: 92 10 00 18 mov %i0, %o1 201049c: 11 00 80 c7 sethi %hi(0x2031c00), %o0 20104a0: 94 07 bf f0 add %fp, -16, %o2 20104a4: 40 00 0f 62 call 201422c <_Objects_Get_no_protection> 20104a8: 90 12 23 74 or %o0, 0x374, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 20104ac: c2 07 bf f0 ld [ %fp + -16 ], %g1 20104b0: 80 a0 60 00 cmp %g1, 0 20104b4: 12 80 00 14 bne 2010504 20104b8: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 20104bc: 94 10 00 1a mov %i2, %o2 20104c0: 92 10 00 19 mov %i1, %o1 20104c4: 90 02 20 68 add %o0, 0x68, %o0 20104c8: 96 07 bf ec add %fp, -20, %o3 20104cc: 40 00 0d 0b call 20138f8 <_Heap_Resize_block> 20104d0: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 20104d4: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 20104d8: b4 92 20 00 orcc %o0, 0, %i2 20104dc: 12 80 00 13 bne 2010528 20104e0: c2 26 c0 00 st %g1, [ %i3 ] 20104e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 20104e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20104ec: 12 80 00 17 bne 2010548 <== NOT EXECUTED 20104f0: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 20104f4: 40 00 08 48 call 2012614 <_API_Mutex_Unlock> <== NOT EXECUTED 20104f8: b0 10 20 00 clr %i0 <== NOT EXECUTED 20104fc: 81 c7 e0 08 ret <== NOT EXECUTED 2010500: 81 e8 00 00 restore <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010504: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 2010508: 82 18 60 01 xor %g1, 1, %g1 201050c: 80 a0 00 01 cmp %g0, %g1 2010510: 84 40 3f ff addx %g0, -1, %g2 2010514: b0 08 bf eb and %g2, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 2010518: 40 00 08 3f call 2012614 <_API_Mutex_Unlock> 201051c: b0 06 20 19 add %i0, 0x19, %i0 2010520: 81 c7 e0 08 ret 2010524: 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(); 2010528: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 201052c: 40 00 08 3a call 2012614 <_API_Mutex_Unlock> 2010530: b0 10 20 0d mov 0xd, %i0 return 2010534: 80 a6 a0 01 cmp %i2, 1 2010538: 02 80 00 07 be 2010554 201053c: 01 00 00 00 nop break; } _RTEMS_Unlock_allocator(); return return_status; } 2010540: 81 c7 e0 08 ret 2010544: 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 */ 2010548: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 201054c: 40 00 23 5c call 20192bc <_Region_Process_queue> <== NOT EXECUTED 2010550: b0 10 20 00 clr %i0 <== NOT EXECUTED 2010554: 81 c7 e0 08 ret <== NOT EXECUTED 2010558: 81 e8 00 00 restore <== NOT EXECUTED 02005540 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 2005540: 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 ) ) 2005544: a4 96 20 00 orcc %i0, 0, %l2 2005548: 02 80 00 33 be 2005614 200554c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 2005550: 80 a7 20 00 cmp %i4, 0 2005554: 02 80 00 30 be 2005614 2005558: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 200555c: 82 8e a0 c0 andcc %i2, 0xc0, %g1 2005560: 12 80 00 2f bne 200561c 2005564: 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 ) ) 2005568: 80 a4 20 00 cmp %l0, 0 200556c: 02 80 00 04 be 200557c 2005570: 80 a6 60 01 cmp %i1, 1 2005574: 18 80 00 28 bgu 2005614 2005578: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 200557c: 05 00 80 60 sethi %hi(0x2018000), %g2 2005580: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 20181d0 <_Thread_Dispatch_disable_level> 2005584: 82 00 60 01 inc %g1 2005588: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] * 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 ); 200558c: 31 00 80 60 sethi %hi(0x2018000), %i0 2005590: 40 00 05 94 call 2006be0 <_Objects_Allocate> 2005594: 90 16 20 94 or %i0, 0x94, %o0 ! 2018094 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 2005598: a2 92 20 00 orcc %o0, 0, %l1 200559c: 02 80 00 4e be 20056d4 20055a0: 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 ) ) { 20055a4: 02 80 00 2c be 2005654 20055a8: f4 24 60 10 st %i2, [ %l1 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 20055ac: 80 8e a0 40 btst 0x40, %i2 20055b0: 02 80 00 44 be 20056c0 20055b4: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 20055b8: 82 10 20 02 mov 2, %g1 20055bc: 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 ) ) { 20055c0: 80 a4 20 10 cmp %l0, 0x10 20055c4: 02 80 00 48 be 20056e4 20055c8: 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; 20055cc: 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; 20055d0: 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( 20055d4: 82 1e 60 01 xor %i1, 1, %g1 20055d8: 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; 20055dc: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 20055e0: 94 60 3f ff subx %g0, -1, %o2 20055e4: 90 04 60 14 add %l1, 0x14, %o0 20055e8: 40 00 03 64 call 2006378 <_CORE_mutex_Initialize> 20055ec: 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 ) { 20055f0: 80 a2 20 06 cmp %o0, 6 20055f4: 32 80 00 26 bne,a 200568c 20055f8: 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 ); 20055fc: 90 16 20 94 or %i0, 0x94, %o0 <== NOT EXECUTED 2005600: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2005604: 40 00 06 72 call 2006fcc <_Objects_Free> <== NOT EXECUTED 2005608: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 200560c: 40 00 09 60 call 2007b8c <_Thread_Enable_dispatch> <== NOT EXECUTED 2005610: 01 00 00 00 nop <== NOT EXECUTED 2005614: 81 c7 e0 08 ret 2005618: 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 ) || 200561c: 80 a4 20 10 cmp %l0, 0x10 2005620: 02 80 00 06 be 2005638 2005624: 80 a4 20 20 cmp %l0, 0x20 2005628: 02 80 00 05 be 200563c 200562c: 80 8e a0 04 btst 4, %i2 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 2005630: 81 c7 e0 08 ret 2005634: 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 ) || 2005638: 80 8e a0 04 btst 4, %i2 200563c: 02 bf ff fd be 2005630 2005640: 80 a0 60 c0 cmp %g1, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 2005644: 12 bf ff ca bne 200556c 2005648: 80 a4 20 00 cmp %l0, 0 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 200564c: 81 c7 e0 08 ret 2005650: 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 ) ) 2005654: 80 8e a0 04 btst 4, %i2 2005658: 22 80 00 04 be,a 2005668 200565c: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 2005660: 82 10 20 01 mov 1, %g1 2005664: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005668: 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; 200566c: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 2005670: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 2005674: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 2005678: 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( 200567c: 90 04 60 14 add %l1, 0x14, %o0 2005680: 40 00 04 29 call 2006724 <_CORE_semaphore_Initialize> 2005684: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005688: c4 04 60 08 ld [ %l1 + 8 ], %g2 200568c: 82 16 20 94 or %i0, 0x94, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 2005690: e4 24 60 0c st %l2, [ %l1 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 2005694: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 2005698: c4 27 00 00 st %g2, [ %i4 ] 200569c: 03 00 00 3f sethi %hi(0xfc00), %g1 20056a0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 20056a4: 84 08 80 01 and %g2, %g1, %g2 20056a8: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 20056ac: b0 10 20 00 clr %i0 20056b0: 40 00 09 37 call 2007b8c <_Thread_Enable_dispatch> 20056b4: e2 20 c0 02 st %l1, [ %g3 + %g2 ] 20056b8: 81 c7 e0 08 ret 20056bc: 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 ) ) 20056c0: 02 80 00 0f be 20056fc 20056c4: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 20056c8: 82 10 20 03 mov 3, %g1 20056cc: 10 bf ff bd b 20055c0 20056d0: c2 27 bf e8 st %g1, [ %fp + -24 ] _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 20056d4: 40 00 09 2e call 2007b8c <_Thread_Enable_dispatch> 20056d8: b0 10 20 05 mov 5, %i0 20056dc: 81 c7 e0 08 ret 20056e0: 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 ) { 20056e4: c2 07 bf e8 ld [ %fp + -24 ], %g1 20056e8: 80 a0 60 01 cmp %g1, 1 20056ec: 18 80 00 09 bgu 2005710 20056f0: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 20056f4: 10 bf ff b8 b 20055d4 20056f8: 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 ) ) 20056fc: 22 bf ff b1 be,a 20055c0 2005700: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 2005704: 82 10 20 01 mov 1, %g1 2005708: 10 bf ff ae b 20055c0 200570c: 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 ) { 2005710: 80 a0 60 03 cmp %g1, 3 2005714: 18 bf ff b1 bgu 20055d8 2005718: 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; 200571c: 82 10 20 01 mov 1, %g1 2005720: 10 bf ff ad b 20055d4 2005724: c2 2f bf e4 stb %g1, [ %fp + -28 ] 02023df0 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 2023df0: 9d e3 bf 90 save %sp, -112, %sp 2023df4: 11 00 81 7a sethi %hi(0x205e800), %o0 2023df8: 92 10 00 18 mov %i0, %o1 2023dfc: 90 12 21 58 or %o0, 0x158, %o0 2023e00: 7f ff 9a 1a call 200a668 <_Objects_Get> 2023e04: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 2023e08: c2 07 bf f4 ld [ %fp + -12 ], %g1 2023e0c: 80 a0 60 00 cmp %g1, 0 2023e10: 12 80 00 0b bne 2023e3c 2023e14: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 2023e18: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 2023e1c: 80 88 60 30 btst 0x30, %g1 2023e20: 12 80 00 09 bne 2023e44 2023e24: 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( 2023e28: 92 10 20 00 clr %o1 <== NOT EXECUTED 2023e2c: 7f ff 97 01 call 2009a30 <_CORE_semaphore_Flush> <== NOT EXECUTED 2023e30: 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(); 2023e34: 7f ff 9c 93 call 200b080 <_Thread_Enable_dispatch> 2023e38: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2023e3c: 81 c7 e0 08 ret 2023e40: 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( 2023e44: 92 10 20 00 clr %o1 2023e48: 7f ff 96 0f call 2009684 <_CORE_mutex_Flush> 2023e4c: 94 10 20 01 mov 1, %o2 2023e50: 30 bf ff f9 b,a 2023e34 020156f0 : */ void rtems_shutdown_executive( uint32_t result ) { 20156f0: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 20156f4: 05 00 80 60 sethi %hi(0x2018000), %g2 20156f8: c2 00 a3 74 ld [ %g2 + 0x374 ], %g1 ! 2018374 <_System_state_Current> 20156fc: 80 a0 60 04 cmp %g1, 4 2015700: 02 80 00 07 be 201571c 2015704: 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 ); 2015708: 13 00 80 60 sethi %hi(0x2018000), %o1 201570c: c2 20 a3 74 st %g1, [ %g2 + 0x374 ] 2015710: 92 12 61 48 or %o1, 0x148, %o1 2015714: 7f ff cf 18 call 2009374 <_CPU_Context_switch> 2015718: 90 07 bf 70 add %fp, -144, %o0 201571c: 81 c7 e0 08 ret <== NOT EXECUTED 2015720: 81 e8 00 00 restore <== NOT EXECUTED 020030d0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 20030d0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 20030d4: 21 00 81 7a sethi %hi(0x205e800), %l0 <== NOT EXECUTED 20030d8: c2 04 23 54 ld [ %l0 + 0x354 ], %g1 ! 205eb54 <_Thread_Executing> <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 20030dc: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 <== NOT EXECUTED 20030e0: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED 20030e4: 0a 80 00 07 bcs 2003100 <== NOT EXECUTED 20030e8: b0 10 20 00 clr %i0 <== NOT EXECUTED 20030ec: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 20030f0: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 20030f4: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED 20030f8: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 20030fc: 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 ) { 2003100: 03 00 81 2d sethi %hi(0x204b400), %g1 <== NOT EXECUTED 2003104: c4 00 63 58 ld [ %g1 + 0x358 ], %g2 ! 204b758 <== NOT EXECUTED 2003108: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 200310c: 12 80 00 0d bne 2003140 <== NOT EXECUTED 2003110: 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 ) 2003114: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED 2003118: 02 80 00 05 be 200312c <== NOT EXECUTED 200311c: 92 08 60 ff and %g1, 0xff, %o1 <== NOT EXECUTED 2003120: 92 88 60 ff andcc %g1, 0xff, %o1 <== NOT EXECUTED 2003124: 12 80 00 05 bne 2003138 <== NOT EXECUTED 2003128: 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 ); 200312c: d0 04 23 54 ld [ %l0 + 0x354 ], %o0 <== NOT EXECUTED 2003130: 7f ff ff cf call 200306c <== NOT EXECUTED 2003134: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 2003138: 81 c7 e0 08 ret <== NOT EXECUTED 200313c: 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( 2003140: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 2003144: 13 00 81 7a sethi %hi(0x205e800), %o1 <== NOT EXECUTED 2003148: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 200314c: 40 00 c3 82 call 2033f54 <== NOT EXECUTED 2003150: 92 12 60 84 or %o1, 0x84, %o1 <== NOT EXECUTED 2003154: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 2003158: 10 bf ff ef b 2003114 <== NOT EXECUTED 200315c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 02003050 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 2003050: 13 00 80 17 sethi %hi(0x2005c00), %o1 <== NOT EXECUTED 2003054: 90 10 20 00 clr %o0 <== NOT EXECUTED 2003058: 92 12 63 3c or %o1, 0x33c, %o1 <== NOT EXECUTED 200305c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2003060: 7f ff ff e6 call 2002ff8 <== NOT EXECUTED 2003064: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2003068: 01 00 00 00 nop 02002ff8 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 2002ff8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED print_context = context; 2002ffc: 23 00 81 2d sethi %hi(0x204b400), %l1 <== NOT EXECUTED print_handler = print; 2003000: 21 00 81 2d sethi %hi(0x204b400), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 2003004: f0 24 63 5c st %i0, [ %l1 + 0x35c ] <== NOT EXECUTED print_handler = print; 2003008: f2 24 23 60 st %i1, [ %l0 + 0x360 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 200300c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2003010: 13 00 81 0f sethi %hi(0x2043c00), %o1 <== NOT EXECUTED 2003014: 9f c6 40 00 call %i1 <== NOT EXECUTED 2003018: 92 12 63 08 or %o1, 0x308, %o1 ! 2043f08 <== NOT EXECUTED (*print)( context, 200301c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2003020: 13 00 81 0f sethi %hi(0x2043c00), %o1 <== NOT EXECUTED 2003024: 9f c6 40 00 call %i1 <== NOT EXECUTED 2003028: 92 12 63 20 or %o1, 0x320, %o1 ! 2043f20 <== 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 ); 200302c: 11 00 80 0b sethi %hi(0x2002c00), %o0 <== NOT EXECUTED 2003030: 40 00 1b b3 call 2009efc <== NOT EXECUTED 2003034: 90 12 22 a0 or %o0, 0x2a0, %o0 ! 2002ea0 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 2003038: 7f ff ff 9a call 2002ea0 <== NOT EXECUTED 200303c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 2003040: c0 24 63 5c clr [ %l1 + 0x35c ] <== NOT EXECUTED print_handler = NULL; 2003044: c0 24 23 60 clr [ %l0 + 0x360 ] <== NOT EXECUTED } 2003048: 81 c7 e0 08 ret <== NOT EXECUTED 200304c: 81 e8 00 00 restore <== NOT EXECUTED 02003160 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 2003160: 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; 2003164: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 2003168: 80 a7 80 02 cmp %fp, %g2 200316c: 0a 80 00 07 bcs 2003188 2003170: 90 00 a0 08 add %g2, 8, %o0 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 2003174: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 2003178: 82 00 80 01 add %g2, %g1, %g1 200317c: 80 a7 80 01 cmp %fp, %g1 2003180: 28 80 00 0b bleu,a 20031ac 2003184: 13 00 81 7a sethi %hi(0x205e800), %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, 2003188: 13 00 81 7a sethi %hi(0x205e800), %o1 <== NOT EXECUTED 200318c: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 2003190: 40 00 c3 71 call 2033f54 <== NOT EXECUTED 2003194: 92 12 60 84 or %o1, 0x84, %o1 <== NOT EXECUTED 2003198: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 200319c: 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 ); 20031a0: b2 08 60 01 and %g1, 1, %i1 <== NOT EXECUTED 20031a4: 7f ff ff b2 call 200306c <== NOT EXECUTED 20031a8: 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, 20031ac: 94 10 20 10 mov 0x10, %o2 20031b0: 40 00 c3 69 call 2033f54 20031b4: 92 12 60 84 or %o1, 0x84, %o1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 20031b8: 80 a2 20 00 cmp %o0, 0 20031bc: 12 bf ff f9 bne 20031a0 20031c0: 82 10 20 00 clr %g1 20031c4: 81 c7 e0 08 ret 20031c8: 81 e8 00 00 restore 02007c08 : const char * rtems_status_text( rtems_status_code status ) { 2007c08: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 2007c0c: 11 00 80 91 sethi %hi(0x2024400), %o0 <== NOT EXECUTED 2007c10: 90 12 23 98 or %o0, 0x398, %o0 ! 2024798 <== NOT EXECUTED 2007c14: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2007c18: 40 00 2c 02 call 2012c20 <== NOT EXECUTED 2007c1c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2007c20: 01 00 00 00 nop 02007840 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 2007840: 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() ) 2007844: 03 00 80 78 sethi %hi(0x201e000), %g1 2007848: c4 00 60 6c ld [ %g1 + 0x6c ], %g2 ! 201e06c <_Configuration_Table> rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 200784c: 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() ) 2007850: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1 2007854: c4 08 60 04 ldub [ %g1 + 4 ], %g2 2007858: 80 a0 a0 00 cmp %g2, 0 200785c: 02 80 00 1c be 20078cc 2007860: 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 ) 2007864: 80 a6 60 0f cmp %i1, 0xf 2007868: 18 80 00 19 bgu 20078cc 200786c: b0 10 20 0a mov 0xa, %i0 2007870: 03 00 80 78 sethi %hi(0x201e000), %g1 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 2007874: 80 a2 20 00 cmp %o0, 0 2007878: 02 80 00 17 be 20078d4 200787c: 86 10 60 94 or %g1, 0x94, %g3 2007880: 03 00 80 78 sethi %hi(0x201e000), %g1 2007884: c4 00 60 94 ld [ %g1 + 0x94 ], %g2 ! 201e094 <_Thread_Executing> 2007888: 86 10 60 94 or %g1, 0x94, %g3 200788c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 2007890: 80 a2 00 01 cmp %o0, %g1 2007894: 22 80 00 11 be,a 20078d8 2007898: 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 ); 200789c: 40 00 08 86 call 2009ab4 <_Thread_Get> 20078a0: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 20078a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 20078a8: 80 a0 60 00 cmp %g1, 0 20078ac: 12 80 00 08 bne 20078cc 20078b0: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 20078b4: c4 02 21 68 ld [ %o0 + 0x168 ], %g2 20078b8: 82 06 60 08 add %i1, 8, %g1 20078bc: 83 28 60 02 sll %g1, 2, %g1 _Thread_Enable_dispatch(); 20078c0: b0 10 20 00 clr %i0 20078c4: 40 00 08 6e call 2009a7c <_Thread_Enable_dispatch> 20078c8: f4 20 80 01 st %i2, [ %g2 + %g1 ] case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20078cc: 81 c7 e0 08 ret 20078d0: 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; 20078d4: c2 00 c0 00 ld [ %g3 ], %g1 20078d8: 84 06 60 08 add %i1, 8, %g2 20078dc: c6 00 61 68 ld [ %g1 + 0x168 ], %g3 20078e0: 85 28 a0 02 sll %g2, 2, %g2 20078e4: f4 20 c0 02 st %i2, [ %g3 + %g2 ] 20078e8: 81 c7 e0 08 ret 20078ec: 91 e8 20 00 restore %g0, 0, %o0 02002fd0 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 2002fd0: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 2002fd4: 05 00 80 5e sethi %hi(0x2017800), %g2 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 2002fd8: d0 20 60 04 st %o0, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 2002fdc: d2 20 a0 08 st %o1, [ %g2 + 8 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 2002fe0: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 2002fe4: 90 10 20 00 clr %o0 <== NOT EXECUTED 2002fe8: 81 c3 e0 08 retl <== NOT EXECUTED 2002fec: d4 20 60 0c st %o2, [ %g1 + 0xc ] <== NOT EXECUTED 0200470c : } } rtems_status_code rtems_termios_close (void *arg) { 200470c: 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); 2004710: 23 00 80 60 sethi %hi(0x2018000), %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; 2004714: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2004718: d0 04 60 88 ld [ %l1 + 0x88 ], %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; 200471c: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2004720: 92 10 20 00 clr %o1 2004724: 40 00 04 2e call 20057dc 2004728: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 200472c: 80 a2 20 00 cmp %o0, 0 2004730: 12 80 00 52 bne 2004878 2004734: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 2004738: c2 04 20 08 ld [ %l0 + 8 ], %g1 200473c: 82 00 7f ff add %g1, -1, %g1 2004740: 80 a0 60 00 cmp %g1, 0 2004744: 12 80 00 3a bne 200482c 2004748: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 200474c: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 2004750: 03 00 80 5f sethi %hi(0x2017c00), %g1 2004754: 85 28 a0 05 sll %g2, 5, %g2 2004758: 82 10 61 9c or %g1, 0x19c, %g1 200475c: 82 00 40 02 add %g1, %g2, %g1 2004760: c2 00 60 04 ld [ %g1 + 4 ], %g1 2004764: 80 a0 60 00 cmp %g1, 0 2004768: 02 80 00 46 be 2004880 200476c: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 2004770: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004774: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 2004778: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 200477c: 80 a0 60 02 cmp %g1, 2 2004780: 22 80 00 33 be,a 200484c 2004784: 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) 2004788: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 200478c: 80 a0 60 00 cmp %g1, 0 2004790: 22 80 00 07 be,a 20047ac 2004794: c4 04 00 00 ld [ %l0 ], %g2 (*tty->device.lastClose)(tty->major, tty->minor, arg); 2004798: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 200479c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 20047a0: 9f c0 40 00 call %g1 <== NOT EXECUTED 20047a4: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 20047a8: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 20047ac: 80 a0 a0 00 cmp %g2, 0 20047b0: 22 80 00 38 be,a 2004890 20047b4: c4 04 20 04 ld [ %l0 + 4 ], %g2 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 20047b8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 20047bc: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 20047c0: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 20047c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20047c8: 22 80 00 39 be,a 20048ac <== NOT EXECUTED 20047cc: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 20047d0: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 20047d4: 40 00 03 d5 call 2005728 20047d8: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 20047dc: 40 00 03 d3 call 2005728 20047e0: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 20047e4: 40 00 03 d1 call 2005728 20047e8: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 20047ec: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 20047f0: 80 a0 60 00 cmp %g1, 0 20047f4: 02 80 00 13 be 2004840 20047f8: 01 00 00 00 nop 20047fc: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 2004800: 80 a0 60 02 cmp %g1, 2 2004804: 02 80 00 0f be 2004840 2004808: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 200480c: 40 00 18 38 call 200a8ec 2004810: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 2004814: 40 00 18 36 call 200a8ec 2004818: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 200481c: 40 00 18 34 call 200a8ec 2004820: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 2004824: 40 00 18 32 call 200a8ec 2004828: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 200482c: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 2004830: 40 00 04 33 call 20058fc 2004834: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 2004838: 81 c7 e0 08 ret 200483c: 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); 2004840: 40 00 03 ba call 2005728 <== NOT EXECUTED 2004844: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 2004848: 30 bf ff f1 b,a 200480c <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 200484c: 40 00 02 90 call 200528c <== NOT EXECUTED 2004850: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 2004854: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004858: 12 80 00 08 bne 2004878 <== NOT EXECUTED 200485c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 2004860: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 2004864: 40 00 02 8a call 200528c <== NOT EXECUTED 2004868: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 200486c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004870: 22 bf ff c7 be,a 200478c <== NOT EXECUTED 2004874: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2004878: 40 00 05 9c call 2005ee8 <== NOT EXECUTED 200487c: 01 00 00 00 nop <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 2004880: 7f ff fd 6e call 2003e38 2004884: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 2004888: 10 bf ff bd b 200477c 200488c: 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; 2004890: 03 00 80 60 sethi %hi(0x2018000), %g1 if ( rtems_termios_ttyTail != NULL ) { 2004894: 80 a0 a0 00 cmp %g2, 0 2004898: 02 80 00 0a be 20048c0 200489c: c4 20 60 8c st %g2, [ %g1 + 0x8c ] rtems_termios_ttyTail->forw = NULL; 20048a0: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED 20048a4: 10 bf ff c7 b 20047c0 <== NOT EXECUTED 20048a8: 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 ) { 20048ac: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20048b0: 02 bf ff c9 be 20047d4 <== NOT EXECUTED 20048b4: c4 20 60 90 st %g2, [ %g1 + 0x90 ] <== NOT EXECUTED rtems_termios_ttyHead->back = NULL; 20048b8: 10 bf ff c7 b 20047d4 <== NOT EXECUTED 20048bc: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 20048c0: 03 00 80 60 sethi %hi(0x2018000), %g1 20048c4: 10 bf ff c4 b 20047d4 20048c8: c0 20 60 90 clr [ %g1 + 0x90 ] ! 2018090 02003204 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 2003204: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2003208: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 200320c: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 2003210: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 2003214: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2003218: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 200321c: 02 80 00 10 be 200325c <== NOT EXECUTED 2003220: 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 ) { 2003224: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 2003228: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 200322c: 12 80 00 0a bne 2003254 <== NOT EXECUTED 2003230: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 2003234: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 2017e50 <== NOT EXECUTED 2003238: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200323c: 02 80 00 04 be 200324c <== NOT EXECUTED 2003240: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2003244: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003248: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 200324c: 81 c7 e0 08 ret <== NOT EXECUTED 2003250: 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); 2003254: 7f ff ff 6d call 2003008 <== NOT EXECUTED 2003258: 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, 200325c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 2003260: 40 00 08 0b call 200528c <== NOT EXECUTED 2003264: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 2003268: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200326c: 02 bf ff f8 be 200324c <== NOT EXECUTED 2003270: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2003274: 40 00 0b 1d call 2005ee8 <== NOT EXECUTED 2003278: 01 00 00 00 nop 200327c: 01 00 00 00 nop 02003280 : * 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) { 2003280: 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) { 2003284: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 2003288: 05 00 80 5f sethi %hi(0x2017c00), %g2 <== NOT EXECUTED 200328c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 2003290: a2 10 a1 9c or %g2, 0x19c, %l1 <== NOT EXECUTED 2003294: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 2003298: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED 200329c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20032a0: 02 80 00 22 be 2003328 <== NOT EXECUTED 20032a4: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED while (len--) { 20032a8: 22 80 00 0f be,a 20032e4 <== NOT EXECUTED 20032ac: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 20032b0: 10 80 00 05 b 20032c4 <== NOT EXECUTED 20032b4: a0 10 20 00 clr %l0 <== NOT EXECUTED 20032b8: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 20032bc: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 20032c0: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 20032c4: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED 20032c8: 9f c0 40 00 call %g1 <== NOT EXECUTED 20032cc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 20032d0: 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--) { 20032d4: 80 a4 00 1a cmp %l0, %i2 <== NOT EXECUTED 20032d8: 32 bf ff f8 bne,a 20032b8 <== NOT EXECUTED 20032dc: 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 )) { 20032e0: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 20032e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20032e8: 12 80 00 0e bne 2003320 <== NOT EXECUTED 20032ec: a6 10 20 00 clr %l3 <== NOT EXECUTED 20032f0: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 20032f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20032f8: 02 80 00 0a be 2003320 <== NOT EXECUTED 20032fc: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2003300: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 2003304: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003308: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 200330c: a6 10 20 00 clr %l3 <== NOT EXECUTED 2003310: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 2003314: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 2003318: 81 c7 e0 08 ret <== NOT EXECUTED 200331c: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED 2003320: 81 c7 e0 08 ret <== NOT EXECUTED 2003324: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2003328: 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, 200332c: 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); 2003330: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED 2003334: a6 10 20 00 clr %l3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2003338: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 200333c: 02 80 00 1c be 20033ac <== NOT EXECUTED 2003340: 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) { 2003344: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003348: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 200334c: 02 80 00 0b be 2003378 <== NOT EXECUTED 2003350: 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]) { 2003354: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 2003358: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED 200335c: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 2003360: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 2003364: 02 80 00 64 be 20034f4 <== NOT EXECUTED 2003368: 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]) { 200336c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 2003370: 02 80 00 68 be 2003510 <== NOT EXECUTED 2003374: 01 00 00 00 nop <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 2003378: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED 200337c: 02 80 00 24 be 200340c <== NOT EXECUTED 2003380: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2003384: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003388: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 200338c: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 2003390: 02 80 00 0f be 20033cc <== NOT EXECUTED 2003394: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 2003398: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 200339c: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 20033a0: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 20033a4: 12 bf ff e8 bne 2003344 <== NOT EXECUTED 20033a8: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 20033ac: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 20033b0: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 20033b4: 82 00 40 13 add %g1, %l3, %g1 <== NOT EXECUTED 20033b8: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 20033bc: 40 00 09 50 call 20058fc <== NOT EXECUTED 20033c0: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED return dropped; } 20033c4: 81 c7 e0 08 ret <== NOT EXECUTED 20033c8: 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); 20033cc: 7f ff fa 76 call 2001da4 <== NOT EXECUTED 20033d0: 01 00 00 00 nop <== NOT EXECUTED 20033d4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 20033d8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 20033dc: 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; 20033e0: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 20033e4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 20033e8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20033ec: 12 80 00 53 bne 2003538 <== NOT EXECUTED 20033f0: 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); 20033f4: a2 10 20 01 mov 1, %l1 ! 1 <== NOT EXECUTED 20033f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 20033fc: 7f ff fa 6e call 2001db4 <== NOT EXECUTED 2003400: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 2003404: 10 bf ff e7 b 20033a0 <== NOT EXECUTED 2003408: 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; 200340c: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 2003410: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 2003414: 40 00 44 ff call 2014810 <.urem> <== NOT EXECUTED 2003418: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 200341c: 7f ff fa 62 call 2001da4 <== NOT EXECUTED 2003420: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 2003424: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 2003428: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 200342c: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 2003430: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 2003434: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 2003438: 40 00 44 f6 call 2014810 <.urem> <== NOT EXECUTED 200343c: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 2003440: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 2003444: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2003448: 08 80 00 13 bleu 2003494 <== NOT EXECUTED 200344c: 01 00 00 00 nop <== NOT EXECUTED 2003450: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003454: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2003458: 12 80 00 0f bne 2003494 <== NOT EXECUTED 200345c: 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; 2003460: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003464: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 2003468: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 200346c: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED 2003470: 84 08 a4 02 and %g2, 0x402, %g2 <== NOT EXECUTED 2003474: 80 a0 a4 00 cmp %g2, 0x400 <== NOT EXECUTED 2003478: 02 80 00 38 be 2003558 <== NOT EXECUTED 200347c: 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)) 2003480: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003484: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 2003488: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 200348c: 02 80 00 44 be 200359c <== NOT EXECUTED 2003490: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 2003494: 7f ff fa 48 call 2001db4 <== NOT EXECUTED 2003498: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 200349c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 20034a0: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 20034a4: 22 80 00 1f be,a 2003520 <== NOT EXECUTED 20034a8: a6 04 e0 01 inc %l3 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 20034ac: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED 20034b0: 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 )) { 20034b4: 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; 20034b8: 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 )) { 20034bc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20034c0: 32 bf ff b7 bne,a 200339c <== NOT EXECUTED 20034c4: b2 06 60 01 inc %i1 <== NOT EXECUTED 20034c8: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 20034cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20034d0: 22 bf ff b3 be,a 200339c <== NOT EXECUTED 20034d4: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 20034d8: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 20034dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 20034e0: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 20034e4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 20034e8: 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; 20034ec: 10 bf ff ac b 200339c <== NOT EXECUTED 20034f0: 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]) { 20034f4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 20034f8: 02 80 00 0c be 2003528 <== NOT EXECUTED 20034fc: 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; 2003500: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003504: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 2003508: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 200350c: 30 bf ff 9e b,a 2003384 <== NOT EXECUTED flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 2003510: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003514: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 2003518: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 200351c: 30 bf ff 9a b,a 2003384 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 2003520: 10 bf ff 9f b 200339c <== NOT EXECUTED 2003524: 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; 2003528: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 200352c: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED 2003530: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 2003534: 30 bf ff 94 b,a 2003384 <== 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, 2003538: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 200353c: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 2003540: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 2003544: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 2003548: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 200354c: 9f c0 80 00 call %g2 <== NOT EXECUTED 2003550: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2003554: 30 bf ff a8 b,a 20033f4 <== 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) || 2003558: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 200355c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2003560: 12 80 00 06 bne 2003578 <== NOT EXECUTED 2003564: 01 00 00 00 nop <== NOT EXECUTED 2003568: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 200356c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003570: 12 bf ff c9 bne 2003494 <== NOT EXECUTED 2003574: 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; 2003578: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 200357c: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 2003580: 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; 2003584: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2003588: 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; 200358c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 2003590: 9f c0 80 00 call %g2 <== NOT EXECUTED 2003594: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2003598: 30 bf ff bf b,a 2003494 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 200359c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 20035a0: 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; 20035a4: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 20035a8: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 20035ac: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20035b0: 02 bf ff b9 be 2003494 <== NOT EXECUTED 20035b4: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 20035b8: 9f c0 80 00 call %g2 <== NOT EXECUTED 20035bc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 20035c0: 30 bf ff b5 b,a 2003494 <== NOT EXECUTED 02002f80 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 2002f80: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 2002f84: 03 00 80 60 sethi %hi(0x2018000), %g1 2002f88: c4 00 60 88 ld [ %g1 + 0x88 ], %g2 ! 2018088 2002f8c: 80 a0 a0 00 cmp %g2, 0 2002f90: 02 80 00 04 be 2002fa0 2002f94: 98 10 60 88 or %g1, 0x88, %o4 2002f98: 81 c7 e0 08 ret 2002f9c: 81 e8 00 00 restore sc = rtems_semaphore_create ( 2002fa0: 11 15 14 9b sethi %hi(0x54526c00), %o0 2002fa4: 92 10 20 01 mov 1, %o1 2002fa8: 90 12 21 69 or %o0, 0x169, %o0 2002fac: 94 10 20 54 mov 0x54, %o2 2002fb0: 40 00 09 64 call 2005540 2002fb4: 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) 2002fb8: 80 a2 20 00 cmp %o0, 0 2002fbc: 02 bf ff f7 be 2002f98 2002fc0: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 2002fc4: 40 00 0b c9 call 2005ee8 <== NOT EXECUTED 2002fc8: 01 00 00 00 nop 2002fcc: 01 00 00 00 nop 020042f8 : } } rtems_status_code rtems_termios_ioctl (void *arg) { 20042f8: 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; 20042fc: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 2004300: 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; 2004304: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 2004308: 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); 200430c: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 2004310: 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); 2004314: 92 10 20 00 clr %o1 <== NOT EXECUTED 2004318: 40 00 05 31 call 20057dc <== NOT EXECUTED 200431c: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 2004320: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2004324: 32 80 00 12 bne,a 200436c <== NOT EXECUTED 2004328: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED args->ioctl_return = sc; return sc; } switch (args->command) { 200432c: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED 2004330: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 2004334: 22 80 00 27 be,a 20043d0 <== NOT EXECUTED 2004338: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 200433c: 18 80 00 0e bgu 2004374 <== NOT EXECUTED 2004340: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 2004344: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 2004348: 22 80 00 61 be,a 20044cc <== NOT EXECUTED 200434c: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 2004350: 08 80 00 4c bleu 2004480 <== NOT EXECUTED 2004354: 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); 2004358: 7f ff fe b8 call 2003e38 <== NOT EXECUTED 200435c: 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); 2004360: 40 00 05 67 call 20058fc <== NOT EXECUTED 2004364: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 2004368: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 200436c: 81 c7 e0 08 ret <== NOT EXECUTED 2004370: 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) { 2004374: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 2004378: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 200437c: 02 80 00 48 be 200449c <== NOT EXECUTED 2004380: 01 00 00 00 nop <== NOT EXECUTED 2004384: 18 80 00 1b bgu 20043f0 <== NOT EXECUTED 2004388: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 200438c: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 2004390: 22 80 00 14 be,a 20043e0 <== NOT EXECUTED 2004394: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 2004398: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED 200439c: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED 20043a0: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 20043a4: 82 10 61 9c or %g1, 0x19c, %g1 <== NOT EXECUTED 20043a8: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 20043ac: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 20043b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20043b4: 02 bf ff eb be 2004360 <== NOT EXECUTED 20043b8: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 20043bc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 20043c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 20043c4: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 20043c8: 10 bf ff e6 b 2004360 <== NOT EXECUTED 20043cc: 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; 20043d0: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 20043d4: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 20043d8: 10 bf ff e2 b 2004360 <== NOT EXECUTED 20043dc: 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; 20043e0: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 20043e4: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 20043e8: 10 bf ff de b 2004360 <== NOT EXECUTED 20043ec: 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) { 20043f0: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 20043f4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 20043f8: 02 80 00 1e be 2004470 <== NOT EXECUTED 20043fc: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 2004400: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 2004404: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004408: 32 bf ff e5 bne,a 200439c <== NOT EXECUTED 200440c: 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) { 2004410: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 2004414: 05 00 80 5f sethi %hi(0x2017c00), %g2 <== NOT EXECUTED 2004418: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 200441c: a0 10 a1 9c or %g2, 0x19c, %l0 <== NOT EXECUTED 2004420: 82 04 00 01 add %l0, %g1, %g1 <== NOT EXECUTED 2004424: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 2004428: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 200442c: 22 80 00 06 be,a 2004444 <== NOT EXECUTED 2004430: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 2004434: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004438: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 200443c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 2004440: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 2004444: 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); 2004448: 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) { 200444c: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED 2004450: c2 04 00 02 ld [ %l0 + %g2 ], %g1 <== NOT EXECUTED 2004454: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004458: 02 bf ff c2 be 2004360 <== NOT EXECUTED 200445c: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 2004460: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004464: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2004468: 10 bf ff be b 2004360 <== NOT EXECUTED 200446c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 2004470: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 2004474: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 2004478: 10 bf ff ba b 2004360 <== NOT EXECUTED 200447c: 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) { 2004480: 32 bf ff c7 bne,a 200439c <== NOT EXECUTED 2004484: 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; 2004488: d0 04 a0 08 ld [ %l2 + 8 ], %o0 <== NOT EXECUTED 200448c: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 2004490: 40 00 27 5b call 200e1fc <== NOT EXECUTED 2004494: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 2004498: 30 bf ff b2 b,a 2004360 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 200449c: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 20044a0: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 20044a4: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 20044a8: 0c 80 00 82 bneg 20046b0 <== NOT EXECUTED 20044ac: 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; 20044b0: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 20044b4: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 20044b8: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 20044bc: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20044c0: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 20044c4: 10 bf ff a7 b 2004360 <== NOT EXECUTED 20044c8: 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; 20044cc: a6 04 60 30 add %l1, 0x30, %l3 <== NOT EXECUTED 20044d0: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 20044d4: 40 00 27 4a call 200e1fc <== NOT EXECUTED 20044d8: 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) && 20044dc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20044e0: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 20044e4: 02 80 00 19 be 2004548 <== NOT EXECUTED 20044e8: 01 00 00 00 nop <== NOT EXECUTED 20044ec: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 20044f0: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 20044f4: 12 80 00 15 bne 2004548 <== NOT EXECUTED 20044f8: 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); 20044fc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004500: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 2004504: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 2004508: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 200450c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 2004510: 02 80 00 0e be 2004548 <== NOT EXECUTED 2004514: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 2004518: 7f ff f6 23 call 2001da4 <== NOT EXECUTED 200451c: 01 00 00 00 nop <== NOT EXECUTED 2004520: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 2004524: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2004528: 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; 200452c: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 2004530: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2004534: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2004538: 12 80 00 6d bne 20046ec <== NOT EXECUTED 200453c: 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); 2004540: 7f ff f6 1d call 2001db4 <== NOT EXECUTED 2004544: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 2004548: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 200454c: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 2004550: 02 80 00 0c be 2004580 <== NOT EXECUTED 2004554: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 2004558: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 200455c: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 2004560: 12 80 00 08 bne 2004580 <== NOT EXECUTED 2004564: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 2004568: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 200456c: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 2004570: 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); 2004574: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 2004578: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED 200457c: 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) && 2004580: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004584: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 2004588: 12 80 00 22 bne 2004610 <== NOT EXECUTED 200458c: 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) { 2004590: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2004594: 06 80 00 4a bl 20046bc <== NOT EXECUTED 2004598: 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) { 200459c: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 20045a0: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 20045a4: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 20045a8: 02 80 00 06 be 20045c0 <== NOT EXECUTED 20045ac: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 20045b0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20045b4: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 20045b8: 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) { 20045bc: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED 20045c0: 22 80 00 06 be,a 20045d8 <== NOT EXECUTED 20045c4: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 20045c8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20045cc: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 20045d0: 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) { 20045d4: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 20045d8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20045dc: 02 80 00 23 be 2004668 <== NOT EXECUTED 20045e0: 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; 20045e4: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 20045e8: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 20045ec: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 20045f0: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 20045f4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20045f8: 02 bf ff 5a be 2004360 <== NOT EXECUTED 20045fc: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 2004600: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 2004604: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004608: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 200460c: 30 bf ff 55 b,a 2004360 <== 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) && 2004610: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2004614: 06 80 00 2a bl 20046bc <== NOT EXECUTED 2004618: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 200461c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004620: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 2004624: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 2004628: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 200462c: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 2004630: 02 80 00 09 be 2004654 <== NOT EXECUTED 2004634: 01 00 00 00 nop <== NOT EXECUTED 2004638: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 200463c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004640: 02 80 00 05 be 2004654 <== NOT EXECUTED 2004644: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 2004648: 9f c0 40 00 call %g1 <== NOT EXECUTED 200464c: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 2004650: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 2004654: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 2004658: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 200465c: 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) { 2004660: 10 bf ff cd b 2004594 <== NOT EXECUTED 2004664: 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); 2004668: 40 00 01 ff call 2004e64 <== NOT EXECUTED 200466c: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 2004670: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 2004674: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 2004678: 40 00 3f 80 call 2014478 <.umul> <== NOT EXECUTED 200467c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2004680: 40 00 3f b8 call 2014560 <.udiv> <== NOT EXECUTED 2004684: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 2004688: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 200468c: 02 80 00 11 be 20046d0 <== NOT EXECUTED 2004690: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 2004694: 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; 2004698: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 200469c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20046a0: 12 bf ff d3 bne 20045ec <== NOT EXECUTED 20046a4: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 20046a8: 10 bf ff d2 b 20045f0 <== NOT EXECUTED 20046ac: 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; 20046b0: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 20046b4: 10 bf ff 7f b 20044b0 <== NOT EXECUTED 20046b8: 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; 20046bc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 20046c0: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 20046c4: 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) { 20046c8: 10 bf ff b6 b 20045a0 <== NOT EXECUTED 20046cc: 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]) { 20046d0: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED 20046d4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20046d8: 32 bf ff c4 bne,a 20045e8 <== NOT EXECUTED 20046dc: 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; 20046e0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 20046e4: 10 bf ff c3 b 20045f0 <== NOT EXECUTED 20046e8: 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, 20046ec: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 20046f0: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 20046f4: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 20046f8: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 20046fc: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 2004700: 9f c0 80 00 call %g2 <== NOT EXECUTED 2004704: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2004708: 30 bf ff 8e b,a 2004540 <== NOT EXECUTED 020048cc : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 20048cc: 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, 20048d0: 29 00 80 60 sethi %hi(0x2018000), %l4 20048d4: d0 05 20 88 ld [ %l4 + 0x88 ], %o0 ! 2018088 20048d8: 92 10 20 00 clr %o1 20048dc: 40 00 03 c0 call 20057dc 20048e0: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 20048e4: a4 92 20 00 orcc %o0, 0, %l2 20048e8: 32 80 00 29 bne,a 200498c 20048ec: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 20048f0: 27 00 80 60 sethi %hi(0x2018000), %l3 20048f4: e0 04 e0 90 ld [ %l3 + 0x90 ], %l0 ! 2018090 20048f8: 80 a4 20 00 cmp %l0, 0 20048fc: 32 80 00 08 bne,a 200491c 2004900: c2 04 20 0c ld [ %l0 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 2004904: 10 80 00 24 b 2004994 2004908: 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) { 200490c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 2004910: 02 80 00 21 be 2004994 <== NOT EXECUTED 2004914: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 2004918: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 200491c: 80 a0 40 18 cmp %g1, %i0 2004920: 32 bf ff fb bne,a 200490c 2004924: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 2004928: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 200492c: 80 a0 40 19 cmp %g1, %i1 2004930: 32 bf ff f7 bne,a 200490c 2004934: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 2004938: c2 04 20 08 ld [ %l0 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 200493c: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 2004940: 86 00 60 01 add %g1, 1, %g3 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 2004944: e0 20 a0 28 st %l0, [ %g2 + 0x28 ] if (!tty->refcount++) { 2004948: 80 a0 60 00 cmp %g1, 0 200494c: 12 80 00 0d bne 2004980 2004950: c6 24 20 08 st %g3, [ %l0 + 8 ] if (tty->device.firstOpen) 2004954: c2 04 20 98 ld [ %l0 + 0x98 ], %g1 2004958: 80 a0 60 00 cmp %g1, 0 200495c: 02 80 00 05 be 2004970 2004960: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 2004964: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2004968: 9f c0 40 00 call %g1 <== NOT EXECUTED 200496c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2004970: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 2004974: 80 a0 60 02 cmp %g1, 2 2004978: 22 80 00 a0 be,a 2004bf8 200497c: 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); 2004980: 40 00 03 df call 20058fc 2004984: d0 05 20 88 ld [ %l4 + 0x88 ], %o0 return RTEMS_SUCCESSFUL; } 2004988: b0 10 00 12 mov %l2, %i0 200498c: 81 c7 e0 08 ret 2004990: 81 e8 00 00 restore static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 2004994: 40 00 17 90 call 200a7d4 2004998: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 200499c: a2 92 20 00 orcc %o0, 0, %l1 20049a0: 02 80 00 a8 be 2004c40 20049a4: a0 10 00 11 mov %l1, %l0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 20049a8: 03 00 80 5e sethi %hi(0x2017800), %g1 20049ac: c4 00 60 08 ld [ %g1 + 8 ], %g2 ! 2017808 20049b0: c4 24 60 64 st %g2, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 20049b4: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 20049b8: 40 00 19 4c call 200aee8 20049bc: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 20049c0: 80 a2 20 00 cmp %o0, 0 20049c4: 02 80 00 9d be 2004c38 20049c8: d0 24 60 58 st %o0, [ %l1 + 0x58 ] return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 20049cc: 03 00 80 5e sethi %hi(0x2017800), %g1 20049d0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 201780c 20049d4: c4 24 60 88 st %g2, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 20049d8: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 20049dc: 40 00 19 43 call 200aee8 20049e0: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 20049e4: 80 a2 20 00 cmp %o0, 0 20049e8: 02 80 00 9b be 2004c54 20049ec: d0 24 60 7c st %o0, [ %l1 + 0x7c ] return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 20049f0: 03 00 80 5e sethi %hi(0x2017800), %g1 20049f4: 40 00 19 3d call 200aee8 20049f8: d0 00 60 04 ld [ %g1 + 4 ], %o0 ! 2017804 if (tty->cbuf == NULL) { 20049fc: 80 a2 20 00 cmp %o0, 0 2004a00: 02 80 00 ab be 2004cac 2004a04: d0 24 60 1c st %o0, [ %l1 + 0x1c ] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 2004a08: c2 04 e0 90 ld [ %l3 + 0x90 ], %g1 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 2004a0c: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 2004a10: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 2004a14: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 2004a18: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 2004a1c: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 2004a20: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 2004a24: 80 a0 60 00 cmp %g1, 0 2004a28: 02 80 00 03 be 2004a34 2004a2c: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 2004a30: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 2004a34: 05 00 80 60 sethi %hi(0x2018000), %g2 2004a38: c2 00 a0 8c ld [ %g2 + 0x8c ], %g1 ! 201808c 2004a3c: 80 a0 60 00 cmp %g1, 0 2004a40: 02 80 00 b8 be 2004d20 2004a44: e2 24 e0 90 st %l1, [ %l3 + 0x90 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2004a48: 27 00 80 5e sethi %hi(0x2017800), %l3 2004a4c: c2 4c e0 10 ldsb [ %l3 + 0x10 ], %g1 ! 2017810 2004a50: 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; 2004a54: f2 24 60 10 st %i1, [ %l1 + 0x10 ] tty->major = major; 2004a58: f0 24 60 0c st %i0, [ %l1 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2004a5c: 90 12 21 00 or %o0, 0x100, %o0 2004a60: 92 10 20 01 mov 1, %o1 2004a64: 90 10 40 08 or %g1, %o0, %o0 2004a68: 94 10 20 54 mov 0x54, %o2 2004a6c: 96 10 20 00 clr %o3 2004a70: 40 00 02 b4 call 2005540 2004a74: 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) 2004a78: 80 a2 20 00 cmp %o0, 0 2004a7c: 12 80 00 6d bne 2004c30 2004a80: c2 4c e0 10 ldsb [ %l3 + 0x10 ], %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 2004a84: 11 15 14 9b sethi %hi(0x54526c00), %o0 2004a88: 92 10 20 01 mov 1, %o1 2004a8c: 90 12 23 00 or %o0, 0x300, %o0 2004a90: 94 10 20 54 mov 0x54, %o2 2004a94: 90 10 40 08 or %g1, %o0, %o0 2004a98: 96 10 20 00 clr %o3 2004a9c: 40 00 02 a9 call 2005540 2004aa0: 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) 2004aa4: 80 a2 20 00 cmp %o0, 0 2004aa8: 12 80 00 62 bne 2004c30 2004aac: c2 4c e0 10 ldsb [ %l3 + 0x10 ], %g1 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 2004ab0: 11 15 14 9e sethi %hi(0x54527800), %o0 2004ab4: 92 10 20 00 clr %o1 2004ab8: 90 10 40 08 or %g1, %o0, %o0 2004abc: 94 10 20 20 mov 0x20, %o2 2004ac0: 96 10 20 00 clr %o3 2004ac4: 40 00 02 9f call 2005540 2004ac8: 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) 2004acc: 80 a2 20 00 cmp %o0, 0 2004ad0: 12 80 00 58 bne 2004c30 2004ad4: 92 10 00 1b mov %i3, %o1 rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 2004ad8: c0 24 60 94 clr [ %l1 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 2004adc: 90 04 60 98 add %l1, 0x98, %o0 2004ae0: 40 00 25 c7 call 200e1fc 2004ae4: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2004ae8: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 2004aec: 80 a0 60 02 cmp %g1, 2 2004af0: 02 80 00 74 be 2004cc0 2004af4: c2 4c e0 10 ldsb [ %l3 + 0x10 ], %g1 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 2004af8: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 2004afc: 80 a0 60 00 cmp %g1, 0 2004b00: 02 80 00 5e be 2004c78 2004b04: c2 4c e0 10 ldsb [ %l3 + 0x10 ], %g1 2004b08: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 2004b0c: 80 a0 60 02 cmp %g1, 2 2004b10: 02 80 00 5a be 2004c78 2004b14: c2 4c e0 10 ldsb [ %l3 + 0x10 ], %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; 2004b18: c0 24 60 b8 clr [ %l1 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 2004b1c: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 2004b20: c8 0c e0 10 ldub [ %l3 + 0x10 ], %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; 2004b24: 83 30 60 01 srl %g1, 1, %g1 2004b28: c2 24 60 bc st %g1, [ %l1 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 2004b2c: 03 00 00 09 sethi %hi(0x2400), %g1 2004b30: 82 10 61 02 or %g1, 0x102, %g1 ! 2502 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 2004b34: 05 00 00 06 sethi %hi(0x1800), %g2 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 2004b38: c2 24 60 30 st %g1, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 2004b3c: 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; 2004b40: 03 00 00 20 sethi %hi(0x8000), %g1 2004b44: 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; 2004b48: 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; 2004b4c: c2 24 60 3c st %g1, [ %l1 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 2004b50: 84 10 20 03 mov 3, %g2 tty->termios.c_cc[VQUIT] = '\034'; 2004b54: 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'; 2004b58: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 2004b5c: c2 2c 60 42 stb %g1, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 2004b60: 84 10 20 7f mov 0x7f, %g2 tty->termios.c_cc[VKILL] = '\025'; 2004b64: 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'; 2004b68: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 2004b6c: c2 2c 60 44 stb %g1, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 2004b70: 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'; 2004b74: 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; 2004b78: 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'; 2004b7c: 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'; 2004b80: c2 2c 60 49 stb %g1, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 2004b84: 84 10 20 13 mov 0x13, %g2 tty->termios.c_cc[VSUSP] = '\032'; 2004b88: 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; 2004b8c: 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'; 2004b90: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 2004b94: c2 2c 60 4b stb %g1, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 2004b98: 84 10 20 12 mov 0x12, %g2 tty->termios.c_cc[VDISCARD] = '\017'; 2004b9c: 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; 2004ba0: 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'; 2004ba4: c4 2c 60 4d stb %g2, [ %l1 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 2004ba8: c2 2c 60 4e stb %g1, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 2004bac: 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'; 2004bb0: 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'; 2004bb4: 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'; 2004bb8: 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'; 2004bbc: 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; 2004bc0: 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'; 2004bc4: 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; 2004bc8: 82 00 40 0d add %g1, %o5, %g1 2004bcc: 83 30 60 02 srl %g1, 2, %g1 2004bd0: c2 24 60 c0 st %g1, [ %l1 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 2004bd4: 84 01 20 01 add %g4, 1, %g2 2004bd8: 89 29 20 18 sll %g4, 0x18, %g4 2004bdc: 89 39 20 18 sra %g4, 0x18, %g4 2004be0: 80 a1 20 7a cmp %g4, 0x7a 2004be4: 12 bf ff 55 bne 2004938 2004be8: c4 2c e0 10 stb %g2, [ %l3 + 0x10 ] c = 'a'; 2004bec: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 2004bf0: 10 bf ff 52 b 2004938 <== NOT EXECUTED 2004bf4: c2 2c e0 10 stb %g1, [ %l3 + 0x10 ] <== 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, 2004bf8: 13 00 80 13 sethi %hi(0x2004c00), %o1 <== NOT EXECUTED 2004bfc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 2004c00: 40 00 04 14 call 2005c50 <== NOT EXECUTED 2004c04: 92 12 61 c0 or %o1, 0x1c0, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 2004c08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004c0c: 12 80 00 09 bne 2004c30 <== NOT EXECUTED 2004c10: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 2004c14: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 2004c18: 13 00 80 13 sethi %hi(0x2004c00), %o1 <== NOT EXECUTED 2004c1c: 40 00 04 0d call 2005c50 <== NOT EXECUTED 2004c20: 92 12 61 28 or %o1, 0x128, %o1 ! 2004d28 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 2004c24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004c28: 02 bf ff 56 be 2004980 <== NOT EXECUTED 2004c2c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2004c30: 40 00 04 ae call 2005ee8 <== NOT EXECUTED 2004c34: 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); 2004c38: 40 00 17 2d call 200a8ec <== NOT EXECUTED 2004c3c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 2004c40: d0 05 20 88 ld [ %l4 + 0x88 ], %o0 <== NOT EXECUTED 2004c44: 40 00 03 2e call 20058fc <== NOT EXECUTED 2004c48: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 2004c4c: 81 c7 e0 08 ret <== NOT EXECUTED 2004c50: 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)); 2004c54: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 2004c58: 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)); 2004c5c: 40 00 17 24 call 200a8ec <== NOT EXECUTED 2004c60: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED free(tty); 2004c64: 40 00 17 22 call 200a8ec <== NOT EXECUTED 2004c68: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 2004c6c: 40 00 03 24 call 20058fc <== NOT EXECUTED 2004c70: d0 05 20 88 ld [ %l4 + 0x88 ], %o0 <== NOT EXECUTED 2004c74: 30 bf ff 46 b,a 200498c <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 2004c78: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 2004c7c: 92 10 20 00 clr %o1 <== NOT EXECUTED 2004c80: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 2004c84: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 2004c88: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 2004c8c: 96 10 20 00 clr %o3 <== NOT EXECUTED 2004c90: 40 00 02 2c call 2005540 <== NOT EXECUTED 2004c94: 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) 2004c98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004c9c: 02 bf ff 9f be 2004b18 <== NOT EXECUTED 2004ca0: 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); 2004ca4: 40 00 04 91 call 2005ee8 <== NOT EXECUTED 2004ca8: 01 00 00 00 nop <== NOT EXECUTED /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); 2004cac: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 2004cb0: 40 00 17 0f call 200a8ec <== NOT EXECUTED 2004cb4: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 2004cb8: 10 bf ff e9 b 2004c5c <== NOT EXECUTED 2004cbc: 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 ( 2004cc0: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 2004cc4: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 2004cc8: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 2004ccc: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 2004cd0: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 2004cd4: 98 10 20 00 clr %o4 <== NOT EXECUTED 2004cd8: 40 00 03 34 call 20059a8 <== NOT EXECUTED 2004cdc: 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) 2004ce0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004ce4: 12 bf ff d3 bne 2004c30 <== NOT EXECUTED 2004ce8: c2 4c e0 10 ldsb [ %l3 + 0x10 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 2004cec: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 2004cf0: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 2004cf4: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 2004cf8: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 2004cfc: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 2004d00: 98 10 20 00 clr %o4 <== NOT EXECUTED 2004d04: 40 00 03 29 call 20059a8 <== NOT EXECUTED 2004d08: 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) 2004d0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004d10: 22 bf ff 7b be,a 2004afc <== NOT EXECUTED 2004d14: 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); 2004d18: 40 00 04 74 call 2005ee8 <== NOT EXECUTED 2004d1c: 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; 2004d20: 10 bf ff 4a b 2004a48 2004d24: e2 20 a0 8c st %l1, [ %g2 + 0x8c ] 020035c4 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 20035c4: 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) { 20035c8: 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) { 20035cc: 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) { 20035d0: 80 a0 60 00 cmp %g1, 0 20035d4: 02 80 00 44 be 20036e4 20035d8: a6 10 00 18 mov %i0, %l3 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 20035dc: e4 06 a0 80 ld [ %i2 + 0x80 ], %l2 <== NOT EXECUTED while (len) { 20035e0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 20035e4: 02 80 00 44 be 20036f4 <== NOT EXECUTED 20035e8: 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; 20035ec: 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; 20035f0: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 20035f4: 40 00 44 87 call 2014810 <.urem> <== NOT EXECUTED 20035f8: 90 04 a0 01 add %l2, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 20035fc: 7f ff f9 ea call 2001da4 <== NOT EXECUTED 2003600: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 2003604: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 2003608: e0 06 a0 84 ld [ %i2 + 0x84 ], %l0 <== NOT EXECUTED 200360c: 80 a4 00 12 cmp %l0, %l2 <== NOT EXECUTED 2003610: 12 80 00 13 bne 200365c <== NOT EXECUTED 2003614: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2003618: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 200361c: 7f ff f9 e6 call 2001db4 <== NOT EXECUTED 2003620: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2003624: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 2003628: 92 10 20 00 clr %o1 <== NOT EXECUTED 200362c: 40 00 08 6c call 20057dc <== NOT EXECUTED 2003630: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2003634: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2003638: 12 80 00 20 bne 20036b8 <== NOT EXECUTED 200363c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 2003640: 7f ff f9 d9 call 2001da4 <== NOT EXECUTED 2003644: 01 00 00 00 nop <== NOT EXECUTED 2003648: 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) { 200364c: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 2003650: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 2003654: 22 bf ff f2 be,a 200361c <== NOT EXECUTED 2003658: 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++; 200365c: c8 06 a0 80 ld [ %i2 + 0x80 ], %g4 <== NOT EXECUTED 2003660: c4 0c c0 00 ldub [ %l3 ], %g2 <== NOT EXECUTED 2003664: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 2003668: c4 28 40 04 stb %g2, [ %g1 + %g4 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 200366c: 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; 2003670: e4 26 a0 80 st %l2, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 2003674: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 2003678: 12 80 00 0a bne 20036a0 <== NOT EXECUTED 200367c: 01 00 00 00 nop <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 2003680: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 2003684: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 2003688: 02 80 00 0e be 20036c0 <== NOT EXECUTED 200368c: 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; 2003690: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 2003694: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 2003698: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 200369c: e8 26 a0 94 st %l4, [ %i2 + 0x94 ] <== NOT EXECUTED } rtems_interrupt_enable (level); 20036a0: 7f ff f9 c5 call 2001db4 <== NOT EXECUTED 20036a4: 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) { 20036a8: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED 20036ac: 02 80 00 12 be 20036f4 <== NOT EXECUTED 20036b0: a6 04 e0 01 inc %l3 <== NOT EXECUTED 20036b4: 30 bf ff cf b,a 20035f0 <== 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); 20036b8: 40 00 0a 0c call 2005ee8 <== NOT EXECUTED 20036bc: 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, 20036c0: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 20036c4: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 20036c8: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 20036cc: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 20036d0: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 20036d4: 9f c0 80 00 call %g2 <== NOT EXECUTED 20036d8: 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; 20036dc: 10 bf ff f1 b 20036a0 <== NOT EXECUTED 20036e0: 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); 20036e4: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 20036e8: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 20036ec: 9f c0 40 00 call %g1 20036f0: 94 10 00 19 mov %i1, %o2 20036f4: 81 c7 e0 08 ret 20036f8: 81 e8 00 00 restore 02003ecc : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2003ecc: 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; 2003ed0: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 2003ed4: 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; 2003ed8: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 2003edc: 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); 2003ee0: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2003ee4: 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); 2003ee8: 92 10 20 00 clr %o1 <== NOT EXECUTED 2003eec: 40 00 06 3c call 20057dc <== NOT EXECUTED 2003ef0: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2003ef4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2003ef8: 12 80 00 10 bne 2003f38 <== NOT EXECUTED 2003efc: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2003f00: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 2003f04: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 2003f08: 82 10 61 9c or %g1, 0x19c, %g1 <== NOT EXECUTED 2003f0c: 84 00 a0 08 add %g2, 8, %g2 <== NOT EXECUTED 2003f10: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 2003f14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003f18: 02 80 00 0a be 2003f40 <== NOT EXECUTED 2003f1c: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2003f20: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003f24: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2003f28: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 2003f2c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 2003f30: 40 00 06 73 call 20058fc <== NOT EXECUTED 2003f34: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 2003f38: 81 c7 e0 08 ret <== NOT EXECUTED 2003f3c: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 2003f40: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 2003f44: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2003f48: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003f4c: 22 80 00 20 be,a 2003fcc <== NOT EXECUTED 2003f50: 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)) { 2003f54: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2003f58: 22 80 00 16 be,a 2003fb0 <== NOT EXECUTED 2003f5c: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED 2003f60: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED 2003f64: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2003f68: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 2003f6c: 26 80 00 09 bl,a 2003f90 <== NOT EXECUTED 2003f70: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2003f74: 10 80 00 0f b 2003fb0 <== NOT EXECUTED 2003f78: 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)) { 2003f7c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2003f80: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2003f84: 24 80 00 0b ble,a 2003fb0 <== NOT EXECUTED 2003f88: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 2003f8c: 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)) { 2003f90: a4 84 bf ff addcc %l2, -1, %l2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 2003f94: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 <== NOT EXECUTED 2003f98: 86 00 e0 01 inc %g3 <== NOT EXECUTED 2003f9c: c4 2c c0 00 stb %g2, [ %l3 ] <== NOT EXECUTED 2003fa0: 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)) { 2003fa4: 12 bf ff f6 bne 2003f7c <== NOT EXECUTED 2003fa8: a6 04 e0 01 inc %l3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2003fac: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2003fb0: 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; 2003fb4: 82 20 40 12 sub %g1, %l2, %g1 <== NOT EXECUTED 2003fb8: c2 25 a0 14 st %g1, [ %l6 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 2003fbc: 40 00 06 50 call 20058fc <== NOT EXECUTED 2003fc0: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 2003fc4: 81 c7 e0 08 ret <== NOT EXECUTED 2003fc8: 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 2003fcc: 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; 2003fd0: 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; 2003fd4: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED 2003fd8: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2003fdc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2003fe0: 02 80 00 06 be 2003ff8 <== NOT EXECUTED 2003fe4: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED 2003fe8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 2003fec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003ff0: 22 80 00 69 be,a 2004194 <== NOT EXECUTED 2003ff4: 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; 2003ff8: 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) && 2003ffc: 03 00 80 5e sethi %hi(0x2017800), %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, 2004000: 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) && 2004004: aa 10 60 04 or %g1, 4, %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, 2004008: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 200400c: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 2004010: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 2004014: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004018: 02 80 00 3e be 2004110 <== NOT EXECUTED 200401c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2004020: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED 2004024: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 2004028: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 200402c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004030: 16 80 00 38 bge 2004110 <== NOT EXECUTED 2004034: 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; 2004038: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 200403c: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 2004040: 40 00 41 f4 call 2014810 <.urem> <== NOT EXECUTED 2004044: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2004048: 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; 200404c: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2004050: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2004054: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 2004058: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 200405c: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 2004060: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 2004064: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 2004068: 40 00 41 ea call 2014810 <.urem> <== NOT EXECUTED 200406c: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 2004070: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 2004074: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 2004078: 3a 80 00 18 bcc,a 20040d8 <== NOT EXECUTED 200407c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 2004080: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 2004084: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 2004088: 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)) 200408c: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED 2004090: 84 08 a2 02 and %g2, 0x202, %g2 <== NOT EXECUTED 2004094: 80 a0 a2 02 cmp %g2, 0x202 <== NOT EXECUTED 2004098: 22 80 00 31 be,a 200415c <== NOT EXECUTED 200409c: 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) { 20040a0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 20040a4: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 20040a8: 22 80 00 0c be,a 20040d8 <== NOT EXECUTED 20040ac: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 20040b0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 20040b4: 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; 20040b8: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 20040bc: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 20040c0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 20040c4: 22 80 00 05 be,a 20040d8 <== NOT EXECUTED 20040c8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 20040cc: 9f c0 80 00 call %g2 <== NOT EXECUTED 20040d0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 20040d4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 20040d8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 20040dc: 02 80 00 17 be 2004138 <== NOT EXECUTED 20040e0: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 20040e4: 7f ff ff 0c call 2003d14 <== NOT EXECUTED 20040e8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 20040ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20040f0: 32 80 00 02 bne,a 20040f8 <== NOT EXECUTED 20040f4: a8 10 20 00 clr %l4 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 20040f8: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 20040fc: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 2004100: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2004104: 12 bf ff c7 bne 2004020 <== NOT EXECUTED 2004108: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 200410c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 2004110: 02 bf ff 92 be 2003f58 <== NOT EXECUTED 2004114: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 2004118: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 200411c: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 2004120: 40 00 05 af call 20057dc <== NOT EXECUTED 2004124: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 2004128: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 200412c: 02 bf ff b8 be 200400c <== NOT EXECUTED 2004130: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2004134: 30 bf ff 89 b,a 2003f58 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 2004138: 7f ff fe f7 call 2003d14 <== NOT EXECUTED 200413c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2004140: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 2004144: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 2004148: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 200414c: 06 bf ff eb bl 20040f8 <== NOT EXECUTED 2004150: 01 00 00 00 nop <== NOT EXECUTED 2004154: 10 bf ff e9 b 20040f8 <== NOT EXECUTED 2004158: 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)) 200415c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004160: 22 80 00 07 be,a 200417c <== NOT EXECUTED 2004164: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 2004168: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 200416c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 2004170: 02 bf ff cc be 20040a0 <== NOT EXECUTED 2004174: 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, 2004178: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 200417c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 2004180: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 2004184: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004188: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 200418c: 10 bf ff d3 b 20040d8 <== NOT EXECUTED 2004190: 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) { 2004194: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 2004198: 12 80 00 37 bne 2004274 <== NOT EXECUTED 200419c: 01 00 00 00 nop <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 20041a0: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 20041a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20041a8: 12 80 00 07 bne 20041c4 <== NOT EXECUTED 20041ac: a8 07 bf f4 add %fp, -12, %l4 <== NOT EXECUTED 20041b0: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 20041b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20041b8: 12 80 00 3f bne 20042b4 <== NOT EXECUTED 20041bc: 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); 20041c0: 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); 20041c4: 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); 20041c8: 9f c0 80 00 call %g2 <== NOT EXECUTED 20041cc: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 20041d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20041d4: 36 80 00 16 bge,a 200422c <== NOT EXECUTED 20041d8: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 20041dc: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 20041e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20041e4: 02 80 00 38 be 20042c4 <== NOT EXECUTED 20041e8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 20041ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20041f0: 02 80 00 06 be 2004208 <== NOT EXECUTED 20041f4: 01 00 00 00 nop <== NOT EXECUTED 20041f8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 20041fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004200: 12 80 00 34 bne 20042d0 <== NOT EXECUTED 2004204: 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); 2004208: 40 00 06 ad call 2005cbc <== NOT EXECUTED 200420c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 2004210: 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); 2004214: 9f c0 80 00 call %g2 <== NOT EXECUTED 2004218: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 200421c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004220: 26 bf ff f0 bl,a 20041e0 <== NOT EXECUTED 2004224: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 2004228: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 200422c: 7f ff fe ba call 2003d14 <== NOT EXECUTED 2004230: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2004234: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 2004238: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 200423c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2004240: 16 bf ff 45 bge 2003f54 <== NOT EXECUTED 2004244: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 2004248: 22 bf ff e0 be,a 20041c8 <== NOT EXECUTED 200424c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED 2004250: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 2004254: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004258: 12 80 00 13 bne 20042a4 <== NOT EXECUTED 200425c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 2004260: 10 bf ff da b 20041c8 <== NOT EXECUTED 2004264: 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); 2004268: 40 00 06 95 call 2005cbc <== NOT EXECUTED 200426c: 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) { 2004270: c6 04 20 a0 ld [ %l0 + 0xa0 ], %g3 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2004274: 9f c0 c0 00 call %g3 <== NOT EXECUTED 2004278: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 200427c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004280: 06 bf ff fa bl 2004268 <== NOT EXECUTED 2004284: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 2004288: 7f ff fe a3 call 2003d14 <== NOT EXECUTED 200428c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 2004290: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2004294: 12 bf ff 31 bne 2003f58 <== NOT EXECUTED 2004298: 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) { 200429c: 10 bf ff f6 b 2004274 <== NOT EXECUTED 20042a0: 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); 20042a4: 40 00 02 f0 call 2004e64 <== NOT EXECUTED 20042a8: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 20042ac: 10 bf ff c7 b 20041c8 <== NOT EXECUTED 20042b0: 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); 20042b4: 40 00 02 ec call 2004e64 <== NOT EXECUTED 20042b8: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 20042bc: 10 bf ff c1 b 20041c0 <== NOT EXECUTED 20042c0: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 20042c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20042c8: 02 bf ff 23 be 2003f54 <== NOT EXECUTED 20042cc: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 20042d0: 40 00 02 e5 call 2004e64 <== NOT EXECUTED 20042d4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 20042d8: c6 04 20 54 ld [ %l0 + 0x54 ], %g3 <== NOT EXECUTED 20042dc: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 20042e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 20042e4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 20042e8: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 20042ec: 08 bf ff c7 bleu 2004208 <== NOT EXECUTED 20042f0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 20042f4: 30 bf ff 19 b,a 2003f58 <== NOT EXECUTED 02003008 : * 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) { 2003008: 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)) 200300c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003010: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 2003014: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 2003018: 22 80 00 3e be,a 2003110 <== NOT EXECUTED 200301c: 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)) 2003020: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003024: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 2003028: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200302c: 22 80 00 49 be,a 2003150 <== NOT EXECUTED 2003030: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 2003034: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 2003038: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 200303c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2003040: 22 80 00 2f be,a 20030fc <== NOT EXECUTED 2003044: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 2003048: 7f ff fb 57 call 2001da4 <== NOT EXECUTED 200304c: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 2003050: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 2003054: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 2003058: 7f ff fb 57 call 2001db4 <== NOT EXECUTED 200305c: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 2003060: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 2003064: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 2003068: 40 00 45 ea call 2014810 <.urem> <== NOT EXECUTED 200306c: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 2003070: 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; 2003074: d0 26 20 84 st %o0, [ %i0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 2003078: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 200307c: 02 80 00 54 be 20031cc <== NOT EXECUTED 2003080: 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) { 2003084: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 2003088: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 200308c: 22 80 00 41 be,a 2003190 <== NOT EXECUTED 2003090: 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)) 2003094: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 2003098: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 200309c: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 20030a0: 02 80 00 4e be 20031d8 <== NOT EXECUTED 20030a4: 01 00 00 00 nop <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 20030a8: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 20030ac: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 20030b0: 08 80 00 41 bleu 20031b4 <== NOT EXECUTED 20030b4: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 20030b8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 20030bc: 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)) { 20030c0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 20030c4: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 20030c8: 32 80 00 02 bne,a 20030d0 <== NOT EXECUTED 20030cc: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 20030d0: d2 06 20 7c ld [ %i0 + 0x7c ], %o1 <== NOT EXECUTED 20030d4: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 20030d8: 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*/ 20030dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 20030e0: 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*/ 20030e4: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 20030e8: 9f c0 80 00 call %g2 <== NOT EXECUTED 20030ec: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 20030f0: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 20030f4: 81 c7 e0 08 ret <== NOT EXECUTED 20030f8: 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) { 20030fc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2003100: 02 80 00 30 be 20031c0 <== NOT EXECUTED 2003104: a0 10 20 00 clr %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 2003108: 81 c7 e0 08 ret <== NOT EXECUTED 200310c: 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, 2003110: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 2003114: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 2003118: 9f c0 40 00 call %g1 <== NOT EXECUTED 200311c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 2003120: 7f ff fb 21 call 2001da4 <== NOT EXECUTED 2003124: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 2003128: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 200312c: 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--; 2003130: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 2003134: 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--; 2003138: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 200313c: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 2003140: 7f ff fb 1d call 2001db4 <== NOT EXECUTED 2003144: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 2003148: 81 c7 e0 08 ret <== NOT EXECUTED 200314c: 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, 2003150: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 2003154: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED 2003158: 9f c0 40 00 call %g1 <== NOT EXECUTED 200315c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 2003160: 7f ff fb 11 call 2001da4 <== NOT EXECUTED 2003164: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 2003168: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 200316c: 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--; 2003170: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 2003174: 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--; 2003178: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 200317c: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 2003180: 7f ff fb 0d call 2001db4 <== NOT EXECUTED 2003184: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 2003188: 81 c7 e0 08 ret <== NOT EXECUTED 200318c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2003190: 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) { 2003194: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2003198: 02 bf ff d6 be 20030f0 <== NOT EXECUTED 200319c: a0 10 20 00 clr %l0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 20031a0: d2 06 20 d8 ld [ %i0 + 0xd8 ], %o1 <== NOT EXECUTED 20031a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 20031a8: 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*/ 20031ac: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED 20031b0: 30 bf ff d1 b,a 20030f4 <== NOT EXECUTED * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 20031b4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 20031b8: 10 bf ff c2 b 20030c0 <== NOT EXECUTED 20031bc: 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); 20031c0: 40 00 09 cf call 20058fc <== NOT EXECUTED 20031c4: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 20031c8: 30 bf ff d0 b,a 2003108 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 20031cc: 40 00 09 cc call 20058fc <== NOT EXECUTED 20031d0: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 20031d4: 30 bf ff ac b,a 2003084 <== 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); 20031d8: 7f ff fa f3 call 2001da4 <== NOT EXECUTED 20031dc: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 20031e0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 20031e4: 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; 20031e8: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 20031ec: 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; 20031f0: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 20031f4: 7f ff fa f0 call 2001db4 <== NOT EXECUTED 20031f8: 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*/ 20031fc: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED 2003200: 30 bf ff bd b,a 20030f4 <== NOT EXECUTED 02004dc0 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 2004dc0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 2004dc4: a0 07 bf f0 add %fp, -16, %l0 <== NOT EXECUTED 2004dc8: 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 | 2004dcc: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 2004dd0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2004dd4: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004dd8: 40 00 00 c3 call 20050e4 <== NOT EXECUTED 2004ddc: 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) { 2004de0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2004de4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2004de8: 32 80 00 16 bne,a 2004e40 <== NOT EXECUTED 2004dec: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 2004df0: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED 2004df4: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004df8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 2004dfc: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 2004e00: 02 bf ff f3 be 2004dcc <== NOT EXECUTED 2004e04: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 2004e08: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 2004e0c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 2004e10: 7f ff f9 1c call 2003280 <== NOT EXECUTED 2004e14: 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 | 2004e18: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 2004e1c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2004e20: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004e24: 40 00 00 b0 call 20050e4 <== NOT EXECUTED 2004e28: 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) { 2004e2c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2004e30: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2004e34: 22 bf ff f0 be,a 2004df4 <== NOT EXECUTED 2004e38: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 2004e3c: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 2004e40: 40 00 03 25 call 2005ad4 <== NOT EXECUTED 2004e44: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 2004e48: 10 bf ff e2 b 2004dd0 <== NOT EXECUTED 2004e4c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 02002ff0 : 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); 2002ff0: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 2002ff4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2002ff8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2002ffc: 40 00 08 a4 call 200528c <== NOT EXECUTED 2003000: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2003004: 01 00 00 00 nop 02004d28 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 2004d28: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 2004d2c: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED 2004d30: a0 07 bf f4 add %fp, -12, %l0 <== NOT EXECUTED 2004d34: a2 10 61 9c or %g1, 0x19c, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004d38: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2004d3c: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004d40: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 2004d44: 40 00 00 e8 call 20050e4 <== NOT EXECUTED 2004d48: 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) { 2004d4c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2004d50: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2004d54: 12 80 00 16 bne 2004dac <== NOT EXECUTED 2004d58: 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) { 2004d5c: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 2004d60: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 2004d64: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 2004d68: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 2004d6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2004d70: 02 80 00 04 be 2004d80 <== NOT EXECUTED 2004d74: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2004d78: 9f c0 40 00 call %g1 <== NOT EXECUTED 2004d7c: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 2004d80: 7f ff f8 a2 call 2003008 <== NOT EXECUTED 2004d84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004d88: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 2004d8c: 94 10 20 00 clr %o2 <== NOT EXECUTED 2004d90: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 2004d94: 40 00 00 d4 call 20050e4 <== NOT EXECUTED 2004d98: 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) { 2004d9c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 2004da0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 2004da4: 02 bf ff ee be 2004d5c <== NOT EXECUTED 2004da8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 2004dac: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 2004db0: 40 00 03 49 call 2005ad4 <== NOT EXECUTED 2004db4: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 2004db8: 10 bf ff e1 b 2004d3c <== NOT EXECUTED 2004dbc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 02003d60 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2003d60: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2003d64: c2 06 00 00 ld [ %i0 ], %g1 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2003d68: a8 10 00 18 mov %i0, %l4 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2003d6c: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2003d70: 92 10 20 00 clr %o1 2003d74: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 2003d78: 40 00 06 99 call 20057dc 2003d7c: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 2003d80: b0 92 20 00 orcc %o0, 0, %i0 2003d84: 12 80 00 0f bne 2003dc0 2003d88: 03 00 80 5f sethi %hi(0x2017c00), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2003d8c: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 2003d90: 85 28 a0 05 sll %g2, 5, %g2 2003d94: 82 10 61 9c or %g1, 0x19c, %g1 2003d98: 82 00 40 02 add %g1, %g2, %g1 2003d9c: c2 00 60 0c ld [ %g1 + 0xc ], %g1 2003da0: 80 a0 60 00 cmp %g1, 0 2003da4: 02 80 00 13 be 2003df0 2003da8: 92 10 00 14 mov %l4, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2003dac: 9f c0 40 00 call %g1 <== NOT EXECUTED 2003db0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2003db4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2003db8: 40 00 06 d1 call 20058fc <== NOT EXECUTED 2003dbc: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED 2003dc0: 81 c7 e0 08 ret <== NOT EXECUTED 2003dc4: 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); 2003dc8: d0 05 20 08 ld [ %l4 + 8 ], %o0 <== NOT EXECUTED 2003dcc: d2 05 20 0c ld [ %l4 + 0xc ], %o1 <== NOT EXECUTED 2003dd0: 7f ff fd fd call 20035c4 <== NOT EXECUTED 2003dd4: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 2003dd8: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED 2003ddc: c2 25 20 14 st %g1, [ %l4 + 0x14 ] } rtems_semaphore_release (tty->osem); 2003de0: 40 00 06 c7 call 20058fc 2003de4: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 return sc; } 2003de8: 81 c7 e0 08 ret 2003dec: 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) { 2003df0: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 2003df4: 80 88 60 01 btst 1, %g1 2003df8: 02 bf ff f4 be 2003dc8 2003dfc: a0 10 20 00 clr %l0 uint32_t count = args->count; 2003e00: e6 05 20 0c ld [ %l4 + 0xc ], %l3 char *buffer = args->buffer; 2003e04: e4 05 20 08 ld [ %l4 + 8 ], %l2 while (count--) 2003e08: 80 a4 e0 00 cmp %l3, 0 2003e0c: 02 bf ff f4 be 2003ddc 2003e10: 82 10 20 00 clr %g1 oproc (*buffer++, tty); 2003e14: d0 0c 80 10 ldub [ %l2 + %l0 ], %o0 2003e18: 7f ff fe 39 call 20036fc 2003e1c: 92 10 00 11 mov %l1, %o1 2003e20: 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--) 2003e24: 80 a4 c0 10 cmp %l3, %l0 2003e28: 32 bf ff fc bne,a 2003e18 2003e2c: 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; 2003e30: 10 bf ff eb b 2003ddc 2003e34: c2 05 20 0c ld [ %l4 + 0xc ], %g1 020069d0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20069d0: 9d e3 bf 90 save %sp, -112, %sp 20069d4: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 20069d8: 80 a6 60 00 cmp %i1, 0 20069dc: 02 80 00 26 be 2006a74 20069e0: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 20069e4: 80 a6 a0 00 cmp %i2, 0 20069e8: 02 80 00 23 be 2006a74 20069ec: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 20069f0: 11 00 80 5d sethi %hi(0x2017400), %o0 20069f4: 92 10 00 12 mov %l2, %o1 20069f8: 90 12 21 84 or %o0, 0x184, %o0 20069fc: 40 00 05 74 call 2007fcc <_Objects_Get> 2006a00: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2006a04: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006a08: a0 10 00 08 mov %o0, %l0 2006a0c: 80 a0 60 00 cmp %g1, 0 2006a10: 12 80 00 19 bne 2006a74 2006a14: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2006a18: a2 02 20 10 add %o0, 0x10, %l1 2006a1c: 40 00 0d 12 call 2009e64 <_Watchdog_Remove> 2006a20: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 2006a24: 7f ff ee 9a call 200248c 2006a28: 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 ) { 2006a2c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2006a30: 80 a0 60 00 cmp %g1, 0 2006a34: 12 80 00 12 bne 2006a7c 2006a38: 01 00 00 00 nop Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2006a3c: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2006a40: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 2006a44: 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; 2006a48: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2006a4c: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 2006a50: 7f ff ee 93 call 200249c 2006a54: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 2006a58: 92 10 00 11 mov %l1, %o1 2006a5c: 11 00 80 5c sethi %hi(0x2017000), %o0 2006a60: 90 12 20 94 or %o0, 0x94, %o0 ! 2017094 <_Watchdog_Ticks_chain> 2006a64: 40 00 0c 95 call 2009cb8 <_Watchdog_Insert> 2006a68: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 2006a6c: 40 00 07 ad call 2008920 <_Thread_Enable_dispatch> 2006a70: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2006a74: 81 c7 e0 08 ret 2006a78: 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 ); 2006a7c: 7f ff ee 88 call 200249c <== NOT EXECUTED 2006a80: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 2006a84: 40 00 07 a7 call 2008920 <_Thread_Enable_dispatch> <== NOT EXECUTED 2006a88: 01 00 00 00 nop <== NOT EXECUTED 2006a8c: 81 c7 e0 08 ret <== NOT EXECUTED 2006a90: 81 e8 00 00 restore <== NOT EXECUTED 02011968 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 2011968: 9d e3 bf 90 save %sp, -112, %sp 201196c: 92 96 20 00 orcc %i0, 0, %o1 2011970: 12 80 00 05 bne 2011984 2011974: 03 00 80 b3 sethi %hi(0x202cc00), %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; 2011978: 90 10 20 13 mov 0x13, %o0 } return status; } 201197c: 81 c7 e0 08 ret 2011980: 91 e8 00 08 restore %g0, %o0, %o0 2011984: c4 08 63 74 ldub [ %g1 + 0x374 ], %g2 2011988: 80 a2 40 02 cmp %o1, %g2 201198c: 18 80 00 56 bgu 2011ae4 2011990: 80 a2 7f ff cmp %o1, -1 2011994: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED 2011998: 05 00 80 c8 sethi %hi(0x2032000), %g2 201199c: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2032140 <_Thread_Dispatch_disable_level> 20119a0: 82 00 60 01 inc %g1 20119a4: c2 20 a1 40 st %g1, [ %g2 + 0x140 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20119a8: 23 00 80 b6 sethi %hi(0x202d800), %l1 initialized = true; 20119ac: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 20119b0: e0 0c 62 bc ldub [ %l1 + 0x2bc ], %l0 initialized = true; _Thread_Enable_dispatch(); 20119b4: 40 00 0c b3 call 2014c80 <_Thread_Enable_dispatch> 20119b8: c2 2c 62 bc stb %g1, [ %l1 + 0x2bc ] if ( tmpInitialized ) 20119bc: 80 a4 20 00 cmp %l0, 0 20119c0: 12 bf ff ef bne 201197c 20119c4: 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); 20119c8: 05 00 80 c8 sethi %hi(0x2032000), %g2 20119cc: 82 10 a0 54 or %g2, 0x54, %g1 ! 2032054 <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 20119d0: 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; 20119d4: 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); 20119d8: 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( 20119dc: 92 10 00 18 mov %i0, %o1 20119e0: 94 10 00 19 mov %i1, %o2 20119e4: 19 00 00 20 sethi %hi(0x8000), %o4 20119e8: c2 20 a0 54 st %g1, [ %g2 + 0x54 ] 20119ec: 98 16 80 0c or %i2, %o4, %o4 20119f0: 11 15 12 53 sethi %hi(0x54494c00), %o0 20119f4: 96 10 21 00 mov 0x100, %o3 20119f8: 90 12 21 45 or %o0, 0x145, %o0 20119fc: 7f ff fc 78 call 2010bdc 2011a00: 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) { 2011a04: 80 a2 20 00 cmp %o0, 0 2011a08: 12 80 00 34 bne 2011ad8 2011a0c: 03 00 80 c7 sethi %hi(0x2031c00), %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( 2011a10: 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 ) 2011a14: 86 10 63 f4 or %g1, 0x3f4, %g3 2011a18: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 2011a1c: 03 00 00 3f sethi %hi(0xfc00), %g1 2011a20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 2011a24: 82 0a c0 01 and %o3, %g1, %g1 2011a28: 80 a0 40 02 cmp %g1, %g2 2011a2c: 18 80 00 05 bgu 2011a40 2011a30: 98 10 20 00 clr %o4 2011a34: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 2011a38: 83 28 60 02 sll %g1, 2, %g1 2011a3c: d8 00 80 01 ld [ %g2 + %g1 ], %o4 2011a40: 09 00 80 c8 sethi %hi(0x2032000), %g4 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011a44: 1b 00 80 c8 sethi %hi(0x2032000), %o5 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 2011a48: 84 11 20 34 or %g4, 0x34, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 2011a4c: 82 13 60 48 or %o5, 0x48, %g1 2011a50: 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; 2011a54: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 2011a58: 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; 2011a5c: 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); 2011a60: 84 00 a0 04 add %g2, 4, %g2 2011a64: 82 00 60 04 add %g1, 4, %g1 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 2011a68: c0 23 20 6c clr [ %o4 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a6c: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011a70: d6 23 20 68 st %o3, [ %o4 + 0x68 ] 2011a74: c4 21 20 34 st %g2, [ %g4 + 0x34 ] 2011a78: c2 23 60 48 st %g1, [ %o5 + 0x48 ] 2011a7c: 05 00 80 ca sethi %hi(0x2032800), %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2011a80: 07 00 80 52 sethi %hi(0x2014800), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a84: 03 00 80 c8 sethi %hi(0x2032000), %g1 the_watchdog->routine = routine; 2011a88: 86 10 e2 a4 or %g3, 0x2a4, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011a8c: 82 10 60 60 or %g1, 0x60, %g1 the_watchdog->routine = routine; 2011a90: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 2011a94: d8 20 a2 f0 st %o4, [ %g2 + 0x2f0 ] 2011a98: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 2011a9c: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011aa0: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 2011aa4: 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; 2011aa8: 05 00 80 46 sethi %hi(0x2011800), %g2 2011aac: 03 00 80 ca sethi %hi(0x2032800), %g1 2011ab0: 84 10 a2 f4 or %g2, 0x2f4, %g2 /* * Start the timer server */ status = rtems_task_start( 2011ab4: 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; 2011ab8: c4 20 62 ec st %g2, [ %g1 + 0x2ec ] /* * Start the timer server */ status = rtems_task_start( 2011abc: 13 00 80 46 sethi %hi(0x2011800), %o1 2011ac0: 94 10 20 00 clr %o2 2011ac4: 7f ff fd 9e call 201113c 2011ac8: 92 12 63 c8 or %o1, 0x3c8, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 2011acc: 80 a2 20 00 cmp %o0, 0 2011ad0: 02 bf ff ab be 201197c 2011ad4: 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; 2011ad8: c0 2c 62 bc clrb [ %l1 + 0x2bc ] } return status; } 2011adc: 81 c7 e0 08 ret 2011ae0: 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 ) 2011ae4: 02 bf ff ad be 2011998 2011ae8: 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; 2011aec: 10 bf ff a4 b 201197c 2011af0: 90 10 20 13 mov 0x13, %o0 020116e8 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 20116e8: 9d e3 bf 90 save %sp, -112, %sp 20116ec: 11 00 80 ca sethi %hi(0x2032800), %o0 20116f0: 92 10 00 18 mov %i0, %o1 20116f4: 90 12 22 ac or %o0, 0x2ac, %o0 20116f8: 40 00 0a df call 2014274 <_Objects_Get> 20116fc: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 2011700: c2 07 bf f4 ld [ %fp + -12 ], %g1 2011704: a0 10 00 08 mov %o0, %l0 2011708: 80 a0 60 00 cmp %g1, 0 201170c: 12 80 00 11 bne 2011750 2011710: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 2011714: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 2011718: 80 a0 60 01 cmp %g1, 1 201171c: 22 80 00 15 be,a 2011770 2011720: 31 00 80 ca sethi %hi(0x2032800), %i0 2011724: 1a 80 00 0d bcc 2011758 2011728: 80 a0 60 04 cmp %g1, 4 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 201172c: a0 02 20 10 add %o0, 0x10, %l0 2011730: 40 00 13 de call 20166a8 <_Watchdog_Remove> 2011734: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 2011738: 11 00 80 c8 sethi %hi(0x2032000), %o0 201173c: 92 10 00 10 mov %l0, %o1 2011740: 40 00 13 6f call 20164fc <_Watchdog_Insert> 2011744: 90 12 22 24 or %o0, 0x224, %o0 case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 2011748: 40 00 0d 4e call 2014c80 <_Thread_Enable_dispatch> 201174c: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2011750: 81 c7 e0 08 ret 2011754: 81 e8 00 00 restore the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 2011758: 18 bf ff fc bgu 2011748 201175c: 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(); 2011760: 40 00 0d 48 call 2014c80 <_Thread_Enable_dispatch> 2011764: b0 10 20 0b mov 0xb, %i0 ! b 2011768: 81 c7 e0 08 ret 201176c: 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 ) { 2011770: c2 06 22 ec ld [ %i0 + 0x2ec ], %g1 2011774: 80 a0 60 00 cmp %g1, 0 2011778: 02 80 00 08 be 2011798 201177c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 2011780: 40 00 13 ca call 20166a8 <_Watchdog_Remove> 2011784: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 2011788: c2 06 22 ec ld [ %i0 + 0x2ec ], %g1 201178c: 9f c0 40 00 call %g1 2011790: 90 10 00 10 mov %l0, %o0 2011794: 30 bf ff ed b,a 2011748 _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(); 2011798: 40 00 0d 3a call 2014c80 <_Thread_Enable_dispatch> <== NOT EXECUTED 201179c: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED 20117a0: 81 c7 e0 08 ret <== NOT EXECUTED 20117a4: 81 e8 00 00 restore <== NOT EXECUTED 020117a8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20117a8: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20117ac: 03 00 80 ca sethi %hi(0x2032800), %g1 20117b0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 2032af0 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 20117b4: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 20117b8: 80 a0 a0 00 cmp %g2, 0 20117bc: 02 80 00 28 be 201185c 20117c0: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 20117c4: 80 a6 a0 00 cmp %i2, 0 20117c8: 02 80 00 25 be 201185c 20117cc: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 20117d0: 80 a6 60 00 cmp %i1, 0 20117d4: 02 80 00 22 be 201185c 20117d8: b0 10 20 0a mov 0xa, %i0 20117dc: 11 00 80 ca sethi %hi(0x2032800), %o0 20117e0: 92 10 00 11 mov %l1, %o1 20117e4: 90 12 22 ac or %o0, 0x2ac, %o0 20117e8: 40 00 0a a3 call 2014274 <_Objects_Get> 20117ec: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 20117f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 20117f4: a0 10 00 08 mov %o0, %l0 20117f8: 80 a0 60 00 cmp %g1, 0 20117fc: 12 80 00 18 bne 201185c 2011800: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 2011804: 40 00 13 a9 call 20166a8 <_Watchdog_Remove> 2011808: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 201180c: 7f ff e6 8a call 200b234 2011810: 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 ) { 2011814: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 2011818: 80 a0 60 00 cmp %g1, 0 201181c: 12 80 00 12 bne 2011864 2011820: 82 10 20 01 mov 1, %g1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 2011824: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 2011828: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 201182c: 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; 2011830: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 2011834: 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; 2011838: 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 ); 201183c: 7f ff e6 82 call 200b244 2011840: 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 ); 2011844: 03 00 80 ca sethi %hi(0x2032800), %g1 2011848: c4 00 62 ec ld [ %g1 + 0x2ec ], %g2 ! 2032aec <_Timer_Server_schedule_operation> 201184c: 9f c0 80 00 call %g2 2011850: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 2011854: 40 00 0d 0b call 2014c80 <_Thread_Enable_dispatch> 2011858: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 201185c: 81 c7 e0 08 ret 2011860: 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 ); 2011864: 7f ff e6 78 call 200b244 <== NOT EXECUTED 2011868: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 201186c: 40 00 0d 05 call 2014c80 <_Thread_Enable_dispatch> <== NOT EXECUTED 2011870: 01 00 00 00 nop <== NOT EXECUTED 2011874: 81 c7 e0 08 ret <== NOT EXECUTED 2011878: 81 e8 00 00 restore <== NOT EXECUTED 02007c24 : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 2007c24: 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) 2007c28: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 2007c2c: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 2007c30: 02 80 00 10 be 2007c70 <== NOT EXECUTED 2007c34: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 2007c38: 07 00 80 a4 sethi %hi(0x2029000), %g3 <== NOT EXECUTED 2007c3c: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 ! 2029170 <== NOT EXECUTED 2007c40: 82 00 a0 01 add %g2, 1, %g1 <== NOT EXECUTED 2007c44: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 2007c48: 02 80 00 06 be 2007c60 <== NOT EXECUTED 2007c4c: c2 20 e1 70 st %g1, [ %g3 + 0x170 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 2007c50: 05 00 80 a4 sethi %hi(0x2029000), %g2 <== NOT EXECUTED 2007c54: c2 00 a3 60 ld [ %g2 + 0x360 ], %g1 ! 2029360 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 2007c58: 82 00 60 01 inc %g1 <== NOT EXECUTED 2007c5c: c2 20 a3 60 st %g1, [ %g2 + 0x360 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 2007c60: c2 00 e1 70 ld [ %g3 + 0x170 ], %g1 <== NOT EXECUTED 2007c64: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 2007c68: 34 80 00 3b bg,a 2007d54 <== NOT EXECUTED 2007c6c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 2007c70: 25 00 80 a0 sethi %hi(0x2028000), %l2 <== NOT EXECUTED 2007c74: c2 04 a3 28 ld [ %l2 + 0x328 ], %g1 ! 2028328 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 2007c78: 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 */ 2007c7c: 40 00 43 4b call 20189a8 <== NOT EXECUTED 2007c80: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 2007c84: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 2007c88: 05 10 00 00 sethi %hi(0x40000000), %g2 <== NOT EXECUTED 2007c8c: 80 8c c0 02 btst %l3, %g2 <== NOT EXECUTED 2007c90: 12 80 00 42 bne 2007d98 <== NOT EXECUTED 2007c94: 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); 2007c98: c2 04 a3 28 ld [ %l2 + 0x328 ], %g1 <== NOT EXECUTED 2007c9c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2007ca0: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 2007ca4: 40 00 5c 19 call 201ed08 <== NOT EXECUTED 2007ca8: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 2007cac: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 2007cb0: 12 80 00 2b bne 2007d5c <== NOT EXECUTED 2007cb4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 2007cb8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2007cbc: 02 80 00 12 be 2007d04 <== NOT EXECUTED 2007cc0: c2 04 a3 28 ld [ %l2 + 0x328 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 2007cc4: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2007cc8: 04 80 00 08 ble 2007ce8 <== NOT EXECUTED 2007ccc: c2 04 a3 28 ld [ %l2 + 0x328 ], %g1 <== NOT EXECUTED 2007cd0: 40 00 50 cc call 201c000 <== NOT EXECUTED 2007cd4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2007cd8: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 2007cdc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2007ce0: 12 80 00 3b bne 2007dcc <== NOT EXECUTED 2007ce4: c2 04 a3 28 ld [ %l2 + 0x328 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 2007ce8: 13 00 80 91 sethi %hi(0x2024400), %o1 <== NOT EXECUTED 2007cec: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 2007cf0: 92 12 60 38 or %o1, 0x38, %o1 <== NOT EXECUTED 2007cf4: 40 00 44 98 call 2018f54 <== NOT EXECUTED 2007cf8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 2007cfc: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 2007d00: c2 04 a3 28 ld [ %l2 + 0x328 ], %g1 <== NOT EXECUTED 2007d04: 13 00 80 93 sethi %hi(0x2024c00), %o1 <== NOT EXECUTED 2007d08: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 2007d0c: 40 00 44 92 call 2018f54 <== NOT EXECUTED 2007d10: 92 12 60 c0 or %o1, 0xc0, %o1 <== NOT EXECUTED (void) fflush(stderr); 2007d14: c2 04 a3 28 ld [ %l2 + 0x328 ], %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"); 2007d18: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 2007d1c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 2007d20: 40 00 43 22 call 20189a8 <== NOT EXECUTED 2007d24: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 2007d28: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 2007d2c: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 2007d30: 02 80 00 09 be 2007d54 <== NOT EXECUTED 2007d34: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 2007d38: 02 80 00 2f be 2007df4 <== NOT EXECUTED 2007d3c: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 2007d40: 13 00 80 91 sethi %hi(0x2024400), %o1 <== NOT EXECUTED 2007d44: 40 00 00 3f call 2007e40 <== NOT EXECUTED 2007d48: 92 12 60 50 or %o1, 0x50, %o1 ! 2024450 <== NOT EXECUTED _exit(local_errno); 2007d4c: 40 00 02 47 call 2008668 <_exit> <== NOT EXECUTED 2007d50: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 2007d54: 81 c7 e0 08 ret <== NOT EXECUTED 2007d58: 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)); 2007d5c: c2 04 a3 28 ld [ %l2 + 0x328 ], %g1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 2007d60: 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)); 2007d64: 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); 2007d68: 11 00 80 91 sethi %hi(0x2024400), %o0 <== NOT EXECUTED 2007d6c: 40 00 2b ad call 2012c20 <== NOT EXECUTED 2007d70: 90 12 23 98 or %o0, 0x398, %o0 ! 2024798 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2007d74: 13 00 80 91 sethi %hi(0x2024400), %o1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 2007d78: 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)); 2007d7c: 92 12 60 18 or %o1, 0x18, %o1 <== NOT EXECUTED 2007d80: 40 00 44 75 call 2018f54 <== NOT EXECUTED 2007d84: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (local_errno) 2007d88: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 2007d8c: 02 bf ff dd be 2007d00 <== NOT EXECUTED 2007d90: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED 2007d94: 30 bf ff cd b,a 2007cc8 <== 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; 2007d98: 40 00 42 33 call 2018664 <__errno> <== NOT EXECUTED 2007d9c: 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); 2007da0: c2 04 a3 28 ld [ %l2 + 0x328 ], %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; 2007da4: 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); 2007da8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 2007dac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2007db0: 40 00 5b d6 call 201ed08 <== NOT EXECUTED 2007db4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 2007db8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 2007dbc: 02 bf ff bf be 2007cb8 <== NOT EXECUTED 2007dc0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 2007dc4: 10 bf ff e7 b 2007d60 <== NOT EXECUTED 2007dc8: c2 04 a3 28 ld [ %l2 + 0x328 ], %g1 <== NOT EXECUTED if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 2007dcc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 2007dd0: 40 00 50 8c call 201c000 <== NOT EXECUTED 2007dd4: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 2007dd8: 13 00 80 91 sethi %hi(0x2024400), %o1 <== NOT EXECUTED 2007ddc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 2007de0: 92 12 60 28 or %o1, 0x28, %o1 <== NOT EXECUTED 2007de4: 40 00 44 5c call 2018f54 <== NOT EXECUTED 2007de8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2007dec: 10 bf ff c5 b 2007d00 <== NOT EXECUTED 2007df0: 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"); 2007df4: 13 00 80 91 sethi %hi(0x2024400), %o1 <== NOT EXECUTED 2007df8: 40 00 00 12 call 2007e40 <== NOT EXECUTED 2007dfc: 92 12 60 68 or %o1, 0x68, %o1 ! 2024468 <== NOT EXECUTED abort(); 2007e00: 40 00 42 0b call 201862c <== NOT EXECUTED 2007e04: 01 00 00 00 nop 2007e08: 01 00 00 00 nop 02006664 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 2006664: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 2006668: 80 a6 60 00 cmp %i1, 0 200666c: 02 80 00 05 be 2006680 2006670: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 2006674: 80 a6 20 00 cmp %i0, 0 2006678: 12 80 00 04 bne 2006688 200667c: 11 00 80 73 sethi %hi(0x201cc00), %o0 if (!ptr) return false; *pointer = ptr; return true; } 2006680: 81 c7 e0 08 ret <== NOT EXECUTED 2006684: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 2006688: 40 00 05 fd call 2007e7c <_Protected_heap_Allocate> 200668c: 90 12 21 94 or %o0, 0x194, %o0 if (!ptr) 2006690: 80 a2 20 00 cmp %o0, 0 2006694: 02 bf ff fb be 2006680 2006698: 01 00 00 00 nop return false; *pointer = ptr; 200669c: d0 26 40 00 st %o0, [ %i1 ] 20066a0: 81 c7 e0 08 ret 20066a4: 91 e8 20 01 restore %g0, 1, %o0 02006648 : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 2006648: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 200664c: 11 00 80 73 sethi %hi(0x201cc00), %o0 <== NOT EXECUTED 2006650: 90 12 21 94 or %o0, 0x194, %o0 ! 201cd94 <_Workspace_Area> <== NOT EXECUTED 2006654: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2006658: 40 00 06 15 call 2007eac <_Protected_heap_Free> <== NOT EXECUTED 200665c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 2006660: 01 00 00 00 nop 020066a8 : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 20066a8: 80 a2 20 00 cmp %o0, 0 20066ac: 02 80 00 07 be 20066c8 20066b0: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 20066b4: 11 00 80 73 sethi %hi(0x201cc00), %o0 20066b8: 90 12 21 94 or %o0, 0x194, %o0 ! 201cd94 <_Workspace_Area> 20066bc: 82 13 c0 00 mov %o7, %g1 20066c0: 40 00 06 07 call 2007edc <_Protected_heap_Get_information> 20066c4: 9e 10 40 00 mov %g1, %o7 } 20066c8: 81 c3 e0 08 retl <== NOT EXECUTED 20066cc: 01 00 00 00 nop 02020f1c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2020f1c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 2020f20: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2020f24: 05 00 81 2c sethi %hi(0x204b000), %g2 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2020f28: a6 10 63 ff or %g1, 0x3ff, %l3 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2020f2c: aa 10 a1 88 or %g2, 0x188, %l5 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 2020f30: 03 00 81 2c sethi %hi(0x204b000), %g1 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2020f34: a2 10 20 00 clr %l1 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 2020f38: a8 10 61 78 or %g1, 0x178, %l4 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2020f3c: a4 10 20 00 clr %l2 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2020f40: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 2020f44: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2020f48: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020f4c: 06 80 00 23 bl 2020fd8 <== NOT EXECUTED 2020f50: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 2020f54: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 2020f58: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 2020f5c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') 2020f60: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 2020f64: 02 80 00 24 be 2020ff4 <== NOT EXECUTED 2020f68: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED break; if (sign == 0) { 2020f6c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2020f70: 32 80 00 06 bne,a 2020f88 <== NOT EXECUTED 2020f74: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 2020f78: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 2020f7c: 02 80 00 2f be 2021038 <== NOT EXECUTED 2020f80: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 2020f84: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 2020f88: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 <== NOT EXECUTED 2020f8c: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 2020f90: 02 80 00 28 be 2021030 <== NOT EXECUTED 2020f94: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 2020f98: 40 00 82 bf call 2041a94 <.udiv> <== NOT EXECUTED 2020f9c: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 2020fa0: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 2020fa4: 18 80 00 23 bgu 2021030 <== NOT EXECUTED 2020fa8: 01 00 00 00 nop <== NOT EXECUTED 2020fac: 02 80 00 1b be 2021018 <== NOT EXECUTED 2020fb0: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 2020fb4: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 2020fb8: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 2020fbc: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 2020fc0: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2020fc4: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 2020fc8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 2020fcc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2020fd0: 16 bf ff e1 bge 2020f54 <== NOT EXECUTED 2020fd4: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 2020fd8: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 2020fdc: 40 00 54 79 call 20361c0 <__srget_r> <== NOT EXECUTED 2020fe0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 2020fe4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 2020fe8: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 2020fec: 12 bf ff e1 bne 2020f70 <== NOT EXECUTED 2020ff0: 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) 2020ff4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 2020ff8: 02 80 00 0e be 2021030 <== NOT EXECUTED 2020ffc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 2021000: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2021004: 40 00 82 6a call 20419ac <.umul> <== NOT EXECUTED 2021008: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 202100c: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 2021010: 81 c7 e0 08 ret <== NOT EXECUTED 2021014: 81 e8 00 00 restore <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 2021018: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 202101c: 40 00 83 4a call 2041d44 <.urem> <== NOT EXECUTED 2021020: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 2021024: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 2021028: 08 bf ff e4 bleu 2020fb8 <== NOT EXECUTED 202102c: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 2021030: 81 c7 e0 08 ret <== NOT EXECUTED 2021034: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 2021038: a6 04 e0 01 inc %l3 <== NOT EXECUTED 202103c: 10 bf ff c1 b 2020f40 <== NOT EXECUTED 2021040: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 02021044 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2021044: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 2021048: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 202104c: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 2021050: 03 00 81 2c sethi %hi(0x204b000), %g1 <== NOT EXECUTED 2021054: 10 80 00 19 b 20210b8 <== NOT EXECUTED 2021058: b2 10 61 88 or %g1, 0x188, %i1 ! 204b188 <_impure_ptr> <== NOT EXECUTED 202105c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 2021060: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 2021064: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') { 2021068: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 202106c: 02 80 00 1e be 20210e4 <== NOT EXECUTED 2021070: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { 2021074: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 2021078: 02 80 00 28 be 2021118 <== NOT EXECUTED 202107c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) return 0; break; } if (c == EOF) 2021080: 02 80 00 29 be 2021124 <== NOT EXECUTED 2021084: 01 00 00 00 nop <== NOT EXECUTED return 0; if (*nleft < 2) 2021088: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 202108c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 2021090: 08 80 00 25 bleu 2021124 <== NOT EXECUTED 2021094: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; 2021098: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 202109c: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 20210a0: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 20210a4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 20210a8: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 20210ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 20210b0: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 20210b4: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 20210b8: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 20210bc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 20210c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20210c4: 16 bf ff e6 bge 202105c <== NOT EXECUTED 20210c8: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 20210cc: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 20210d0: 40 00 54 3c call 20361c0 <__srget_r> <== NOT EXECUTED 20210d4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 20210d8: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 20210dc: 12 bf ff e7 bne 2021078 <== NOT EXECUTED 20210e0: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 20210e4: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 20210e8: 12 80 00 0f bne 2021124 <== NOT EXECUTED 20210ec: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 20210f0: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 20210f4: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 20210f8: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 20210fc: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 2021100: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 2021104: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 2021108: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 202110c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 2021110: 81 c7 e0 08 ret <== NOT EXECUTED 2021114: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 2021118: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 202111c: 32 bf ff f6 bne,a 20210f4 <== NOT EXECUTED 2021120: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 2021124: 81 c7 e0 08 ret <== NOT EXECUTED 2021128: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02005610 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 2005610: 9d e3 bf 48 save %sp, -184, %sp struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 2005614: 7f ff fd 47 call 2004b30 2005618: 90 10 00 18 mov %i0, %o0 200561c: a4 92 20 00 orcc %o0, 0, %l2 2005620: 02 80 00 4d be 2005754 2005624: 92 10 3f ff mov -1, %o1 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 2005628: d0 04 80 00 ld [ %l2 ], %o0 200562c: ac 07 bf a8 add %fp, -88, %l6 2005630: 40 00 1e c4 call 200d140 2005634: 92 10 00 16 mov %l6, %o1 2005638: 80 a2 20 00 cmp %o0, 0 200563c: 06 80 00 56 bl 2005794 2005640: 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); 2005644: 40 00 3d 7d call 2014c38 <.div> 2005648: 92 10 20 18 mov 0x18, %o1 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; 200564c: 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); 2005650: 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; 2005654: 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 *)); 2005658: 7f ff fb 17 call 20042b4 200565c: 91 2a 20 02 sll %o0, 2, %o0 if (names == NULL) 2005660: a6 92 20 00 orcc %o0, 0, %l3 2005664: 02 80 00 4c be 2005794 2005668: 01 00 00 00 nop goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 200566c: 7f ff ff 4d call 20053a0 2005670: 90 10 00 12 mov %l2, %o0 2005674: a0 92 20 00 orcc %o0, 0, %l0 2005678: 02 80 00 29 be 200571c 200567c: 80 a6 a0 00 cmp %i2, 0 if (select != NULL && !(*select)(d)) 2005680: 22 80 00 08 be,a 20056a0 2005684: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED 2005688: 9f c6 80 00 call %i2 200568c: 01 00 00 00 nop 2005690: 80 a2 20 00 cmp %o0, 0 2005694: 02 bf ff f6 be 200566c 2005698: 01 00 00 00 nop continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 200569c: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 20056a0: 90 02 20 04 add %o0, 4, %o0 20056a4: 90 0a 3f fc and %o0, -4, %o0 20056a8: 7f ff fb 03 call 20042b4 20056ac: 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); 20056b0: 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)); 20056b4: a2 10 00 08 mov %o0, %l1 if (p == NULL) 20056b8: 80 a4 60 00 cmp %l1, 0 20056bc: 02 80 00 3b be 20057a8 20056c0: 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; 20056c4: 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; 20056c8: c2 04 00 00 ld [ %l0 ], %g1 p->d_reclen = d->d_reclen; 20056cc: 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); 20056d0: 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; 20056d4: c2 24 40 00 st %g1, [ %l1 ] p->d_reclen = d->d_reclen; 20056d8: c4 34 60 08 sth %g2, [ %l1 + 8 ] p->d_namlen = d->d_namlen; 20056dc: c6 34 60 0a sth %g3, [ %l1 + 0xa ] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 20056e0: 95 32 a0 10 srl %o2, 0x10, %o2 20056e4: 40 00 35 85 call 2012cf8 20056e8: 94 02 a0 01 inc %o2 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 20056ec: b0 06 20 01 inc %i0 20056f0: 80 a6 00 14 cmp %i0, %l4 20056f4: 3a 80 00 1a bcc,a 200575c 20056f8: 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; 20056fc: 82 26 00 15 sub %i0, %l5, %g1 2005700: 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) { 2005704: 90 10 00 12 mov %l2, %o0 2005708: 7f ff ff 26 call 20053a0 200570c: e2 24 c0 01 st %l1, [ %l3 + %g1 ] 2005710: a0 92 20 00 orcc %o0, 0, %l0 2005714: 12 bf ff db bne 2005680 2005718: 80 a6 a0 00 cmp %i2, 0 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 200571c: 7f ff f7 95 call 2003570 2005720: 90 10 00 12 mov %l2, %o0 if (nitems && dcomp != NULL){ 2005724: 80 a6 20 00 cmp %i0, 0 2005728: 22 80 00 0a be,a 2005750 200572c: e6 26 40 00 st %l3, [ %i1 ] <== NOT EXECUTED 2005730: 80 a6 e0 00 cmp %i3, 0 2005734: 02 80 00 06 be 200574c 2005738: 96 10 00 1b mov %i3, %o3 qsort(names, nitems, sizeof(struct dirent *), 200573c: 90 10 00 13 mov %l3, %o0 2005740: 92 10 00 18 mov %i0, %o1 2005744: 40 00 32 65 call 20120d8 2005748: 94 10 20 04 mov 4, %o2 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 200574c: e6 26 40 00 st %l3, [ %i1 ] return(nitems); 2005750: 92 10 00 18 mov %i0, %o1 free( names[i] ); free( names ); } return(-1); } 2005754: 81 c7 e0 08 ret 2005758: 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) 200575c: 40 00 1e 79 call 200d140 <== NOT EXECUTED 2005760: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 2005764: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2005768: 06 80 00 10 bl 20057a8 <== NOT EXECUTED 200576c: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 2005770: 40 00 3d 32 call 2014c38 <.div> <== NOT EXECUTED 2005774: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED 2005778: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 200577c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 2005780: 40 00 1f 41 call 200d484 <== NOT EXECUTED 2005784: 93 2d 20 02 sll %l4, 2, %o1 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 2005788: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 200578c: 12 bf ff dd bne 2005700 <== NOT EXECUTED 2005790: 82 26 00 15 sub %i0, %l5, %g1 <== NOT EXECUTED return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 2005794: 7f ff f7 77 call 2003570 2005798: 90 10 00 12 mov %l2, %o0 200579c: 92 10 3f ff mov -1, %o1 free( names[i] ); free( names ); } return(-1); } 20057a0: 81 c7 e0 08 ret 20057a4: 91 e8 00 09 restore %g0, %o1, %o0 return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 20057a8: 7f ff f7 72 call 2003570 <== NOT EXECUTED 20057ac: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( names ) { for (i=0; i < nitems; i++ ) 20057b0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 20057b4: 02 80 00 0a be 20057dc <== NOT EXECUTED 20057b8: 82 10 20 00 clr %g1 <== NOT EXECUTED 20057bc: a0 10 20 00 clr %l0 <== NOT EXECUTED free( names[i] ); 20057c0: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 20057c4: d0 04 c0 01 ld [ %l3 + %g1 ], %o0 <== NOT EXECUTED 20057c8: 7f ff f8 df call 2003b44 <== NOT EXECUTED 20057cc: a0 04 20 01 inc %l0 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 20057d0: 80 a6 00 10 cmp %i0, %l0 <== NOT EXECUTED 20057d4: 18 bf ff fb bgu 20057c0 <== NOT EXECUTED 20057d8: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED free( names[i] ); free( names ); 20057dc: 7f ff f8 da call 2003b44 <== NOT EXECUTED 20057e0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 20057e4: 10 bf ff dc b 2005754 <== NOT EXECUTED 20057e8: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 0202112c : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 202112c: 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) 2021130: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 2021134: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 2021138: 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) 202113c: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 2021140: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 2021144: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2021148: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 202114c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 2021150: 7f ff ff bd call 2021044 <== NOT EXECUTED 2021154: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 2021158: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 202115c: 12 80 00 04 bne 202116c <== NOT EXECUTED 2021160: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 2021164: 81 c7 e0 08 ret <== NOT EXECUTED 2021168: 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) 202116c: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 2021170: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 2021174: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 2021178: 7f ff ff b3 call 2021044 <== NOT EXECUTED 202117c: 98 10 20 00 clr %o4 <== NOT EXECUTED 2021180: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021184: 02 bf ff f8 be 2021164 <== NOT EXECUTED 2021188: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202118c: 7f ff ff 64 call 2020f1c <== NOT EXECUTED 2021190: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 2021194: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021198: 02 bf ff f3 be 2021164 <== NOT EXECUTED 202119c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20211a0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 20211a4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 20211a8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 20211ac: 7f ff ff a6 call 2021044 <== NOT EXECUTED 20211b0: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 20211b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20211b8: 02 bf ff eb be 2021164 <== NOT EXECUTED 20211bc: 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; 20211c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 20211c4: 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; 20211c8: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 20211cc: c4 0b 40 00 ldub [ %o5 ], %g2 <== NOT EXECUTED 20211d0: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 20211d4: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED 20211d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20211dc: 02 80 00 0e be 2021214 <== NOT EXECUTED 20211e0: 84 10 20 17 mov 0x17, %g2 <== NOT EXECUTED 20211e4: 86 00 e0 01 inc %g3 <== NOT EXECUTED 20211e8: c4 08 c0 00 ldub [ %g3 ], %g2 <== NOT EXECUTED if(*cp == ',') 20211ec: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED memcount++; 20211f0: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 20211f4: 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++) { 20211f8: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED if(*cp == ',') memcount++; 20211fc: 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++) { 2021200: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021204: 32 bf ff f9 bne,a 20211e8 <== NOT EXECUTED 2021208: 86 00 e0 01 inc %g3 <== NOT EXECUTED 202120c: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 2021210: 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)) 2021214: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 <== NOT EXECUTED 2021218: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 202121c: 0a bf ff d2 bcs 2021164 <== NOT EXECUTED 2021220: 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++) { 2021224: 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); 2021228: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 202122c: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 2021230: da 20 40 00 st %o5, [ %g1 ] <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2021234: 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); 2021238: 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++) { 202123c: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 2021240: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED 2021244: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2021248: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 202124c: 12 80 00 09 bne 2021270 <== NOT EXECUTED 2021250: 84 10 20 04 mov 4, %g2 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 2021254: 10 80 00 13 b 20212a0 <== NOT EXECUTED 2021258: 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++) { 202125c: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED 2021260: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 2021264: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2021268: 02 80 00 0c be 2021298 <== NOT EXECUTED 202126c: 86 00 e0 01 inc %g3 <== NOT EXECUTED if(*cp == ',') { 2021270: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 2021274: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED 2021278: 32 bf ff fa bne,a 2021260 <== NOT EXECUTED 202127c: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED *cp = '\0'; 2021280: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 2021284: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 2021288: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 202128c: 88 01 20 01 inc %g4 <== NOT EXECUTED 2021290: 10 bf ff f3 b 202125c <== NOT EXECUTED 2021294: 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++) { 2021298: 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; 202129c: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED 20212a0: c0 20 40 02 clr [ %g1 + %g2 ] <== NOT EXECUTED 20212a4: 81 c7 e0 08 ret <== NOT EXECUTED 20212a8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 020212f8 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 20212f8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 20212fc: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 2021300: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 2021304: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2021308: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 202130c: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 2021310: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2021314: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2021318: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 202131c: 7f ff ff 4a call 2021044 <== NOT EXECUTED 2021320: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 2021324: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021328: 12 80 00 04 bne 2021338 <== NOT EXECUTED 202132c: 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; } 2021330: 81 c7 e0 08 ret <== NOT EXECUTED 2021334: 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) 2021338: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 202133c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 2021340: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 2021344: 7f ff ff 40 call 2021044 <== NOT EXECUTED 2021348: 98 10 20 00 clr %o4 <== NOT EXECUTED 202134c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021350: 02 bf ff f8 be 2021330 <== NOT EXECUTED 2021354: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2021358: 7f ff fe f1 call 2020f1c <== NOT EXECUTED 202135c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 2021360: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021364: 02 bf ff f3 be 2021330 <== NOT EXECUTED 2021368: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 202136c: 7f ff fe ec call 2020f1c <== NOT EXECUTED 2021370: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 2021374: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021378: 02 bf ff ee be 2021330 <== NOT EXECUTED 202137c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2021380: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 2021384: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 2021388: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 202138c: 7f ff ff 2e call 2021044 <== NOT EXECUTED 2021390: 98 10 20 00 clr %o4 <== NOT EXECUTED 2021394: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021398: 02 bf ff e6 be 2021330 <== NOT EXECUTED 202139c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20213a0: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 20213a4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 20213a8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 20213ac: 7f ff ff 26 call 2021044 <== NOT EXECUTED 20213b0: 98 10 20 00 clr %o4 <== NOT EXECUTED 20213b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20213b8: 02 bf ff de be 2021330 <== NOT EXECUTED 20213bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20213c0: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 20213c4: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 20213c8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 20213cc: 7f ff ff 1e call 2021044 <== NOT EXECUTED 20213d0: 98 10 20 00 clr %o4 <== NOT EXECUTED 20213d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20213d8: 02 bf ff d6 be 2021330 <== NOT EXECUTED 20213dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 20213e0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 20213e4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 20213e8: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 20213ec: 7f ff ff 16 call 2021044 <== NOT EXECUTED 20213f0: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 20213f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 20213f8: 02 bf ff ce be 2021330 <== NOT EXECUTED 20213fc: 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; 2021400: 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; 2021404: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 2021408: c4 36 60 0a sth %g2, [ %i1 + 0xa ] <== NOT EXECUTED 202140c: 81 c7 e0 08 ret <== NOT EXECUTED 2021410: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 02007e58 : */ int sem_destroy( sem_t *sem ) { 2007e58: 9d e3 bf 90 save %sp, -112, %sp 2007e5c: d2 06 00 00 ld [ %i0 ], %o1 2007e60: 11 00 80 7b sethi %hi(0x201ec00), %o0 2007e64: 94 07 bf f4 add %fp, -12, %o2 2007e68: 40 00 09 78 call 200a448 <_Objects_Get> 2007e6c: 90 12 20 60 or %o0, 0x60, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 2007e70: c2 07 bf f4 ld [ %fp + -12 ], %g1 2007e74: 80 a0 60 00 cmp %g1, 0 2007e78: 22 80 00 08 be,a 2007e98 2007e7c: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 2007e80: 40 00 25 89 call 20114a4 <__errno> 2007e84: b0 10 3f ff mov -1, %i0 2007e88: 82 10 20 16 mov 0x16, %g1 2007e8c: c2 22 00 00 st %g1, [ %o0 ] } 2007e90: 81 c7 e0 08 ret 2007e94: 81 e8 00 00 restore case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 2007e98: 80 a0 60 00 cmp %g1, 0 2007e9c: 12 80 00 08 bne 2007ebc 2007ea0: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 2007ea4: 40 00 1c a0 call 200f124 <_POSIX_Semaphore_Delete> 2007ea8: b0 10 20 00 clr %i0 ! 0 _Thread_Enable_dispatch(); 2007eac: 40 00 0b bc call 200ad9c <_Thread_Enable_dispatch> 2007eb0: 01 00 00 00 nop 2007eb4: 81 c7 e0 08 ret 2007eb8: 81 e8 00 00 restore /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); 2007ebc: 40 00 0b b8 call 200ad9c <_Thread_Enable_dispatch> <== NOT EXECUTED 2007ec0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 2007ec4: 40 00 25 78 call 20114a4 <__errno> <== NOT EXECUTED 2007ec8: 01 00 00 00 nop <== NOT EXECUTED 2007ecc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2007ed0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2007ed4: 81 c7 e0 08 ret <== NOT EXECUTED 2007ed8: 81 e8 00 00 restore <== NOT EXECUTED 02007f30 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 2007f30: 9d e3 bf 90 save %sp, -112, %sp 2007f34: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 2007f38: 80 a6 20 00 cmp %i0, 0 2007f3c: 02 80 00 0c be 2007f6c 2007f40: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 2007f44: 90 10 20 00 clr %o0 2007f48: 40 00 1c 2b call 200eff4 <_POSIX_Semaphore_Create_support> 2007f4c: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 2007f50: 80 a2 3f ff cmp %o0, -1 2007f54: 02 80 00 04 be 2007f64 2007f58: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 2007f5c: c4 00 60 08 ld [ %g1 + 8 ], %g2 2007f60: c4 26 00 00 st %g2, [ %i0 ] return status; } 2007f64: 81 c7 e0 08 ret 2007f68: 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 ); 2007f6c: 40 00 25 4e call 20114a4 <__errno> <== NOT EXECUTED 2007f70: 01 00 00 00 nop <== NOT EXECUTED 2007f74: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2007f78: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2007f7c: 10 bf ff fa b 2007f64 <== NOT EXECUTED 2007f80: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 02008100 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 2008100: 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 ); 2008104: 90 10 00 19 mov %i1, %o0 2008108: 40 00 19 46 call 200e620 <_POSIX_Absolute_timeout_to_ticks> 200810c: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 2008110: 80 a2 20 02 cmp %o0, 2 2008114: 08 80 00 07 bleu 2008130 2008118: 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 ); 200811c: 90 10 00 18 mov %i0, %o0 2008120: 40 00 1c 35 call 200f1f4 <_POSIX_Semaphore_Wait_support> 2008124: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 2008128: 81 c7 e0 08 ret 200812c: 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 ); 2008130: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2008134: 40 00 1c 30 call 200f1f4 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 2008138: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 200813c: 81 c7 e0 08 ret <== NOT EXECUTED 2008140: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 02008200 : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 2008200: 92 10 20 01 mov 1, %o1 2008204: 94 10 20 00 clr %o2 2008208: 82 13 c0 00 mov %o7, %g1 200820c: 40 00 1b fa call 200f1f4 <_POSIX_Semaphore_Wait_support> 2008210: 9e 10 40 00 mov %g1, %o7 2008214: 01 00 00 00 nop <== NOT EXECUTED 02020eb8 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 2020eb8: 03 00 81 28 sethi %hi(0x204a000), %g1 <== NOT EXECUTED 2020ebc: c4 00 62 3c ld [ %g1 + 0x23c ], %g2 ! 204a23c <== NOT EXECUTED 2020ec0: d0 30 a0 2a sth %o0, [ %g2 + 0x2a ] <== NOT EXECUTED return 0; } 2020ec4: 81 c3 e0 08 retl <== NOT EXECUTED 2020ec8: 90 10 20 00 clr %o0 <== NOT EXECUTED 0202154c : return NULL; return &grent; } void setgrent(void) { 202154c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 2021550: 7f ff ff c4 call 2021460 <== NOT EXECUTED 2021554: 21 00 81 77 sethi %hi(0x205dc00), %l0 <== NOT EXECUTED if (group_fp != NULL) 2021558: d0 04 23 bc ld [ %l0 + 0x3bc ], %o0 ! 205dfbc <== NOT EXECUTED 202155c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021560: 22 80 00 05 be,a 2021574 <== NOT EXECUTED 2021564: 11 00 81 1a sethi %hi(0x2046800), %o0 <== NOT EXECUTED fclose(group_fp); 2021568: 40 00 41 14 call 20319b8 <== NOT EXECUTED 202156c: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 2021570: 11 00 81 1a sethi %hi(0x2046800), %o0 <== NOT EXECUTED 2021574: 13 00 81 24 sethi %hi(0x2049000), %o1 <== NOT EXECUTED 2021578: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED 202157c: 40 00 43 29 call 2032220 <== NOT EXECUTED 2021580: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED 2021584: d0 24 23 bc st %o0, [ %l0 + 0x3bc ] <== NOT EXECUTED } 2021588: 81 c7 e0 08 ret <== NOT EXECUTED 202158c: 81 e8 00 00 restore <== NOT EXECUTED 02021750 : return NULL; return &pwent; } void setpwent(void) { 2021750: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 2021754: 7f ff ff 43 call 2021460 <== NOT EXECUTED 2021758: 21 00 81 77 sethi %hi(0x205dc00), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 202175c: d0 04 22 d4 ld [ %l0 + 0x2d4 ], %o0 ! 205ded4 <== NOT EXECUTED 2021760: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2021764: 22 80 00 05 be,a 2021778 <== NOT EXECUTED 2021768: 11 00 81 1a sethi %hi(0x2046800), %o0 <== NOT EXECUTED fclose(passwd_fp); 202176c: 40 00 40 93 call 20319b8 <== NOT EXECUTED 2021770: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 2021774: 11 00 81 1a sethi %hi(0x2046800), %o0 <== NOT EXECUTED 2021778: 13 00 81 24 sethi %hi(0x2049000), %o1 <== NOT EXECUTED 202177c: 90 12 20 00 mov %o0, %o0 <== NOT EXECUTED 2021780: 40 00 42 a8 call 2032220 <== NOT EXECUTED 2021784: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED 2021788: d0 24 22 d4 st %o0, [ %l0 + 0x2d4 ] <== NOT EXECUTED } 202178c: 81 c7 e0 08 ret <== NOT EXECUTED 2021790: 81 e8 00 00 restore <== NOT EXECUTED 020048bc : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 20048bc: 03 00 81 28 sethi %hi(0x204a000), %g1 <== NOT EXECUTED 20048c0: c4 00 62 3c ld [ %g1 + 0x23c ], %g2 ! 204a23c <== NOT EXECUTED 20048c4: d0 30 a0 28 sth %o0, [ %g2 + 0x28 ] <== NOT EXECUTED return 0; } 20048c8: 81 c3 e0 08 retl <== NOT EXECUTED 20048cc: 90 10 20 00 clr %o0 <== NOT EXECUTED 02008064 : #include int sigsuspend( const sigset_t *sigmask ) { 2008064: 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 ); 2008068: 90 10 20 01 mov 1, %o0 200806c: 92 10 00 18 mov %i0, %o1 2008070: a0 07 bf f4 add %fp, -12, %l0 2008074: 7f ff ff f1 call 2008038 2008078: 94 10 00 10 mov %l0, %o2 (void) sigfillset( &all_signals ); 200807c: a2 07 bf f0 add %fp, -16, %l1 2008080: 7f ff ff b7 call 2007f5c 2008084: 90 10 00 11 mov %l1, %o0 status = sigtimedwait( &all_signals, NULL, NULL ); 2008088: 90 10 00 11 mov %l1, %o0 200808c: 92 10 20 00 clr %o1 2008090: 40 00 00 2e call 2008148 2008094: 94 10 20 00 clr %o2 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 2008098: 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 ); 200809c: a2 10 00 08 mov %o0, %l1 (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL ); 20080a0: 94 10 20 00 clr %o2 20080a4: 7f ff ff e5 call 2008038 20080a8: 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 ) 20080ac: 80 a4 7f ff cmp %l1, -1 20080b0: 12 80 00 05 bne 20080c4 20080b4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); return status; } 20080b8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 20080bc: 81 c7 e0 08 ret <== NOT EXECUTED 20080c0: 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 ); 20080c4: 40 00 24 89 call 20112e8 <__errno> 20080c8: b0 10 3f ff mov -1, %i0 20080cc: 82 10 20 04 mov 4, %g1 20080d0: c2 22 00 00 st %g1, [ %o0 ] 20080d4: 81 c7 e0 08 ret 20080d8: 81 e8 00 00 restore 02008318 : int sigwait( const sigset_t *set, int *sig ) { 2008318: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 200831c: 92 10 20 00 clr %o1 2008320: 90 10 00 18 mov %i0, %o0 2008324: 7f ff ff 89 call 2008148 2008328: 94 10 20 00 clr %o2 if ( status != -1 ) { 200832c: 80 a2 3f ff cmp %o0, -1 2008330: 02 80 00 07 be 200834c 2008334: 80 a6 60 00 cmp %i1, 0 if ( sig ) 2008338: 02 80 00 03 be 2008344 200833c: b0 10 20 00 clr %i0 *sig = status; 2008340: d0 26 40 00 st %o0, [ %i1 ] 2008344: 81 c7 e0 08 ret 2008348: 81 e8 00 00 restore return 0; } return errno; 200834c: 40 00 23 e7 call 20112e8 <__errno> <== NOT EXECUTED 2008350: 01 00 00 00 nop <== NOT EXECUTED 2008354: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 2008358: 81 c7 e0 08 ret <== NOT EXECUTED 200835c: 81 e8 00 00 restore <== NOT EXECUTED 02003d14 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2003d14: 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)) { 2003d18: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 2003d1c: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 2003d20: 32 80 00 05 bne,a 2003d34 <== NOT EXECUTED 2003d24: 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); 2003d28: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 2003d2c: 7f ff ff 7d call 2003b20 <== NOT EXECUTED 2003d30: 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); 2003d34: 94 10 20 00 clr %o2 <== NOT EXECUTED 2003d38: 40 00 06 a9 call 20057dc <== NOT EXECUTED 2003d3c: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 2003d40: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 2003d44: 7f ff ff 77 call 2003b20 <== NOT EXECUTED 2003d48: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 2003d4c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2003d50: 40 00 06 eb call 20058fc <== NOT EXECUTED 2003d54: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2003d58: 81 c7 e0 08 ret <== NOT EXECUTED 2003d5c: 81 e8 00 00 restore <== NOT EXECUTED 02006074 : int _STAT_NAME( const char *path, struct stat *buf ) { 2006074: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 2006078: 80 a6 60 00 cmp %i1, 0 200607c: 02 80 00 32 be 2006144 2006080: 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 ); 2006084: a0 07 bf e8 add %fp, -24, %l0 2006088: 92 10 20 00 clr %o1 200608c: 94 10 00 10 mov %l0, %o2 2006090: 96 10 20 01 mov 1, %o3 2006094: 7f ff f9 5a call 20045fc 2006098: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 200609c: 80 a2 20 00 cmp %o0, 0 20060a0: 12 80 00 27 bne 200613c 20060a4: c4 07 bf ec ld [ %fp + -20 ], %g2 return -1; if ( !loc.handlers->fstat_h ){ 20060a8: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 20060ac: 80 a0 60 00 cmp %g1, 0 20060b0: 02 80 00 2b be 200615c 20060b4: 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) ); 20060b8: c0 26 40 00 clr [ %i1 ] 20060bc: c0 26 60 04 clr [ %i1 + 4 ] 20060c0: c0 26 60 08 clr [ %i1 + 8 ] 20060c4: c0 26 60 0c clr [ %i1 + 0xc ] 20060c8: c0 26 60 10 clr [ %i1 + 0x10 ] 20060cc: c0 26 60 14 clr [ %i1 + 0x14 ] 20060d0: c0 26 60 18 clr [ %i1 + 0x18 ] 20060d4: c0 26 60 1c clr [ %i1 + 0x1c ] 20060d8: c0 26 60 20 clr [ %i1 + 0x20 ] 20060dc: c0 26 60 24 clr [ %i1 + 0x24 ] 20060e0: c0 26 60 28 clr [ %i1 + 0x28 ] 20060e4: c0 26 60 2c clr [ %i1 + 0x2c ] 20060e8: c0 26 60 30 clr [ %i1 + 0x30 ] 20060ec: c0 26 60 34 clr [ %i1 + 0x34 ] 20060f0: c0 26 60 38 clr [ %i1 + 0x38 ] 20060f4: c0 26 60 3c clr [ %i1 + 0x3c ] 20060f8: c0 26 60 40 clr [ %i1 + 0x40 ] 20060fc: c0 26 60 44 clr [ %i1 + 0x44 ] 2006100: c0 26 60 48 clr [ %i1 + 0x48 ] 2006104: c0 26 60 4c clr [ %i1 + 0x4c ] status = (*loc.handlers->fstat_h)( &loc, buf ); 2006108: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 200610c: 9f c0 40 00 call %g1 2006110: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2006114: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006118: 80 a0 60 00 cmp %g1, 0 200611c: 02 80 00 08 be 200613c 2006120: b0 10 00 08 mov %o0, %i0 2006124: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2006128: 80 a0 60 00 cmp %g1, 0 200612c: 02 80 00 1a be 2006194 2006130: 01 00 00 00 nop 2006134: 9f c0 40 00 call %g1 2006138: 90 10 00 10 mov %l0, %o0 return status; } 200613c: 81 c7 e0 08 ret 2006140: 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 ); 2006144: 40 00 ad c5 call 2031858 <__errno> 2006148: b0 10 3f ff mov -1, %i0 200614c: 82 10 20 0e mov 0xe, %g1 2006150: c2 22 00 00 st %g1, [ %o0 ] 2006154: 81 c7 e0 08 ret 2006158: 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 ); 200615c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2006160: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006164: 02 80 00 08 be 2006184 <== NOT EXECUTED 2006168: 01 00 00 00 nop <== NOT EXECUTED 200616c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2006170: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2006174: 02 80 00 04 be 2006184 <== NOT EXECUTED 2006178: 01 00 00 00 nop <== NOT EXECUTED 200617c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2006180: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2006184: 40 00 ad b5 call 2031858 <__errno> <== NOT EXECUTED 2006188: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 200618c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2006190: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2006194: 81 c7 e0 08 ret <== NOT EXECUTED 2006198: 81 e8 00 00 restore <== NOT EXECUTED 020228a4 : int symlink( const char *actualpath, const char *sympath ) { 20228a4: 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 ); 20228a8: c2 4e 40 00 ldsb [ %i1 ], %g1 20228ac: 80 a0 60 2f cmp %g1, 0x2f 20228b0: 02 80 00 07 be 20228cc 20228b4: a0 10 00 18 mov %i0, %l0 20228b8: 80 a0 60 5c cmp %g1, 0x5c 20228bc: 02 80 00 04 be 20228cc 20228c0: 80 a0 60 00 cmp %g1, 0 20228c4: 12 80 00 2b bne 2022970 20228c8: 03 00 81 28 sethi %hi(0x204a000), %g1 20228cc: 03 00 81 28 sethi %hi(0x204a000), %g1 20228d0: c6 00 62 3c ld [ %g1 + 0x23c ], %g3 ! 204a23c 20228d4: 88 10 20 01 mov 1, %g4 20228d8: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 20228dc: c2 27 bf e4 st %g1, [ %fp + -28 ] 20228e0: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 20228e4: c4 27 bf e8 st %g2, [ %fp + -24 ] 20228e8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 20228ec: c2 27 bf ec st %g1, [ %fp + -20 ] 20228f0: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 20228f4: c4 27 bf f0 st %g2, [ %fp + -16 ] result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 20228f8: c2 07 bf ec ld [ %fp + -20 ], %g1 20228fc: 90 06 40 04 add %i1, %g4, %o0 2022900: c4 00 60 04 ld [ %g1 + 4 ], %g2 2022904: b2 07 bf e4 add %fp, -28, %i1 2022908: 94 07 bf f4 add %fp, -12, %o2 202290c: 92 10 00 19 mov %i1, %o1 2022910: 9f c0 80 00 call %g2 2022914: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 2022918: 80 a2 20 00 cmp %o0, 0 202291c: 12 80 00 13 bne 2022968 2022920: c4 07 bf ec ld [ %fp + -20 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 2022924: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 2022928: 80 a0 60 00 cmp %g1, 0 202292c: 02 80 00 1c be 202299c 2022930: 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); 2022934: 92 10 00 10 mov %l0, %o1 2022938: 9f c0 40 00 call %g1 202293c: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 2022940: c2 07 bf ec ld [ %fp + -20 ], %g1 2022944: 80 a0 60 00 cmp %g1, 0 2022948: 02 80 00 08 be 2022968 202294c: b0 10 00 08 mov %o0, %i0 2022950: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2022954: 80 a0 60 00 cmp %g1, 0 2022958: 02 80 00 1b be 20229c4 202295c: 01 00 00 00 nop 2022960: 9f c0 40 00 call %g1 2022964: 90 10 00 19 mov %i1, %o0 return result; } 2022968: 81 c7 e0 08 ret 202296c: 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 ); 2022970: c6 00 62 3c ld [ %g1 + 0x23c ], %g3 2022974: 88 10 20 00 clr %g4 2022978: c2 00 e0 04 ld [ %g3 + 4 ], %g1 202297c: c2 27 bf e4 st %g1, [ %fp + -28 ] 2022980: c4 00 e0 08 ld [ %g3 + 8 ], %g2 2022984: c4 27 bf e8 st %g2, [ %fp + -24 ] 2022988: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 202298c: c2 27 bf ec st %g1, [ %fp + -20 ] 2022990: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 2022994: 10 bf ff d9 b 20228f8 2022998: 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 ); 202299c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 20229a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 20229a4: 02 80 00 04 be 20229b4 <== NOT EXECUTED 20229a8: 01 00 00 00 nop <== NOT EXECUTED 20229ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 20229b0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 20229b4: 40 00 3b a9 call 2031858 <__errno> <== NOT EXECUTED 20229b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20229bc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 20229c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20229c4: 81 c7 e0 08 ret <== NOT EXECUTED 20229c8: 81 e8 00 00 restore <== NOT EXECUTED 02013828 : int tcgetattr( int fd, struct termios *tp ) { 2013828: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 201382c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 2013830: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 2013834: 40 00 10 3d call 2017928 <== NOT EXECUTED 2013838: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 201383c: 01 00 00 00 nop 02013840 : int tcsetattr( int fd, int opt, struct termios *tp ) { 2013840: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 2013844: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 2013848: 02 80 00 10 be 2013888 <== NOT EXECUTED 201384c: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 2013850: 02 80 00 08 be 2013870 <== NOT EXECUTED 2013854: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 2013858: 40 00 13 83 call 2018664 <__errno> <== NOT EXECUTED 201385c: 01 00 00 00 nop <== NOT EXECUTED 2013860: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 2013864: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 2013868: 81 c7 e0 08 ret <== NOT EXECUTED 201386c: 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) 2013870: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 2013874: 40 00 10 2d call 2017928 <== NOT EXECUTED 2013878: 94 10 20 00 clr %o2 <== NOT EXECUTED 201387c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2013880: 06 bf ff fa bl 2013868 <== NOT EXECUTED 2013884: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 2013888: 40 00 10 28 call 2017928 <== NOT EXECUTED 201388c: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED 2013890: 01 00 00 00 nop 0200595c : #include long telldir( DIR *dirp ) { 200595c: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; if ( !dirp ) 2005960: 80 a6 20 00 cmp %i0, 0 2005964: 02 80 00 1b be 20059d0 2005968: 03 00 80 5f sethi %hi(0x2017c00), %g1 /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 200596c: f0 06 00 00 ld [ %i0 ], %i0 2005970: c4 00 63 a8 ld [ %g1 + 0x3a8 ], %g2 2005974: 80 a6 00 02 cmp %i0, %g2 2005978: 1a 80 00 0f bcc 20059b4 200597c: 11 00 80 5c sethi %hi(0x2017000), %o0 2005980: 03 00 80 63 sethi %hi(0x2018c00), %g1 2005984: c6 00 61 18 ld [ %g1 + 0x118 ], %g3 ! 2018d18 2005988: 85 2e 20 02 sll %i0, 2, %g2 200598c: 83 2e 20 04 sll %i0, 4, %g1 2005990: 82 20 40 02 sub %g1, %g2, %g1 2005994: 82 00 40 18 add %g1, %i0, %g1 2005998: 83 28 60 02 sll %g1, 2, %g1 if (iop == NULL) 200599c: 86 80 c0 01 addcc %g3, %g1, %g3 20059a0: 02 80 00 06 be 20059b8 20059a4: 15 00 80 5c sethi %hi(0x2017000), %o2 assert(0); return (long)( iop->offset ); 20059a8: f0 00 e0 08 ld [ %g3 + 8 ], %i0 } 20059ac: 81 c7 e0 08 ret 20059b0: 81 e8 00 00 restore */ iop = rtems_libio_iop( dirp->dd_fd ); if (iop == NULL) assert(0); 20059b4: 15 00 80 5c sethi %hi(0x2017000), %o2 <== NOT EXECUTED 20059b8: 17 00 80 5c sethi %hi(0x2017000), %o3 <== NOT EXECUTED 20059bc: 90 12 21 f0 or %o0, 0x1f0, %o0 <== NOT EXECUTED 20059c0: 94 12 a2 48 or %o2, 0x248, %o2 <== NOT EXECUTED 20059c4: 96 12 e2 40 or %o3, 0x240, %o3 <== NOT EXECUTED 20059c8: 7f ff f6 78 call 20033a8 <__assert_func> <== NOT EXECUTED 20059cc: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED ) { rtems_libio_t *iop; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 20059d0: 40 00 2d 55 call 2010f24 <__errno> <== NOT EXECUTED 20059d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20059d8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 20059dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 20059e0: 81 c7 e0 08 ret <== NOT EXECUTED 20059e4: 81 e8 00 00 restore <== NOT EXECUTED 02006ebc : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 2006ebc: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 2006ec0: 80 a6 a0 00 cmp %i2, 0 2006ec4: 02 80 00 54 be 2007014 2006ec8: 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 ) || 2006ecc: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 2006ed0: 82 10 61 ff or %g1, 0x1ff, %g1 2006ed4: 80 a0 80 01 cmp %g2, %g1 2006ed8: 18 80 00 4f bgu 2007014 2006edc: 01 00 00 00 nop 2006ee0: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2006ee4: 80 a0 80 01 cmp %g2, %g1 2006ee8: 18 80 00 4b bgu 2007014 2006eec: 80 a0 a0 00 cmp %g2, 0 2006ef0: 06 80 00 49 bl 2007014 2006ef4: 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 ) { 2006ef8: 02 80 00 04 be 2006f08 2006efc: 80 a6 60 00 cmp %i1, 0 2006f00: 12 80 00 45 bne 2007014 2006f04: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 2006f08: c2 06 80 00 ld [ %i2 ], %g1 2006f0c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 2006f10: c6 06 a0 08 ld [ %i2 + 8 ], %g3 2006f14: c8 06 a0 0c ld [ %i2 + 0xc ], %g4 2006f18: c2 27 bf e4 st %g1, [ %fp + -28 ] 2006f1c: c4 27 bf e8 st %g2, [ %fp + -24 ] 2006f20: c6 27 bf ec st %g3, [ %fp + -20 ] /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 2006f24: 80 a6 60 04 cmp %i1, 4 2006f28: 02 80 00 5c be 2007098 2006f2c: c8 27 bf f0 st %g4, [ %fp + -16 ] 2006f30: 92 10 00 18 mov %i0, %o1 2006f34: 11 00 80 74 sethi %hi(0x201d000), %o0 2006f38: 94 07 bf f4 add %fp, -12, %o2 2006f3c: 40 00 09 1f call 20093b8 <_Objects_Get> 2006f40: 90 12 22 f0 or %o0, 0x2f0, %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 ) { 2006f44: c2 07 bf f4 ld [ %fp + -12 ], %g1 2006f48: 80 a0 60 00 cmp %g1, 0 2006f4c: 12 80 00 67 bne 20070e8 2006f50: 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 ) { 2006f54: c2 07 bf ec ld [ %fp + -20 ], %g1 2006f58: 80 a0 60 00 cmp %g1, 0 2006f5c: 12 80 00 05 bne 2006f70 2006f60: c2 07 bf f0 ld [ %fp + -16 ], %g1 2006f64: 80 a0 60 00 cmp %g1, 0 2006f68: 02 80 00 31 be 200702c 2006f6c: 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 ); 2006f70: 40 00 0f 8b call 200ad9c <_Timespec_To_ticks> 2006f74: 90 10 00 1a mov %i2, %o0 2006f78: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 2006f7c: 40 00 0f 88 call 200ad9c <_Timespec_To_ticks> 2006f80: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 2006f84: 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 ); 2006f88: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 2006f8c: 17 00 80 1c sethi %hi(0x2007000), %o3 2006f90: 90 06 60 10 add %i1, 0x10, %o0 2006f94: 96 12 e1 00 or %o3, 0x100, %o3 2006f98: 40 00 1c 16 call 200dff0 <_POSIX_Timer_Insert_helper> 2006f9c: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 2006fa0: 80 8a 20 ff btst 0xff, %o0 2006fa4: 02 80 00 18 be 2007004 2006fa8: 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 ) 2006fac: 02 80 00 0b be 2006fd8 2006fb0: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 2006fb4: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 2006fb8: c2 26 c0 00 st %g1, [ %i3 ] 2006fbc: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 2006fc0: c4 26 e0 04 st %g2, [ %i3 + 4 ] 2006fc4: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 2006fc8: c2 26 e0 08 st %g1, [ %i3 + 8 ] 2006fcc: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 2006fd0: c4 26 e0 0c st %g2, [ %i3 + 0xc ] ptimer->timer_data = normalize; 2006fd4: 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 ); 2006fd8: 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; 2006fdc: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 2006fe0: c4 07 bf e8 ld [ %fp + -24 ], %g2 2006fe4: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 2006fe8: c2 07 bf ec ld [ %fp + -20 ], %g1 2006fec: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 2006ff0: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 2006ff4: 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; 2006ff8: 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 ); 2006ffc: 40 00 06 80 call 20089fc <_TOD_Get> 2007000: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 2007004: 40 00 0b 42 call 2009d0c <_Thread_Enable_dispatch> 2007008: b0 10 20 00 clr %i0 200700c: 81 c7 e0 08 ret 2007010: 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 ); 2007014: 40 00 23 e8 call 200ffb4 <__errno> 2007018: b0 10 3f ff mov -1, %i0 200701c: 82 10 20 16 mov 0x16, %g1 2007020: c2 22 00 00 st %g1, [ %o0 ] 2007024: 81 c7 e0 08 ret 2007028: 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 ); 200702c: 40 00 10 ac call 200b2dc <_Watchdog_Remove> 2007030: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 2007034: 80 a6 e0 00 cmp %i3, 0 2007038: 02 80 00 0b be 2007064 200703c: c2 07 bf e4 ld [ %fp + -28 ], %g1 *ovalue = ptimer->timer_data; 2007040: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 <== NOT EXECUTED 2007044: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 2007048: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 <== NOT EXECUTED 200704c: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 2007050: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 <== NOT EXECUTED 2007054: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 2007058: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 <== NOT EXECUTED 200705c: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 2007060: 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(); 2007064: 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; 2007068: c2 26 60 54 st %g1, [ %i1 + 0x54 ] 200706c: c4 07 bf e8 ld [ %fp + -24 ], %g2 2007070: c4 26 60 58 st %g2, [ %i1 + 0x58 ] 2007074: c2 07 bf ec ld [ %fp + -20 ], %g1 2007078: c2 26 60 5c st %g1, [ %i1 + 0x5c ] 200707c: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 2007080: 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; 2007084: 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(); 2007088: 40 00 0b 21 call 2009d0c <_Thread_Enable_dispatch> 200708c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 2007090: 81 c7 e0 08 ret 2007094: 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 ) ) 2007098: b2 07 bf ec add %fp, -20, %i1 200709c: 21 00 80 74 sethi %hi(0x201d000), %l0 20070a0: 92 10 00 19 mov %i1, %o1 20070a4: 40 00 0f 16 call 200acfc <_Timespec_Greater_than> 20070a8: 90 14 20 34 or %l0, 0x34, %o0 20070ac: 80 8a 20 ff btst 0xff, %o0 20070b0: 12 bf ff d9 bne 2007014 20070b4: 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 ); 20070b8: 94 10 00 19 mov %i1, %o2 20070bc: 40 00 0f 22 call 200ad44 <_Timespec_Subtract> 20070c0: 90 14 20 34 or %l0, 0x34, %o0 20070c4: 92 10 00 18 mov %i0, %o1 20070c8: 11 00 80 74 sethi %hi(0x201d000), %o0 20070cc: 94 07 bf f4 add %fp, -12, %o2 20070d0: 40 00 08 ba call 20093b8 <_Objects_Get> 20070d4: 90 12 22 f0 or %o0, 0x2f0, %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 ) { 20070d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 20070dc: 80 a0 60 00 cmp %g1, 0 20070e0: 02 bf ff 9d be 2006f54 20070e4: b2 10 00 08 mov %o0, %i1 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 20070e8: 40 00 23 b3 call 200ffb4 <__errno> <== NOT EXECUTED 20070ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 20070f0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 20070f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 20070f8: 81 c7 e0 08 ret <== NOT EXECUTED 20070fc: 81 e8 00 00 restore <== NOT EXECUTED 02022b54 : */ char *ttyname( int fd ) { 2022b54: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 2022b58: 21 00 81 28 sethi %hi(0x204a000), %l0 <== NOT EXECUTED 2022b5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2022b60: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 2022b64: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED 2022b68: 7f ff ff ba call 2022a50 <== NOT EXECUTED 2022b6c: b0 14 22 40 or %l0, 0x240, %i0 <== NOT EXECUTED 2022b70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2022b74: 12 80 00 04 bne 2022b84 <== NOT EXECUTED 2022b78: 01 00 00 00 nop <== NOT EXECUTED return ttyname_buf; return NULL; } 2022b7c: 81 c7 e0 08 ret <== NOT EXECUTED 2022b80: 81 e8 00 00 restore <== NOT EXECUTED 2022b84: 81 c7 e0 08 ret <== NOT EXECUTED 2022b88: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 02022a50 : int ttyname_r( int fd, char *name, size_t namesize ) { 2022a50: 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) 2022a54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2022a58: 7f ff ff e3 call 20229e4 <== NOT EXECUTED 2022a5c: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 2022a60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2022a64: 06 80 00 0d bl 2022a98 <== NOT EXECUTED 2022a68: 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)) 2022a6c: 7f ff f7 3a call 2020754 <== NOT EXECUTED 2022a70: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 2022a74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2022a78: 12 80 00 08 bne 2022a98 <== NOT EXECUTED 2022a7c: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 2022a80: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 2022a84: 07 00 00 08 sethi %hi(0x2000), %g3 <== NOT EXECUTED 2022a88: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 2022a8c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 2022a90: 02 80 00 08 be 2022ab0 <== NOT EXECUTED 2022a94: 11 00 81 1a sethi %hi(0x2046800), %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); 2022a98: 40 00 3b 70 call 2031858 <__errno> <== NOT EXECUTED 2022a9c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2022aa0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 2022aa4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2022aa8: 81 c7 e0 08 ret <== NOT EXECUTED 2022aac: 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); 2022ab0: 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) 2022ab4: 90 12 21 68 or %o0, 0x168, %o0 <== NOT EXECUTED 2022ab8: 7f ff fd 98 call 2022118 <== NOT EXECUTED 2022abc: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 2022ac0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 2022ac4: 02 bf ff f5 be 2022a98 <== NOT EXECUTED 2022ac8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 2022acc: 7f ff fe 55 call 2022420 <== NOT EXECUTED 2022ad0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2022ad4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2022ad8: 02 80 00 1a be 2022b40 <== NOT EXECUTED 2022adc: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED { if (dirp->d_ino != sb.st_ino) 2022ae0: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED 2022ae4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 2022ae8: 12 bf ff f9 bne 2022acc <== NOT EXECUTED 2022aec: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 2022af0: 40 00 50 0e call 2036b28 <== NOT EXECUTED 2022af4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 2022af8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 2022afc: 7f ff 8d 5e call 2006074 <== NOT EXECUTED 2022b00: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 2022b04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2022b08: 12 bf ff f1 bne 2022acc <== NOT EXECUTED 2022b0c: c4 07 bf 30 ld [ %fp + -208 ], %g2 <== NOT EXECUTED 2022b10: c2 07 bf 80 ld [ %fp + -128 ], %g1 <== NOT EXECUTED 2022b14: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2022b18: 12 bf ff ed bne 2022acc <== NOT EXECUTED 2022b1c: c4 07 bf 34 ld [ %fp + -204 ], %g2 <== NOT EXECUTED 2022b20: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 2022b24: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2022b28: 12 bf ff e9 bne 2022acc <== NOT EXECUTED 2022b2c: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED 2022b30: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 2022b34: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 2022b38: 12 bf ff e5 bne 2022acc <== NOT EXECUTED 2022b3c: 01 00 00 00 nop <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 2022b40: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2022b44: 40 00 30 1c call 202ebb4 <== NOT EXECUTED 2022b48: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 2022b4c: 81 c7 e0 08 ret <== NOT EXECUTED 2022b50: 81 e8 00 00 restore <== NOT EXECUTED 020053e4 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 20053e4: 9d e3 bf 90 save %sp, -112, %sp /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 20053e8: 03 00 80 58 sethi %hi(0x2016000), %g1 20053ec: a2 10 63 14 or %g1, 0x314, %l1 ! 2016314 <_POSIX_signals_Ualarm_timer> 20053f0: c4 04 60 1c ld [ %l1 + 0x1c ], %g2 20053f4: 80 a0 a0 00 cmp %g2, 0 20053f8: 02 80 00 3c be 20054e8 20053fc: a4 10 00 18 mov %i0, %l2 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { switch ( _Watchdog_Remove( the_timer ) ) { 2005400: 40 00 10 dd call 2009774 <_Watchdog_Remove> 2005404: 90 10 00 11 mov %l1, %o0 2005408: 90 02 3f fe add %o0, -2, %o0 200540c: 80 a2 20 01 cmp %o0, 1 2005410: 08 80 00 07 bleu 200542c 2005414: 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 ) { 2005418: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 200541c: 12 80 00 1a bne 2005484 <== NOT EXECUTED 2005420: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 2005424: 81 c7 e0 08 ret 2005428: 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); 200542c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005430: 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); 2005434: d0 04 60 14 ld [ %l1 + 0x14 ], %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005438: 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); 200543c: 90 02 00 01 add %o0, %g1, %o0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 2005440: 40 00 0f 31 call 2009104 <_Timespec_From_ticks> 2005444: 90 22 00 02 sub %o0, %g2, %o0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 2005448: c4 07 bf f0 ld [ %fp + -16 ], %g2 remaining += tp.tv_nsec / 1000; 200544c: 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; 2005450: 87 28 a0 03 sll %g2, 3, %g3 2005454: 83 28 a0 08 sll %g2, 8, %g1 2005458: 82 20 40 03 sub %g1, %g3, %g1 remaining += tp.tv_nsec / 1000; 200545c: 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; 2005460: a1 28 60 06 sll %g1, 6, %l0 2005464: a0 24 00 01 sub %l0, %g1, %l0 remaining += tp.tv_nsec / 1000; 2005468: 40 00 35 3b call 2012954 <.div> 200546c: 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; 2005470: 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 ) { 2005474: 80 a4 a0 00 cmp %l2, 0 2005478: 02 bf ff eb be 2005424 200547c: b0 02 00 10 add %o0, %l0, %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 2005480: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 2005484: 90 10 00 12 mov %l2, %o0 2005488: 40 00 35 31 call 201294c <.udiv> 200548c: 92 14 22 40 or %l0, 0x240, %o1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 2005490: 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; 2005494: d0 27 bf f0 st %o0, [ %fp + -16 ] tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 2005498: 40 00 35 d9 call 2012bfc <.urem> 200549c: 90 10 00 12 mov %l2, %o0 20054a0: 85 2a 20 02 sll %o0, 2, %g2 20054a4: 83 2a 20 07 sll %o0, 7, %g1 20054a8: 82 20 40 02 sub %g1, %g2, %g1 20054ac: 82 00 40 08 add %g1, %o0, %g1 20054b0: 83 28 60 03 sll %g1, 3, %g1 ticks = _Timespec_To_ticks( &tp ); 20054b4: 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; 20054b8: c2 27 bf f4 st %g1, [ %fp + -12 ] ticks = _Timespec_To_ticks( &tp ); 20054bc: 40 00 0f 3d call 20091b0 <_Timespec_To_ticks> 20054c0: 90 10 00 10 mov %l0, %o0 if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 20054c4: 40 00 0f 3b call 20091b0 <_Timespec_To_ticks> 20054c8: 90 10 00 10 mov %l0, %o0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20054cc: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 20054d0: d0 24 60 0c st %o0, [ %l1 + 0xc ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 20054d4: 11 00 80 59 sethi %hi(0x2016400), %o0 20054d8: 40 00 10 3c call 20095c8 <_Watchdog_Insert> 20054dc: 90 12 21 54 or %o0, 0x154, %o0 ! 2016554 <_Watchdog_Ticks_chain> } return remaining; } 20054e0: 81 c7 e0 08 ret 20054e4: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20054e8: 03 00 80 15 sethi %hi(0x2005400), %g1 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 20054ec: c0 24 60 08 clr [ %l1 + 8 ] the_watchdog->routine = routine; 20054f0: 82 10 61 14 or %g1, 0x114, %g1 the_watchdog->id = id; 20054f4: c0 24 60 20 clr [ %l1 + 0x20 ] the_watchdog->user_data = user_data; 20054f8: c0 24 60 24 clr [ %l1 + 0x24 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 20054fc: 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 ) { 2005500: 80 a4 a0 00 cmp %l2, 0 2005504: 02 bf ff c8 be 2005424 2005508: b0 10 20 00 clr %i0 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 200550c: 10 bf ff de b 2005484 2005510: 21 00 03 d0 sethi %hi(0xf4000), %l0 02022ba4 : #include int unlink( const char *path ) { 2022ba4: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 2022ba8: 92 10 20 00 clr %o1 2022bac: 90 10 00 18 mov %i0, %o0 2022bb0: a0 07 bf e8 add %fp, -24, %l0 2022bb4: 96 10 20 00 clr %o3 2022bb8: 7f ff 86 91 call 20045fc 2022bbc: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 2022bc0: 80 a2 20 00 cmp %o0, 0 2022bc4: 02 80 00 04 be 2022bd4 2022bc8: 90 10 20 02 mov 2, %o0 result = (*loc.ops->unlink_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 2022bcc: 81 c7 e0 08 ret 2022bd0: 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 ); 2022bd4: 7f ff 86 5a call 200453c 2022bd8: 92 10 00 10 mov %l0, %o1 if (result != 0 && errno != ENOTSUP) { 2022bdc: 80 a2 20 00 cmp %o0, 0 2022be0: 12 80 00 1d bne 2022c54 2022be4: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); return -1; } if ( !loc.ops->node_type_h ) { 2022be8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 2022bec: 80 a0 60 00 cmp %g1, 0 2022bf0: 22 80 00 2b be,a 2022c9c 2022bf4: 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 ) { 2022bf8: 9f c0 40 00 call %g1 2022bfc: 90 10 00 10 mov %l0, %o0 2022c00: 80 a2 20 01 cmp %o0, 1 2022c04: 02 80 00 31 be 2022cc8 2022c08: 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 ) { 2022c0c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 2022c10: 80 a0 60 00 cmp %g1, 0 2022c14: 22 80 00 22 be,a 2022c9c 2022c18: 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 ); 2022c1c: 9f c0 40 00 call %g1 2022c20: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 2022c24: c2 07 bf f0 ld [ %fp + -16 ], %g1 2022c28: 80 a0 60 00 cmp %g1, 0 2022c2c: 02 80 00 08 be 2022c4c 2022c30: b0 10 00 08 mov %o0, %i0 2022c34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2022c38: 80 a0 60 00 cmp %g1, 0 2022c3c: 02 80 00 31 be 2022d00 2022c40: 01 00 00 00 nop 2022c44: 9f c0 40 00 call %g1 2022c48: 90 10 00 10 mov %l0, %o0 2022c4c: 81 c7 e0 08 ret 2022c50: 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) { 2022c54: 40 00 3b 01 call 2031858 <__errno> <== NOT EXECUTED 2022c58: 01 00 00 00 nop <== NOT EXECUTED 2022c5c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 2022c60: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 2022c64: 02 bf ff e1 be 2022be8 <== NOT EXECUTED 2022c68: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2022c6c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 2022c70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022c74: 02 bf ff f6 be 2022c4c <== NOT EXECUTED 2022c78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2022c7c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 2022c80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022c84: 02 bf ff f2 be 2022c4c <== NOT EXECUTED 2022c88: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 2022c8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2022c90: 01 00 00 00 nop <== NOT EXECUTED 2022c94: 81 c7 e0 08 ret <== NOT EXECUTED 2022c98: 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 ); 2022c9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2022ca0: 02 80 00 04 be 2022cb0 <== NOT EXECUTED 2022ca4: 01 00 00 00 nop <== NOT EXECUTED 2022ca8: 9f c0 40 00 call %g1 <== NOT EXECUTED 2022cac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2022cb0: 40 00 3a ea call 2031858 <__errno> <== NOT EXECUTED 2022cb4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2022cb8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2022cbc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2022cc0: 81 c7 e0 08 ret <== NOT EXECUTED 2022cc4: 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 ); 2022cc8: c2 07 bf f0 ld [ %fp + -16 ], %g1 2022ccc: 80 a0 60 00 cmp %g1, 0 2022cd0: 02 80 00 08 be 2022cf0 2022cd4: 01 00 00 00 nop 2022cd8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2022cdc: 80 a0 60 00 cmp %g1, 0 2022ce0: 02 80 00 04 be 2022cf0 2022ce4: 01 00 00 00 nop 2022ce8: 9f c0 40 00 call %g1 2022cec: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EISDIR ); 2022cf0: 40 00 3a da call 2031858 <__errno> 2022cf4: b0 10 3f ff mov -1, %i0 2022cf8: 82 10 20 15 mov 0x15, %g1 2022cfc: c2 22 00 00 st %g1, [ %o0 ] 2022d00: 81 c7 e0 08 ret 2022d04: 81 e8 00 00 restore 02022d98 : */ int unmount( const char *path ) { 2022d98: 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 ) ) 2022d9c: 92 10 20 00 clr %o1 2022da0: 90 10 00 18 mov %i0, %o0 2022da4: a0 07 bf e8 add %fp, -24, %l0 2022da8: 96 10 20 01 mov 1, %o3 2022dac: 7f ff 86 14 call 20045fc 2022db0: 94 10 00 10 mov %l0, %o2 2022db4: 80 a2 20 00 cmp %o0, 0 2022db8: 12 80 00 3e bne 2022eb0 2022dbc: c2 07 bf e8 ld [ %fp + -24 ], %g1 return -1; mt_entry = loc.mt_entry; 2022dc0: 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) ){ 2022dc4: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 2022dc8: 80 a0 80 01 cmp %g2, %g1 2022dcc: 12 80 00 41 bne 2022ed0 2022dd0: 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 ); 2022dd4: 80 a0 60 00 cmp %g1, 0 2022dd8: 22 80 00 09 be,a 2022dfc 2022ddc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 2022de0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2022de4: 80 a0 60 00 cmp %g1, 0 2022de8: 22 80 00 05 be,a 2022dfc 2022dec: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 2022df0: 9f c0 40 00 call %g1 2022df4: 90 10 00 10 mov %l0, %o0 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 2022df8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2022dfc: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 2022e00: 80 a0 a0 00 cmp %g2, 0 2022e04: 02 80 00 61 be 2022f88 2022e08: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 2022e0c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 2022e10: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 2022e14: 80 a0 a0 00 cmp %g2, 0 2022e18: 02 80 00 5c be 2022f88 2022e1c: 03 00 81 28 sethi %hi(0x204a000), %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 ) 2022e20: c4 00 62 3c ld [ %g1 + 0x23c ], %g2 ! 204a23c 2022e24: c6 00 a0 10 ld [ %g2 + 0x10 ], %g3 2022e28: 80 a0 c0 18 cmp %g3, %i0 2022e2c: 02 80 00 23 be 2022eb8 2022e30: 03 00 81 7a sethi %hi(0x205e800), %g1 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 2022e34: c4 00 61 40 ld [ %g1 + 0x140 ], %g2 ! 205e940 2022e38: 82 10 61 40 or %g1, 0x140, %g1 2022e3c: 88 00 60 04 add %g1, 4, %g4 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 2022e40: 80 a1 00 02 cmp %g4, %g2 2022e44: 02 80 00 0f be 2022e80 2022e48: 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 ) { 2022e4c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 2022e50: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 2022e54: 80 a0 40 03 cmp %g1, %g3 2022e58: 32 80 00 07 bne,a 2022e74 2022e5c: c4 00 80 00 ld [ %g2 ], %g2 2022e60: 30 80 00 16 b,a 2022eb8 <== NOT EXECUTED 2022e64: 80 a0 c0 01 cmp %g3, %g1 2022e68: 02 80 00 14 be 2022eb8 2022e6c: 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 ) { 2022e70: 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 ); 2022e74: 80 a1 00 02 cmp %g4, %g2 2022e78: 32 bf ff fb bne,a 2022e64 2022e7c: 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 ) 2022e80: 7f ff 86 ff call 2004a7c 2022e84: 90 10 00 18 mov %i0, %o0 2022e88: 80 a2 20 01 cmp %o0, 1 2022e8c: 02 80 00 0b be 2022eb8 2022e90: 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 ) 2022e94: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 2022e98: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 2022e9c: 9f c0 40 00 call %g1 2022ea0: 90 10 00 18 mov %i0, %o0 2022ea4: 80 a2 20 00 cmp %o0, 0 2022ea8: 22 80 00 19 be,a 2022f0c 2022eac: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 2022eb0: 81 c7 e0 08 ret 2022eb4: 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 ); 2022eb8: 40 00 3a 68 call 2031858 <__errno> 2022ebc: b0 10 3f ff mov -1, %i0 2022ec0: 82 10 20 10 mov 0x10, %g1 2022ec4: c2 22 00 00 st %g1, [ %o0 ] 2022ec8: 81 c7 e0 08 ret 2022ecc: 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 ); 2022ed0: 80 a0 60 00 cmp %g1, 0 2022ed4: 02 80 00 08 be 2022ef4 2022ed8: 01 00 00 00 nop 2022edc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2022ee0: 80 a0 60 00 cmp %g1, 0 2022ee4: 02 80 00 04 be 2022ef4 2022ee8: 01 00 00 00 nop 2022eec: 9f c0 40 00 call %g1 2022ef0: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 2022ef4: 40 00 3a 59 call 2031858 <__errno> 2022ef8: b0 10 3f ff mov -1, %i0 2022efc: 82 10 20 0d mov 0xd, %g1 2022f00: c2 22 00 00 st %g1, [ %o0 ] 2022f04: 81 c7 e0 08 ret 2022f08: 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){ 2022f0c: c2 00 a0 2c ld [ %g2 + 0x2c ], %g1 2022f10: 9f c0 40 00 call %g1 2022f14: 90 10 00 18 mov %i0, %o0 2022f18: 80 a2 20 00 cmp %o0, 0 2022f1c: 32 80 00 13 bne,a 2022f68 2022f20: 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 ); 2022f24: 40 00 05 ba call 202460c <_Chain_Extract> 2022f28: 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 ); 2022f2c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 2022f30: 80 a0 60 00 cmp %g1, 0 2022f34: 02 80 00 09 be 2022f58 2022f38: 90 10 00 18 mov %i0, %o0 2022f3c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2022f40: 80 a0 60 00 cmp %g1, 0 2022f44: 02 80 00 05 be 2022f58 2022f48: 01 00 00 00 nop 2022f4c: 9f c0 40 00 call %g1 2022f50: 90 06 20 08 add %i0, 8, %o0 free( mt_entry ); 2022f54: 90 10 00 18 mov %i0, %o0 2022f58: 7f ff 86 07 call 2004774 2022f5c: b0 10 20 00 clr %i0 2022f60: 81 c7 e0 08 ret 2022f64: 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 ) 2022f68: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED 2022f6c: 9f c0 40 00 call %g1 <== NOT EXECUTED 2022f70: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 2022f74: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 2022f78: 02 bf ff ce be 2022eb0 <== NOT EXECUTED 2022f7c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 2022f80: 7f ff 98 8e call 20091b8 <== NOT EXECUTED 2022f84: 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 ); 2022f88: 40 00 3a 34 call 2031858 <__errno> <== NOT EXECUTED 2022f8c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2022f90: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 2022f94: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2022f98: 81 c7 e0 08 ret <== NOT EXECUTED 2022f9c: 81 e8 00 00 restore <== NOT EXECUTED 02022fa0 : int utime( const char *path, const struct utimbuf *times ) { 2022fa0: 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 ) ) 2022fa4: 92 10 20 00 clr %o1 2022fa8: 90 10 00 18 mov %i0, %o0 2022fac: a0 07 bf e8 add %fp, -24, %l0 2022fb0: 96 10 20 01 mov 1, %o3 2022fb4: 94 10 00 10 mov %l0, %o2 2022fb8: 7f ff 85 91 call 20045fc 2022fbc: b0 10 3f ff mov -1, %i0 2022fc0: 80 a2 20 00 cmp %o0, 0 2022fc4: 12 80 00 14 bne 2023014 2022fc8: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 2022fcc: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 2022fd0: 80 a0 60 00 cmp %g1, 0 2022fd4: 22 80 00 12 be,a 202301c 2022fd8: 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 ); 2022fdc: d4 06 60 04 ld [ %i1 + 4 ], %o2 2022fe0: d2 06 40 00 ld [ %i1 ], %o1 2022fe4: 9f c0 40 00 call %g1 2022fe8: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 2022fec: c2 07 bf f0 ld [ %fp + -16 ], %g1 2022ff0: 80 a0 60 00 cmp %g1, 0 2022ff4: 02 80 00 08 be 2023014 2022ff8: b0 10 00 08 mov %o0, %i0 2022ffc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 2023000: 80 a0 60 00 cmp %g1, 0 2023004: 02 80 00 0f be 2023040 2023008: 01 00 00 00 nop 202300c: 9f c0 40 00 call %g1 2023010: 90 10 00 10 mov %l0, %o0 return result; } 2023014: 81 c7 e0 08 ret 2023018: 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 ); 202301c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 2023020: 02 80 00 04 be 2023030 <== NOT EXECUTED 2023024: 01 00 00 00 nop <== NOT EXECUTED 2023028: 9f c0 40 00 call %g1 <== NOT EXECUTED 202302c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 2023030: 40 00 3a 0a call 2031858 <__errno> <== NOT EXECUTED 2023034: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 2023038: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 202303c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2023040: 81 c7 e0 08 ret <== NOT EXECUTED 2023044: 81 e8 00 00 restore <== NOT EXECUTED 02002ba0 : */ void vprintk( const char *fmt, va_list ap ) { 2002ba0: 9d e3 bf 80 save %sp, -128, %sp char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002ba4: d0 0e 00 00 ldub [ %i0 ], %o0 2002ba8: 91 2a 20 18 sll %o0, 0x18, %o0 2002bac: 80 a2 20 00 cmp %o0, 0 2002bb0: 02 80 00 44 be 2002cc0 2002bb4: 03 00 80 5c sethi %hi(0x2017000), %g1 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2002bb8: 05 00 80 0a sethi %hi(0x2002800), %g2 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 2002bbc: a8 10 63 fc or %g1, 0x3fc, %l4 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2002bc0: b4 10 a2 cc or %g2, 0x2cc, %i2 2002bc4: 03 00 80 59 sethi %hi(0x2016400), %g1 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 2002bc8: b6 07 bf f8 add %fp, -8, %i3 2002bcc: b8 10 60 60 or %g1, 0x60, %i4 2002bd0: ae 07 bf e0 add %fp, -32, %l7 base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 2002bd4: 91 3a 20 18 sra %o0, 0x18, %o0 2002bd8: 80 a2 20 25 cmp %o0, 0x25 2002bdc: 32 80 00 3b bne,a 2002cc8 2002be0: c2 05 00 00 ld [ %l4 ], %g1 fmt++; if (*fmt == '0' ) { 2002be4: d0 0e 20 01 ldub [ %i0 + 1 ], %o0 sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { fmt++; 2002be8: 88 06 20 01 add %i0, 1, %g4 if (*fmt == '0' ) { 2002bec: 87 2a 20 18 sll %o0, 0x18, %g3 2002bf0: 83 38 e0 18 sra %g3, 0x18, %g1 2002bf4: 80 a0 60 30 cmp %g1, 0x30 2002bf8: 02 80 00 b7 be 2002ed4 2002bfc: ba 10 20 20 mov 0x20, %i5 lead = '0'; fmt++; } if (*fmt == '-' ) { 2002c00: 83 38 e0 18 sra %g3, 0x18, %g1 2002c04: 80 a0 60 2d cmp %g1, 0x2d 2002c08: 02 80 00 ae be 2002ec0 2002c0c: ac 10 20 00 clr %l6 minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 2002c10: 82 02 3f d0 add %o0, -48, %g1 2002c14: a0 10 20 00 clr %l0 2002c18: 82 08 60 ff and %g1, 0xff, %g1 2002c1c: b0 10 00 04 mov %g4, %i0 2002c20: 80 a0 60 09 cmp %g1, 9 2002c24: 08 80 00 05 bleu 2002c38 2002c28: aa 10 20 00 clr %l5 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 2002c2c: 10 80 00 13 b 2002c78 2002c30: 83 38 e0 18 sra %g3, 0x18, %g1 2002c34: 87 2a 20 18 sll %o0, 0x18, %g3 fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); fmt++; 2002c38: 88 01 20 01 inc %g4 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 2002c3c: d0 09 00 00 ldub [ %g4 ], %o0 width *= 10; width += (*fmt - '0'); 2002c40: 85 2c 20 03 sll %l0, 3, %g2 2002c44: 83 2c 20 01 sll %l0, 1, %g1 2002c48: 87 38 e0 18 sra %g3, 0x18, %g3 2002c4c: 82 00 40 02 add %g1, %g2, %g1 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 2002c50: 84 02 3f d0 add %o0, -48, %g2 width *= 10; width += (*fmt - '0'); 2002c54: 82 00 40 03 add %g1, %g3, %g1 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 2002c58: 84 08 a0 ff and %g2, 0xff, %g2 2002c5c: 80 a0 a0 09 cmp %g2, 9 2002c60: 08 bf ff f5 bleu 2002c34 2002c64: a0 00 7f d0 add %g1, -48, %l0 2002c68: b0 10 00 04 mov %g4, %i0 2002c6c: aa 10 00 10 mov %l0, %l5 2002c70: 87 2a 20 18 sll %o0, 0x18, %g3 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 2002c74: 83 38 e0 18 sra %g3, 0x18, %g1 2002c78: 80 a0 60 6c cmp %g1, 0x6c 2002c7c: 22 80 00 9b be,a 2002ee8 2002c80: d0 09 20 01 ldub [ %g4 + 1 ], %o0 lflag = 1; c = *++fmt; } switch (c) { 2002c84: 82 02 3f bc add %o0, -68, %g1 2002c88: 82 08 60 ff and %g1, 0xff, %g1 2002c8c: 80 a0 60 34 cmp %g1, 0x34 2002c90: 08 80 00 12 bleu 2002cd8 2002c94: 83 28 60 02 sll %g1, 2, %g1 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 2002c98: c2 05 00 00 ld [ %l4 ], %g1 2002c9c: 91 2a 20 18 sll %o0, 0x18, %o0 2002ca0: 9f c0 40 00 call %g1 2002ca4: 91 3a 20 18 sra %o0, 0x18, %o0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002ca8: b0 06 20 01 inc %i0 2002cac: d0 0e 00 00 ldub [ %i0 ], %o0 2002cb0: 91 2a 20 18 sll %o0, 0x18, %o0 2002cb4: 80 a2 20 00 cmp %o0, 0 2002cb8: 12 bf ff c8 bne 2002bd8 2002cbc: 91 3a 20 18 sra %o0, 0x18, %o0 2002cc0: 81 c7 e0 08 ret 2002cc4: 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); 2002cc8: 9f c0 40 00 call %g1 2002ccc: b0 06 20 01 inc %i0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002cd0: 10 bf ff f8 b 2002cb0 2002cd4: d0 0e 00 00 ldub [ %i0 ], %o0 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2002cd8: c4 06 80 01 ld [ %i2 + %g1 ], %g2 2002cdc: 81 c0 80 00 jmp %g2 2002ce0: 01 00 00 00 nop break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 2002ce4: 82 10 20 00 clr %g1 ! 0 <== NOT EXECUTED 2002ce8: 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), 2002cec: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 2002cf0: 80 a4 60 00 cmp %l1, 0 2002cf4: 06 80 00 3d bl 2002de8 2002cf8: b2 06 60 04 add %i1, 4, %i1 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 2002cfc: 90 10 00 11 mov %l1, %o0 2002d00: 92 10 00 13 mov %l3, %o1 2002d04: 40 00 46 17 call 2014560 <.udiv> 2002d08: a0 10 20 00 clr %l0 2002d0c: 80 a2 20 00 cmp %o0, 0 2002d10: 02 80 00 14 be 2002d60 2002d14: a4 10 20 01 mov 1, %l2 2002d18: a4 10 00 11 mov %l1, %l2 2002d1c: a0 10 20 00 clr %l0 2002d20: 10 80 00 03 b 2002d2c 2002d24: a2 10 00 08 mov %o0, %l1 2002d28: a2 10 00 08 mov %o0, %l1 toPrint[count++] = (num - (n*base)); 2002d2c: 92 10 00 13 mov %l3, %o1 2002d30: 40 00 45 d2 call 2014478 <.umul> 2002d34: 90 10 00 11 mov %l1, %o0 2002d38: 90 24 80 08 sub %l2, %o0, %o0 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 2002d3c: 92 10 00 13 mov %l3, %o1 toPrint[count++] = (num - (n*base)); 2002d40: d0 2d c0 10 stb %o0, [ %l7 + %l0 ] num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 2002d44: 90 10 00 11 mov %l1, %o0 2002d48: 40 00 46 06 call 2014560 <.udiv> 2002d4c: a0 04 20 01 inc %l0 2002d50: 80 a2 20 00 cmp %o0, 0 2002d54: 12 bf ff f5 bne 2002d28 2002d58: a4 10 00 11 mov %l1, %l2 2002d5c: a4 04 20 01 add %l0, 1, %l2 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 2002d60: 82 06 c0 10 add %i3, %l0, %g1 2002d64: e2 28 7f e8 stb %l1, [ %g1 + -24 ] for (n=maxwidth ; n > count; n-- ) 2002d68: 80 a4 80 15 cmp %l2, %l5 2002d6c: 1a 80 00 0a bcc 2002d94 2002d70: a0 10 00 15 mov %l5, %l0 2002d74: a2 10 00 1d mov %i5, %l1 BSP_output_char(lead); 2002d78: c2 05 00 00 ld [ %l4 ], %g1 2002d7c: 9f c0 40 00 call %g1 2002d80: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 2002d84: a0 04 3f ff add %l0, -1, %l0 2002d88: 80 a4 80 10 cmp %l2, %l0 2002d8c: 2a bf ff fc bcs,a 2002d7c 2002d90: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(lead); for (n = 0; n < count; n++) { 2002d94: 80 a4 a0 00 cmp %l2, 0 2002d98: 02 bf ff c4 be 2002ca8 2002d9c: a2 06 c0 12 add %i3, %l2, %l1 2002da0: a0 10 20 00 clr %l0 BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 2002da4: 82 24 40 10 sub %l1, %l0, %g1 2002da8: c4 48 7f e7 ldsb [ %g1 + -25 ], %g2 2002dac: c6 05 00 00 ld [ %l4 ], %g3 2002db0: d0 4f 00 02 ldsb [ %i4 + %g2 ], %o0 2002db4: 9f c0 c0 00 call %g3 2002db8: 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++) { 2002dbc: 80 a4 80 10 cmp %l2, %l0 2002dc0: 18 bf ff fa bgu 2002da8 2002dc4: 82 24 40 10 sub %l1, %l0, %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002dc8: 10 bf ff b9 b 2002cac 2002dcc: 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), 2002dd0: e2 06 40 00 ld [ %i1 ], %l1 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2002dd4: 82 10 20 01 mov 1, %g1 2002dd8: a6 10 20 0a mov 0xa, %l3 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 2002ddc: 80 a4 60 00 cmp %l1, 0 2002de0: 16 bf ff c7 bge 2002cfc 2002de4: b2 06 60 04 add %i1, 4, %i1 2002de8: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 2002dec: 02 bf ff c5 be 2002d00 <== NOT EXECUTED 2002df0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED BSP_output_char('-'); 2002df4: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 2002df8: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002dfc: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 2002e00: 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; 2002e04: a2 20 00 11 neg %l1 <== NOT EXECUTED if (maxwidth) maxwidth--; 2002e08: 10 bf ff bd b 2002cfc <== NOT EXECUTED 2002e0c: 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 *); 2002e10: e6 06 40 00 ld [ %i1 ], %l3 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 2002e14: a4 10 20 00 clr %l2 2002e18: c2 4c c0 00 ldsb [ %l3 ], %g1 2002e1c: 80 a0 60 00 cmp %g1, 0 2002e20: 02 80 00 07 be 2002e3c 2002e24: b2 06 60 04 add %i1, 4, %i1 2002e28: a4 04 a0 01 inc %l2 2002e2c: c2 4c c0 12 ldsb [ %l3 + %l2 ], %g1 2002e30: 80 a0 60 00 cmp %g1, 0 2002e34: 32 bf ff fe bne,a 2002e2c 2002e38: a4 04 a0 01 inc %l2 ; /* leading spaces */ if ( !minus ) 2002e3c: 80 a5 a0 00 cmp %l6, 0 2002e40: 02 80 00 36 be 2002f18 2002e44: 80 a4 00 12 cmp %l0, %l2 for ( i=len ; i 2002e50: aa 10 00 12 mov %l2, %l5 width = len; } /* output the string */ for ( i=0 ; i 2002e5c: 80 a5 a0 00 cmp %l6, 0 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 2002e60: 22 bf ff 93 be,a 2002cac 2002e64: b0 06 20 01 inc %i0 for ( i=len ; i 2002e70: b0 06 20 01 inc %i0 <== NOT EXECUTED 2002e74: a0 10 00 12 mov %l2, %l0 BSP_output_char(' '); 2002e78: c2 05 00 00 ld [ %l4 ], %g1 2002e7c: 9f c0 40 00 call %g1 2002e80: 90 10 20 20 mov 0x20, %o0 for ( i=0 ; i 2002e90: c2 05 00 00 ld [ %l4 ], %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 2002e94: 10 bf ff 86 b 2002cac 2002e98: b0 06 20 01 inc %i0 for ( i=len ; i <== NOT EXECUTED 2002eb0: b0 06 20 01 inc %i0 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 2002eb4: 82 10 20 00 clr %g1 2002eb8: 10 bf ff 8d b 2002cec 2002ebc: a6 10 20 0a mov 0xa, %l3 lead = '0'; fmt++; } if (*fmt == '-' ) { minus = 1; fmt++; 2002ec0: 88 01 20 01 inc %g4 2002ec4: d0 09 00 00 ldub [ %g4 ], %o0 2002ec8: ac 10 20 01 mov 1, %l6 2002ecc: 10 bf ff 51 b 2002c10 2002ed0: 87 2a 20 18 sll %o0, 0x18, %g3 lead = ' '; if (*fmt == '%') { fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 2002ed4: d0 0e 20 02 ldub [ %i0 + 2 ], %o0 2002ed8: 88 06 20 02 add %i0, 2, %g4 2002edc: ba 10 20 30 mov 0x30, %i5 2002ee0: 10 bf ff 48 b 2002c00 2002ee4: 87 2a 20 18 sll %o0, 0x18, %g3 fmt++; } if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; 2002ee8: 10 bf ff 67 b 2002c84 2002eec: b0 01 20 01 add %g4, 1, %i0 width = len; } /* output the string */ for ( i=0 ; i 2002f0c: c2 05 00 00 ld [ %l4 ], %g1 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 2002f10: 10 bf ff d4 b 2002e60 2002f14: 80 a5 a0 00 cmp %l6, 0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 2002f1c: a2 10 00 12 mov %l2, %l1 BSP_output_char(' '); 2002f20: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 2002f24: 9f c0 40 00 call %g1 <== NOT EXECUTED 2002f28: 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 2002f38: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i <== NOT EXECUTED 2002f40: 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); 2002f44: 82 10 20 00 clr %g1 2002f48: 10 bf ff 69 b 2002cec 2002f4c: a6 10 20 10 mov 0x10, %l3 0201585c : ssize_t write( int fd, const void *buffer, size_t count ) { 201585c: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2015860: 03 00 80 5c sethi %hi(0x2017000), %g1 2015864: c4 00 62 f8 ld [ %g1 + 0x2f8 ], %g2 ! 20172f8 ssize_t write( int fd, const void *buffer, size_t count ) { 2015868: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 201586c: 80 a6 00 02 cmp %i0, %g2 2015870: 1a 80 00 24 bcc 2015900 2015874: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 2015878: 03 00 80 5f sethi %hi(0x2017c00), %g1 201587c: c6 00 63 f4 ld [ %g1 + 0x3f4 ], %g3 ! 2017ff4 2015880: 85 2e 20 02 sll %i0, 2, %g2 2015884: 83 2e 20 04 sll %i0, 4, %g1 2015888: 82 20 40 02 sub %g1, %g2, %g1 201588c: 82 00 40 18 add %g1, %i0, %g1 2015890: 83 28 60 02 sll %g1, 2, %g1 2015894: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 2015898: c2 06 20 0c ld [ %i0 + 0xc ], %g1 201589c: 80 88 61 00 btst 0x100, %g1 20158a0: 02 80 00 18 be 2015900 20158a4: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 20158a8: 02 80 00 1c be 2015918 20158ac: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 20158b0: 02 80 00 12 be 20158f8 20158b4: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 20158b8: 80 88 60 04 btst 4, %g1 20158bc: 02 80 00 17 be 2015918 20158c0: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 20158c4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 20158c8: c2 00 60 0c ld [ %g1 + 0xc ], %g1 20158cc: 80 a0 60 00 cmp %g1, 0 20158d0: 02 80 00 18 be 2015930 20158d4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 20158d8: 9f c0 40 00 call %g1 20158dc: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 20158e0: 80 a2 20 00 cmp %o0, 0 20158e4: 04 80 00 05 ble 20158f8 20158e8: 01 00 00 00 nop iop->offset += rc; 20158ec: c2 06 20 08 ld [ %i0 + 8 ], %g1 20158f0: 82 00 40 08 add %g1, %o0, %g1 20158f4: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 20158f8: 81 c7 e0 08 ret 20158fc: 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 ); 2015900: 7f ff e0 4d call 200da34 <__errno> <== NOT EXECUTED 2015904: 01 00 00 00 nop <== NOT EXECUTED 2015908: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 201590c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015910: 10 bf ff fa b 20158f8 <== NOT EXECUTED 2015914: 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 ); 2015918: 7f ff e0 47 call 200da34 <__errno> <== NOT EXECUTED 201591c: 01 00 00 00 nop <== NOT EXECUTED 2015920: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 2015924: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015928: 10 bf ff f4 b 20158f8 <== NOT EXECUTED 201592c: 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 ); 2015930: 7f ff e0 41 call 200da34 <__errno> <== NOT EXECUTED 2015934: 01 00 00 00 nop <== NOT EXECUTED 2015938: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 201593c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 2015940: 10 bf ff ee b 20158f8 <== NOT EXECUTED 2015944: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED