4001d9a0 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 4001d9a0: 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(); 4001d9a4: 40 00 06 fa call 4001f58c 4001d9a8: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4001d9ac: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 4001d9b0: 91 2a 20 10 sll %o0, 0x10, %o0 4001d9b4: 91 32 20 10 srl %o0, 0x10, %o0 4001d9b8: 80 a2 00 01 cmp %o0, %g1 4001d9bc: 02 80 00 0a be 4001d9e4 4001d9c0: 80 a2 20 00 cmp %o0, 0 4001d9c4: 22 80 00 09 be,a 4001d9e8 <== NOT EXECUTED 4001d9c8: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); 4001d9cc: 40 00 44 db call 4002ed38 <__errno> <== NOT EXECUTED 4001d9d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001d9d4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4001d9d8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d9dc: 81 c7 e0 08 ret <== NOT EXECUTED 4001d9e0: 81 e8 00 00 restore <== NOT EXECUTED #endif jnode->st_uid = owner; 4001d9e4: f2 34 20 38 sth %i1, [ %l0 + 0x38 ] jnode->st_gid = group; 4001d9e8: f4 34 20 3a sth %i2, [ %l0 + 0x3a ] IMFS_update_ctime( jnode ); 4001d9ec: 90 07 bf f0 add %fp, -16, %o0 4001d9f0: 7f ff 9e dd call 40005564 4001d9f4: 92 10 20 00 clr %o1 4001d9f8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001d9fc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4001da00: 81 c7 e0 08 ret 4001da04: 91 e8 20 00 restore %g0, 0, %o0 4000c118 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 4000c118: 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 ) 4000c11c: a2 96 20 00 orcc %i0, 0, %l1 4000c120: 02 80 00 03 be 4000c12c 4000c124: a0 10 20 00 clr %l0 parent = parent_loc->node_access; 4000c128: e0 04 40 00 ld [ %l1 ], %l0 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000c12c: 90 10 20 01 mov 1, %o0 4000c130: 7f ff f7 38 call 40009e10 4000c134: 92 10 20 5c mov 0x5c, %o1 if ( !node ) 4000c138: b0 92 20 00 orcc %o0, 0, %i0 4000c13c: 02 80 00 4a be 4000c264 4000c140: 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 ); 4000c144: 92 10 00 1a mov %i2, %o1 4000c148: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; node->type = type; 4000c14c: f2 26 20 48 st %i1, [ %i0 + 0x48 ] /* * Fill in the basic information */ node->st_nlink = 1; 4000c150: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4000c154: 40 00 08 33 call 4000e220 4000c158: 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; 4000c15c: 03 10 00 60 sethi %hi(0x40018000), %g1 4000c160: c2 00 63 cc ld [ %g1 + 0x3cc ], %g1 ! 400183cc /* * Set the type specific information */ switch (type) { 4000c164: b2 06 7f ff add %i1, -1, %i1 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000c168: c2 10 60 24 lduh [ %g1 + 0x24 ], %g1 4000c16c: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4000c170: 7f ff f7 dd call 4000a0e4 4000c174: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] node->st_gid = getegid(); 4000c178: 7f ff f7 d7 call 4000a0d4 4000c17c: d0 36 20 38 sth %o0, [ %i0 + 0x38 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000c180: 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(); 4000c184: d0 36 20 3a sth %o0, [ %i0 + 0x3a ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000c188: 7f ff f7 db call 4000a0f4 4000c18c: 90 07 bf f0 add %fp, -16, %o0 node->stat_atime = (time_t) tv.tv_sec; 4000c190: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 4000c194: 80 a6 60 05 cmp %i1, 5 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; 4000c198: c2 26 20 44 st %g1, [ %i0 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4000c19c: c2 26 20 3c st %g1, [ %i0 + 0x3c ] /* * Set the type specific information */ switch (type) { 4000c1a0: 18 80 00 1d bgu 4000c214 4000c1a4: c2 26 20 40 st %g1, [ %i0 + 0x40 ] 4000c1a8: 83 2e 60 02 sll %i1, 2, %g1 4000c1ac: 05 10 00 30 sethi %hi(0x4000c000), %g2 4000c1b0: 84 10 a1 00 or %g2, 0x100, %g2 ! 4000c100 4000c1b4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4000c1b8: 81 c0 40 00 jmp %g1 4000c1bc: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000c1c0: 82 06 20 50 add %i0, 0x50, %g1 the_chain->permanent_null = NULL; 4000c1c4: 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); 4000c1c8: c2 26 20 4c st %g1, [ %i0 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000c1cc: 82 06 20 4c add %i0, 0x4c, %g1 4000c1d0: 10 80 00 19 b 4000c234 4000c1d4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 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; 4000c1d8: c2 07 00 00 ld [ %i4 ], %g1 4000c1dc: 10 80 00 16 b 4000c234 4000c1e0: c2 26 20 4c st %g1, [ %i0 + 0x4c ] break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 4000c1e4: 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; 4000c1e8: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 4000c1ec: 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; 4000c1f0: 10 80 00 11 b 4000c234 4000c1f4: c4 26 20 4c st %g2, [ %i0 + 0x4c ] node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000c1f8: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000c1fc: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000c200: c0 26 20 4c clr [ %i0 + 0x4c ] node->info.file.indirect = 0; 4000c204: c0 26 20 50 clr [ %i0 + 0x50 ] node->info.file.doubly_indirect = 0; 4000c208: c0 26 20 54 clr [ %i0 + 0x54 ] node->info.file.triply_indirect = 0; 4000c20c: 10 80 00 0a b 4000c234 4000c210: c0 26 20 58 clr [ %i0 + 0x58 ] break; default: assert(0); 4000c214: 11 10 00 5d sethi %hi(0x40017400), %o0 <== NOT EXECUTED 4000c218: 15 10 00 5d sethi %hi(0x40017400), %o2 <== NOT EXECUTED 4000c21c: 17 10 00 5b sethi %hi(0x40016c00), %o3 <== NOT EXECUTED 4000c220: 90 12 23 38 or %o0, 0x338, %o0 <== NOT EXECUTED 4000c224: 94 12 a3 88 or %o2, 0x388, %o2 <== NOT EXECUTED 4000c228: 96 12 e1 50 or %o3, 0x150, %o3 <== NOT EXECUTED 4000c22c: 7f ff d7 03 call 40001e38 <__assert_func> <== NOT EXECUTED 4000c230: 92 10 20 74 mov 0x74, %o1 <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000c234: 80 a4 20 00 cmp %l0, 0 4000c238: 02 80 00 0b be 4000c264 4000c23c: 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 ); 4000c240: 7f ff e7 2a call 40005ee8 <_Chain_Append> 4000c244: 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; 4000c248: 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; 4000c24c: e0 26 20 08 st %l0, [ %i0 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 4000c250: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 node->st_ino = ++fs_info->ino_count; 4000c254: c2 00 80 00 ld [ %g2 ], %g1 4000c258: 82 00 60 01 inc %g1 4000c25c: c2 20 80 00 st %g1, [ %g2 ] 4000c260: c2 26 20 34 st %g1, [ %i0 + 0x34 ] } return node; } 4000c264: 81 c7 e0 08 ret 4000c268: 81 e8 00 00 restore 40003a30 : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40003a30: 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 ); 40003a34: 80 a6 20 00 cmp %i0, 0 40003a38: 12 80 00 0a bne 40003a60 40003a3c: 80 a6 60 00 cmp %i1, 0 40003a40: 11 10 00 77 sethi %hi(0x4001dc00), %o0 <== NOT EXECUTED 40003a44: 15 10 00 78 sethi %hi(0x4001e000), %o2 <== NOT EXECUTED 40003a48: 17 10 00 78 sethi %hi(0x4001e000), %o3 <== NOT EXECUTED 40003a4c: 90 12 23 90 or %o0, 0x390, %o0 <== NOT EXECUTED 40003a50: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 40003a54: 96 12 e0 50 or %o3, 0x50, %o3 <== NOT EXECUTED 40003a58: 10 80 00 0b b 40003a84 <== NOT EXECUTED 40003a5c: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED assert( level >= 0 ); 40003a60: 36 80 00 0b bge,a 40003a8c 40003a64: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40003a68: 11 10 00 77 sethi %hi(0x4001dc00), %o0 <== NOT EXECUTED 40003a6c: 15 10 00 78 sethi %hi(0x4001e000), %o2 <== NOT EXECUTED 40003a70: 17 10 00 78 sethi %hi(0x4001e000), %o3 <== NOT EXECUTED 40003a74: 90 12 23 90 or %o0, 0x390, %o0 <== NOT EXECUTED 40003a78: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 40003a7c: 96 12 e0 60 or %o3, 0x60, %o3 <== NOT EXECUTED 40003a80: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED 40003a84: 40 00 01 c3 call 40004190 <__assert_func> <== NOT EXECUTED 40003a88: 01 00 00 00 nop <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 40003a8c: 80 a0 60 01 cmp %g1, 1 40003a90: 22 80 00 0a be,a 40003ab8 40003a94: 03 10 00 80 sethi %hi(0x40020000), %g1 40003a98: 11 10 00 77 sethi %hi(0x4001dc00), %o0 <== NOT EXECUTED 40003a9c: 15 10 00 78 sethi %hi(0x4001e000), %o2 <== NOT EXECUTED 40003aa0: 17 10 00 78 sethi %hi(0x4001e000), %o3 <== NOT EXECUTED 40003aa4: 90 12 23 90 or %o0, 0x390, %o0 <== NOT EXECUTED 40003aa8: 94 12 a1 48 or %o2, 0x148, %o2 <== NOT EXECUTED 40003aac: 96 12 e0 70 or %o3, 0x70, %o3 <== NOT EXECUTED 40003ab0: 10 bf ff f5 b 40003a84 <== NOT EXECUTED 40003ab4: 92 10 20 83 mov 0x83, %o1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40003ab8: a4 06 20 50 add %i0, 0x50, %l2 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40003abc: a8 10 62 00 or %g1, 0x200, %l4 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40003ac0: f0 06 20 4c ld [ %i0 + 0x4c ], %i0 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40003ac4: 03 10 00 78 sethi %hi(0x4001e000), %g1 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40003ac8: a2 06 60 01 add %i1, 1, %l1 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 40003acc: 10 80 00 14 b 40003b1c 40003ad0: a6 10 60 98 or %g1, 0x98, %l3 40003ad4: c2 05 00 00 ld [ %l4 ], %g1 40003ad8: 90 10 00 13 mov %l3, %o0 40003adc: d2 00 60 08 ld [ %g1 + 8 ], %o1 40003ae0: 40 00 37 15 call 40011734 40003ae4: a0 04 20 01 inc %l0 !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++ ) 40003ae8: 80 a4 00 19 cmp %l0, %i1 40003aec: 24 bf ff fb ble,a 40003ad8 40003af0: c2 05 00 00 ld [ %l4 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40003af4: 7f ff ff 78 call 400038d4 40003af8: 90 10 00 18 mov %i0, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40003afc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40003b00: 80 a0 60 01 cmp %g1, 1 40003b04: 32 80 00 06 bne,a 40003b1c 40003b08: f0 06 00 00 ld [ %i0 ], %i0 IMFS_dump_directory( the_jnode, level + 1 ); 40003b0c: 90 10 00 18 mov %i0, %o0 40003b10: 7f ff ff c8 call 40003a30 40003b14: 92 10 00 11 mov %l1, %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 ) { 40003b18: f0 06 00 00 ld [ %i0 ], %i0 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 ); 40003b1c: 80 a6 00 12 cmp %i0, %l2 40003b20: 12 bf ff ed bne 40003ad4 40003b24: a0 10 20 00 clr %l0 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 40003b28: 81 c7 e0 08 ret 40003b2c: 81 e8 00 00 restore 40009260 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009260: 9d e3 bf 60 save %sp, -160, %sp case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 40009264: 03 10 00 60 sethi %hi(0x40018000), %g1 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009268: a8 10 00 18 mov %i0, %l4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000926c: ae 10 63 cc or %g1, 0x3cc, %l7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 40009270: e0 06 80 00 ld [ %i2 ], %l0 40009274: a6 10 20 00 clr %l3 40009278: a2 10 20 01 mov 1, %l1 * 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 ); 4000927c: aa 07 bf c0 add %fp, -64, %l5 40009280: 10 80 00 6a b 40009428 40009284: ac 07 bf f4 add %fp, -12, %l6 40009288: 90 05 00 13 add %l4, %l3, %o0 4000928c: 92 10 00 15 mov %l5, %o1 40009290: 40 00 01 a0 call 40009910 40009294: 94 10 00 16 mov %l6, %o2 i += len; if ( !pathloc->node_access ) 40009298: c2 06 80 00 ld [ %i2 ], %g1 * 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 ); 4000929c: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 400092a0: 80 a0 60 00 cmp %g1, 0 400092a4: 02 80 00 59 be 40009408 400092a8: e4 07 bf f4 ld [ %fp + -12 ], %l2 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 400092ac: 80 a2 20 00 cmp %o0, 0 400092b0: 22 80 00 12 be,a 400092f8 400092b4: a6 04 c0 12 add %l3, %l2, %l3 if ( node->type == IMFS_DIRECTORY ) 400092b8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400092bc: 80 a0 60 01 cmp %g1, 1 400092c0: 32 80 00 0e bne,a 400092f8 400092c4: a6 04 c0 12 add %l3, %l2, %l3 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 400092c8: 90 10 00 1a mov %i2, %o0 400092cc: 7f ff ff 83 call 400090d8 400092d0: 92 10 20 01 mov 1, %o1 400092d4: 80 a2 20 00 cmp %o0, 0 400092d8: 32 80 00 08 bne,a 400092f8 400092dc: a6 04 c0 12 add %l3, %l2, %l3 rtems_set_errno_and_return_minus_one( EACCES ); 400092e0: 40 00 0e 8e call 4000cd18 <__errno> 400092e4: b0 10 3f ff mov -1, %i0 400092e8: 82 10 20 0d mov 0xd, %g1 400092ec: c2 22 00 00 st %g1, [ %o0 ] 400092f0: 81 c7 e0 08 ret 400092f4: 81 e8 00 00 restore node = pathloc->node_access; switch( type ) { 400092f8: 80 a4 60 03 cmp %l1, 3 400092fc: 02 80 00 1b be 40009368 40009300: e0 06 80 00 ld [ %i2 ], %l0 40009304: 80 a4 60 04 cmp %l1, 4 40009308: 02 80 00 44 be 40009418 4000930c: 80 a4 60 02 cmp %l1, 2 40009310: 12 80 00 47 bne 4000942c 40009314: 80 a4 60 00 cmp %l1, 0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 40009318: c2 05 c0 00 ld [ %l7 ], %g1 4000931c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40009320: 80 a4 00 01 cmp %l0, %g1 40009324: 02 bf ff da be 4000928c 40009328: 90 05 00 13 add %l4, %l3, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000932c: d2 06 a0 0c ld [ %i2 + 0xc ], %o1 40009330: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 40009334: 80 a4 00 01 cmp %l0, %g1 40009338: 32 80 00 04 bne,a 40009348 4000933c: e0 04 20 08 ld [ %l0 + 8 ], %l0 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 40009340: 10 80 00 48 b 40009460 40009344: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 40009348: 80 a4 20 00 cmp %l0, 0 4000934c: 32 bf ff cf bne,a 40009288 40009350: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 40009354: 40 00 0e 71 call 4000cd18 <__errno> 40009358: b0 10 3f ff mov -1, %i0 4000935c: e2 22 00 00 st %l1, [ %o0 ] 40009360: 81 c7 e0 08 ret 40009364: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 40009368: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000936c: 80 a0 60 03 cmp %g1, 3 40009370: 12 80 00 0a bne 40009398 40009374: 80 a0 60 04 cmp %g1, 4 IMFS_evaluate_hard_link( pathloc, 0 ); 40009378: 90 10 00 1a mov %i2, %o0 4000937c: 7f ff ff 6f call 40009138 40009380: 92 10 20 00 clr %o1 node = pathloc->node_access; 40009384: e0 06 80 00 ld [ %i2 ], %l0 if ( !node ) 40009388: 80 a4 20 00 cmp %l0, 0 4000938c: 32 80 00 0e bne,a 400093c4 40009390: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40009394: 30 80 00 0f b,a 400093d0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 40009398: 32 80 00 0b bne,a 400093c4 4000939c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 result = IMFS_evaluate_sym_link( pathloc, 0 ); 400093a0: 90 10 00 1a mov %i2, %o0 400093a4: 7f ff ff 7d call 40009198 400093a8: 92 10 20 00 clr %o1 400093ac: b0 10 00 08 mov %o0, %i0 node = pathloc->node_access; if ( result == -1 ) 400093b0: 80 a2 3f ff cmp %o0, -1 400093b4: 02 bf ff cf be 400092f0 400093b8: 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; 400093bc: a0 10 00 08 mov %o0, %l0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 400093c0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400093c4: 80 a0 60 01 cmp %g1, 1 400093c8: 22 80 00 06 be,a 400093e0 400093cc: d2 04 20 58 ld [ %l0 + 0x58 ], %o1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 400093d0: 40 00 0e 52 call 4000cd18 <__errno> 400093d4: b0 10 3f ff mov -1, %i0 400093d8: 10 bf ff c5 b 400092ec 400093dc: 82 10 20 14 mov 0x14, %g1 /* * 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 ) { 400093e0: 80 a2 60 00 cmp %o1, 0 400093e4: 02 80 00 04 be 400093f4 400093e8: 90 10 00 10 mov %l0, %o0 newloc = node->info.directory.mt_fs->mt_fs_root; 400093ec: 10 80 00 1d b 40009460 400093f0: 92 02 60 18 add %o1, 0x18, %o1 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 400093f4: 40 00 01 1c call 40009864 400093f8: 92 10 00 15 mov %l5, %o1 if ( !node ) 400093fc: a0 92 20 00 orcc %o0, 0, %l0 40009400: 32 bf ff a2 bne,a 40009288 40009404: e0 26 80 00 st %l0, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 40009408: 40 00 0e 44 call 4000cd18 <__errno> 4000940c: b0 10 3f ff mov -1, %i0 40009410: 10 bf ff b7 b 400092ec 40009414: 82 10 20 02 mov 2, %g1 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 40009418: 40 00 0e 40 call 4000cd18 <__errno> 4000941c: b0 10 3f ff mov -1, %i0 40009420: 10 bf ff b3 b 400092ec 40009424: 82 10 20 5b mov 0x5b, %g1 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 40009428: 80 a4 60 00 cmp %l1, 0 4000942c: 22 80 00 06 be,a 40009444 40009430: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40009434: 80 a4 60 04 cmp %l1, 4 40009438: 12 bf ff 95 bne 4000928c 4000943c: 90 05 00 13 add %l4, %l3, %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 ) { 40009440: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 <== NOT EXECUTED 40009444: 80 a0 60 01 cmp %g1, 1 40009448: 12 80 00 18 bne 400094a8 4000944c: 01 00 00 00 nop if ( node->info.directory.mt_fs != NULL ) { 40009450: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 40009454: 80 a2 20 00 cmp %o0, 0 40009458: 02 80 00 14 be 400094a8 4000945c: 92 02 20 18 add %o0, 0x18, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 40009460: a0 07 bf e4 add %fp, -28, %l0 40009464: 94 10 20 10 mov 0x10, %o2 40009468: 40 00 10 1e call 4000d4e0 4000946c: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 40009470: 92 10 00 10 mov %l0, %o1 40009474: 94 10 20 10 mov 0x10, %o2 40009478: 40 00 10 1a call 4000d4e0 4000947c: 90 10 00 1a mov %i2, %o0 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 40009480: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40009484: d0 07 bf f4 ld [ %fp + -12 ], %o0 40009488: c2 00 40 00 ld [ %g1 ], %g1 4000948c: 90 24 c0 08 sub %l3, %o0, %o0 40009490: 92 10 00 19 mov %i1, %o1 40009494: 90 05 00 08 add %l4, %o0, %o0 40009498: 9f c0 40 00 call %g1 4000949c: 94 10 00 1a mov %i2, %o2 400094a0: 81 c7 e0 08 ret 400094a4: 91 e8 00 08 restore %g0, %o0, %o0 } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 400094a8: 7f ff fe f3 call 40009074 400094ac: 90 10 00 1a mov %i2, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 400094b0: 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 ); 400094b4: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 400094b8: 7f ff ff 08 call 400090d8 400094bc: 90 10 00 1a mov %i2, %o0 400094c0: 80 a2 20 00 cmp %o0, 0 400094c4: 12 80 00 06 bne 400094dc 400094c8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 400094cc: 40 00 0e 13 call 4000cd18 <__errno> 400094d0: b0 10 3f ff mov -1, %i0 ! ffffffff 400094d4: 82 10 20 0d mov 0xd, %g1 400094d8: c2 22 00 00 st %g1, [ %o0 ] return result; } 400094dc: 81 c7 e0 08 ret 400094e0: 81 e8 00 00 restore 4000959c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 4000959c: 9d e3 bf 60 save %sp, -160, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 400095a0: e0 06 40 00 ld [ %i1 ], %l0 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 400095a4: 03 10 00 60 sethi %hi(0x40018000), %g1 int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 400095a8: a8 10 00 18 mov %i0, %l4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 400095ac: ae 10 63 cc or %g1, 0x3cc, %l7 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 400095b0: a4 10 20 00 clr %l2 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 400095b4: aa 07 bf c0 add %fp, -64, %l5 400095b8: ac 07 bf f4 add %fp, -12, %l6 400095bc: 90 05 00 12 add %l4, %l2, %o0 400095c0: 92 10 00 15 mov %l5, %o1 400095c4: 40 00 00 d3 call 40009910 400095c8: 94 10 00 16 mov %l6, %o2 i += len; if ( !pathloc->node_access ) 400095cc: c2 06 40 00 ld [ %i1 ], %g1 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 400095d0: a2 10 00 08 mov %o0, %l1 i += len; if ( !pathloc->node_access ) 400095d4: 80 a0 60 00 cmp %g1, 0 400095d8: 02 80 00 82 be 400097e0 400095dc: e6 07 bf f4 ld [ %fp + -12 ], %l3 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 400095e0: 80 a2 20 00 cmp %o0, 0 400095e4: 22 80 00 10 be,a 40009624 400095e8: a4 04 80 13 add %l2, %l3, %l2 if ( node->type == IMFS_DIRECTORY ) 400095ec: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400095f0: 80 a0 60 01 cmp %g1, 1 400095f4: 32 80 00 0c bne,a 40009624 400095f8: a4 04 80 13 add %l2, %l3, %l2 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 400095fc: 90 10 00 19 mov %i1, %o0 40009600: 7f ff fe b6 call 400090d8 40009604: 92 10 20 01 mov 1, %o1 40009608: 80 a2 20 00 cmp %o0, 0 4000960c: 32 80 00 06 bne,a 40009624 40009610: a4 04 80 13 add %l2, %l3, %l2 rtems_set_errno_and_return_minus_one( EACCES ); 40009614: 40 00 0d c1 call 4000cd18 <__errno> 40009618: b0 10 3f ff mov -1, %i0 4000961c: 10 80 00 83 b 40009828 40009620: 82 10 20 0d mov 0xd, %g1 node = pathloc->node_access; switch( type ) { 40009624: 80 a4 60 02 cmp %l1, 2 40009628: 02 80 00 0f be 40009664 4000962c: e0 06 40 00 ld [ %i1 ], %l0 40009630: 80 a4 60 02 cmp %l1, 2 40009634: 18 80 00 07 bgu 40009650 40009638: 80 a4 60 03 cmp %l1, 3 4000963c: 80 a4 60 00 cmp %l1, 0 40009640: 02 80 00 56 be 40009798 40009644: 01 00 00 00 nop * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], token, &len ); 40009648: 10 bf ff de b 400095c0 4000964c: 90 05 00 12 add %l4, %l2, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 40009650: 02 80 00 19 be 400096b4 40009654: 80 a4 60 04 cmp %l1, 4 40009658: 32 bf ff da bne,a 400095c0 4000965c: 90 05 00 12 add %l4, %l2, %o0 <== NOT EXECUTED 40009660: 30 80 00 52 b,a 400097a8 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 40009664: c2 05 c0 00 ld [ %l7 ], %g1 40009668: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4000966c: 80 a4 00 01 cmp %l0, %g1 40009670: 02 bf ff d4 be 400095c0 40009674: 90 05 00 12 add %l4, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 40009678: d2 06 60 0c ld [ %i1 + 0xc ], %o1 4000967c: c2 02 60 18 ld [ %o1 + 0x18 ], %g1 40009680: 80 a4 00 01 cmp %l0, %g1 40009684: 32 80 00 04 bne,a 40009694 40009688: e0 04 20 08 ld [ %l0 + 8 ], %l0 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 4000968c: 10 80 00 2a b 40009734 40009690: 92 02 60 08 add %o1, 8, %o1 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 40009694: 80 a4 20 00 cmp %l0, 0 40009698: 32 bf ff c9 bne,a 400095bc 4000969c: e0 26 40 00 st %l0, [ %i1 ] rtems_set_errno_and_return_minus_one( ENOENT ); 400096a0: 40 00 0d 9e call 4000cd18 <__errno> 400096a4: b0 10 3f ff mov -1, %i0 400096a8: e2 22 00 00 st %l1, [ %o0 ] 400096ac: 81 c7 e0 08 ret 400096b0: 81 e8 00 00 restore pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 400096b4: d0 04 20 48 ld [ %l0 + 0x48 ], %o0 400096b8: 80 a2 20 03 cmp %o0, 3 400096bc: 12 80 00 0a bne 400096e4 400096c0: 80 a2 20 04 cmp %o0, 4 result = IMFS_evaluate_link( pathloc, 0 ); 400096c4: 90 10 00 19 mov %i1, %o0 400096c8: 7f ff ff 87 call 400094e4 400096cc: 92 10 20 00 clr %o1 if ( result == -1 ) 400096d0: 80 a2 3f ff cmp %o0, -1 400096d4: 12 80 00 0c bne 40009704 400096d8: b0 10 00 08 mov %o0, %i0 400096dc: 81 c7 e0 08 ret <== NOT EXECUTED 400096e0: 81 e8 00 00 restore <== NOT EXECUTED return -1; } else if ( node->type == IMFS_SYM_LINK ) { 400096e4: 32 80 00 09 bne,a 40009708 400096e8: d0 06 40 00 ld [ %i1 ], %o0 result = IMFS_evaluate_link( pathloc, 0 ); 400096ec: 90 10 00 19 mov %i1, %o0 400096f0: 7f ff ff 7d call 400094e4 400096f4: 92 10 20 00 clr %o1 if ( result == -1 ) 400096f8: 80 a2 3f ff cmp %o0, -1 400096fc: 02 bf ff ec be 400096ac 40009700: b0 10 00 08 mov %o0, %i0 return -1; } node = pathloc->node_access; 40009704: d0 06 40 00 ld [ %i1 ], %o0 if ( !node ) 40009708: 80 a2 20 00 cmp %o0, 0 4000970c: 02 80 00 44 be 4000981c 40009710: 01 00 00 00 nop /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 40009714: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 40009718: 80 a0 60 01 cmp %g1, 1 4000971c: 12 80 00 40 bne 4000981c 40009720: 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 ) { 40009724: d2 02 20 58 ld [ %o0 + 0x58 ], %o1 40009728: 80 a2 60 00 cmp %o1, 0 4000972c: 02 80 00 14 be 4000977c 40009730: 92 02 60 18 add %o1, 0x18, %o1 newloc = node->info.directory.mt_fs->mt_fs_root; 40009734: a0 07 bf e4 add %fp, -28, %l0 40009738: 94 10 20 10 mov 0x10, %o2 4000973c: 40 00 0f 69 call 4000d4e0 40009740: 90 10 00 10 mov %l0, %o0 *pathloc = newloc; 40009744: 92 10 00 10 mov %l0, %o1 40009748: 94 10 20 10 mov 0x10, %o2 4000974c: 40 00 0f 65 call 4000d4e0 40009750: 90 10 00 19 mov %i1, %o0 return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 40009754: c2 06 60 08 ld [ %i1 + 8 ], %g1 40009758: d0 07 bf f4 ld [ %fp + -12 ], %o0 4000975c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40009760: 90 24 80 08 sub %l2, %o0, %o0 40009764: 92 10 00 19 mov %i1, %o1 40009768: 90 05 00 08 add %l4, %o0, %o0 4000976c: 9f c0 40 00 call %g1 40009770: 94 10 00 1a mov %i2, %o2 40009774: 81 c7 e0 08 ret 40009778: 91 e8 00 08 restore %g0, %o0, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000977c: 40 00 00 3a call 40009864 40009780: 92 10 00 15 mov %l5, %o1 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 40009784: a0 92 20 00 orcc %o0, 0, %l0 40009788: 02 80 00 0c be 400097b8 4000978c: c2 07 bf f4 ld [ %fp + -12 ], %g1 done = true; else pathloc->node_access = node; 40009790: 10 bf ff 8b b 400095bc 40009794: e0 26 40 00 st %l0, [ %i1 ] break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 40009798: 40 00 0d 60 call 4000cd18 <__errno> 4000979c: b0 10 3f ff mov -1, %i0 400097a0: 10 80 00 22 b 40009828 400097a4: 82 10 20 11 mov 0x11, %g1 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 400097a8: 40 00 0d 5c call 4000cd18 <__errno> 400097ac: b0 10 3f ff mov -1, %i0 400097b0: 10 80 00 1e b 40009828 400097b4: 82 10 20 5b mov 0x5b, %g1 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 400097b8: 84 05 00 12 add %l4, %l2, %g2 400097bc: 82 24 80 01 sub %l2, %g1, %g1 400097c0: 82 05 00 01 add %l4, %g1, %g1 400097c4: 10 80 00 0b b 400097f0 400097c8: c2 26 80 00 st %g1, [ %i2 ] * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { if ( !IMFS_is_separator( path[ i ] ) ) 400097cc: 80 a0 60 2f cmp %g1, 0x2f 400097d0: 02 80 00 08 be 400097f0 400097d4: 80 a0 60 5c cmp %g1, 0x5c 400097d8: 22 80 00 07 be,a 400097f4 400097dc: c2 48 80 00 ldsb [ %g2 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); 400097e0: 40 00 0d 4e call 4000cd18 <__errno> 400097e4: b0 10 3f ff mov -1, %i0 400097e8: 10 80 00 10 b 40009828 400097ec: 82 10 20 02 mov 2, %g1 /* * We have evaluated the path as far as we can. * Verify there is not any invalid stuff at the end of the name. */ for( ; path[i] != '\0'; i++) { 400097f0: c2 48 80 00 ldsb [ %g2 ], %g1 400097f4: 80 a0 60 00 cmp %g1, 0 400097f8: 12 bf ff f5 bne 400097cc 400097fc: 84 00 a0 01 inc %g2 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 40009800: 7f ff fe 1d call 40009074 40009804: 90 10 00 19 mov %i1, %o0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 40009808: c2 06 40 00 ld [ %i1 ], %g1 4000980c: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 40009810: 80 a0 60 01 cmp %g1, 1 40009814: 02 80 00 08 be 40009834 40009818: b0 10 00 08 mov %o0, %i0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000981c: 40 00 0d 3f call 4000cd18 <__errno> 40009820: b0 10 3f ff mov -1, %i0 40009824: 82 10 20 14 mov 0x14, %g1 40009828: c2 22 00 00 st %g1, [ %o0 ] 4000982c: 81 c7 e0 08 ret 40009830: 81 e8 00 00 restore /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 40009834: 90 10 00 19 mov %i1, %o0 40009838: 7f ff fe 28 call 400090d8 4000983c: 92 10 20 03 mov 3, %o1 40009840: 80 a2 20 00 cmp %o0, 0 40009844: 12 80 00 06 bne 4000985c 40009848: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 4000984c: 40 00 0d 33 call 4000cd18 <__errno> 40009850: b0 10 3f ff mov -1, %i0 ! ffffffff 40009854: 82 10 20 0d mov 0xd, %g1 40009858: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000985c: 81 c7 e0 08 ret 40009860: 81 e8 00 00 restore 40009138 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009138: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000913c: c4 06 00 00 ld [ %i0 ], %g2 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 40009140: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40009144: 80 a0 60 03 cmp %g1, 3 40009148: 22 80 00 04 be,a 40009158 4000914c: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1 rtems_fatal_error_occurred (0xABCD0000); 40009150: 7f ff f2 68 call 40005af0 <== NOT EXECUTED 40009154: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; IMFS_Set_handlers( node ); 40009158: 90 10 00 18 mov %i0, %o0 4000915c: 7f ff ff c6 call 40009074 40009160: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 40009164: 90 10 00 18 mov %i0, %o0 40009168: 92 10 00 19 mov %i1, %o1 4000916c: 7f ff ff db call 400090d8 40009170: b0 10 20 00 clr %i0 40009174: 80 a2 20 00 cmp %o0, 0 40009178: 12 80 00 06 bne 40009190 4000917c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 40009180: 40 00 0e e6 call 4000cd18 <__errno> <== NOT EXECUTED 40009184: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009188: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000918c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 40009190: 81 c7 e0 08 ret 40009194: 81 e8 00 00 restore 400090d8 : int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 400090d8: 9d e3 bf 98 save %sp, -104, %sp } jnode = node->node_access; #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 400090dc: 40 00 04 02 call 4000a0e4 400090e0: e2 06 00 00 ld [ %i0 ], %l1 st_gid = getegid(); 400090e4: 40 00 03 fc call 4000a0d4 400090e8: 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 ) 400090ec: c2 14 60 38 lduh [ %l1 + 0x38 ], %g1 400090f0: a1 2c 20 10 sll %l0, 0x10, %l0 400090f4: a1 34 20 10 srl %l0, 0x10, %l0 400090f8: 80 a4 00 01 cmp %l0, %g1 400090fc: 02 80 00 09 be 40009120 40009100: b1 2e 60 06 sll %i1, 6, %i0 flags_to_test <<= 6; else if ( st_gid == jnode->st_gid ) 40009104: c4 14 60 3a lduh [ %l1 + 0x3a ], %g2 40009108: 83 2a 20 10 sll %o0, 0x10, %g1 4000910c: 83 30 60 10 srl %g1, 0x10, %g1 40009110: 80 a0 40 02 cmp %g1, %g2 40009114: 02 80 00 03 be 40009120 40009118: b1 2e 60 03 sll %i1, 3, %i0 4000911c: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED flags_to_test <<= 3; 40009120: c2 14 60 2e lduh [ %l1 + 0x2e ], %g1 40009124: 82 2e 00 01 andn %i0, %g1, %g1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 40009128: 80 a0 00 01 cmp %g0, %g1 4000912c: b0 60 3f ff subx %g0, -1, %i0 40009130: 81 c7 e0 08 ret 40009134: 81 e8 00 00 restore 40009198 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 40009198: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000919c: e0 06 00 00 ld [ %i0 ], %l0 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 400091a0: a2 10 00 18 mov %i0, %l1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 400091a4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400091a8: 80 a0 60 04 cmp %g1, 4 400091ac: 12 80 00 07 bne 400091c8 400091b0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 400091b4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400091b8: 80 a0 60 00 cmp %g1, 0 400091bc: 32 80 00 05 bne,a 400091d0 400091c0: c2 26 00 00 st %g1, [ %i0 ] rtems_fatal_error_occurred( 0xBAD00000 ); 400091c4: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 400091c8: 7f ff f2 4a call 40005af0 <== NOT EXECUTED 400091cc: 01 00 00 00 nop <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 400091d0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 400091d4: c2 48 40 00 ldsb [ %g1 ], %g1 400091d8: 80 a0 60 2f cmp %g1, 0x2f 400091dc: 02 80 00 06 be 400091f4 400091e0: 80 a0 60 5c cmp %g1, 0x5c 400091e4: 02 80 00 04 be 400091f4 400091e8: 80 a0 60 00 cmp %g1, 0 400091ec: 12 80 00 09 bne 40009210 400091f0: 82 10 20 00 clr %g1 400091f4: 03 10 00 60 sethi %hi(0x40018000), %g1 400091f8: d2 00 63 cc ld [ %g1 + 0x3cc ], %o1 ! 400183cc 400091fc: 90 10 00 11 mov %l1, %o0 40009200: 92 02 60 14 add %o1, 0x14, %o1 40009204: 40 00 10 b7 call 4000d4e0 40009208: 94 10 20 10 mov 0x10, %o2 4000920c: 82 10 20 01 mov 1, %g1 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 40009210: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 40009214: 94 10 00 11 mov %l1, %o2 40009218: 90 02 00 01 add %o0, %g1, %o0 4000921c: 40 00 00 11 call 40009260 40009220: 92 10 00 19 mov %i1, %o1 40009224: b0 10 00 08 mov %o0, %i0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 40009228: 7f ff ff 93 call 40009074 4000922c: 90 10 00 11 mov %l1, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 40009230: 90 10 00 11 mov %l1, %o0 40009234: 7f ff ff a9 call 400090d8 40009238: 92 10 00 19 mov %i1, %o1 4000923c: 80 a2 20 00 cmp %o0, 0 40009240: 12 80 00 06 bne 40009258 40009244: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); 40009248: 40 00 0e b4 call 4000cd18 <__errno> <== NOT EXECUTED 4000924c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009250: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 40009254: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 40009258: 81 c7 e0 08 ret 4000925c: 81 e8 00 00 restore 4000c26c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000c26c: 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(); 4000c270: 7f ff f7 9d call 4000a0e4 4000c274: e0 06 00 00 ld [ %i0 ], %l0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000c278: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1 4000c27c: 91 2a 20 10 sll %o0, 0x10, %o0 4000c280: 91 32 20 10 srl %o0, 0x10, %o0 4000c284: 80 a2 00 01 cmp %o0, %g1 4000c288: 02 80 00 04 be 4000c298 4000c28c: 80 a2 20 00 cmp %o0, 0 4000c290: 12 80 00 08 bne 4000c2b0 <== NOT EXECUTED 4000c294: 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 ) ) ) 4000c298: 83 2e 60 10 sll %i1, 0x10, %g1 4000c29c: 83 30 60 10 srl %g1, 0x10, %g1 4000c2a0: 82 08 7e 00 and %g1, -512, %g1 4000c2a4: 80 a0 60 00 cmp %g1, 0 4000c2a8: 22 80 00 08 be,a 4000c2c8 4000c2ac: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1 rtems_set_errno_and_return_minus_one( EPERM ); 4000c2b0: 40 00 02 9a call 4000cd18 <__errno> 4000c2b4: b0 10 3f ff mov -1, %i0 4000c2b8: 82 10 20 01 mov 1, %g1 4000c2bc: c2 22 00 00 st %g1, [ %o0 ] 4000c2c0: 81 c7 e0 08 ret 4000c2c4: 81 e8 00 00 restore jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; IMFS_update_ctime( jnode ); 4000c2c8: 90 07 bf f0 add %fp, -16, %o0 */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) rtems_set_errno_and_return_minus_one( EPERM ); jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); jnode->st_mode |= mode; 4000c2cc: 82 08 7e 00 and %g1, -512, %g1 4000c2d0: 82 16 40 01 or %i1, %g1, %g1 IMFS_update_ctime( jnode ); 4000c2d4: 92 10 20 00 clr %o1 4000c2d8: 7f ff f7 87 call 4000a0f4 4000c2dc: c2 34 20 2e sth %g1, [ %l0 + 0x2e ] 4000c2e0: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000c2e4: c2 24 20 44 st %g1, [ %l0 + 0x44 ] return 0; } 4000c2e8: 81 c7 e0 08 ret 4000c2ec: 91 e8 20 00 restore %g0, 0, %o0 40009864 : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 40009864: 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 ); 40009868: 80 a6 20 00 cmp %i0, 0 4000986c: 12 80 00 0a bne 40009894 40009870: 80 a6 60 00 cmp %i1, 0 40009874: 11 10 00 5c sethi %hi(0x40017000), %o0 <== NOT EXECUTED 40009878: 15 10 00 5c sethi %hi(0x40017000), %o2 <== NOT EXECUTED 4000987c: 17 10 00 5c sethi %hi(0x40017000), %o3 <== NOT EXECUTED 40009880: 90 12 22 58 or %o0, 0x258, %o0 <== NOT EXECUTED 40009884: 94 12 a2 c8 or %o2, 0x2c8, %o2 <== NOT EXECUTED 40009888: 96 12 e2 a8 or %o3, 0x2a8, %o3 <== NOT EXECUTED 4000988c: 7f ff e1 6b call 40001e38 <__assert_func> <== NOT EXECUTED 40009890: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 40009894: 02 80 00 1c be 40009904 40009898: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000989c: 13 10 00 5c sethi %hi(0x40017000), %o1 400098a0: 40 00 11 ee call 4000e058 400098a4: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 400172b8 400098a8: 80 a2 20 00 cmp %o0, 0 400098ac: 02 80 00 09 be 400098d0 400098b0: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 400098b4: 13 10 00 5c sethi %hi(0x40017000), %o1 400098b8: 40 00 11 e8 call 4000e058 400098bc: 92 12 62 c0 or %o1, 0x2c0, %o1 ! 400172c0 400098c0: 80 a2 20 00 cmp %o0, 0 400098c4: 12 80 00 05 bne 400098d8 400098c8: a0 06 20 50 add %i0, 0x50, %l0 return directory->Parent; 400098cc: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 400098d0: 81 c7 e0 08 ret <== NOT EXECUTED 400098d4: 81 e8 00 00 restore <== NOT EXECUTED the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; 400098d8: 10 80 00 08 b 400098f8 400098dc: f0 06 20 4c ld [ %i0 + 0x4c ], %i0 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 400098e0: 40 00 11 de call 4000e058 400098e4: 92 06 20 0c add %i0, 0xc, %o1 400098e8: 80 a2 20 00 cmp %o0, 0 400098ec: 02 80 00 07 be 40009908 400098f0: 01 00 00 00 nop the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { 400098f4: f0 06 00 00 ld [ %i0 ], %i0 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !rtems_chain_is_tail( the_chain, the_node ); 400098f8: 80 a6 00 10 cmp %i0, %l0 400098fc: 12 bf ff f9 bne 400098e0 40009900: 90 10 00 19 mov %i1, %o0 40009904: b0 10 20 00 clr %i0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 40009908: 81 c7 e0 08 ret 4000990c: 81 e8 00 00 restore 4001e384 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 4001e384: 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; 4001e388: 94 10 20 10 mov 0x10, %o2 4001e38c: 90 07 bf e8 add %fp, -24, %o0 /* * 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; 4001e390: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4001e394: a2 10 00 08 mov %o0, %l1 * 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; 4001e398: 40 00 4c 55 call 400314ec 4001e39c: 92 06 20 18 add %i0, 0x18, %o1 /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4001e3a0: c0 26 20 18 clr [ %i0 + 0x18 ] do { next = jnode->Parent; loc.node_access = (void *)jnode; 4001e3a4: e0 27 bf e8 st %l0, [ %fp + -24 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 4001e3a8: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 4001e3ac: 7f ff fd f8 call 4001db8c 4001e3b0: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 4001e3b4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001e3b8: 80 a0 60 01 cmp %g1, 1 4001e3bc: 12 80 00 06 bne 4001e3d4 4001e3c0: 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 ) ) { 4001e3c4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001e3c8: 80 a0 40 02 cmp %g1, %g2 4001e3cc: 12 80 00 08 bne 4001e3ec 4001e3d0: 80 a4 20 00 cmp %l0, 0 result = IMFS_unlink( &loc ); 4001e3d4: 7f ff 9a 7f call 40004dd0 4001e3d8: 90 10 00 11 mov %l1, %o0 if (result != 0) 4001e3dc: 80 a2 20 00 cmp %o0, 0 4001e3e0: 12 80 00 13 bne 4001e42c 4001e3e4: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 4001e3e8: 80 a4 20 00 cmp %l0, 0 4001e3ec: 22 80 00 11 be,a 4001e430 4001e3f0: b0 10 20 00 clr %i0 if ( jnode->type == IMFS_DIRECTORY ) { 4001e3f4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001e3f8: 80 a0 60 01 cmp %g1, 1 4001e3fc: 32 bf ff eb bne,a 4001e3a8 4001e400: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 4001e404: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 4001e408: 82 04 20 50 add %l0, 0x50, %g1 4001e40c: 80 a0 80 01 cmp %g2, %g1 4001e410: 22 bf ff e6 be,a 4001e3a8 4001e414: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 4001e418: a0 90 a0 00 orcc %g2, 0, %l0 4001e41c: 32 bf ff e3 bne,a 4001e3a8 4001e420: e0 27 bf e8 st %l0, [ %fp + -24 ] 4001e424: 81 c7 e0 08 ret <== NOT EXECUTED 4001e428: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4001e42c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return 0; } 4001e430: 81 c7 e0 08 ret 4001e434: 81 e8 00 00 restore 400099f8 : 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 ) { 400099f8: 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, 400099fc: 03 10 00 5f sethi %hi(0x40017c00), %g1 40009a00: 84 10 20 10 mov 0x10, %g2 40009a04: c6 00 62 ac ld [ %g1 + 0x2ac ], %g3 40009a08: 82 10 20 00 clr %g1 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 40009a0c: 80 a0 80 03 cmp %g2, %g3 40009a10: 02 80 00 06 be 40009a28 40009a14: 82 00 60 01 inc %g1 40009a18: 80 a0 60 06 cmp %g1, 6 40009a1c: 12 bf ff fc bne 40009a0c 40009a20: 85 28 a0 01 sll %g2, 1, %g2 40009a24: 84 10 20 80 mov 0x80, %g2 <== NOT EXECUTED bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 40009a28: 03 10 00 62 sethi %hi(0x40018800), %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( 40009a2c: 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) 40009a30: c4 20 62 60 st %g2, [ %g1 + 0x260 ] * 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( 40009a34: 92 10 20 01 mov 1, %o1 40009a38: 90 10 20 00 clr %o0 40009a3c: 15 10 00 5b sethi %hi(0x40016c00), %o2 40009a40: 17 00 00 10 sethi %hi(0x4000), %o3 40009a44: 94 12 a2 a0 or %o2, 0x2a0, %o2 40009a48: 40 00 09 b4 call 4000c118 40009a4c: 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; 40009a50: 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( 40009a54: 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; 40009a58: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 40009a5c: 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; 40009a60: 13 10 00 5d sethi %hi(0x40017400), %o1 40009a64: 90 06 20 30 add %i0, 0x30, %o0 40009a68: 40 00 0e 9e call 4000d4e0 40009a6c: 92 12 63 08 or %o1, 0x308, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 40009a70: 90 10 20 01 mov 1, %o0 40009a74: 40 00 00 e7 call 40009e10 40009a78: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 40009a7c: 80 a2 20 00 cmp %o0, 0 40009a80: 12 80 00 0a bne 40009aa8 40009a84: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 free(temp_mt_entry->mt_fs_root.node_access); 40009a88: 40 00 01 2c call 40009f38 <== NOT EXECUTED 40009a8c: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 40009a90: 40 00 0c a2 call 4000cd18 <__errno> <== NOT EXECUTED 40009a94: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009a98: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40009a9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009aa0: 81 c7 e0 08 ret <== NOT EXECUTED 40009aa4: 81 e8 00 00 restore <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 40009aa8: 82 10 20 01 mov 1, %g1 40009aac: 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; 40009ab0: 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; 40009ab4: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 40009ab8: 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; 40009abc: 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; } 40009ac0: 81 c7 e0 08 ret 40009ac4: 91 e8 20 00 restore %g0, 0, %o0 40004b34 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40004b34: 9d e3 bf 58 save %sp, -168, %sp /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 40004b38: c2 06 00 00 ld [ %i0 ], %g1 40004b3c: c2 27 bf dc st %g1, [ %fp + -36 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40004b40: c2 10 60 30 lduh [ %g1 + 0x30 ], %g1 40004b44: 80 a0 60 07 cmp %g1, 7 40004b48: 08 80 00 06 bleu 40004b60 40004b4c: 90 10 00 1a mov %i2, %o0 rtems_set_errno_and_return_minus_one( EMLINK ); 40004b50: 40 00 a8 7a call 4002ed38 <__errno> 40004b54: 01 00 00 00 nop 40004b58: 10 80 00 13 b 40004ba4 40004b5c: 82 10 20 1f mov 0x1f, %g1 ! 1f /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 40004b60: a0 07 bf b8 add %fp, -72, %l0 40004b64: 94 07 bf f4 add %fp, -12, %o2 40004b68: 7f ff ff 7b call 40004954 40004b6c: 92 10 00 10 mov %l0, %o1 /* * Create a new link node. */ new_node = IMFS_create_node( 40004b70: 90 10 00 19 mov %i1, %o0 40004b74: 94 10 00 10 mov %l0, %o2 40004b78: 92 10 20 03 mov 3, %o1 40004b7c: 17 00 00 28 sethi %hi(0xa000), %o3 40004b80: 98 07 bf dc add %fp, -36, %o4 40004b84: 40 00 63 a7 call 4001da20 40004b88: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40004b8c: 80 a2 20 00 cmp %o0, 0 40004b90: 12 80 00 08 bne 40004bb0 40004b94: c4 07 bf dc ld [ %fp + -36 ], %g2 rtems_set_errno_and_return_minus_one( ENOMEM ); 40004b98: 40 00 a8 68 call 4002ed38 <__errno> <== NOT EXECUTED 40004b9c: 01 00 00 00 nop <== NOT EXECUTED 40004ba0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40004ba4: c2 22 00 00 st %g1, [ %o0 ] 40004ba8: 81 c7 e0 08 ret 40004bac: 91 e8 3f ff restore %g0, -1, %o0 /* * 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 ); 40004bb0: 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++; 40004bb4: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 IMFS_update_ctime( info.hard_link.link_node ); 40004bb8: 92 10 20 00 clr %o1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 40004bbc: 82 00 60 01 inc %g1 IMFS_update_ctime( info.hard_link.link_node ); 40004bc0: 40 00 02 69 call 40005564 40004bc4: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] 40004bc8: c4 07 bf ec ld [ %fp + -20 ], %g2 40004bcc: c2 07 bf dc ld [ %fp + -36 ], %g1 40004bd0: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 40004bd4: 81 c7 e0 08 ret 40004bd8: 91 e8 20 00 restore %g0, 0, %o0 40026194 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 40026194: 9d e3 bf 98 save %sp, -104, %sp 40026198: 90 10 00 18 mov %i0, %o0 block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4002619c: 80 a6 20 00 cmp %i0, 0 400261a0: 12 80 00 0a bne 400261c8 400261a4: 92 10 00 19 mov %i1, %o1 400261a8: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 400261ac: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 400261b0: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 400261b4: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 400261b8: 94 12 a2 18 or %o2, 0x218, %o2 <== NOT EXECUTED 400261bc: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 400261c0: 10 80 00 0c b 400261f0 <== NOT EXECUTED 400261c4: 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 ); 400261c8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400261cc: 80 a0 60 05 cmp %g1, 5 400261d0: 02 80 00 0a be 400261f8 400261d4: 15 10 01 13 sethi %hi(0x40044c00), %o2 400261d8: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 400261dc: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 400261e0: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 400261e4: 94 12 a2 18 or %o2, 0x218, %o2 <== NOT EXECUTED 400261e8: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 400261ec: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 400261f0: 7f ff 7b 94 call 40005040 <__assert_func> <== NOT EXECUTED 400261f4: 01 00 00 00 nop <== 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 ); 400261f8: 7f ff fe 7a call 40025be0 400261fc: 94 10 20 01 mov 1, %o2 ! 1 if ( *block_entry_ptr ) 40026200: 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 ); 40026204: b2 10 00 08 mov %o0, %i1 if ( *block_entry_ptr ) 40026208: 80 a0 60 00 cmp %g1, 0 4002620c: 12 80 00 09 bne 40026230 40026210: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 40026214: 7f ff fe 66 call 40025bac 40026218: b0 10 20 01 mov 1, %i0 if ( !memory ) 4002621c: 80 a2 20 00 cmp %o0, 0 40026220: 02 80 00 04 be 40026230 40026224: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 40026228: d0 26 40 00 st %o0, [ %i1 ] 4002622c: b0 10 20 00 clr %i0 return 0; } 40026230: 81 c7 e0 08 ret 40026234: 81 e8 00 00 restore 40026238 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 40026238: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4002623c: a4 96 20 00 orcc %i0, 0, %l2 40026240: 32 80 00 0a bne,a 40026268 40026244: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40026248: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 4002624c: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40026250: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40026254: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40026258: 94 12 a2 30 or %o2, 0x230, %o2 <== NOT EXECUTED 4002625c: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40026260: 10 80 00 0c b 40026290 <== NOT EXECUTED 40026264: 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 ); 40026268: 80 a0 60 05 cmp %g1, 5 4002626c: 02 80 00 0b be 40026298 40026270: 03 10 01 25 sethi %hi(0x40049400), %g1 40026274: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40026278: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 4002627c: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40026280: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40026284: 94 12 a2 30 or %o2, 0x230, %o2 <== NOT EXECUTED 40026288: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 4002628c: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED 40026290: 7f ff 7b 6c call 40005040 <__assert_func> <== NOT EXECUTED 40026294: 01 00 00 00 nop <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 40026298: e2 00 62 40 ld [ %g1 + 0x240 ], %l1 4002629c: a1 34 60 02 srl %l1, 2, %l0 400262a0: 92 10 00 10 mov %l0, %o1 400262a4: 7f ff 73 ad call 40003158 <.umul> 400262a8: 90 04 20 01 add %l0, 1, %o0 400262ac: 92 10 00 10 mov %l0, %o1 400262b0: 7f ff 73 aa call 40003158 <.umul> 400262b4: 90 02 20 01 inc %o0 400262b8: 92 10 00 11 mov %l1, %o1 400262bc: 7f ff 73 a7 call 40003158 <.umul> 400262c0: 90 02 3f ff add %o0, -1, %o0 400262c4: 80 a6 40 08 cmp %i1, %o0 400262c8: 2a 80 00 06 bcs,a 400262e0 400262cc: e0 04 a0 4c ld [ %l2 + 0x4c ], %l0 rtems_set_errno_and_return_minus_one( EINVAL ); 400262d0: 40 00 22 9a call 4002ed38 <__errno> <== NOT EXECUTED 400262d4: 01 00 00 00 nop <== NOT EXECUTED 400262d8: 10 80 00 1f b 40026354 <== NOT EXECUTED 400262dc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) 400262e0: 80 a6 40 10 cmp %i1, %l0 400262e4: 04 80 00 24 ble 40026374 400262e8: b0 10 20 00 clr %i0 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 400262ec: 92 10 00 11 mov %l1, %o1 400262f0: 40 00 64 04 call 4003f300 <.div> 400262f4: 90 10 00 19 mov %i1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 400262f8: 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; 400262fc: b0 10 00 08 mov %o0, %i0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 40026300: 40 00 64 00 call 4003f300 <.div> 40026304: 90 10 00 10 mov %l0, %o0 40026308: a2 10 00 08 mov %o0, %l1 4002630c: 10 80 00 15 b 40026360 40026310: a0 10 00 08 mov %o0, %l0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { 40026314: 7f ff ff a0 call 40026194 40026318: 92 10 00 10 mov %l0, %o1 4002631c: 80 a2 20 00 cmp %o0, 0 40026320: 22 80 00 10 be,a 40026360 40026324: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 40026328: 10 80 00 06 b 40026340 <== NOT EXECUTED 4002632c: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 40026330: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40026334: 7f ff fe d5 call 40025e88 <== NOT EXECUTED 40026338: 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-- ) { 4002633c: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED 40026340: 1a bf ff fc bcc 40026330 <== NOT EXECUTED 40026344: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 40026348: 40 00 22 7c call 4002ed38 <__errno> <== NOT EXECUTED 4002634c: 01 00 00 00 nop <== NOT EXECUTED 40026350: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 40026354: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40026358: 81 c7 e0 08 ret <== NOT EXECUTED 4002635c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 40026360: 80 a4 00 18 cmp %l0, %i0 40026364: 08 bf ff ec bleu 40026314 40026368: 90 10 00 12 mov %l2, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4002636c: f2 24 a0 4c st %i1, [ %l2 + 0x4c ] 40026370: b0 10 20 00 clr %i0 return 0; } 40026374: 81 c7 e0 08 ret 40026378: 81 e8 00 00 restore 40025be0 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 40025be0: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40025be4: 80 a6 20 00 cmp %i0, 0 40025be8: 32 80 00 0a bne,a 40025c10 40025bec: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40025bf0: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40025bf4: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40025bf8: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40025bfc: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40025c00: 94 12 a1 90 or %o2, 0x190, %o2 <== NOT EXECUTED 40025c04: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40025c08: 10 80 00 0c b 40025c38 <== NOT EXECUTED 40025c0c: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 40025c10: 80 a0 60 05 cmp %g1, 5 40025c14: 02 80 00 0b be 40025c40 40025c18: 03 10 01 25 sethi %hi(0x40049400), %g1 40025c1c: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40025c20: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40025c24: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40025c28: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40025c2c: 94 12 a1 90 or %o2, 0x190, %o2 <== NOT EXECUTED 40025c30: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 40025c34: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED 40025c38: 7f ff 7d 02 call 40005040 <__assert_func> <== NOT EXECUTED 40025c3c: 01 00 00 00 nop <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 40025c40: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 40025c44: a3 30 60 02 srl %g1, 2, %l1 40025c48: 82 04 7f ff add %l1, -1, %g1 40025c4c: 80 a6 40 01 cmp %i1, %g1 40025c50: 18 80 00 13 bgu 40025c9c 40025c54: 90 04 60 01 add %l1, 1, %o0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 40025c58: 80 a6 a0 00 cmp %i2, 0 40025c5c: 02 80 00 0d be 40025c90 40025c60: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 if ( !p ) { 40025c64: 80 a0 a0 00 cmp %g2, 0 40025c68: 12 80 00 08 bne 40025c88 40025c6c: 01 00 00 00 nop p = memfile_alloc_block(); 40025c70: 7f ff ff cf call 40025bac 40025c74: 01 00 00 00 nop if ( !p ) 40025c78: 80 a2 20 00 cmp %o0, 0 40025c7c: 22 80 00 81 be,a 40025e80 40025c80: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; info->indirect = p; 40025c84: d0 26 20 50 st %o0, [ %i0 + 0x50 ] } return &info->indirect[ my_block ]; 40025c88: 10 80 00 2a b 40025d30 40025c8c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 } if ( !p ) 40025c90: 80 a0 a0 00 cmp %g2, 0 return 0; return &info->indirect[ my_block ]; 40025c94: 10 80 00 30 b 40025d54 40025c98: 83 2e 60 02 sll %i1, 2, %g1 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 40025c9c: 7f ff 75 2f call 40003158 <.umul> <== NOT EXECUTED 40025ca0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40025ca4: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 40025ca8: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 40025cac: 18 80 00 2e bgu 40025d64 <== NOT EXECUTED 40025cb0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 40025cb4: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40025cb8: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40025cbc: 40 00 66 3b call 4003f5a8 <.urem> <== NOT EXECUTED 40025cc0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40025cc4: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40025cc8: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40025ccc: 40 00 65 8b call 4003f2f8 <.udiv> <== NOT EXECUTED 40025cd0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40025cd4: 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; 40025cd8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 40025cdc: 02 80 00 17 be 40025d38 <== NOT EXECUTED 40025ce0: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( !p ) { 40025ce4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025ce8: 12 80 00 08 bne 40025d08 <== NOT EXECUTED 40025cec: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED p = memfile_alloc_block(); 40025cf0: 7f ff ff af call 40025bac <== NOT EXECUTED 40025cf4: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40025cf8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025cfc: 02 80 00 60 be 40025e7c <== NOT EXECUTED 40025d00: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED return 0; info->doubly_indirect = p; 40025d04: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; 40025d08: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED if ( !p1 ) { 40025d0c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40025d10: 12 80 00 08 bne 40025d30 <== NOT EXECUTED 40025d14: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 40025d18: 7f ff ff a5 call 40025bac <== NOT EXECUTED 40025d1c: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40025d20: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 40025d24: 22 80 00 57 be,a 40025e80 <== NOT EXECUTED 40025d28: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 40025d2c: c4 24 00 00 st %g2, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p1[ singly ]; 40025d30: 10 80 00 51 b 40025e74 40025d34: 83 2e 60 02 sll %i1, 2, %g1 } if ( !p ) 40025d38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025d3c: 02 80 00 51 be 40025e80 <== NOT EXECUTED 40025d40: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 40025d44: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED 40025d48: c2 02 00 01 ld [ %o0 + %g1 ], %g1 <== 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 ]; 40025d4c: 85 2e 60 02 sll %i1, 2, %g2 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 40025d50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40025d54: 12 80 00 4b bne 40025e80 40025d58: b0 00 40 02 add %g1, %g2, %i0 p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40025d5c: 81 c7 e0 08 ret <== NOT EXECUTED 40025d60: 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 ) { 40025d64: 90 02 20 01 inc %o0 <== NOT EXECUTED 40025d68: 7f ff 74 fc call 40003158 <.umul> <== NOT EXECUTED 40025d6c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40025d70: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 40025d74: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 40025d78: 18 80 00 41 bgu 40025e7c <== NOT EXECUTED 40025d7c: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 40025d80: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40025d84: 40 00 66 09 call 4003f5a8 <.urem> <== NOT EXECUTED 40025d88: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40025d8c: 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; 40025d90: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 40025d94: 40 00 65 59 call 4003f2f8 <.udiv> <== NOT EXECUTED 40025d98: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 40025d9c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40025da0: 40 00 65 56 call 4003f2f8 <.udiv> <== NOT EXECUTED 40025da4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40025da8: 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; 40025dac: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 40025db0: 40 00 65 fe call 4003f5a8 <.urem> <== NOT EXECUTED 40025db4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40025db8: 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; 40025dbc: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 40025dc0: 02 80 00 23 be 40025e4c <== NOT EXECUTED 40025dc4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED if ( !p ) { 40025dc8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025dcc: 12 80 00 08 bne 40025dec <== NOT EXECUTED 40025dd0: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED p = memfile_alloc_block(); 40025dd4: 7f ff ff 76 call 40025bac <== NOT EXECUTED 40025dd8: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 40025ddc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025de0: 02 80 00 27 be 40025e7c <== NOT EXECUTED 40025de4: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED return 0; info->triply_indirect = p; 40025de8: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; 40025dec: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED if ( !p1 ) { 40025df0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40025df4: 12 80 00 08 bne 40025e14 <== NOT EXECUTED 40025df8: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED p1 = memfile_alloc_block(); 40025dfc: 7f ff ff 6c call 40025bac <== NOT EXECUTED 40025e00: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 40025e04: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40025e08: 02 80 00 1e be 40025e80 <== NOT EXECUTED 40025e0c: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 40025e10: c6 24 00 00 st %g3, [ %l0 ] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; 40025e14: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED 40025e18: d0 00 c0 01 ld [ %g3 + %g1 ], %o0 <== NOT EXECUTED if ( !p2 ) { 40025e1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025e20: 12 80 00 08 bne 40025e40 <== NOT EXECUTED 40025e24: a0 00 c0 01 add %g3, %g1, %l0 <== NOT EXECUTED p2 = memfile_alloc_block(); 40025e28: 7f ff ff 61 call 40025bac <== NOT EXECUTED 40025e2c: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 40025e30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025e34: 22 80 00 13 be,a 40025e80 <== NOT EXECUTED 40025e38: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 40025e3c: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED } return (block_p *)&p2[ singly ]; 40025e40: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 40025e44: 81 c7 e0 08 ret <== NOT EXECUTED 40025e48: 91 ea 00 01 restore %o0, %g1, %o0 <== NOT EXECUTED } if ( !p ) 40025e4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025e50: 02 80 00 0c be 40025e80 <== NOT EXECUTED 40025e54: b0 10 20 00 clr %i0 <== 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 ]; 40025e58: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED 40025e5c: d0 02 00 01 ld [ %o0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 40025e60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40025e64: 02 80 00 07 be 40025e80 <== NOT EXECUTED 40025e68: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 40025e6c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED 40025e70: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 40025e74: 81 c7 e0 08 ret 40025e78: 91 e8 80 01 restore %g2, %g1, %o0 40025e7c: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 40025e80: 81 c7 e0 08 ret 40025e84: 81 e8 00 00 restore 4002676c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4002676c: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40026770: a6 96 20 00 orcc %i0, 0, %l3 40026774: 32 80 00 0a bne,a 4002679c 40026778: c4 04 e0 48 ld [ %l3 + 0x48 ], %g2 4002677c: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40026780: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40026784: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40026788: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 4002678c: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 40026790: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40026794: 10 80 00 0d b 400267c8 <== NOT EXECUTED 40026798: 92 10 22 4a mov 0x24a, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4002679c: 82 00 bf fb add %g2, -5, %g1 400267a0: 80 a0 60 01 cmp %g1, 1 400267a4: 08 80 00 0b bleu 400267d0 400267a8: 80 a6 a0 00 cmp %i2, 0 400267ac: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 400267b0: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 400267b4: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 400267b8: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 400267bc: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 400267c0: 96 12 e1 38 or %o3, 0x138, %o3 <== NOT EXECUTED 400267c4: 92 10 22 4f mov 0x24f, %o1 <== NOT EXECUTED 400267c8: 7f ff 7a 1e call 40005040 <__assert_func> <== NOT EXECUTED 400267cc: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 400267d0: 32 80 00 0a bne,a 400267f8 400267d4: 80 a6 e0 00 cmp %i3, 0 400267d8: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 400267dc: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 400267e0: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 400267e4: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 400267e8: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 400267ec: 96 12 e1 88 or %o3, 0x188, %o3 <== NOT EXECUTED 400267f0: 10 bf ff f6 b 400267c8 <== NOT EXECUTED 400267f4: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 400267f8: 12 80 00 08 bne 40026818 400267fc: 80 a0 a0 06 cmp %g2, 6 rtems_set_errno_and_return_minus_one( EINVAL ); 40026800: 40 00 21 4e call 4002ed38 <__errno> <== NOT EXECUTED 40026804: 01 00 00 00 nop <== NOT EXECUTED 40026808: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4002680c: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 40026810: 10 80 00 76 b 400269e8 <== NOT EXECUTED 40026814: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 40026818: 32 80 00 0c bne,a 40026848 4002681c: c4 04 e0 4c ld [ %l3 + 0x4c ], %g2 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 40026820: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED 40026824: b0 20 40 19 sub %g1, %i1, %i0 <== NOT EXECUTED 40026828: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED 4002682c: 38 80 00 02 bgu,a 40026834 <== NOT EXECUTED 40026830: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 40026834: d2 04 e0 50 ld [ %l3 + 0x50 ], %o1 <== NOT EXECUTED 40026838: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4002683c: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 40026840: 10 80 00 62 b 400269c8 <== NOT EXECUTED 40026844: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 40026848: 82 06 c0 19 add %i3, %i1, %g1 4002684c: 80 a0 40 02 cmp %g1, %g2 40026850: 18 80 00 03 bgu 4002685c 40026854: a0 20 80 19 sub %g2, %i1, %l0 40026858: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4002685c: 03 10 01 25 sethi %hi(0x40049400), %g1 40026860: f6 00 62 40 ld [ %g1 + 0x240 ], %i3 ! 40049640 40026864: 90 10 00 19 mov %i1, %o0 40026868: 40 00 63 52 call 4003f5b0 <.rem> 4002686c: 92 10 00 1b mov %i3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40026870: 92 10 00 1b mov %i3, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40026874: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40026878: 40 00 62 a2 call 4003f300 <.div> 4002687c: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 40026880: 80 a4 60 00 cmp %l1, 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; 40026884: b2 10 00 08 mov %o0, %i1 if ( start_offset ) { 40026888: a4 10 00 1a mov %i2, %l2 4002688c: 02 80 00 1d be 40026900 40026890: b0 10 20 00 clr %i0 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 ); 40026894: 90 10 00 13 mov %l3, %o0 40026898: 92 10 00 19 mov %i1, %o1 4002689c: 7f ff fc d1 call 40025be0 400268a0: 94 10 20 00 clr %o2 assert( block_ptr ); 400268a4: 80 a2 20 00 cmp %o0, 0 400268a8: 32 80 00 0a bne,a 400268d0 400268ac: 92 26 c0 11 sub %i3, %l1, %o1 400268b0: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 400268b4: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 400268b8: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 400268bc: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 400268c0: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 400268c4: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 400268c8: 10 bf ff c0 b 400267c8 <== NOT EXECUTED 400268cc: 92 10 22 94 mov 0x294, %o1 <== 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; 400268d0: 80 a4 00 09 cmp %l0, %o1 400268d4: 08 80 00 03 bleu 400268e0 400268d8: 94 10 00 10 mov %l0, %o2 400268dc: 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 ); 400268e0: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 400268e4: a4 06 80 0a add %i2, %o2, %l2 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 ); 400268e8: 92 02 40 11 add %o1, %l1, %o1 dest += to_copy; block++; 400268ec: b2 06 60 01 inc %i1 my_length -= to_copy; 400268f0: a0 24 00 0a sub %l0, %o2, %l0 400268f4: b0 10 00 0a mov %o2, %i0 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 ); 400268f8: 40 00 2a fd call 400314ec 400268fc: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40026900: 03 10 01 25 sethi %hi(0x40049400), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40026904: a2 10 62 40 or %g1, 0x240, %l1 ! 40049640 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 40026908: 10 80 00 17 b 40026964 4002690c: f6 00 62 40 ld [ %g1 + 0x240 ], %i3 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40026910: 92 10 00 19 mov %i1, %o1 40026914: 7f ff fc b3 call 40025be0 40026918: 94 10 20 00 clr %o2 assert( block_ptr ); 4002691c: 80 a2 20 00 cmp %o0, 0 40026920: 32 80 00 0a bne,a 40026948 40026924: d2 02 00 00 ld [ %o0 ], %o1 40026928: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 4002692c: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40026930: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40026934: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40026938: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 4002693c: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 40026940: 10 bf ff a2 b 400267c8 <== NOT EXECUTED 40026944: 92 10 22 a5 mov 0x2a5, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 40026948: b2 06 60 01 inc %i1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 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 ); 4002694c: 90 10 00 12 mov %l2, %o0 dest += to_copy; block++; my_length -= to_copy; 40026950: a0 24 00 1b sub %l0, %i3, %l0 copied += to_copy; 40026954: b0 06 00 1b add %i0, %i3, %i0 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; 40026958: a4 04 80 1b add %l2, %i3, %l2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 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 ); 4002695c: 40 00 2a e4 call 400314ec 40026960: 94 10 00 1b mov %i3, %o2 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 40026964: c2 04 40 00 ld [ %l1 ], %g1 40026968: 80 a4 00 01 cmp %l0, %g1 4002696c: 1a bf ff e9 bcc 40026910 40026970: 90 10 00 13 mov %l3, %o0 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 40026974: 80 a4 20 00 cmp %l0, 0 40026978: 02 80 00 17 be 400269d4 4002697c: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40026980: 92 10 00 19 mov %i1, %o1 40026984: 90 10 00 13 mov %l3, %o0 40026988: 7f ff fc 96 call 40025be0 4002698c: 94 10 20 00 clr %o2 assert( block_ptr ); 40026990: 80 a2 20 00 cmp %o0, 0 40026994: 32 80 00 0a bne,a 400269bc 40026998: d2 02 00 00 ld [ %o0 ], %o1 4002699c: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 400269a0: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 400269a4: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 400269a8: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 400269ac: 94 12 a1 c8 or %o2, 0x1c8, %o2 <== NOT EXECUTED 400269b0: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 400269b4: 10 bf ff 85 b 400267c8 <== NOT EXECUTED 400269b8: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; 400269bc: b0 04 00 18 add %l0, %i0, %i0 if ( 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)[ 0 ], my_length ); 400269c0: 90 10 00 12 mov %l2, %o0 400269c4: 94 10 00 10 mov %l0, %o2 400269c8: 40 00 2a c9 call 400314ec 400269cc: 01 00 00 00 nop copied += my_length; } IMFS_update_atime( the_jnode ); 400269d0: 90 07 bf f0 add %fp, -16, %o0 400269d4: 7f ff 7a e4 call 40005564 400269d8: 92 10 20 00 clr %o1 400269dc: c2 07 bf f0 ld [ %fp + -16 ], %g1 return copied; 400269e0: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 400269e4: c2 24 e0 3c st %g1, [ %l3 + 0x3c ] return copied; } 400269e8: 81 c7 e0 08 ret 400269ec: 91 e8 00 0a restore %g0, %o2, %o0 40025f2c : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 40025f2c: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40025f30: 80 a6 20 00 cmp %i0, 0 40025f34: 32 80 00 0a bne,a 40025f5c 40025f38: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40025f3c: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40025f40: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40025f44: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40025f48: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40025f4c: 94 12 a1 e0 or %o2, 0x1e0, %o2 <== NOT EXECUTED 40025f50: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40025f54: 10 80 00 0c b 40025f84 <== NOT EXECUTED 40025f58: 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 ); 40025f5c: 80 a0 60 05 cmp %g1, 5 40025f60: 02 80 00 0b be 40025f8c 40025f64: 03 10 01 25 sethi %hi(0x40049400), %g1 40025f68: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40025f6c: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40025f70: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40025f74: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40025f78: 94 12 a1 e0 or %o2, 0x1e0, %o2 <== NOT EXECUTED 40025f7c: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 40025f80: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED 40025f84: 7f ff 7c 2f call 40005040 <__assert_func> <== NOT EXECUTED 40025f88: 01 00 00 00 nop <== NOT EXECUTED * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40025f8c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 /* * 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; 40025f90: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 40025f94: 80 a0 a0 00 cmp %g2, 0 40025f98: 02 80 00 05 be 40025fac 40025f9c: a7 30 60 02 srl %g1, 2, %l3 memfile_free_blocks_in_table( &info->indirect, to_free ); 40025fa0: 90 06 20 50 add %i0, 0x50, %o0 40025fa4: 7f ff ff c5 call 40025eb8 40025fa8: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 40025fac: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 40025fb0: 80 a0 60 00 cmp %g1, 0 40025fb4: 02 80 00 15 be 40026008 40025fb8: 03 10 01 25 sethi %hi(0x40049400), %g1 40025fbc: a0 10 20 00 clr %l0 <== NOT EXECUTED for ( i=0 ; i <== NOT EXECUTED 40025fc4: a2 10 62 40 or %g1, 0x240, %l1 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 40025fc8: 85 2c 20 02 sll %l0, 2, %g2 <== NOT EXECUTED 40025fcc: c2 02 00 02 ld [ %o0 + %g2 ], %g1 <== NOT EXECUTED 40025fd0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40025fd4: 02 80 00 04 be 40025fe4 <== NOT EXECUTED 40025fd8: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 40025fdc: 7f ff ff b7 call 40025eb8 <== NOT EXECUTED 40025fe0: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40025ff8: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== 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 ); 40025ffc: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 40026000: 7f ff ff ae call 40025eb8 <== NOT EXECUTED 40026004: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 40026008: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 4002600c: 80 a0 60 00 cmp %g1, 0 40026010: 02 80 00 26 be 400260a8 40026014: 03 10 01 25 sethi %hi(0x40049400), %g1 40026018: a4 10 20 00 clr %l2 <== NOT EXECUTED for ( i=0 ; i <== NOT EXECUTED 40026020: aa 10 62 40 or %g1, 0x240, %l5 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 40026024: a9 2c a0 02 sll %l2, 2, %l4 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 40026028: d0 00 40 14 ld [ %g1 + %l4 ], %o0 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4002602c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40026030: 22 80 00 1c be,a 400260a0 <== NOT EXECUTED 40026034: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED break; 40026038: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4002603c: 10 80 00 09 b 40026060 <== NOT EXECUTED 40026040: a2 10 20 00 clr %l1 <== NOT EXECUTED for ( j=0 ; j <== NOT EXECUTED 4002604c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 40026050: 7f ff ff 9a call 40025eb8 <== NOT EXECUTED 40026054: 92 10 00 13 mov %l3, %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 40026070: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 40026074: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40026084: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 40026098: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4002609c: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 400260a0: 7f ff ff 86 call 40025eb8 <== NOT EXECUTED 400260a4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 400260a8: 81 c7 e0 08 ret 400260ac: 91 e8 20 00 restore %g0, 0, %o0 40025e88 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 40025e88: 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 ); 40025e8c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40025e90: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40025e94: 7f ff ff 53 call 40025be0 <== NOT EXECUTED 40025e98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 40025e9c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 40025ea0: 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; 40025ea4: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 40025ea8: 7f ff ff 38 call 40025b88 <== NOT EXECUTED 40025eac: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 40025eb0: 81 c7 e0 08 ret <== NOT EXECUTED 40025eb4: 81 e8 00 00 restore <== NOT EXECUTED 40026440 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 40026440: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 40026444: a4 96 20 00 orcc %i0, 0, %l2 40026448: 32 80 00 0a bne,a 40026470 4002644c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40026450: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40026454: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40026458: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 4002645c: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40026460: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40026464: 96 12 e0 a8 or %o3, 0xa8, %o3 <== NOT EXECUTED 40026468: 10 80 00 82 b 40026670 <== NOT EXECUTED 4002646c: 92 10 22 e1 mov 0x2e1, %o1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 40026470: 80 a0 60 05 cmp %g1, 5 40026474: 02 80 00 0a be 4002649c 40026478: 80 a6 a0 00 cmp %i2, 0 4002647c: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40026480: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40026484: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40026488: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 4002648c: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40026490: 96 12 e0 b8 or %o3, 0xb8, %o3 <== NOT EXECUTED 40026494: 10 80 00 77 b 40026670 <== NOT EXECUTED 40026498: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4002649c: 12 80 00 0a bne 400264c4 400264a0: 80 a6 e0 00 cmp %i3, 0 400264a4: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 400264a8: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 400264ac: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 400264b0: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 400264b4: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 400264b8: 96 12 e0 f0 or %o3, 0xf0, %o3 <== NOT EXECUTED 400264bc: 10 80 00 6d b 40026670 <== NOT EXECUTED 400264c0: 92 10 22 ed mov 0x2ed, %o1 <== NOT EXECUTED /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 400264c4: 32 80 00 06 bne,a 400264dc 400264c8: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 400264cc: 40 00 22 1b call 4002ed38 <__errno> <== NOT EXECUTED 400264d0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400264d4: 10 80 00 0e b 4002650c <== NOT EXECUTED 400264d8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; 400264dc: 92 06 c0 19 add %i3, %i1, %o1 if ( last_byte > the_jnode->info.file.size ) { 400264e0: 80 a2 40 01 cmp %o1, %g1 400264e4: 08 80 00 0d bleu 40026518 400264e8: 03 10 01 25 sethi %hi(0x40049400), %g1 status = IMFS_memfile_extend( the_jnode, last_byte ); 400264ec: 7f ff ff 53 call 40026238 400264f0: 90 10 00 12 mov %l2, %o0 if ( status ) 400264f4: 80 a2 20 00 cmp %o0, 0 400264f8: 02 80 00 08 be 40026518 400264fc: 03 10 01 25 sethi %hi(0x40049400), %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 40026500: 40 00 22 0e call 4002ed38 <__errno> <== NOT EXECUTED 40026504: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40026508: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4002650c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40026510: 81 c7 e0 08 ret <== NOT EXECUTED 40026514: 81 e8 00 00 restore <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 40026518: e0 00 62 40 ld [ %g1 + 0x240 ], %l0 4002651c: 90 10 00 19 mov %i1, %o0 40026520: 40 00 64 24 call 4003f5b0 <.rem> 40026524: 92 10 00 10 mov %l0, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40026528: 92 10 00 10 mov %l0, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4002652c: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 40026530: 40 00 63 74 call 4003f300 <.div> 40026534: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 40026538: 80 a4 60 00 cmp %l1, 0 4002653c: 12 80 00 05 bne 40026550 40026540: b2 10 00 08 mov %o0, %i1 40026544: a0 10 00 1a mov %i2, %l0 40026548: 10 80 00 1c b 400265b8 4002654c: b0 10 20 00 clr %i0 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 ); 40026550: 90 10 00 12 mov %l2, %o0 40026554: 92 10 00 19 mov %i1, %o1 40026558: 7f ff fd a2 call 40025be0 4002655c: 94 10 20 00 clr %o2 assert( block_ptr ); 40026560: 80 a2 20 00 cmp %o0, 0 40026564: 32 80 00 0a bne,a 4002658c 40026568: 94 24 00 11 sub %l0, %l1, %o2 4002656c: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40026570: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40026574: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40026578: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 4002657c: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40026580: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 40026584: 10 80 00 3b b 40026670 <== NOT EXECUTED 40026588: 92 10 23 1a mov 0x31a, %o1 <== 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; 4002658c: 80 a2 80 1b cmp %o2, %i3 40026590: 38 80 00 02 bgu,a 40026598 40026594: 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 ); 40026598: d0 02 00 00 ld [ %o0 ], %o0 src += to_copy; 4002659c: a0 06 80 0a add %i2, %o2, %l0 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 ); 400265a0: 90 02 00 11 add %o0, %l1, %o0 src += to_copy; block++; 400265a4: b2 06 60 01 inc %i1 my_length -= to_copy; 400265a8: b6 26 c0 0a sub %i3, %o2, %i3 copied += to_copy; 400265ac: 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 ); 400265b0: 40 00 2b cf call 400314ec 400265b4: 92 10 00 1a mov %i2, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 400265b8: 03 10 01 25 sethi %hi(0x40049400), %g1 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 400265bc: a2 10 62 40 or %g1, 0x240, %l1 ! 40049640 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 400265c0: 10 80 00 17 b 4002661c 400265c4: f4 00 62 40 ld [ %g1 + 0x240 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 400265c8: 92 10 00 19 mov %i1, %o1 400265cc: 7f ff fd 85 call 40025be0 400265d0: 94 10 20 00 clr %o2 assert( block_ptr ); 400265d4: 80 a2 20 00 cmp %o0, 0 400265d8: 32 80 00 0a bne,a 40026600 400265dc: d0 02 00 00 ld [ %o0 ], %o0 400265e0: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 400265e4: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 400265e8: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 400265ec: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 400265f0: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 400265f4: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 400265f8: 10 80 00 1e b 40026670 <== NOT EXECUTED 400265fc: 92 10 23 2e mov 0x32e, %o1 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 40026600: 92 10 00 10 mov %l0, %o1 src += to_copy; block++; 40026604: b2 06 60 01 inc %i1 my_length -= to_copy; 40026608: b6 26 c0 1a sub %i3, %i2, %i3 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4002660c: b0 06 00 1a add %i0, %i2, %i0 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; 40026610: a0 04 00 1a add %l0, %i2, %l0 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 ); 40026614: 40 00 2b b6 call 400314ec 40026618: 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 ) { 4002661c: c2 04 40 00 ld [ %l1 ], %g1 40026620: 80 a6 c0 01 cmp %i3, %g1 40026624: 1a bf ff e9 bcc 400265c8 40026628: 90 10 00 12 mov %l2, %o0 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4002662c: 80 a6 e0 00 cmp %i3, 0 40026630: 02 80 00 17 be 4002668c 40026634: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 40026638: 92 10 00 19 mov %i1, %o1 4002663c: 90 10 00 12 mov %l2, %o0 40026640: 7f ff fd 68 call 40025be0 40026644: 94 10 20 00 clr %o2 assert( block_ptr ); 40026648: 80 a2 20 00 cmp %o0, 0 4002664c: 32 80 00 0b bne,a 40026678 40026650: d0 02 00 00 ld [ %o0 ], %o0 40026654: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40026658: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 4002665c: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40026660: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40026664: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 40026668: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED 4002666c: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 40026670: 7f ff 7a 74 call 40005040 <__assert_func> <== NOT EXECUTED 40026674: 01 00 00 00 nop <== NOT EXECUTED #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); my_length = 0; copied += to_copy; 40026678: 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 ); 4002667c: 92 10 00 10 mov %l0, %o1 40026680: 40 00 2b 9b call 400314ec 40026684: 94 10 00 1b mov %i3, %o2 my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 40026688: 90 07 bf f0 add %fp, -16, %o0 4002668c: 7f ff 7b b6 call 40005564 40026690: 92 10 20 00 clr %o1 40026694: c2 07 bf f0 ld [ %fp + -16 ], %g1 40026698: c2 24 a0 3c st %g1, [ %l2 + 0x3c ] 4002669c: c2 24 a0 40 st %g1, [ %l2 + 0x40 ] return copied; } 400266a0: 81 c7 e0 08 ret 400266a4: 81 e8 00 00 restore 40009ac8 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 40009ac8: 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 ); 40009acc: 90 10 00 18 mov %i0, %o0 40009ad0: 92 07 bf c0 add %fp, -64, %o1 40009ad4: 7f ff ff 8f call 40009910 40009ad8: 94 07 bf f4 add %fp, -12, %o2 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 40009adc: 03 00 00 3c sethi %hi(0xf000), %g1 40009ae0: b3 2e 60 10 sll %i1, 0x10, %i1 40009ae4: 97 36 60 10 srl %i1, 0x10, %o3 40009ae8: 84 0a c0 01 and %o3, %g1, %g2 40009aec: 03 00 00 10 sethi %hi(0x4000), %g1 40009af0: 80 a0 80 01 cmp %g2, %g1 40009af4: 02 80 00 17 be 40009b50 40009af8: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 40009afc: 03 00 00 20 sethi %hi(0x8000), %g1 40009b00: 80 a0 80 01 cmp %g2, %g1 40009b04: 02 80 00 14 be 40009b54 40009b08: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 40009b0c: 03 00 00 18 sethi %hi(0x6000), %g1 40009b10: 80 a0 80 01 cmp %g2, %g1 40009b14: 02 80 00 05 be 40009b28 40009b18: 03 00 00 08 sethi %hi(0x2000), %g1 40009b1c: 80 a0 80 01 cmp %g2, %g1 40009b20: 12 80 00 06 bne 40009b38 40009b24: 01 00 00 00 nop type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 40009b28: f4 27 bf e4 st %i2, [ %fp + -28 ] 40009b2c: f6 27 bf e8 st %i3, [ %fp + -24 ] 40009b30: 10 80 00 09 b 40009b54 40009b34: 92 10 20 02 mov 2, %o1 } else { rtems_set_errno_and_return_minus_one( EINVAL ); 40009b38: 40 00 0c 78 call 4000cd18 <__errno> <== NOT EXECUTED 40009b3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009b40: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40009b44: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009b48: 81 c7 e0 08 ret <== NOT EXECUTED 40009b4c: 81 e8 00 00 restore <== NOT EXECUTED 40009b50: 92 10 20 01 mov 1, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 40009b54: 94 07 bf c0 add %fp, -64, %o2 40009b58: 98 07 bf e4 add %fp, -28, %o4 40009b5c: 40 00 09 6f call 4000c118 40009b60: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 40009b64: 80 a2 20 00 cmp %o0, 0 40009b68: 12 80 00 06 bne 40009b80 40009b6c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); 40009b70: 40 00 0c 6a call 4000cd18 <__errno> <== NOT EXECUTED 40009b74: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40009b78: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40009b7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 40009b80: 81 c7 e0 08 ret 40009b84: 81 e8 00 00 restore 40004c9c : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004c9c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004ca0: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004ca4: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40004ca8: 80 a0 60 01 cmp %g1, 1 40004cac: 22 80 00 08 be,a 40004ccc 40004cb0: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004cb4: 40 00 a8 21 call 4002ed38 <__errno> <== NOT EXECUTED 40004cb8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004cbc: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40004cc0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004cc4: 81 c7 e0 08 ret <== NOT EXECUTED 40004cc8: 81 e8 00 00 restore <== NOT EXECUTED * the mounted file system. */ node->info.directory.mt_fs = mt_entry; return 0; } 40004ccc: 81 c7 e0 08 ret 40004cd0: 91 e8 20 00 restore %g0, 0, %o0 400038d4 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 400038d4: 9d e3 bf 98 save %sp, -104, %sp assert( the_jnode ); 400038d8: 80 a6 20 00 cmp %i0, 0 400038dc: 12 80 00 0a bne 40003904 400038e0: 21 10 00 80 sethi %hi(0x40020000), %l0 400038e4: 11 10 00 77 sethi %hi(0x4001dc00), %o0 <== NOT EXECUTED 400038e8: 15 10 00 78 sethi %hi(0x4001e000), %o2 <== NOT EXECUTED 400038ec: 17 10 00 77 sethi %hi(0x4001dc00), %o3 <== NOT EXECUTED 400038f0: 90 12 23 90 or %o0, 0x390, %o0 <== NOT EXECUTED 400038f4: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 400038f8: 96 12 e3 e0 or %o3, 0x3e0, %o3 <== NOT EXECUTED 400038fc: 10 80 00 3b b 400039e8 <== NOT EXECUTED 40003900: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 40003904: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 40003908: 90 06 20 0c add %i0, 0xc, %o0 4000390c: 40 00 37 8a call 40011734 40003910: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 40003914: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 40003918: 82 02 bf ff add %o2, -1, %g1 4000391c: 80 a0 60 05 cmp %g1, 5 40003920: 38 80 00 3b bgu,a 40003a0c 40003924: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 <== NOT EXECUTED 40003928: 83 28 60 02 sll %g1, 2, %g1 4000392c: 05 10 00 0e sethi %hi(0x40003800), %g2 40003930: 84 10 a0 80 or %g2, 0x80, %g2 ! 40003880 40003934: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40003938: 81 c0 40 00 jmp %g1 4000393c: 01 00 00 00 nop case IMFS_DIRECTORY: fprintf(stdout, "/" ); 40003940: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 40003944: 90 10 20 2f mov 0x2f, %o0 40003948: 40 00 37 43 call 40011654 4000394c: d2 00 60 08 ld [ %g1 + 8 ], %o1 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40003950: 10 80 00 35 b 40003a24 40003954: 31 10 00 77 sethi %hi(0x4001dc00), %i0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40003958: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 4000395c: 13 10 00 77 sethi %hi(0x4001dc00), %o1 40003960: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 40003964: d0 00 60 08 ld [ %g1 + 8 ], %o0 40003968: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 4000396c: 10 80 00 08 b 4000398c 40003970: 92 12 63 f0 or %o1, 0x3f0, %o1 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 40003974: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 <== NOT EXECUTED 40003978: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED 4000397c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40003980: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED 40003984: 13 10 00 78 sethi %hi(0x4001e000), %o1 <== NOT EXECUTED 40003988: 92 12 60 08 or %o1, 8, %o1 ! 4001e008 <__func__.4776+0x2b8> <== NOT EXECUTED 4000398c: 40 00 37 18 call 400115ec 40003990: 31 10 00 77 sethi %hi(0x4001dc00), %i0 40003994: 30 80 00 24 b,a 40003a24 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40003998: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 4000399c: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 400039a0: d0 00 60 08 ld [ %g1 + 8 ], %o0 400039a4: 13 10 00 78 sethi %hi(0x4001e000), %o1 400039a8: 40 00 37 11 call 400115ec 400039ac: 92 12 60 18 or %o1, 0x18, %o1 ! 4001e018 <__func__.4776+0x2c8> default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 400039b0: 10 80 00 1d b 40003a24 400039b4: 31 10 00 77 sethi %hi(0x4001dc00), %i0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 400039b8: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 <== NOT EXECUTED 400039bc: 11 10 00 78 sethi %hi(0x4001e000), %o0 <== NOT EXECUTED 400039c0: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 400039c4: 40 00 37 5c call 40011734 <== NOT EXECUTED 400039c8: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED assert(0); 400039cc: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED 400039d0: 11 10 00 77 sethi %hi(0x4001dc00), %o0 <== NOT EXECUTED 400039d4: 15 10 00 78 sethi %hi(0x4001e000), %o2 <== NOT EXECUTED 400039d8: 17 10 00 77 sethi %hi(0x4001dc00), %o3 <== NOT EXECUTED 400039dc: 90 12 23 90 or %o0, 0x390, %o0 <== NOT EXECUTED 400039e0: 94 12 a1 60 or %o2, 0x160, %o2 <== NOT EXECUTED 400039e4: 96 12 e1 48 or %o3, 0x148, %o3 <== NOT EXECUTED 400039e8: 40 00 01 ea call 40004190 <__assert_func> <== NOT EXECUTED 400039ec: 01 00 00 00 nop <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 400039f0: c2 04 22 00 ld [ %l0 + 0x200 ], %g1 <== NOT EXECUTED 400039f4: 11 10 00 78 sethi %hi(0x4001e000), %o0 <== NOT EXECUTED 400039f8: d2 00 60 08 ld [ %g1 + 8 ], %o1 <== NOT EXECUTED 400039fc: 40 00 37 4e call 40011734 <== NOT EXECUTED 40003a00: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED assert(0); 40003a04: 10 bf ff f3 b 400039d0 <== NOT EXECUTED 40003a08: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40003a0c: 13 10 00 78 sethi %hi(0x4001e000), %o1 <== NOT EXECUTED 40003a10: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40003a14: 40 00 36 f6 call 400115ec <== NOT EXECUTED 40003a18: 92 12 60 40 or %o1, 0x40, %o1 <== NOT EXECUTED assert(0); 40003a1c: 10 bf ff ed b 400039d0 <== NOT EXECUTED 40003a20: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED break; } puts(""); 40003a24: 40 00 3d e3 call 400131b0 40003a28: 91 ee 22 98 restore %i0, 0x298, %o0 40003a2c: 01 00 00 00 nop 40004ce0 : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 40004ce0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 40004ce4: c6 06 00 00 ld [ %i0 ], %g3 if ( node->type != IMFS_SYM_LINK ) 40004ce8: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 40004cec: 80 a0 60 04 cmp %g1, 4 40004cf0: 02 80 00 0a be 40004d18 40004cf4: b0 10 20 00 clr %i0 rtems_set_errno_and_return_minus_one( EINVAL ); 40004cf8: 40 00 a8 10 call 4002ed38 <__errno> <== NOT EXECUTED 40004cfc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004d00: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40004d04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004d08: 81 c7 e0 08 ret <== NOT EXECUTED 40004d0c: 81 e8 00 00 restore <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 40004d10: c2 2e 40 18 stb %g1, [ %i1 + %i0 ] 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++ ) 40004d14: b0 06 20 01 inc %i0 40004d18: 80 a6 00 1a cmp %i0, %i2 40004d1c: 1a 80 00 07 bcc 40004d38 40004d20: 01 00 00 00 nop 40004d24: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 40004d28: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 40004d2c: 80 a0 a0 00 cmp %g2, 0 40004d30: 12 bf ff f8 bne 40004d10 40004d34: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 buf[i] = node->info.sym_link.name[i]; return i; } 40004d38: 81 c7 e0 08 ret 40004d3c: 81 e8 00 00 restore 40009b94 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40009b94: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40009b98: 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 ) { 40009b9c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40009ba0: 80 a0 60 00 cmp %g1, 0 40009ba4: 22 80 00 06 be,a 40009bbc 40009ba8: 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 ); 40009bac: 40 00 06 23 call 4000b438 <_Chain_Extract> 40009bb0: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40009bb4: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40009bb8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40009bbc: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40009bc0: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40009bc4: 90 07 bf f0 add %fp, -16, %o0 40009bc8: 40 00 01 4b call 4000a0f4 40009bcc: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40009bd0: 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) ) { 40009bd4: 90 10 00 10 mov %l0, %o0 40009bd8: 40 00 01 80 call 4000a1d8 40009bdc: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40009be0: 80 a2 20 00 cmp %o0, 0 40009be4: 12 80 00 18 bne 40009c44 40009be8: 01 00 00 00 nop 40009bec: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40009bf0: 80 a0 60 00 cmp %g1, 0 40009bf4: 12 80 00 14 bne 40009c44 40009bf8: 03 10 00 60 sethi %hi(0x40018000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40009bfc: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 ! 400183cc 40009c00: c4 06 00 00 ld [ %i0 ], %g2 40009c04: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40009c08: 80 a0 40 02 cmp %g1, %g2 40009c0c: 22 80 00 02 be,a 40009c14 40009c10: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 40009c14: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40009c18: 80 a0 60 04 cmp %g1, 4 40009c1c: 12 80 00 08 bne 40009c3c 40009c20: 01 00 00 00 nop if ( the_jnode->info.sym_link.name ) 40009c24: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 40009c28: 80 a2 20 00 cmp %o0, 0 40009c2c: 02 80 00 04 be 40009c3c 40009c30: 01 00 00 00 nop free( (void*) the_jnode->info.sym_link.name ); 40009c34: 40 00 00 c1 call 40009f38 40009c38: 01 00 00 00 nop } free( the_jnode ); 40009c3c: 40 00 00 bf call 40009f38 40009c40: 90 10 00 10 mov %l0, %o0 } return 0; } 40009c44: 81 c7 e0 08 ret 40009c48: 91 e8 20 00 restore %g0, 0, %o0 40009c4c : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 40009c4c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 40009c50: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 40009c54: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40009c58: 80 a0 60 04 cmp %g1, 4 40009c5c: 22 80 00 19 be,a 40009cc0 40009c60: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 40009c64: 14 80 00 07 bg 40009c80 40009c68: 80 a0 60 06 cmp %g1, 6 40009c6c: 80 a0 60 02 cmp %g1, 2 40009c70: 12 80 00 0e bne 40009ca8 40009c74: 01 00 00 00 nop case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 40009c78: 10 80 00 06 b 40009c90 40009c7c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 40009c80: 14 80 00 0a bg 40009ca8 40009c84: 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; 40009c88: 10 80 00 06 b 40009ca0 40009c8c: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 40009c90: 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 ); 40009c94: c2 26 60 04 st %g1, [ %i1 + 4 ] 40009c98: 10 80 00 0a b 40009cc0 40009c9c: c4 26 40 00 st %g2, [ %i1 ] break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 40009ca0: 10 80 00 08 b 40009cc0 40009ca4: c2 26 60 20 st %g1, [ %i1 + 0x20 ] case IMFS_SYM_LINK: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40009ca8: 40 00 0c 1c call 4000cd18 <__errno> <== NOT EXECUTED 40009cac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40009cb0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40009cb4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40009cb8: 81 c7 e0 08 ret <== NOT EXECUTED 40009cbc: 81 e8 00 00 restore <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; 40009cc0: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 40009cc4: 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; 40009cc8: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 40009ccc: 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; 40009cd0: 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; 40009cd4: 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; 40009cd8: 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; 40009cdc: 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; 40009ce0: 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; 40009ce4: 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; 40009ce8: 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; 40009cec: 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; 40009cf0: 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; 40009cf4: 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; 40009cf8: 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; 40009cfc: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 40009d00: 81 c7 e0 08 ret 40009d04: 91 e8 20 00 restore %g0, 0, %o0 40004d40 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40004d40: 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 ); 40004d44: 94 07 bf f4 add %fp, -12, %o2 40004d48: a0 07 bf c0 add %fp, -64, %l0 40004d4c: 90 10 00 1a mov %i2, %o0 40004d50: 7f ff ff 01 call 40004954 40004d54: 92 10 00 10 mov %l0, %o1 /* * Duplicate link name */ info.sym_link.name = strdup( link_name); 40004d58: 40 00 bc ce call 40034090 40004d5c: 90 10 00 19 mov %i1, %o0 40004d60: d0 27 bf e4 st %o0, [ %fp + -28 ] if (info.sym_link.name == NULL) { 40004d64: 80 a2 20 00 cmp %o0, 0 40004d68: 12 80 00 08 bne 40004d88 40004d6c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOMEM); 40004d70: 40 00 a7 f2 call 4002ed38 <__errno> <== NOT EXECUTED 40004d74: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004d78: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40004d7c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004d80: 81 c7 e0 08 ret 40004d84: 81 e8 00 00 restore /* * Create a new link node. */ new_node = IMFS_create_node( 40004d88: 94 10 00 10 mov %l0, %o2 40004d8c: 92 10 20 04 mov 4, %o1 40004d90: 17 00 00 28 sethi %hi(0xa000), %o3 40004d94: 98 07 bf e4 add %fp, -28, %o4 40004d98: 96 12 e1 ff or %o3, 0x1ff, %o3 40004d9c: 40 00 63 21 call 4001da20 40004da0: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 40004da4: 80 a2 20 00 cmp %o0, 0 40004da8: 12 bf ff f6 bne 40004d80 40004dac: d0 07 bf e4 ld [ %fp + -28 ], %o0 free( info.sym_link.name); 40004db0: 40 00 01 c3 call 400054bc <== NOT EXECUTED 40004db4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM); 40004db8: 40 00 a7 e0 call 4002ed38 <__errno> <== NOT EXECUTED 40004dbc: 01 00 00 00 nop <== NOT EXECUTED 40004dc0: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 40004dc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 40004dc8: 81 c7 e0 08 ret <== NOT EXECUTED 40004dcc: 81 e8 00 00 restore <== NOT EXECUTED 40004dd0 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 40004dd0: 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; 40004dd4: 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 ) { 40004dd8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40004ddc: 80 a0 60 03 cmp %g1, 3 40004de0: 32 80 00 29 bne,a 40004e84 40004de4: c2 06 20 04 ld [ %i0 + 4 ], %g1 if ( !node->info.hard_link.link_node ) 40004de8: e2 04 20 4c ld [ %l0 + 0x4c ], %l1 40004dec: 80 a4 60 00 cmp %l1, 0 40004df0: 12 80 00 08 bne 40004e10 40004df4: a4 07 bf e0 add %fp, -32, %l2 rtems_set_errno_and_return_minus_one( EINVAL ); 40004df8: 40 00 a7 d0 call 4002ed38 <__errno> <== NOT EXECUTED 40004dfc: 01 00 00 00 nop <== NOT EXECUTED 40004e00: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40004e04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004e08: 10 80 00 22 b 40004e90 <== NOT EXECUTED 40004e0c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED the_link = *loc; 40004e10: 92 10 00 18 mov %i0, %o1 40004e14: 94 10 20 10 mov 0x10, %o2 40004e18: 40 00 b1 b5 call 400314ec 40004e1c: 90 10 00 12 mov %l2, %o0 the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 40004e20: 90 10 00 12 mov %l2, %o0 40004e24: 40 00 63 5a call 4001db8c 40004e28: e2 27 bf e0 st %l1, [ %fp + -32 ] /* * 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) 40004e2c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40004e30: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 40004e34: 80 a0 60 01 cmp %g1, 1 40004e38: 12 80 00 0b bne 40004e64 40004e3c: 82 00 7f ff add %g1, -1, %g1 { result = (*the_link.handlers->rmnod_h)( &the_link ); 40004e40: c2 07 bf e4 ld [ %fp + -28 ], %g1 40004e44: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40004e48: 9f c0 40 00 call %g1 40004e4c: 90 10 00 12 mov %l2, %o0 if ( result != 0 ) 40004e50: 80 a2 20 00 cmp %o0, 0 40004e54: 02 80 00 0b be 40004e80 40004e58: 90 10 3f ff mov -1, %o0 */ result = (*loc->handlers->rmnod_h)( loc ); return result; } 40004e5c: 81 c7 e0 08 ret 40004e60: 91 e8 00 08 restore %g0, %o0, %o0 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 40004e64: 90 07 bf f0 add %fp, -16, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40004e68: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40004e6c: 40 00 01 be call 40005564 40004e70: 92 10 20 00 clr %o1 40004e74: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40004e78: c2 07 bf f0 ld [ %fp + -16 ], %g1 40004e7c: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 40004e80: c2 06 20 04 ld [ %i0 + 4 ], %g1 40004e84: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40004e88: 9f c0 40 00 call %g1 40004e8c: 90 10 00 18 mov %i0, %o0 return result; } 40004e90: b0 10 00 08 mov %o0, %i0 40004e94: 81 c7 e0 08 ret 40004e98: 81 e8 00 00 restore 40004e9c : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40004e9c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40004ea0: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40004ea4: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40004ea8: 80 a0 60 01 cmp %g1, 1 40004eac: 22 80 00 06 be,a 40004ec4 40004eb0: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40004eb4: 40 00 a7 a1 call 4002ed38 <__errno> <== NOT EXECUTED 40004eb8: 01 00 00 00 nop <== NOT EXECUTED 40004ebc: 10 80 00 08 b 40004edc <== NOT EXECUTED 40004ec0: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 40004ec4: 80 a0 60 00 cmp %g1, 0 40004ec8: 32 80 00 08 bne,a 40004ee8 40004ecc: c0 20 a0 58 clr [ %g2 + 0x58 ] rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 40004ed0: 40 00 a7 9a call 4002ed38 <__errno> <== NOT EXECUTED 40004ed4: 01 00 00 00 nop <== NOT EXECUTED 40004ed8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40004edc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004ee0: 81 c7 e0 08 ret <== NOT EXECUTED 40004ee4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED */ node->info.directory.mt_fs = NULL; return 0; } 40004ee8: 81 c7 e0 08 ret 40004eec: 91 e8 20 00 restore %g0, 0, %o0 40002154 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 40002154: 9d e3 bf 98 save %sp, -104, %sp #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers ) 40002158: 03 10 00 62 sethi %hi(0x40018800), %g1 4000215c: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 ! 40018914 40002160: 80 a0 60 00 cmp %g1, 0 40002164: 02 80 00 05 be 40002178 40002168: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->initialize)(); 4000216c: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40002170: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002174: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 40002178: 40 00 20 bd call 4000a46c 4000217c: a0 10 00 18 mov %i0, %l0 starting_address = start; /* * Initialize the optional sbrk support for extending the heap */ if (rtems_malloc_sbrk_helpers) { 40002180: 03 10 00 62 sethi %hi(0x40018800), %g1 40002184: c2 00 61 18 ld [ %g1 + 0x118 ], %g1 ! 40018918 40002188: 80 a0 60 00 cmp %g1, 0 4000218c: 02 80 00 06 be 400021a4 40002190: 90 10 00 18 mov %i0, %o0 starting_address = (*rtems_malloc_sbrk_helpers->initialize)( 40002194: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40002198: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000219c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 400021a0: 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() ) 400021a4: 03 10 00 63 sethi %hi(0x40018c00), %g1 400021a8: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 ! 40018d38 <_Configuration_Table> 400021ac: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 400021b0: 80 a0 60 00 cmp %g1, 0 400021b4: 02 80 00 07 be 400021d0 400021b8: 92 10 00 10 mov %l0, %o1 memset( starting_address, 0, length ); 400021bc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400021c0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400021c4: 40 00 2d 00 call 4000d5c4 <== NOT EXECUTED 400021c8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 400021cc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400021d0: 11 10 00 62 sethi %hi(0x40018800), %o0 400021d4: 94 10 00 19 mov %i1, %o2 400021d8: 90 12 22 d8 or %o0, 0x2d8, %o0 400021dc: 40 00 10 99 call 40006440 <_Heap_Initialize> 400021e0: 96 10 20 08 mov 8, %o3 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 400021e4: 80 a2 20 00 cmp %o0, 0 400021e8: 12 80 00 04 bne 400021f8 400021ec: 05 10 00 62 sethi %hi(0x40018800), %g2 rtems_fatal_error_occurred( status ); 400021f0: 40 00 0e 40 call 40005af0 <== NOT EXECUTED 400021f4: 01 00 00 00 nop <== NOT EXECUTED rtems_print_buffer( (start + length) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif MSBUMP(space_available, length); 400021f8: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 400021fc: 82 06 40 01 add %i1, %g1, %g1 40002200: c2 20 a3 30 st %g1, [ %g2 + 0x330 ] } 40002204: 81 c7 e0 08 ret 40002208: 81 e8 00 00 restore 40003d18 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 40003d18: 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 ) 40003d1c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40003d20: 02 80 00 4a be 40003e48 <== NOT EXECUTED 40003d24: 03 10 01 25 sethi %hi(0x40049400), %g1 <== NOT EXECUTED return; if ( !print_handler ) 40003d28: e8 00 62 3c ld [ %g1 + 0x23c ], %l4 ! 4004963c <== NOT EXECUTED 40003d2c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40003d30: 02 80 00 46 be 40003e48 <== NOT EXECUTED 40003d34: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 40003d38: 32 80 00 0b bne,a 40003d64 <== NOT EXECUTED 40003d3c: ec 06 21 48 ld [ %i0 + 0x148 ], %l6 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 40003d40: 03 10 01 71 sethi %hi(0x4005c400), %g1 <== NOT EXECUTED 40003d44: 96 10 62 84 or %g1, 0x284, %o3 ! 4005c684 <== NOT EXECUTED 40003d48: c2 02 e0 04 ld [ %o3 + 4 ], %g1 <== NOT EXECUTED 40003d4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003d50: 02 80 00 3e be 40003e48 <== NOT EXECUTED 40003d54: a4 10 00 0b mov %o3, %l2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; current = 0; } else return; 40003d58: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003d5c: 10 80 00 03 b 40003d68 <== NOT EXECUTED 40003d60: ac 10 20 00 clr %l6 <== NOT EXECUTED } else { stack = &the_thread->Start.Initial_stack; 40003d64: a4 06 20 c4 add %i0, 0xc4, %l2 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 40003d68: e0 04 a0 04 ld [ %l2 + 4 ], %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40003d6c: 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); 40003d70: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40003d74: a6 00 7f f0 add %g1, -16, %l3 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40003d78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003d7c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40003d80: 7f ff ff d6 call 40003cd8 <== NOT EXECUTED 40003d84: a0 04 00 13 add %l0, %l3, %l0 <== NOT EXECUTED if ( high_water_mark ) 40003d88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003d8c: 12 80 00 03 bne 40003d98 <== NOT EXECUTED 40003d90: aa 24 00 08 sub %l0, %o0, %l5 <== NOT EXECUTED 40003d94: aa 10 20 00 clr %l5 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { 40003d98: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40003d9c: 02 80 00 10 be 40003ddc <== NOT EXECUTED 40003da0: 03 10 01 25 sethi %hi(0x40049400), %g1 <== NOT EXECUTED (*print_handler)( 40003da4: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED 40003da8: e2 00 62 38 ld [ %g1 + 0x238 ], %l1 <== NOT EXECUTED 40003dac: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED 40003db0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003db4: 40 00 15 06 call 400091cc <== NOT EXECUTED 40003db8: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 40003dbc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40003dc0: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED 40003dc4: 13 10 01 07 sethi %hi(0x40041c00), %o1 <== NOT EXECUTED 40003dc8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003dcc: 9f c5 00 00 call %l4 <== NOT EXECUTED 40003dd0: 92 12 62 28 or %o1, 0x228, %o1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 40003dd4: 10 80 00 08 b 40003df4 <== NOT EXECUTED 40003dd8: d6 04 80 00 ld [ %l2 ], %o3 <== 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 ); 40003ddc: d0 00 62 38 ld [ %g1 + 0x238 ], %o0 <== NOT EXECUTED 40003de0: 13 10 01 07 sethi %hi(0x40041c00), %o1 <== NOT EXECUTED 40003de4: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 40003de8: 9f c5 00 00 call %l4 <== NOT EXECUTED 40003dec: 92 12 62 38 or %o1, 0x238, %o1 <== NOT EXECUTED } (*print_handler)( 40003df0: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED 40003df4: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED 40003df8: 21 10 01 25 sethi %hi(0x40049400), %l0 <== NOT EXECUTED 40003dfc: 23 10 01 25 sethi %hi(0x40049400), %l1 <== NOT EXECUTED 40003e00: c2 04 22 3c ld [ %l0 + 0x23c ], %g1 <== NOT EXECUTED 40003e04: d0 04 62 38 ld [ %l1 + 0x238 ], %o0 <== NOT EXECUTED 40003e08: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED 40003e0c: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED 40003e10: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED 40003e14: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED 40003e18: 13 10 01 07 sethi %hi(0x40041c00), %o1 <== NOT EXECUTED 40003e1c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003e20: 92 12 62 48 or %o1, 0x248, %o1 ! 40041e48 <__func__.4776+0x260> <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 40003e24: 03 10 01 25 sethi %hi(0x40049400), %g1 <== NOT EXECUTED 40003e28: c2 00 62 34 ld [ %g1 + 0x234 ], %g1 ! 40049634 <== NOT EXECUTED 40003e2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003e30: 12 80 00 08 bne 40003e50 <== NOT EXECUTED 40003e34: c2 04 22 3c ld [ %l0 + 0x23c ], %g1 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 40003e38: d0 04 62 38 ld [ %l1 + 0x238 ], %o0 <== NOT EXECUTED 40003e3c: 13 10 01 07 sethi %hi(0x40041c00), %o1 <== NOT EXECUTED 40003e40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003e44: 92 12 62 68 or %o1, 0x268, %o1 ! 40041e68 <__func__.4776+0x280> <== NOT EXECUTED 40003e48: 81 c7 e0 08 ret <== NOT EXECUTED 40003e4c: 81 e8 00 00 restore <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 40003e50: d0 04 62 38 ld [ %l1 + 0x238 ], %o0 <== NOT EXECUTED 40003e54: 13 10 01 07 sethi %hi(0x40041c00), %o1 <== NOT EXECUTED 40003e58: 94 10 00 15 mov %l5, %o2 <== NOT EXECUTED 40003e5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003e60: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED 40003e64: 81 c7 e0 08 ret <== NOT EXECUTED 40003e68: 81 e8 00 00 restore <== NOT EXECUTED 40003cd8 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40003cd8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40003cdc: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED if (*base != U32_PATTERN) 40003ce0: 03 29 69 69 sethi %hi(0xa5a5a400), %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++) 40003ce4: 84 02 00 09 add %o0, %o1, %g2 <== NOT EXECUTED if (*base != U32_PATTERN) 40003ce8: 10 80 00 06 b 40003d00 <== NOT EXECUTED 40003cec: 86 10 61 a5 or %g1, 0x1a5, %g3 <== NOT EXECUTED 40003cf0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40003cf4: 12 80 00 07 bne 40003d10 <== NOT EXECUTED 40003cf8: 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++) 40003cfc: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 40003d00: 80 a2 00 02 cmp %o0, %g2 <== NOT EXECUTED 40003d04: 2a bf ff fb bcs,a 40003cf0 <== NOT EXECUTED 40003d08: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40003d0c: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 40003d10: 81 c3 e0 08 retl <== NOT EXECUTED 40003d14: 01 00 00 00 nop 40003ee0 : */ void Stack_check_report_blown_task( Thread_Control *running, bool pattern_ok ) { 40003ee0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 40003ee4: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 40003ee8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40003eec: 11 10 01 07 sethi %hi(0x40041c00), %o0 <== NOT EXECUTED 40003ef0: 40 00 0a c5 call 40006a04 <== NOT EXECUTED 40003ef4: 90 12 22 e8 or %o0, 0x2e8, %o0 ! 40041ee8 <__func__.4776+0x300> <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 40003ef8: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2 <== NOT EXECUTED 40003efc: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 40003f00: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED 40003f04: 11 10 01 07 sethi %hi(0x40041c00), %o0 <== NOT EXECUTED 40003f08: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 40003f0c: 90 12 23 28 or %o0, 0x328, %o0 <== NOT EXECUTED 40003f10: 40 00 0a bd call 40006a04 <== NOT EXECUTED 40003f14: 94 02 40 0a add %o1, %o2, %o2 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 40003f18: 80 8e 60 ff btst 0xff, %i1 <== NOT EXECUTED 40003f1c: 12 80 00 07 bne 40003f38 <== NOT EXECUTED 40003f20: 11 10 01 07 sethi %hi(0x40041c00), %o0 <== NOT EXECUTED printk( 40003f24: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1 <== NOT EXECUTED 40003f28: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40003f2c: 90 12 23 58 or %o0, 0x358, %o0 <== NOT EXECUTED 40003f30: 40 00 0a b5 call 40006a04 <== NOT EXECUTED 40003f34: 94 10 20 10 mov 0x10, %o2 <== 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 ); 40003f38: 40 00 16 f9 call 40009b1c <== NOT EXECUTED 40003f3c: 90 10 20 81 mov 0x81, %o0 <== NOT EXECUTED 40003f40: 01 00 00 00 nop 40005d44 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40005d44: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40005d48: 03 10 00 63 sethi %hi(0x40018c00), %g1 40005d4c: e0 00 62 e4 ld [ %g1 + 0x2e4 ], %l0 ! 40018ee4 <_API_extensions_List> 40005d50: 82 10 62 e4 or %g1, 0x2e4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40005d54: 10 80 00 08 b 40005d74 <_API_extensions_Run_postdriver+0x30> 40005d58: a2 00 60 04 add %g1, 4, %l1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40005d5c: 80 a0 60 00 cmp %g1, 0 40005d60: 22 80 00 05 be,a 40005d74 <_API_extensions_Run_postdriver+0x30> 40005d64: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40005d68: 9f c0 40 00 call %g1 40005d6c: 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 ) { 40005d70: 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 ) ; 40005d74: 80 a4 00 11 cmp %l0, %l1 40005d78: 32 bf ff f9 bne,a 40005d5c <_API_extensions_Run_postdriver+0x18> 40005d7c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) (*the_extension->postdriver_hook)(); } } 40005d80: 81 c7 e0 08 ret 40005d84: 81 e8 00 00 restore 40005d88 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40005d88: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40005d8c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40005d90: e0 00 62 e4 ld [ %g1 + 0x2e4 ], %l0 ! 40018ee4 <_API_extensions_List> 40005d94: 82 10 62 e4 or %g1, 0x2e4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40005d98: a4 00 60 04 add %g1, 4, %l2 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); 40005d9c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40005da0: 10 80 00 08 b 40005dc0 <_API_extensions_Run_postswitch+0x38> 40005da4: a2 10 61 60 or %g1, 0x160, %l1 ! 40018d60 <_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 ) 40005da8: 80 a0 60 00 cmp %g1, 0 40005dac: 22 80 00 05 be,a 40005dc0 <_API_extensions_Run_postswitch+0x38> 40005db0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40005db4: 9f c0 40 00 call %g1 40005db8: d0 04 40 00 ld [ %l1 ], %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 ) { 40005dbc: 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 ) ; 40005dc0: 80 a4 00 12 cmp %l0, %l2 40005dc4: 32 bf ff f9 bne,a 40005da8 <_API_extensions_Run_postswitch+0x20> 40005dc8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) (*the_extension->postswitch_hook)( _Thread_Executing ); } } 40005dcc: 81 c7 e0 08 ret 40005dd0: 81 e8 00 00 restore 40005d00 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40005d00: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40005d04: 03 10 00 63 sethi %hi(0x40018c00), %g1 40005d08: e0 00 62 e4 ld [ %g1 + 0x2e4 ], %l0 ! 40018ee4 <_API_extensions_List> 40005d0c: 82 10 62 e4 or %g1, 0x2e4, %g1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40005d10: 10 80 00 08 b 40005d30 <_API_extensions_Run_predriver+0x30> 40005d14: a2 00 60 04 add %g1, 4, %l1 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 40005d18: 80 a0 60 00 cmp %g1, 0 40005d1c: 22 80 00 05 be,a 40005d30 <_API_extensions_Run_predriver+0x30> 40005d20: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40005d24: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005d28: 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 ) { 40005d2c: 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 ) ; 40005d30: 80 a4 00 11 cmp %l0, %l1 40005d34: 32 bf ff f9 bne,a 40005d18 <_API_extensions_Run_predriver+0x18> 40005d38: c2 04 20 08 ld [ %l0 + 8 ], %g1 the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) (*the_extension->predriver_hook)(); } } 40005d3c: 81 c7 e0 08 ret 40005d40: 81 e8 00 00 restore 400080b8 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 400080b8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 400080bc: 03 10 00 6e sethi %hi(0x4001b800), %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 ); 400080c0: 7f ff eb 32 call 40002d88 400080c4: e0 00 60 00 ld [ %g1 ], %l0 400080c8: 84 10 00 08 mov %o0, %g2 if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 400080cc: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 400080d0: 80 a0 60 00 cmp %g1, 0 400080d4: 12 80 00 08 bne 400080f4 <_CORE_RWLock_Release+0x3c> 400080d8: 80 a0 60 01 cmp %g1, 1 _ISR_Enable( level ); 400080dc: 7f ff eb 2f call 40002d98 <== NOT EXECUTED 400080e0: b0 10 20 00 clr %i0 <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 400080e4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 400080e8: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED 400080ec: 81 c7 e0 08 ret <== NOT EXECUTED 400080f0: 81 e8 00 00 restore <== NOT EXECUTED return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 400080f4: 32 80 00 0b bne,a 40008120 <_CORE_RWLock_Release+0x68> 400080f8: c0 24 20 34 clr [ %l0 + 0x34 ] the_rwlock->number_of_readers -= 1; 400080fc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40008100: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 40008104: 80 a0 60 00 cmp %g1, 0 40008108: 02 80 00 05 be 4000811c <_CORE_RWLock_Release+0x64> 4000810c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* must be unlocked again */ _ISR_Enable( level ); 40008110: 7f ff eb 22 call 40002d98 40008114: b0 10 20 00 clr %i0 40008118: 30 80 00 25 b,a 400081ac <_CORE_RWLock_Release+0xf4> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4000811c: 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; 40008120: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 40008124: 7f ff eb 1d call 40002d98 40008128: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 4000812c: 40 00 05 d2 call 40009874 <_Thread_queue_Dequeue> 40008130: 90 10 00 18 mov %i0, %o0 if ( next ) { 40008134: 80 a2 20 00 cmp %o0, 0 40008138: 22 80 00 1d be,a 400081ac <_CORE_RWLock_Release+0xf4> 4000813c: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 40008140: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 40008144: 80 a0 60 01 cmp %g1, 1 40008148: 32 80 00 05 bne,a 4000815c <_CORE_RWLock_Release+0xa4> 4000814c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 40008150: 82 10 20 02 mov 2, %g1 40008154: 10 80 00 15 b 400081a8 <_CORE_RWLock_Release+0xf0> 40008158: c2 26 20 44 st %g1, [ %i0 + 0x44 ] /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 4000815c: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 40008160: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 40008164: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 40008168: 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 ); 4000816c: 40 00 07 19 call 40009dd0 <_Thread_queue_First> 40008170: 90 10 00 18 mov %i0, %o0 if ( !next || 40008174: 80 a2 20 00 cmp %o0, 0 40008178: 22 80 00 0d be,a 400081ac <_CORE_RWLock_Release+0xf4> 4000817c: b0 10 20 00 clr %i0 40008180: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 40008184: 80 a0 60 01 cmp %g1, 1 40008188: 02 80 00 08 be 400081a8 <_CORE_RWLock_Release+0xf0> 4000818c: 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; 40008190: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 40008194: 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; 40008198: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4000819c: 40 00 06 be call 40009c94 <_Thread_queue_Extract> 400081a0: c2 26 20 48 st %g1, [ %i0 + 0x48 ] 400081a4: 30 bf ff f2 b,a 4000816c <_CORE_RWLock_Release+0xb4> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 400081a8: b0 10 20 00 clr %i0 400081ac: 81 c7 e0 08 ret 400081b0: 81 e8 00 00 restore 4001252c <_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 ) { 4001252c: 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 ) { 40012530: 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 ) { 40012534: 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 ) { 40012538: 80 a6 80 01 cmp %i2, %g1 4001253c: 18 80 00 17 bgu 40012598 <_CORE_message_queue_Broadcast+0x6c> 40012540: 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 ) { 40012544: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 40012548: 80 a0 60 00 cmp %g1, 0 4001254c: 02 80 00 0a be 40012574 <_CORE_message_queue_Broadcast+0x48> 40012550: a2 10 20 00 clr %l1 *count = 0; 40012554: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 40012558: 81 c7 e0 08 ret <== NOT EXECUTED 4001255c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40012560: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40012564: 40 00 21 83 call 4001ab70 40012568: a2 04 60 01 inc %l1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 4001256c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 40012570: 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))) { 40012574: 40 00 09 a0 call 40014bf4 <_Thread_queue_Dequeue> 40012578: 90 10 00 12 mov %l2, %o0 4001257c: 92 10 00 19 mov %i1, %o1 40012580: a0 10 00 08 mov %o0, %l0 40012584: 80 a2 20 00 cmp %o0, 0 40012588: 12 bf ff f6 bne 40012560 <_CORE_message_queue_Broadcast+0x34> 4001258c: 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; 40012590: e2 27 40 00 st %l1, [ %i5 ] 40012594: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 40012598: 81 c7 e0 08 ret 4001259c: 81 e8 00 00 restore 400122fc <_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 ) { 400122fc: 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 ) { 40012300: 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 ) { 40012304: 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 ) { 40012308: 80 a6 80 01 cmp %i2, %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 ) { 4001230c: 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 ) { 40012310: 18 80 00 3f bgu 4001240c <_CORE_message_queue_Submit+0x110> 40012314: 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 ) { 40012318: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4001231c: 80 a0 60 00 cmp %g1, 0 40012320: 32 80 00 0f bne,a 4001235c <_CORE_message_queue_Submit+0x60> 40012324: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 40012328: 7f ff e8 c7 call 4000c644 <_Thread_queue_Dequeue> 4001232c: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40012330: a0 92 20 00 orcc %o0, 0, %l0 40012334: 02 80 00 09 be 40012358 <_CORE_message_queue_Submit+0x5c> 40012338: 92 10 00 19 mov %i1, %o1 4001233c: d0 04 20 2c ld [ %l0 + 0x2c ], %o0 40012340: 40 00 13 f1 call 40017304 40012344: 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; 40012348: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 the_thread->Wait.count = submit_type; 4001234c: 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; 40012350: 10 80 00 15 b 400123a4 <_CORE_message_queue_Submit+0xa8> 40012354: f4 20 40 00 st %i2, [ %g1 ] /* * 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 < 40012358: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 4001235c: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40012360: 80 a0 80 01 cmp %g2, %g1 40012364: 1a 80 00 12 bcc 400123ac <_CORE_message_queue_Submit+0xb0> 40012368: 80 a4 a0 00 cmp %l2, 0 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 *) 4001236c: 7f ff e1 ed call 4000ab20 <_Chain_Get> 40012370: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40012374: a0 92 20 00 orcc %o0, 0, %l0 40012378: 02 80 00 27 be 40012414 <_CORE_message_queue_Submit+0x118> 4001237c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40012380: 94 10 00 1a mov %i2, %o2 40012384: 40 00 13 e0 call 40017304 40012388: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 4001238c: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40012390: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40012394: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40012398: 92 10 00 10 mov %l0, %o1 4001239c: 40 00 0c 13 call 400153e8 <_CORE_message_queue_Insert_message> 400123a0: 94 10 00 1d mov %i5, %o2 400123a4: 81 c7 e0 08 ret 400123a8: 91 e8 20 00 restore %g0, 0, %o0 * 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 ) { 400123ac: 02 80 00 18 be 4001240c <_CORE_message_queue_Submit+0x110> 400123b0: 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() ) { 400123b4: 03 10 00 9f sethi %hi(0x40027c00), %g1 400123b8: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 40027dac <_ISR_Nest_level> 400123bc: 80 a0 60 00 cmp %g1, 0 400123c0: 32 80 00 13 bne,a 4001240c <_CORE_message_queue_Submit+0x110> 400123c4: 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; 400123c8: 03 10 00 9f sethi %hi(0x40027c00), %g1 _ISR_Disable( level ); 400123cc: 7f ff c0 37 call 400024a8 400123d0: e0 00 61 d0 ld [ %g1 + 0x1d0 ], %l0 ! 40027dd0 <_Thread_Executing> 400123d4: 82 10 20 01 mov 1, %g1 400123d8: 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; 400123dc: 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; 400123e0: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument_second.immutable_object = buffer; 400123e4: f2 24 20 2c st %i1, [ %l0 + 0x2c ] executing->Wait.option = (uint32_t) size; 400123e8: 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; 400123ec: 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 ); 400123f0: 7f ff c0 32 call 400024b8 400123f4: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 400123f8: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 400123fc: 90 10 00 11 mov %l1, %o0 40012400: 15 10 00 32 sethi %hi(0x4000c800), %o2 40012404: 7f ff e8 f5 call 4000c7d8 <_Thread_queue_Enqueue_with_handler> 40012408: 94 12 a3 a4 or %o2, 0x3a4, %o2 ! 4000cba4 <_Thread_queue_Timeout> 4001240c: 81 c7 e0 08 ret 40012410: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 40012414: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED } 40012418: 81 c7 e0 08 ret <== NOT EXECUTED 4001241c: 81 e8 00 00 restore <== NOT EXECUTED 4000b4d8 <_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 ) { 4000b4d8: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000b4dc: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000b4e0: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 40018d60 <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000b4e4: d0 06 40 00 ld [ %i1 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000b4e8: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000b4ec: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000b4f0: 80 a0 60 00 cmp %g1, 0 4000b4f4: 22 80 00 32 be,a 4000b5bc <_CORE_mutex_Seize_interrupt_trylock+0xe4> 4000b4f8: c6 06 20 5c ld [ %i0 + 0x5c ], %g3 the_mutex->lock = CORE_MUTEX_LOCKED; 4000b4fc: c0 26 20 50 clr [ %i0 + 0x50 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000b500: c2 00 a0 08 ld [ %g2 + 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; 4000b504: c6 06 20 48 ld [ %i0 + 0x48 ], %g3 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; 4000b508: 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; 4000b50c: c4 26 20 5c st %g2, [ %i0 + 0x5c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000b510: 82 10 20 01 mov 1, %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000b514: 80 a0 e0 02 cmp %g3, 2 4000b518: 02 80 00 05 be 4000b52c <_CORE_mutex_Seize_interrupt_trylock+0x54> 4000b51c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] 4000b520: 80 a0 e0 03 cmp %g3, 3 4000b524: 32 80 00 06 bne,a 4000b53c <_CORE_mutex_Seize_interrupt_trylock+0x64> 4000b528: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 4000b52c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000b530: 82 00 60 01 inc %g1 4000b534: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000b538: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000b53c: 80 a0 60 03 cmp %g1, 3 4000b540: 22 80 00 03 be,a 4000b54c <_CORE_mutex_Seize_interrupt_trylock+0x74> 4000b544: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 _ISR_Enable( level ); 4000b548: 30 80 00 2c b,a 4000b5f8 <_CORE_mutex_Seize_interrupt_trylock+0x120> { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 4000b54c: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 if ( current == ceiling ) { 4000b550: 80 a0 40 03 cmp %g1, %g3 4000b554: 12 80 00 03 bne 4000b560 <_CORE_mutex_Seize_interrupt_trylock+0x88> 4000b558: 01 00 00 00 nop _ISR_Enable( level ); 4000b55c: 30 80 00 27 b,a 4000b5f8 <_CORE_mutex_Seize_interrupt_trylock+0x120> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 4000b560: 08 80 00 0f bleu 4000b59c <_CORE_mutex_Seize_interrupt_trylock+0xc4> 4000b564: 82 10 20 06 mov 6, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b568: 05 10 00 63 sethi %hi(0x40018c00), %g2 4000b56c: c2 00 a0 a0 ld [ %g2 + 0xa0 ], %g1 ! 40018ca0 <_Thread_Dispatch_disable_level> 4000b570: 82 00 60 01 inc %g1 4000b574: c2 20 a0 a0 st %g1, [ %g2 + 0xa0 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000b578: 7f ff d9 dd call 40001cec 4000b57c: 01 00 00 00 nop _Thread_Change_priority( 4000b580: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 4000b584: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 4000b588: 7f ff ee a1 call 4000700c <_Thread_Change_priority> 4000b58c: 94 10 20 00 clr %o2 the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 4000b590: 7f ff f0 12 call 400075d8 <_Thread_Enable_dispatch> 4000b594: b0 10 20 00 clr %i0 4000b598: 30 80 00 1a b,a 4000b600 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000b59c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000b5a0: 82 10 20 01 mov 1, %g1 the_mutex->nest_count = 0; /* undo locking above */ 4000b5a4: 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; 4000b5a8: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 4000b5ac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 4000b5b0: 82 00 7f ff add %g1, -1, %g1 4000b5b4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 4000b5b8: 30 80 00 10 b,a 4000b5f8 <_CORE_mutex_Seize_interrupt_trylock+0x120> /* * 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 ) ) { 4000b5bc: 80 a0 c0 02 cmp %g3, %g2 4000b5c0: 12 80 00 12 bne 4000b608 <_CORE_mutex_Seize_interrupt_trylock+0x130> 4000b5c4: 01 00 00 00 nop switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000b5c8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000b5cc: 80 a0 60 00 cmp %g1, 0 4000b5d0: 22 80 00 07 be,a 4000b5ec <_CORE_mutex_Seize_interrupt_trylock+0x114> 4000b5d4: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 4000b5d8: 80 a0 60 01 cmp %g1, 1 4000b5dc: 12 80 00 0b bne 4000b608 <_CORE_mutex_Seize_interrupt_trylock+0x130> 4000b5e0: 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; 4000b5e4: 10 80 00 05 b 4000b5f8 <_CORE_mutex_Seize_interrupt_trylock+0x120> 4000b5e8: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] * 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++; 4000b5ec: 82 00 60 01 inc %g1 4000b5f0: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( level ); 4000b5f4: 30 80 00 01 b,a 4000b5f8 <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( level ); 4000b5f8: 7f ff d9 bd call 40001cec 4000b5fc: b0 10 20 00 clr %i0 4000b600: 81 c7 e0 08 ret 4000b604: 81 e8 00 00 restore return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 4000b608: 81 c7 e0 08 ret 4000b60c: 91 e8 20 01 restore %g0, 1, %o0 40006100 <_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 ) { 40006100: 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 ) { 40006104: 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 ) { 40006108: 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 ) { 4000610c: 80 a0 60 00 cmp %g1, 0 40006110: 02 80 00 07 be 4000612c <_CORE_mutex_Surrender+0x2c> 40006114: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 40006118: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000611c: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 40018d60 <_Thread_Executing> 40006120: 80 a2 00 01 cmp %o0, %g1 40006124: 12 80 00 52 bne 4000626c <_CORE_mutex_Surrender+0x16c> 40006128: 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 ) 4000612c: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40006130: 80 a0 60 00 cmp %g1, 0 40006134: 02 80 00 4d be 40006268 <_CORE_mutex_Surrender+0x168> 40006138: 82 00 7f ff add %g1, -1, %g1 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { 4000613c: 80 a0 60 00 cmp %g1, 0 40006140: 02 80 00 09 be 40006164 <_CORE_mutex_Surrender+0x64> 40006144: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40006148: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4000614c: 80 a0 60 00 cmp %g1, 0 40006150: 02 80 00 47 be 4000626c <_CORE_mutex_Surrender+0x16c> 40006154: b0 10 20 00 clr %i0 40006158: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000615c: 02 80 00 44 be 4000626c <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED 40006160: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 40006164: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40006168: 80 a0 60 02 cmp %g1, 2 4000616c: 02 80 00 04 be 4000617c <_CORE_mutex_Surrender+0x7c> 40006170: 80 a0 60 03 cmp %g1, 3 40006174: 32 80 00 07 bne,a 40006190 <_CORE_mutex_Surrender+0x90> 40006178: c0 24 20 5c clr [ %l0 + 0x5c ] the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 4000617c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40006180: 82 00 7f ff add %g1, -1, %g1 40006184: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 40006188: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } the_mutex->holder = NULL; 4000618c: 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 ) || 40006190: 80 a0 60 02 cmp %g1, 2 40006194: 02 80 00 05 be 400061a8 <_CORE_mutex_Surrender+0xa8> 40006198: c0 24 20 60 clr [ %l0 + 0x60 ] 4000619c: 80 a0 60 03 cmp %g1, 3 400061a0: 12 80 00 0d bne 400061d4 <_CORE_mutex_Surrender+0xd4> 400061a4: 01 00 00 00 nop _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 400061a8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400061ac: 80 a0 60 00 cmp %g1, 0 400061b0: 12 80 00 09 bne 400061d4 <_CORE_mutex_Surrender+0xd4> 400061b4: 01 00 00 00 nop 400061b8: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 400061bc: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 400061c0: 80 a2 40 01 cmp %o1, %g1 400061c4: 02 80 00 04 be 400061d4 <_CORE_mutex_Surrender+0xd4> 400061c8: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 400061cc: 40 00 03 90 call 4000700c <_Thread_Change_priority> 400061d0: 94 10 20 01 mov 1, %o2 ! 1 /* * 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 ) ) ) { 400061d4: 40 00 05 dc call 40007944 <_Thread_queue_Dequeue> 400061d8: 90 10 00 10 mov %l0, %o0 400061dc: 86 92 20 00 orcc %o0, 0, %g3 400061e0: 02 80 00 1f be 4000625c <_CORE_mutex_Surrender+0x15c> 400061e4: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400061e8: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 400061ec: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400061f0: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 400061f4: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 400061f8: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 400061fc: 80 a0 a0 02 cmp %g2, 2 40006200: 02 80 00 07 be 4000621c <_CORE_mutex_Surrender+0x11c> 40006204: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 40006208: 80 a0 a0 03 cmp %g2, 3 4000620c: 12 80 00 18 bne 4000626c <_CORE_mutex_Surrender+0x16c> 40006210: b0 10 20 00 clr %i0 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++; 40006214: 10 80 00 07 b 40006230 <_CORE_mutex_Surrender+0x130> 40006218: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 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++; 4000621c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40006220: 82 00 60 01 inc %g1 40006224: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 40006228: 81 c7 e0 08 ret 4000622c: 91 e8 20 00 restore %g0, 0, %o0 #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 < 40006230: 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++; 40006234: 82 00 60 01 inc %g1 40006238: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 4000623c: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 40006240: 80 a2 40 02 cmp %o1, %g2 40006244: 3a 80 00 0a bcc,a 4000626c <_CORE_mutex_Surrender+0x16c> 40006248: b0 10 20 00 clr %i0 <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 4000624c: 40 00 03 70 call 4000700c <_Thread_Change_priority> 40006250: 94 10 20 00 clr %o2 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40006254: 81 c7 e0 08 ret 40006258: 91 e8 20 00 restore %g0, 0, %o0 4000625c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 40006260: 81 c7 e0 08 ret 40006264: 91 e8 20 00 restore %g0, 0, %o0 40006268: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 4000626c: 81 c7 e0 08 ret 40006270: 81 e8 00 00 restore 40006cb0 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 40006cb0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 40006cb4: 7f ff ed e2 call 4000243c 40006cb8: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40006cbc: c2 06 20 04 ld [ %i0 + 4 ], %g1 40006cc0: 80 a0 60 00 cmp %g1, 0 40006cc4: 12 80 00 06 bne 40006cdc <_CORE_spinlock_Release+0x2c> 40006cc8: 03 10 00 4c sethi %hi(0x40013000), %g1 _ISR_Enable( level ); 40006ccc: 7f ff ed e0 call 4000244c 40006cd0: b0 10 20 06 mov 6, %i0 40006cd4: 81 c7 e0 08 ret 40006cd8: 81 e8 00 00 restore } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 40006cdc: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 40006ce0: c4 06 20 0c ld [ %i0 + 0xc ], %g2 40006ce4: c2 00 60 08 ld [ %g1 + 8 ], %g1 40006ce8: 80 a0 80 01 cmp %g2, %g1 40006cec: 02 80 00 06 be 40006d04 <_CORE_spinlock_Release+0x54> 40006cf0: 01 00 00 00 nop _ISR_Enable( level ); 40006cf4: 7f ff ed d6 call 4000244c <== NOT EXECUTED 40006cf8: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 40006cfc: 81 c7 e0 08 ret <== NOT EXECUTED 40006d00: 81 e8 00 00 restore <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40006d04: c2 06 20 08 ld [ %i0 + 8 ], %g1 40006d08: 82 00 7f ff add %g1, -1, %g1 40006d0c: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40006d10: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40006d14: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40006d18: 7f ff ed cd call 4000244c 40006d1c: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40006d20: 81 c7 e0 08 ret 40006d24: 81 e8 00 00 restore 40006d28 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, bool wait, Watchdog_Interval timeout ) { 40006d28: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 40006d2c: 03 10 00 4c sethi %hi(0x40013000), %g1 40006d30: c2 00 63 54 ld [ %g1 + 0x354 ], %g1 ! 40013354 <_Watchdog_Ticks_since_boot> _ISR_Disable( level ); 40006d34: 7f ff ed c2 call 4000243c 40006d38: a2 06 80 01 add %i2, %g1, %l1 40006d3c: 86 10 00 08 mov %o0, %g3 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40006d40: c2 06 20 04 ld [ %i0 + 4 ], %g1 40006d44: 80 a0 60 01 cmp %g1, 1 40006d48: 12 80 00 0c bne 40006d78 <_CORE_spinlock_Wait+0x50> 40006d4c: 03 10 00 4c sethi %hi(0x40013000), %g1 40006d50: c2 00 62 c0 ld [ %g1 + 0x2c0 ], %g1 ! 400132c0 <_Thread_Executing> 40006d54: c4 06 20 0c ld [ %i0 + 0xc ], %g2 40006d58: c2 00 60 08 ld [ %g1 + 8 ], %g1 40006d5c: 80 a0 80 01 cmp %g2, %g1 40006d60: 12 80 00 06 bne 40006d78 <_CORE_spinlock_Wait+0x50> 40006d64: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40006d68: 7f ff ed b9 call 4000244c 40006d6c: b0 10 20 01 mov 1, %i0 ! 1 40006d70: 81 c7 e0 08 ret 40006d74: 81 e8 00 00 restore return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40006d78: c2 06 20 08 ld [ %i0 + 8 ], %g1 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40006d7c: b2 0e 60 ff and %i1, 0xff, %i1 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40006d80: 82 00 60 01 inc %g1 40006d84: c2 26 20 08 st %g1, [ %i0 + 8 ] } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 40006d88: 03 10 00 4c sethi %hi(0x40013000), %g1 40006d8c: a4 10 63 54 or %g1, 0x354, %l2 ! 40013354 <_Watchdog_Ticks_since_boot> 40006d90: 03 10 00 4c sethi %hi(0x40013000), %g1 40006d94: a0 10 62 00 or %g1, 0x200, %l0 ! 40013200 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40006d98: c2 06 20 04 ld [ %i0 + 4 ], %g1 40006d9c: 80 a0 60 00 cmp %g1, 0 40006da0: 12 80 00 0d bne 40006dd4 <_CORE_spinlock_Wait+0xac> 40006da4: 80 a6 60 00 cmp %i1, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 40006da8: 03 10 00 4c sethi %hi(0x40013000), %g1 40006dac: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 400132c0 <_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; 40006db0: 82 10 20 01 mov 1, %g1 40006db4: c2 26 20 04 st %g1, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 40006db8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40006dbc: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 40006dc0: b0 10 20 00 clr %i0 40006dc4: 7f ff ed a2 call 4000244c 40006dc8: 90 10 00 03 mov %g3, %o0 40006dcc: 81 c7 e0 08 ret 40006dd0: 81 e8 00 00 restore } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40006dd4: 12 80 00 0a bne 40006dfc <_CORE_spinlock_Wait+0xd4> 40006dd8: 80 a6 a0 00 cmp %i2, 0 the_spinlock->users -= 1; 40006ddc: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40006de0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006de4: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40006de8: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 40006dec: 7f ff ed 98 call 4000244c <== NOT EXECUTED 40006df0: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 40006df4: 81 c7 e0 08 ret <== NOT EXECUTED 40006df8: 81 e8 00 00 restore <== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 40006dfc: 02 80 00 0e be 40006e34 <_CORE_spinlock_Wait+0x10c> 40006e00: 01 00 00 00 nop 40006e04: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED 40006e08: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 40006e0c: 18 80 00 0a bgu 40006e34 <_CORE_spinlock_Wait+0x10c> <== NOT EXECUTED 40006e10: 01 00 00 00 nop <== NOT EXECUTED the_spinlock->users -= 1; 40006e14: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40006e18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006e1c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40006e20: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40006e24: 7f ff ed 8a call 4000244c <== NOT EXECUTED 40006e28: 90 10 00 03 mov %g3, %o0 <== NOT EXECUTED 40006e2c: 81 c7 e0 08 ret <== NOT EXECUTED 40006e30: 81 e8 00 00 restore <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 40006e34: 7f ff ed 86 call 4000244c 40006e38: 90 10 00 03 mov %g3, %o0 /* An ISR could occur here */ _Thread_Enable_dispatch(); 40006e3c: 40 00 04 8c call 4000806c <_Thread_Enable_dispatch> 40006e40: 01 00 00 00 nop 40006e44: c2 04 00 00 ld [ %l0 ], %g1 40006e48: 82 00 60 01 inc %g1 40006e4c: c2 24 00 00 st %g1, [ %l0 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40006e50: 7f ff ed 7b call 4000243c 40006e54: 01 00 00 00 nop 40006e58: 86 10 00 08 mov %o0, %g3 40006e5c: 30 bf ff cf b,a 40006d98 <_CORE_spinlock_Wait+0x70> 40022a58 <_Chain_Insert>: void _Chain_Insert( Chain_Node *after_node, Chain_Node *node ) { 40022a58: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); 40022a5c: 7f ff 84 8b call 40003c88 <== NOT EXECUTED 40022a60: 01 00 00 00 nop <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 40022a64: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40022a68: f0 26 60 04 st %i0, [ %i1 + 4 ] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 40022a6c: f2 26 00 00 st %i1, [ %i0 ] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 40022a70: 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; 40022a74: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 40022a78: 7f ff 84 88 call 40003c98 <== NOT EXECUTED 40022a7c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40022a80: 01 00 00 00 nop 4000b3cc <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 4000b3cc: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED 4000b3d0: c2 00 61 64 ld [ %g1 + 0x164 ], %g1 ! 40018d64 <_Debug_Level> <== NOT EXECUTED 4000b3d4: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED 4000b3d8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 4000b3dc: 81 c3 e0 08 retl <== NOT EXECUTED 4000b3e0: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 40004f08 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40004f08: 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 ]; 40004f0c: e0 06 21 5c ld [ %i0 + 0x15c ], %l0 option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 40004f10: 7f ff f3 73 call 40001cdc 40004f14: e2 06 20 30 ld [ %i0 + 0x30 ], %l1 40004f18: b2 10 00 08 mov %o0, %i1 pending_events = api->pending_events; 40004f1c: c8 04 00 00 ld [ %l0 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 40004f20: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 40004f24: 86 88 80 04 andcc %g2, %g4, %g3 40004f28: 12 80 00 03 bne 40004f34 <_Event_Surrender+0x2c> 40004f2c: 03 10 00 63 sethi %hi(0x40018c00), %g1 _ISR_Enable( level ); 40004f30: 30 80 00 42 b,a 40005038 <_Event_Surrender+0x130> /* * 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() && 40004f34: c2 00 61 3c ld [ %g1 + 0x13c ], %g1 ! 40018d3c <_ISR_Nest_level> 40004f38: 80 a0 60 00 cmp %g1, 0 40004f3c: 22 80 00 1e be,a 40004fb4 <_Event_Surrender+0xac> 40004f40: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40004f44: 03 10 00 63 sethi %hi(0x40018c00), %g1 40004f48: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 40018d60 <_Thread_Executing> 40004f4c: 80 a6 00 01 cmp %i0, %g1 40004f50: 32 80 00 19 bne,a 40004fb4 <_Event_Surrender+0xac> 40004f54: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40004f58: 1b 10 00 65 sethi %hi(0x40019400), %o5 40004f5c: c2 03 61 c0 ld [ %o5 + 0x1c0 ], %g1 ! 400195c0 <_Event_Sync_state> 40004f60: 80 a0 60 01 cmp %g1, 1 40004f64: 02 80 00 07 be 40004f80 <_Event_Surrender+0x78> 40004f68: 80 a0 c0 02 cmp %g3, %g2 40004f6c: c2 03 61 c0 ld [ %o5 + 0x1c0 ], %g1 40004f70: 80 a0 60 02 cmp %g1, 2 40004f74: 32 80 00 10 bne,a 40004fb4 <_Event_Surrender+0xac> 40004f78: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 40004f7c: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40004f80: 02 80 00 04 be 40004f90 <_Event_Surrender+0x88> 40004f84: 80 8c 60 02 btst 2, %l1 40004f88: 02 80 00 0a be 40004fb0 <_Event_Surrender+0xa8> <== NOT EXECUTED 40004f8c: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 40004f90: 82 29 00 03 andn %g4, %g3, %g1 40004f94: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40004f98: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 40004f9c: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40004fa0: c6 20 40 00 st %g3, [ %g1 ] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 40004fa4: 84 10 20 03 mov 3, %g2 40004fa8: 03 10 00 65 sethi %hi(0x40019400), %g1 40004fac: c4 20 61 c0 st %g2, [ %g1 + 0x1c0 ] ! 400195c0 <_Event_Sync_state> } _ISR_Enable( level ); 40004fb0: 30 80 00 22 b,a 40005038 <_Event_Surrender+0x130> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 40004fb4: 80 88 61 00 btst 0x100, %g1 40004fb8: 02 80 00 20 be 40005038 <_Event_Surrender+0x130> 40004fbc: 80 a0 c0 02 cmp %g3, %g2 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 40004fc0: 02 80 00 04 be 40004fd0 <_Event_Surrender+0xc8> 40004fc4: 80 8c 60 02 btst 2, %l1 40004fc8: 02 80 00 1c be 40005038 <_Event_Surrender+0x130> 40004fcc: 01 00 00 00 nop api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 40004fd0: 82 29 00 03 andn %g4, %g3, %g1 40004fd4: c2 24 00 00 st %g1, [ %l0 ] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40004fd8: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 * 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 ); the_thread->Wait.count = 0; 40004fdc: c0 26 20 24 clr [ %i0 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 40004fe0: c6 20 40 00 st %g3, [ %g1 ] _ISR_Flash( level ); 40004fe4: 7f ff f3 42 call 40001cec 40004fe8: 90 10 00 19 mov %i1, %o0 40004fec: 7f ff f3 3c call 40001cdc 40004ff0: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40004ff4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 40004ff8: 80 a0 60 02 cmp %g1, 2 40004ffc: 02 80 00 06 be 40005014 <_Event_Surrender+0x10c> 40005000: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40005004: 7f ff f3 3a call 40001cec 40005008: 90 10 00 19 mov %i1, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000500c: 10 80 00 08 b 4000502c <_Event_Surrender+0x124> 40005010: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40005014: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 40005018: 7f ff f3 35 call 40001cec 4000501c: 90 10 00 19 mov %i1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40005020: 40 00 0e 21 call 400088a4 <_Watchdog_Remove> 40005024: 90 06 20 48 add %i0, 0x48, %o0 40005028: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000502c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40005030: 40 00 08 6f call 400071ec <_Thread_Clear_state> 40005034: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 40005038: 7f ff f3 2d call 40001cec 4000503c: 91 e8 00 19 restore %g0, %i1, %o0 40005040: 01 00 00 00 nop 40005044 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 40005044: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 40005048: 90 10 00 18 mov %i0, %o0 4000504c: 40 00 09 70 call 4000760c <_Thread_Get> 40005050: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 40005054: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005058: 80 a0 60 00 cmp %g1, 0 4000505c: 12 80 00 0f bne 40005098 <_Event_Timeout+0x54> 40005060: 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 ); 40005064: 7f ff f3 1e call 40001cdc 40005068: 01 00 00 00 nop 4000506c: 86 10 00 08 mov %o0, %g3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 40005070: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40005074: 80 a0 60 00 cmp %g1, 0 40005078: 12 80 00 0a bne 400050a0 <_Event_Timeout+0x5c> 4000507c: 03 10 00 63 sethi %hi(0x40018c00), %g1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40005080: 05 10 00 63 sethi %hi(0x40018c00), %g2 <== NOT EXECUTED 40005084: c2 00 a0 a0 ld [ %g2 + 0xa0 ], %g1 ! 40018ca0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40005088: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000508c: c2 20 a0 a0 st %g1, [ %g2 + 0xa0 ] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 40005090: 7f ff f3 17 call 40001cec <== NOT EXECUTED 40005094: 01 00 00 00 nop <== NOT EXECUTED 40005098: 81 c7 e0 08 ret <== NOT EXECUTED 4000509c: 81 e8 00 00 restore <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 400050a0: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 400050a4: 80 a6 00 01 cmp %i0, %g1 400050a8: 12 80 00 09 bne 400050cc <_Event_Timeout+0x88> 400050ac: c0 26 20 24 clr [ %i0 + 0x24 ] Thread_blocking_operation_States sync = _Event_Sync_state; 400050b0: 05 10 00 65 sethi %hi(0x40019400), %g2 400050b4: c2 00 a1 c0 ld [ %g2 + 0x1c0 ], %g1 ! 400195c0 <_Event_Sync_state> if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 400050b8: 80 a0 60 01 cmp %g1, 1 400050bc: 18 80 00 05 bgu 400050d0 <_Event_Timeout+0x8c> 400050c0: 82 10 20 06 mov 6, %g1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 400050c4: 82 10 20 02 mov 2, %g1 400050c8: c2 20 a1 c0 st %g1, [ %g2 + 0x1c0 ] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 400050cc: 82 10 20 06 mov 6, %g1 400050d0: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 400050d4: 7f ff f3 06 call 40001cec 400050d8: 90 10 00 03 mov %g3, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400050dc: 90 10 00 18 mov %i0, %o0 400050e0: 13 04 00 ff sethi %hi(0x1003fc00), %o1 400050e4: 40 00 08 42 call 400071ec <_Thread_Clear_state> 400050e8: 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; 400050ec: 05 10 00 63 sethi %hi(0x40018c00), %g2 400050f0: c2 00 a0 a0 ld [ %g2 + 0xa0 ], %g1 ! 40018ca0 <_Thread_Dispatch_disable_level> 400050f4: 82 00 7f ff add %g1, -1, %g1 400050f8: c2 20 a0 a0 st %g1, [ %g2 + 0xa0 ] 400050fc: 81 c7 e0 08 ret 40005100: 81 e8 00 00 restore 400092a8 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 400092a8: 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; 400092ac: e8 06 20 10 ld [ %i0 + 0x10 ], %l4 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); 400092b0: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 400092b4: 90 10 00 19 mov %i1, %o0 400092b8: 40 00 01 5d call 4000982c <_Heap_Calc_block_size> 400092bc: 92 10 00 14 mov %l4, %o1 void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 400092c0: b2 06 7f fc add %i1, -4, %i1 uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); if(the_size == 0) 400092c4: ba 92 20 00 orcc %o0, 0, %i5 400092c8: 02 80 00 67 be 40009464 <_Heap_Allocate_aligned+0x1bc> 400092cc: 90 10 20 00 clr %o0 return NULL; if(alignment == 0) 400092d0: 80 a6 a0 00 cmp %i2, 0 400092d4: 22 80 00 02 be,a 400092dc <_Heap_Allocate_aligned+0x34> 400092d8: b4 10 20 08 mov 8, %i2 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 400092dc: e2 06 20 08 ld [ %i0 + 8 ], %l1 400092e0: 10 80 00 59 b 40009444 <_Heap_Allocate_aligned+0x19c> 400092e4: aa 10 20 00 clr %l5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 400092e8: a6 08 7f fe and %g1, -2, %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. */ 400092ec: 80 a4 c0 1d cmp %l3, %i5 400092f0: 2a 80 00 54 bcs,a 40009440 <_Heap_Allocate_aligned+0x198> 400092f4: e2 04 60 08 ld [ %l1 + 8 ], %l1 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 400092f8: 92 10 00 1a mov %i2, %o1 /* 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; 400092fc: ae 04 40 13 add %l1, %l3, %l7 aligned_user_addr = block_end - end_to_user_offs; 40009300: a0 25 c0 19 sub %l7, %i1, %l0 40009304: 40 00 3f 59 call 40019068 <.urem> 40009308: 90 10 00 10 mov %l0, %o0 if(block_size >= the_size) { /* the_block is large enough. */ _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 4000930c: 92 10 00 14 mov %l4, %o1 40009310: a4 24 00 08 sub %l0, %o0, %l2 40009314: 40 00 3f 55 call 40019068 <.urem> 40009318: 90 10 00 12 mov %l2, %o0 4000931c: a0 04 60 08 add %l1, 8, %l0 40009320: 84 24 80 08 sub %l2, %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) { 40009324: 80 a0 80 10 cmp %g2, %l0 40009328: 2a 80 00 46 bcs,a 40009440 <_Heap_Allocate_aligned+0x198> 4000932c: 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) { 40009330: ec 06 20 14 ld [ %i0 + 0x14 ], %l6 40009334: 82 20 80 10 sub %g2, %l0, %g1 40009338: 80 a0 40 16 cmp %g1, %l6 4000933c: 1a 80 00 15 bcc 40009390 <_Heap_Allocate_aligned+0xe8> 40009340: 80 a4 a0 00 cmp %l2, 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) { 40009344: 82 24 80 10 sub %l2, %l0, %g1 40009348: 80 a0 40 14 cmp %g1, %l4 4000934c: 0a 80 00 10 bcs 4000938c <_Heap_Allocate_aligned+0xe4> 40009350: 84 10 00 10 mov %l0, %g2 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 40009354: 90 10 00 10 mov %l0, %o0 40009358: 40 00 3f 44 call 40019068 <.urem> 4000935c: 92 10 00 1a mov %i2, %o1 *value = r ? v - r + a : v; 40009360: 82 04 00 1a add %l0, %i2, %g1 40009364: 80 a2 20 00 cmp %o0, 0 40009368: 12 80 00 03 bne 40009374 <_Heap_Allocate_aligned+0xcc> 4000936c: 90 20 40 08 sub %g1, %o0, %o0 40009370: 90 10 00 10 mov %l0, %o0 <== 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) { 40009374: 82 22 00 10 sub %o0, %l0, %g1 40009378: 80 a0 40 14 cmp %g1, %l4 4000937c: 3a 80 00 31 bcc,a 40009440 <_Heap_Allocate_aligned+0x198> 40009380: e2 04 60 08 ld [ %l1 + 8 ], %l1 40009384: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED 40009388: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED aligned_user_addr = 0; } } } if(aligned_user_addr) { 4000938c: 80 a4 a0 00 cmp %l2, 0 40009390: 22 80 00 2c be,a 40009440 <_Heap_Allocate_aligned+0x198> 40009394: 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; 40009398: 82 05 e0 08 add %l7, 8, %g1 4000939c: a0 20 40 02 sub %g1, %g2, %l0 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; 400093a0: 84 24 c0 10 sub %l3, %l0, %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) { 400093a4: 80 a0 80 16 cmp %g2, %l6 400093a8: 2a 80 00 08 bcs,a 400093c8 <_Heap_Allocate_aligned+0x120> 400093ac: 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; 400093b0: 82 10 a0 01 or %g2, 1, %g1 400093b4: 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); 400093b8: a2 04 40 02 add %l1, %g2, %l1 the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 400093bc: c4 24 40 00 st %g2, [ %l1 ] the_block->size = alloc_size; 400093c0: 10 80 00 09 b 400093e4 <_Heap_Allocate_aligned+0x13c> 400093c4: e0 24 60 04 st %l0, [ %l1 + 4 ] ) { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 400093c8: 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; 400093cc: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 prev->next = next; next->prev = prev; 400093d0: c4 20 e0 0c st %g2, [ %g3 + 0xc ] 400093d4: 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; 400093d8: c6 20 a0 08 st %g3, [ %g2 + 8 ] 400093dc: c2 26 20 38 st %g1, [ %i0 + 0x38 ] 400093e0: a0 10 00 13 mov %l3, %l0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400093e4: 84 04 40 10 add %l1, %l0, %g2 } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 400093e8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 400093ec: 82 10 60 01 or %g1, 1, %g1 400093f0: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* Update statistics */ stats->free_size -= alloc_size; 400093f4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 if(stats->min_free_size > stats->free_size) 400093f8: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 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; 400093fc: 82 20 40 10 sub %g1, %l0, %g1 if(stats->min_free_size > stats->free_size) 40009400: 80 a0 80 01 cmp %g2, %g1 40009404: 08 80 00 03 bleu 40009410 <_Heap_Allocate_aligned+0x168> 40009408: c2 26 20 30 st %g1, [ %i0 + 0x30 ] stats->min_free_size = stats->free_size; 4000940c: c2 26 20 34 st %g1, [ %i0 + 0x34 ] stats->used_blocks += 1; 40009410: c2 06 20 40 ld [ %i0 + 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; 40009414: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 stats->allocs += 1; 40009418: c4 06 20 48 ld [ %i0 + 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; 4000941c: 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; 40009420: 86 00 e0 01 inc %g3 stats->allocs += 1; 40009424: 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; 40009428: 86 00 c0 15 add %g3, %l5, %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; 4000942c: c2 26 20 40 st %g1, [ %i0 + 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; 40009430: c4 26 20 48 st %g2, [ %i0 + 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; 40009434: c6 26 20 4c st %g3, [ %i0 + 0x4c ] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 40009438: 10 80 00 07 b 40009454 <_Heap_Allocate_aligned+0x1ac> 4000943c: 90 10 00 12 mov %l2, %o0 /* 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) 40009440: aa 05 60 01 inc %l5 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; 40009444: 80 a4 40 18 cmp %l1, %i0 40009448: 32 bf ff a8 bne,a 400092e8 <_Heap_Allocate_aligned+0x40> 4000944c: c2 04 60 04 ld [ %l1 + 4 ], %g1 40009450: 90 10 20 00 clr %o0 } } } } if(stats->max_search < search_count) 40009454: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 40009458: 80 a0 40 15 cmp %g1, %l5 4000945c: 2a 80 00 02 bcs,a 40009464 <_Heap_Allocate_aligned+0x1bc> 40009460: ea 26 20 44 st %l5, [ %i0 + 0x44 ] stats->max_search = search_count; return user_ptr; } 40009464: 81 c7 e0 08 ret 40009468: 91 e8 00 08 restore %g0, %o0, %o0 4002d388 <_Heap_Get_information>: 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; 4002d388: c0 22 40 00 clr [ %o1 ] Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 4002d38c: d8 02 20 24 ld [ %o0 + 0x24 ], %o4 _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; the_info->Free.total = 0; 4002d390: c0 22 60 08 clr [ %o1 + 8 ] the_info->Free.largest = 0; 4002d394: c0 22 60 04 clr [ %o1 + 4 ] the_info->Used.number = 0; 4002d398: c0 22 60 0c clr [ %o1 + 0xc ] the_info->Used.total = 0; 4002d39c: c0 22 60 14 clr [ %o1 + 0x14 ] the_info->Used.largest = 0; 4002d3a0: c0 22 60 10 clr [ %o1 + 0x10 ] Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 4002d3a4: 10 80 00 23 b 4002d430 <_Heap_Get_information+0xa8> 4002d3a8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4002d3ac: 88 08 7f fe and %g1, -2, %g4 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4002d3b0: 9a 00 80 04 add %g2, %g4, %o5 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) ) { 4002d3b4: c2 03 60 04 ld [ %o5 + 4 ], %g1 4002d3b8: 80 88 60 01 btst 1, %g1 4002d3bc: 22 80 00 0d be,a 4002d3f0 <_Heap_Get_information+0x68> 4002d3c0: c2 02 40 00 ld [ %o1 ], %g1 the_info->Used.number++; 4002d3c4: c2 02 60 0c ld [ %o1 + 0xc ], %g1 the_info->Used.total += the_size; 4002d3c8: c4 02 60 14 ld [ %o1 + 0x14 ], %g2 if ( the_info->Used.largest < the_size ) 4002d3cc: 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++; 4002d3d0: 82 00 60 01 inc %g1 the_info->Used.total += the_size; 4002d3d4: 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++; 4002d3d8: c2 22 60 0c st %g1, [ %o1 + 0xc ] the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 4002d3dc: 80 a0 c0 04 cmp %g3, %g4 4002d3e0: 1a 80 00 13 bcc 4002d42c <_Heap_Get_information+0xa4> 4002d3e4: c4 22 60 14 st %g2, [ %o1 + 0x14 ] the_info->Used.largest = the_size; 4002d3e8: 10 80 00 11 b 4002d42c <_Heap_Get_information+0xa4> 4002d3ec: c8 22 60 10 st %g4, [ %o1 + 0x10 ] } else { the_info->Free.number++; the_info->Free.total += the_size; 4002d3f0: c4 02 60 08 ld [ %o1 + 8 ], %g2 if ( the_info->Free.largest < the_size ) 4002d3f4: 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++; 4002d3f8: 82 00 60 01 inc %g1 the_info->Free.total += the_size; 4002d3fc: 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++; 4002d400: c2 22 40 00 st %g1, [ %o1 ] the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 4002d404: 80 a0 c0 04 cmp %g3, %g4 4002d408: 1a 80 00 03 bcc 4002d414 <_Heap_Get_information+0x8c> 4002d40c: c4 22 60 08 st %g2, [ %o1 + 8 ] the_info->Free.largest = the_size; 4002d410: c8 22 60 04 st %g4, [ %o1 + 4 ] if ( the_size != next_block->prev_size ) 4002d414: c2 03 40 00 ld [ %o5 ], %g1 4002d418: 80 a1 00 01 cmp %g4, %g1 4002d41c: 02 80 00 05 be 4002d430 <_Heap_Get_information+0xa8> 4002d420: 84 10 00 0d mov %o5, %g2 4002d424: 81 c3 e0 08 retl <== NOT EXECUTED 4002d428: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4002d42c: 84 10 00 0d mov %o5, %g2 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 4002d430: 80 a0 80 0c cmp %g2, %o4 4002d434: 32 bf ff de bne,a 4002d3ac <_Heap_Get_information+0x24> 4002d438: c2 00 a0 04 ld [ %g2 + 4 ], %g1 } /* 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; 4002d43c: c2 02 60 14 ld [ %o1 + 0x14 ], %g1 4002d440: 90 10 20 00 clr %o0 4002d444: 82 00 60 08 add %g1, 8, %g1 return HEAP_GET_INFORMATION_SUCCESSFUL; } 4002d448: 81 c3 e0 08 retl 4002d44c: c2 22 60 14 st %g1, [ %o1 + 0x14 ] 400165a4 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 400165a4: 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; 400165a8: e8 06 20 14 ld [ %i0 + 0x14 ], %l4 uint32_t const page_size = the_heap->page_size; 400165ac: ec 06 20 10 ld [ %i0 + 0x10 ], %l6 *old_mem_size = 0; 400165b0: c0 26 c0 00 clr [ %i3 ] *avail_mem_size = 0; 400165b4: 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); 400165b8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 400165bc: 7f ff f6 53 call 40013f08 <.urem> 400165c0: 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 ); 400165c4: c8 06 20 20 ld [ %i0 + 0x20 ], %g4 400165c8: 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); 400165cc: 82 06 7f f8 add %i1, -8, %g1 400165d0: a4 20 40 08 sub %g1, %o0, %l2 _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)) 400165d4: 80 a4 80 04 cmp %l2, %g4 400165d8: 84 60 3f ff subx %g0, -1, %g2 400165dc: 80 a0 c0 12 cmp %g3, %l2 400165e0: 82 60 3f ff subx %g0, -1, %g1 400165e4: 80 88 80 01 btst %g2, %g1 400165e8: 02 80 00 75 be 400167bc <_Heap_Resize_block+0x218> 400165ec: a6 10 00 18 mov %i0, %l3 return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 400165f0: da 04 a0 04 ld [ %l2 + 4 ], %o5 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 400165f4: aa 0b 7f fe and %o5, -2, %l5 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 400165f8: a2 04 80 15 add %l2, %l5, %l1 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) || 400165fc: 80 a4 40 04 cmp %l1, %g4 40016600: 84 60 3f ff subx %g0, -1, %g2 40016604: 80 a0 c0 11 cmp %g3, %l1 40016608: 82 60 3f ff subx %g0, -1, %g1 4001660c: 80 88 80 01 btst %g2, %g1 40016610: 02 80 00 6b be 400167bc <_Heap_Resize_block+0x218> 40016614: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 40016618: c2 04 60 04 ld [ %l1 + 4 ], %g1 4001661c: 80 88 60 01 btst 1, %g1 40016620: 02 80 00 67 be 400167bc <_Heap_Resize_block+0x218> 40016624: 80 a4 40 03 cmp %l1, %g3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 40016628: b0 08 7f fe and %g1, -2, %i0 !_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) || 4001662c: 84 10 20 01 mov 1, %g2 40016630: 02 80 00 04 be 40016640 <_Heap_Resize_block+0x9c> 40016634: 82 04 40 18 add %l1, %i0, %g1 40016638: c2 00 60 04 ld [ %g1 + 4 ], %g1 4001663c: 84 08 60 01 and %g1, 1, %g2 _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) 40016640: 82 24 40 19 sub %l1, %i1, %g1 40016644: 82 00 60 04 add %g1, 4, %g1 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 40016648: c2 26 c0 00 st %g1, [ %i3 ] !_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) || 4001664c: b2 10 00 02 mov %g2, %i1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 40016650: 80 a6 80 01 cmp %i2, %g1 40016654: 08 80 00 1e bleu 400166cc <_Heap_Resize_block+0x128> 40016658: 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 */ 4001665c: 80 a6 60 00 cmp %i1, 0 40016660: 12 80 00 59 bne 400167c4 <_Heap_Resize_block+0x220> 40016664: a0 26 80 01 sub %i2, %g1, %l0 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 40016668: 92 10 00 16 mov %l6, %o1 4001666c: 7f ff f6 27 call 40013f08 <.urem> 40016670: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 40016674: 80 a2 20 00 cmp %o0, 0 40016678: 02 80 00 05 be 4001668c <_Heap_Resize_block+0xe8> 4001667c: 80 a4 00 14 cmp %l0, %l4 40016680: 82 04 00 16 add %l0, %l6, %g1 40016684: a0 20 40 08 sub %g1, %o0, %l0 40016688: 80 a4 00 14 cmp %l0, %l4 4001668c: 1a 80 00 03 bcc 40016698 <_Heap_Resize_block+0xf4> 40016690: 90 10 00 10 mov %l0, %o0 40016694: 90 10 00 14 mov %l4, %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) 40016698: 80 a2 00 18 cmp %o0, %i0 4001669c: 18 80 00 4a bgu 400167c4 <_Heap_Resize_block+0x220> 400166a0: 94 10 00 08 mov %o0, %o2 return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 400166a4: 92 10 00 11 mov %l1, %o1 400166a8: 7f ff bf c6 call 400065c0 <_Heap_Block_allocate> 400166ac: 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; 400166b0: 90 02 00 15 add %o0, %l5, %o0 400166b4: 90 12 00 1b or %o0, %i3, %o0 400166b8: d0 24 a0 04 st %o0, [ %l2 + 4 ] --stats->used_blocks; 400166bc: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 400166c0: 82 00 7f ff add %g1, -1, %g1 400166c4: 10 80 00 39 b 400167a8 <_Heap_Resize_block+0x204> 400166c8: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 400166cc: a0 20 40 1a sub %g1, %i2, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 400166d0: 92 10 00 16 mov %l6, %o1 400166d4: 7f ff f6 0d call 40013f08 <.urem> 400166d8: 90 10 00 10 mov %l0, %o0 _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 400166dc: a0 a4 00 08 subcc %l0, %o0, %l0 400166e0: 22 80 00 33 be,a 400167ac <_Heap_Resize_block+0x208> 400166e4: 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; 400166e8: 84 25 40 10 sub %l5, %l0, %g2 if (new_block_size < min_block_size) { 400166ec: 80 a0 80 14 cmp %g2, %l4 400166f0: 1a 80 00 07 bcc 4001670c <_Heap_Resize_block+0x168> 400166f4: 80 a6 60 00 cmp %i1, 0 uint32_t delta = min_block_size - new_block_size; 400166f8: 82 25 00 02 sub %l4, %g2, %g1 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 400166fc: a0 a4 00 01 subcc %l0, %g1, %l0 40016700: 02 80 00 2a be 400167a8 <_Heap_Resize_block+0x204> 40016704: 84 00 80 01 add %g2, %g1, %g2 _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) { 40016708: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4001670c: 12 80 00 15 bne 40016760 <_Heap_Resize_block+0x1bc> 40016710: 80 a4 00 14 cmp %l0, %l4 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; 40016714: 82 10 80 1b or %g2, %i3, %g1 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; 40016718: 86 04 00 18 add %l0, %i0, %g3 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 4001671c: c2 24 a0 04 st %g1, [ %l2 + 4 ] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 40016720: 82 10 e0 01 or %g3, 1, %g1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40016724: 84 04 80 02 add %l2, %g2, %g2 next_next_block->prev_size = new_next_block_size; 40016728: c6 24 40 18 st %g3, [ %l1 + %i0 ] Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4001672c: da 04 60 0c ld [ %l1 + 0xc ], %o5 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 40016730: c8 04 60 08 ld [ %l1 + 8 ], %g4 _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; 40016734: c2 20 a0 04 st %g1, [ %g2 + 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; 40016738: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1 Heap_Block *prev = block->prev; block = new_block; block->next = next; 4001673c: c8 20 a0 08 st %g4, [ %g2 + 8 ] 40016740: 82 00 40 10 add %g1, %l0, %g1 block->prev = prev; 40016744: da 20 a0 0c st %o5, [ %g2 + 0xc ] 40016748: c2 24 e0 30 st %g1, [ %l3 + 0x30 ] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 4001674c: 86 00 ff fc add %g3, -4, %g3 next->prev = prev->next = block; 40016750: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40016754: c4 23 60 08 st %g2, [ %o5 + 8 ] 40016758: 10 80 00 14 b 400167a8 <_Heap_Resize_block+0x204> 4001675c: c6 27 00 00 st %g3, [ %i4 ] } else if (free_block_size >= min_block_size) { 40016760: 2a 80 00 13 bcs,a 400167ac <_Heap_Resize_block+0x208> <== NOT EXECUTED 40016764: 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; 40016768: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED 4001676c: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 40016770: 82 14 20 01 or %l0, 1, %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40016774: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED 40016778: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 4001677c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40016780: 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 */ 40016784: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40016788: 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 */ 4001678c: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 40016790: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 40016794: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40016798: 7f ff d3 de call 4000b710 <_Heap_Free> <== NOT EXECUTED 4001679c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 400167a0: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 400167a4: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED } } } ++stats->resizes; 400167a8: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 400167ac: 82 00 60 01 inc %g1 400167b0: c2 24 e0 54 st %g1, [ %l3 + 0x54 ] 400167b4: 81 c7 e0 08 ret 400167b8: 91 e8 20 00 restore %g0, 0, %o0 return HEAP_RESIZE_SUCCESSFUL; 400167bc: 81 c7 e0 08 ret 400167c0: 91 e8 20 02 restore %g0, 2, %o0 } 400167c4: 81 c7 e0 08 ret 400167c8: 91 e8 20 01 restore %g0, 1, %o0 4000eeb4 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 4000eeb4: 9d e3 bf 98 save %sp, -104, %sp 4000eeb8: a6 10 00 18 mov %i0, %l3 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000eebc: 80 a6 60 00 cmp %i1, 0 Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 4000eec0: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 4000eec4: 16 80 00 03 bge 4000eed0 <_Heap_Walk+0x1c> 4000eec8: ec 06 20 24 ld [ %i0 + 0x24 ], %l6 source = the_heap->stats.instance; 4000eecc: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 4000eed0: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000eed4: 80 88 60 01 btst 1, %g1 4000eed8: 12 80 00 07 bne 4000eef4 <_Heap_Walk+0x40> 4000eedc: b0 10 20 00 clr %i0 printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 4000eee0: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000eee4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000eee8: 90 12 22 60 or %o0, 0x260, %o0 <== NOT EXECUTED 4000eeec: 7f ff d9 bb call 400055d8 <== NOT EXECUTED 4000eef0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 4000eef4: c4 04 00 00 ld [ %l0 ], %g2 4000eef8: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1 4000eefc: 80 a0 80 01 cmp %g2, %g1 4000ef00: 22 80 00 5e be,a 4000f078 <_Heap_Walk+0x1c4> 4000ef04: 03 10 00 72 sethi %hi(0x4001c800), %g1 printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 4000ef08: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000ef0c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ef10: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED 4000ef14: 7f ff d9 b1 call 400055d8 <== NOT EXECUTED 4000ef18: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000ef1c: 10 80 00 57 b 4000f078 <_Heap_Walk+0x1c4> <== NOT EXECUTED 4000ef20: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000ef24: e8 04 20 04 ld [ %l0 + 4 ], %l4 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)) { 4000ef28: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3 4000ef2c: a4 0d 3f fe and %l4, -2, %l2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000ef30: a2 04 00 12 add %l0, %l2, %l1 4000ef34: 80 a4 40 01 cmp %l1, %g1 4000ef38: 84 60 3f ff subx %g0, -1, %g2 4000ef3c: 80 a0 c0 11 cmp %g3, %l1 4000ef40: 82 60 3f ff subx %g0, -1, %g1 4000ef44: 80 88 80 01 btst %g2, %g1 4000ef48: 32 80 00 09 bne,a 4000ef6c <_Heap_Walk+0xb8> 4000ef4c: c2 04 60 04 ld [ %l1 + 4 ], %g1 if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 4000ef50: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000ef54: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000ef58: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ef5c: 7f ff d9 9f call 400055d8 <== NOT EXECUTED 4000ef60: 90 12 22 d0 or %o0, 0x2d0, %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", 4000ef64: 10 80 00 51 b 4000f0a8 <_Heap_Walk+0x1f4> <== NOT EXECUTED 4000ef68: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 4000ef6c: 80 88 60 01 btst 1, %g1 4000ef70: 12 80 00 27 bne 4000f00c <_Heap_Walk+0x158> 4000ef74: 80 a6 20 00 cmp %i0, 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) { 4000ef78: c2 04 40 00 ld [ %l1 ], %g1 4000ef7c: 80 a4 80 01 cmp %l2, %g1 4000ef80: 02 80 00 07 be 4000ef9c <_Heap_Walk+0xe8> 4000ef84: 80 8d 20 01 btst 1, %l4 if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 4000ef88: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4000ef8c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000ef90: 7f ff d9 92 call 400055d8 <== NOT EXECUTED 4000ef94: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED error = 1; } if (!prev_used) { 4000ef98: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED 4000ef9c: 32 80 00 0c bne,a 4000efcc <_Heap_Walk+0x118> 4000efa0: c2 04 e0 08 ld [ %l3 + 8 ], %g1 if (do_dump || error) printk("\n"); 4000efa4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000efa8: 02 80 00 05 be 4000efbc <_Heap_Walk+0x108> <== NOT EXECUTED 4000efac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000efb0: 7f ff d9 8a call 400055d8 <== NOT EXECUTED 4000efb4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 4000efb8: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED 4000efbc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000efc0: 7f ff d9 86 call 400055d8 <== NOT EXECUTED 4000efc4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000efc8: c2 04 e0 08 ld [ %l3 + 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) 4000efcc: 80 a0 40 10 cmp %g1, %l0 4000efd0: 02 80 00 0e be 4000f008 <_Heap_Walk+0x154> 4000efd4: 80 a0 40 13 cmp %g1, %l3 4000efd8: 32 bf ff fd bne,a 4000efcc <_Heap_Walk+0x118> 4000efdc: c2 00 60 08 ld [ %g1 + 8 ], %g1 block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 4000efe0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000efe4: 22 80 00 05 be,a 4000eff8 <_Heap_Walk+0x144> <== NOT EXECUTED 4000efe8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000efec: 7f ff d9 7b call 400055d8 <== NOT EXECUTED 4000eff0: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 4000eff4: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED 4000eff8: 7f ff d9 78 call 400055d8 <== NOT EXECUTED 4000effc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 4000f000: 10 80 00 06 b 4000f018 <_Heap_Walk+0x164> <== NOT EXECUTED 4000f004: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000f008: 80 a6 20 00 cmp %i0, 0 4000f00c: 22 80 00 06 be,a 4000f024 <_Heap_Walk+0x170> 4000f010: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 4000f014: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 4000f018: 7f ff d9 70 call 400055d8 <== NOT EXECUTED 4000f01c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 4000f020: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED 4000f024: 80 a4 80 01 cmp %l2, %g1 4000f028: 3a 80 00 05 bcc,a 4000f03c <_Heap_Walk+0x188> 4000f02c: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1 printk("PASS: %d !block size is too small\n", source); 4000f030: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000f034: 10 80 00 09 b 4000f058 <_Heap_Walk+0x1a4> <== NOT EXECUTED 4000f038: 90 12 23 88 or %o0, 0x388, %o0 ! 4001cb88 <_POSIX_Threads_Default_attributes+0x160> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 4000f03c: 40 00 28 0b call 40019068 <.urem> 4000f040: 90 10 00 12 mov %l2, %o0 4000f044: 80 a2 20 00 cmp %o0, 0 4000f048: 02 80 00 08 be 4000f068 <_Heap_Walk+0x1b4> 4000f04c: 80 a6 20 00 cmp %i0, 0 printk("PASS: %d !block size is misaligned\n", source); 4000f050: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000f054: 90 12 23 b0 or %o0, 0x3b0, %o0 ! 4001cbb0 <_POSIX_Threads_Default_attributes+0x188> <== NOT EXECUTED 4000f058: 7f ff d9 60 call 400055d8 <== NOT EXECUTED 4000f05c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 4000f060: 10 80 00 12 b 4000f0a8 <_Heap_Walk+0x1f4> <== NOT EXECUTED 4000f064: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 4000f068: 12 80 00 10 bne 4000f0a8 <_Heap_Walk+0x1f4> 4000f06c: 96 10 00 16 mov %l6, %o3 break; 4000f070: 10 80 00 09 b 4000f094 <_Heap_Walk+0x1e0> 4000f074: a0 10 00 11 mov %l1, %l0 error = 1; } } } if (do_dump || error) printk("\n"); 4000f078: aa 10 62 c8 or %g1, 0x2c8, %l5 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); 4000f07c: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000f080: b8 10 63 58 or %g1, 0x358, %i4 ! 4001cb58 <_POSIX_Threads_Default_attributes+0x130> 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); 4000f084: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000f088: ba 10 63 28 or %g1, 0x328, %i5 ! 4001cb28 <_POSIX_Threads_Default_attributes+0x100> 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); 4000f08c: 03 10 00 72 sethi %hi(0x4001c800), %g1 4000f090: ae 10 62 f8 or %g1, 0x2f8, %l7 ! 4001caf8 <_POSIX_Threads_Default_attributes+0xd0> 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 ) { 4000f094: 80 a4 00 16 cmp %l0, %l6 4000f098: 32 bf ff a3 bne,a 4000ef24 <_Heap_Walk+0x70> 4000f09c: c2 04 e0 20 ld [ %l3 + 0x20 ], %g1 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000f0a0: 10 80 00 09 b 4000f0c4 <_Heap_Walk+0x210> 4000f0a4: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 4000f0a8: 11 10 00 72 sethi %hi(0x4001c800), %o0 <== NOT EXECUTED 4000f0ac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f0b0: 90 12 23 d8 or %o0, 0x3d8, %o0 <== NOT EXECUTED 4000f0b4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4000f0b8: 7f ff d9 48 call 400055d8 <== NOT EXECUTED 4000f0bc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000f0c0: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 4000f0c4: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3 4000f0c8: 94 08 7f fe and %g1, -2, %o2 4000f0cc: 80 a2 80 0b cmp %o2, %o3 4000f0d0: 02 80 00 06 be 4000f0e8 <_Heap_Walk+0x234> 4000f0d4: 92 10 00 19 mov %i1, %o1 printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 4000f0d8: 11 10 00 73 sethi %hi(0x4001cc00), %o0 <== NOT EXECUTED 4000f0dc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4000f0e0: 7f ff d9 3e call 400055d8 <== NOT EXECUTED 4000f0e4: 90 12 20 18 or %o0, 0x18, %o0 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 4000f0e8: 81 c7 e0 08 ret 4000f0ec: 81 e8 00 00 restore 400067f8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 400067f8: 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; 400067fc: 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 ) 40006800: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0 40006804: 03 00 00 3f sethi %hi(0xfc00), %g1 40006808: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000680c: a2 08 80 01 and %g2, %g1, %l1 40006810: 80 a4 00 11 cmp %l0, %l1 40006814: 3a 80 00 06 bcc,a 4000682c <_Objects_Extend_information+0x34> 40006818: e4 06 20 14 ld [ %i0 + 0x14 ], %l2 4000681c: aa 10 00 11 mov %l1, %l5 40006820: ae 10 20 00 clr %l7 40006824: 10 80 00 13 b 40006870 <_Objects_Extend_information+0x78> 40006828: ac 10 20 00 clr %l6 block_count = 0; else { block_count = information->maximum / information->allocation_size; 4000682c: 90 10 00 10 mov %l0, %o0 40006830: 92 10 00 12 mov %l2, %o1 40006834: 40 00 35 09 call 40013c58 <.udiv> 40006838: aa 10 00 11 mov %l1, %l5 4000683c: ac 10 20 00 clr %l6 40006840: 10 80 00 09 b 40006864 <_Objects_Extend_information+0x6c> 40006844: ae 10 00 08 mov %o0, %l7 for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40006848: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 4000684c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 40006850: 80 a0 60 00 cmp %g1, 0 40006854: 02 80 00 08 be 40006874 <_Objects_Extend_information+0x7c> 40006858: 80 a5 40 10 cmp %l5, %l0 break; else index_base += information->allocation_size; 4000685c: aa 05 40 12 add %l5, %l2, %l5 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40006860: ac 05 a0 01 inc %l6 40006864: 80 a5 80 17 cmp %l6, %l7 40006868: 0a bf ff f8 bcs 40006848 <_Objects_Extend_information+0x50> 4000686c: 85 2d a0 02 sll %l6, 2, %g2 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40006870: 80 a5 40 10 cmp %l5, %l0 40006874: 2a 80 00 5d bcs,a 400069e8 <_Objects_Extend_information+0x1f0> 40006878: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 4000687c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40006880: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 40006884: ba 04 00 01 add %l0, %g1, %i5 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40006888: 80 a0 a0 00 cmp %g2, 0 /* * Up the block count and maximum */ block_count++; 4000688c: a0 05 e0 01 add %l7, 1, %l0 40006890: 82 07 40 11 add %i5, %l1, %g1 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40006894: 02 80 00 0b be 400068c0 <_Objects_Extend_information+0xc8> 40006898: 91 2c 20 01 sll %l0, 1, %o0 object_blocks = (void**) 4000689c: 90 02 00 10 add %o0, %l0, %o0 400068a0: 90 00 40 08 add %g1, %o0, %o0 400068a4: 40 00 08 5b call 40008a10 <_Workspace_Allocate> 400068a8: 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 ) 400068ac: a4 92 20 00 orcc %o0, 0, %l2 400068b0: 32 80 00 0a bne,a 400068d8 <_Objects_Extend_information+0xe0> 400068b4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 400068b8: 81 c7 e0 08 ret <== NOT EXECUTED 400068bc: 81 e8 00 00 restore <== NOT EXECUTED return; } else { object_blocks = (void**) 400068c0: 90 02 00 10 add %o0, %l0, %o0 400068c4: 90 00 40 08 add %g1, %o0, %o0 400068c8: 40 00 08 59 call 40008a2c <_Workspace_Allocate_or_fatal_error> 400068cc: 91 2a 20 02 sll %o0, 2, %o0 400068d0: a4 10 00 08 mov %o0, %l2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 400068d4: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 400068d8: 85 2c 20 02 sll %l0, 2, %g2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 400068dc: 80 a0 40 11 cmp %g1, %l1 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 400068e0: a8 04 80 02 add %l2, %g2, %l4 400068e4: a6 05 00 02 add %l4, %g2, %l3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 400068e8: 08 80 00 15 bleu 4000693c <_Objects_Extend_information+0x144> 400068ec: 84 10 20 00 clr %g2 /* * 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, 400068f0: d2 06 20 34 ld [ %i0 + 0x34 ], %o1 400068f4: a1 2d e0 02 sll %l7, 2, %l0 400068f8: 90 10 00 12 mov %l2, %o0 400068fc: 40 00 1a f9 call 4000d4e0 40006900: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40006904: d2 06 20 30 ld [ %i0 + 0x30 ], %o1 40006908: 94 10 00 10 mov %l0, %o2 4000690c: 40 00 1a f5 call 4000d4e0 40006910: 90 10 00 14 mov %l4, %o0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 40006914: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40006918: d2 06 20 1c ld [ %i0 + 0x1c ], %o1 4000691c: 94 04 40 0a add %l1, %o2, %o2 40006920: 90 10 00 13 mov %l3, %o0 40006924: 40 00 1a ef call 4000d4e0 40006928: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 4000692c: 10 80 00 08 b 4000694c <_Objects_Extend_information+0x154> 40006930: 83 2d e0 02 sll %l7, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40006934: 84 00 a0 01 inc %g2 local_table[ index ] = NULL; 40006938: c0 24 c0 01 clr [ %l3 + %g1 ] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 4000693c: 80 a0 80 11 cmp %g2, %l1 40006940: 2a bf ff fd bcs,a 40006934 <_Objects_Extend_information+0x13c> 40006944: 83 28 a0 02 sll %g2, 2, %g1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40006948: 83 2d e0 02 sll %l7, 2, %g1 inactive_per_block[block_count] = 0; 4000694c: c0 25 00 01 clr [ %l4 + %g1 ] for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006950: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40006954: c0 24 80 01 clr [ %l2 + %g1 ] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006958: 83 2d 60 02 sll %l5, 2, %g1 4000695c: 86 05 40 02 add %l5, %g2, %g3 40006960: 84 04 c0 01 add %l3, %g1, %g2 40006964: 10 80 00 04 b 40006974 <_Objects_Extend_information+0x17c> 40006968: 82 10 00 15 mov %l5, %g1 index++ ) { 4000696c: 82 00 60 01 inc %g1 40006970: 84 00 a0 04 add %g2, 4, %g2 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40006974: 80 a0 40 03 cmp %g1, %g3 40006978: 2a bf ff fd bcs,a 4000696c <_Objects_Extend_information+0x174> 4000697c: c0 20 80 00 clr [ %g2 ] index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40006980: 7f ff ec d7 call 40001cdc 40006984: 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( 40006988: c2 06 00 00 ld [ %i0 ], %g1 4000698c: c8 16 20 04 lduh [ %i0 + 4 ], %g4 40006990: 87 2f 60 10 sll %i5, 0x10, %g3 40006994: 89 29 20 1b sll %g4, 0x1b, %g4 40006998: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 4000699c: 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( 400069a0: 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; 400069a4: e8 26 20 30 st %l4, [ %i0 + 0x30 ] information->local_table = local_table; 400069a8: e6 26 20 1c st %l3, [ %i0 + 0x1c ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 400069ac: 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; 400069b0: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 400069b4: 82 10 40 02 or %g1, %g2, %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 400069b8: e4 26 20 34 st %l2, [ %i0 + 0x34 ] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 400069bc: 82 10 40 04 or %g1, %g4, %g1 400069c0: 82 10 40 03 or %g1, %g3, %g1 400069c4: c2 26 20 0c st %g1, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 400069c8: 7f ff ec c9 call 40001cec 400069cc: 01 00 00 00 nop if ( old_tables ) 400069d0: 80 a4 20 00 cmp %l0, 0 400069d4: 22 80 00 05 be,a 400069e8 <_Objects_Extend_information+0x1f0> 400069d8: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 _Workspace_Free( old_tables ); 400069dc: 40 00 08 06 call 400089f4 <_Workspace_Free> 400069e0: 90 10 00 10 mov %l0, %o0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 400069e4: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1 400069e8: e2 06 20 34 ld [ %i0 + 0x34 ], %l1 400069ec: 80 a0 60 00 cmp %g1, 0 400069f0: 02 80 00 0f be 40006a2c <_Objects_Extend_information+0x234> 400069f4: a1 2d a0 02 sll %l6, 2, %l0 information->object_blocks[ block ] = 400069f8: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 400069fc: 40 00 34 5d call 40013b70 <.umul> 40006a00: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 40006a04: 40 00 08 03 call 40008a10 <_Workspace_Allocate> 40006a08: 01 00 00 00 nop _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006a0c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40006a10: d0 24 40 10 st %o0, [ %l1 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40006a14: c2 00 40 10 ld [ %g1 + %l0 ], %g1 40006a18: 80 a0 60 00 cmp %g1, 0 40006a1c: 32 80 00 0b bne,a 40006a48 <_Objects_Extend_information+0x250> 40006a20: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40006a24: 81 c7 e0 08 ret <== NOT EXECUTED 40006a28: 81 e8 00 00 restore <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 40006a2c: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 40006a30: 40 00 34 50 call 40013b70 <.umul> 40006a34: d2 06 20 14 ld [ %i0 + 0x14 ], %o1 40006a38: 40 00 07 fd call 40008a2c <_Workspace_Allocate_or_fatal_error> 40006a3c: 01 00 00 00 nop 40006a40: d0 24 40 10 st %o0, [ %l1 + %l0 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006a44: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40006a48: a5 2d a0 02 sll %l6, 2, %l2 40006a4c: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40006a50: d2 00 40 12 ld [ %g1 + %l2 ], %o1 40006a54: d6 06 20 18 ld [ %i0 + 0x18 ], %o3 40006a58: 90 07 bf ec add %fp, -20, %o0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006a5c: a0 10 00 15 mov %l5, %l0 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 40006a60: a8 10 00 08 mov %o0, %l4 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40006a64: 40 00 12 8f call 4000b4a0 <_Chain_Initialize> 40006a68: a2 06 20 20 add %i0, 0x20, %l1 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40006a6c: 10 80 00 0d b 40006aa0 <_Objects_Extend_information+0x2a8> 40006a70: 27 00 00 40 sethi %hi(0x10000), %l3 40006a74: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40006a78: 83 28 60 18 sll %g1, 0x18, %g1 40006a7c: 85 28 a0 1b sll %g2, 0x1b, %g2 40006a80: 82 10 40 13 or %g1, %l3, %g1 40006a84: 82 10 40 02 or %g1, %g2, %g1 40006a88: 82 10 40 10 or %g1, %l0, %g1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006a8c: 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( 40006a90: c2 22 20 08 st %g1, [ %o0 + 8 ] index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 40006a94: a0 04 20 01 inc %l0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 40006a98: 7f ff fd 14 call 40005ee8 <_Chain_Append> 40006a9c: 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 ) { 40006aa0: 40 00 12 70 call 4000b460 <_Chain_Get> 40006aa4: 90 10 00 14 mov %l4, %o0 40006aa8: 80 a2 20 00 cmp %o0, 0 40006aac: 32 bf ff f2 bne,a 40006a74 <_Objects_Extend_information+0x27c> 40006ab0: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006ab4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006ab8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive += information->allocation_size; 40006abc: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40006ac0: c2 20 80 12 st %g1, [ %g2 + %l2 ] information->inactive += information->allocation_size; 40006ac4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006ac8: 82 00 40 03 add %g1, %g3, %g1 40006acc: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40006ad0: 81 c7 e0 08 ret 40006ad4: 81 e8 00 00 restore 40006b84 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint32_t the_class ) { 40006b84: 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 ) 40006b88: 82 06 3f ff add %i0, -1, %g1 40006b8c: 80 a0 60 03 cmp %g1, 3 40006b90: 38 80 00 1c bgu,a 40006c00 <_Objects_Get_information+0x7c> 40006b94: b0 10 20 00 clr %i0 int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40006b98: 10 80 00 1c b 40006c08 <_Objects_Get_information+0x84> 40006b9c: 80 a6 60 00 cmp %i1, 0 return NULL; the_class_api_maximum = _Objects_API_maximum_class( the_api ); 40006ba0: 40 00 13 59 call 4000b904 <_Objects_API_maximum_class> 40006ba4: 90 10 00 18 mov %i0, %o0 if ( the_class_api_maximum < 0 || 40006ba8: 80 a2 20 00 cmp %o0, 0 40006bac: 06 80 00 14 bl 40006bfc <_Objects_Get_information+0x78> 40006bb0: 80 a6 40 08 cmp %i1, %o0 40006bb4: 38 80 00 13 bgu,a 40006c00 <_Objects_Get_information+0x7c> 40006bb8: b0 10 20 00 clr %i0 <== NOT EXECUTED the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) 40006bbc: 85 2e 20 02 sll %i0, 2, %g2 40006bc0: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006bc4: 82 10 60 00 mov %g1, %g1 ! 40018c00 <_Objects_Information_table> 40006bc8: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40006bcc: 80 a0 a0 00 cmp %g2, 0 40006bd0: 02 80 00 0c be 40006c00 <_Objects_Get_information+0x7c> 40006bd4: b0 10 20 00 clr %i0 return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 40006bd8: 83 2e 60 02 sll %i1, 2, %g1 40006bdc: f0 00 80 01 ld [ %g2 + %g1 ], %i0 if ( !info ) 40006be0: 80 a6 20 00 cmp %i0, 0 40006be4: 02 80 00 07 be 40006c00 <_Objects_Get_information+0x7c> 40006be8: 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 ) 40006bec: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1 40006bf0: 80 a0 60 00 cmp %g1, 0 40006bf4: 12 80 00 03 bne 40006c00 <_Objects_Get_information+0x7c> 40006bf8: 01 00 00 00 nop 40006bfc: b0 10 20 00 clr %i0 ! 0 return NULL; #endif return info; } 40006c00: 81 c7 e0 08 ret 40006c04: 81 e8 00 00 restore int the_class_api_maximum; if ( !_Objects_Is_api_valid( the_api ) ) return NULL; if ( !the_class ) 40006c08: 22 bf ff fe be,a 40006c00 <_Objects_Get_information+0x7c> 40006c0c: b0 10 20 00 clr %i0 40006c10: 30 bf ff e4 b,a 40006ba0 <_Objects_Get_information+0x1c> 400157e4 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 400157e4: 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) 400157e8: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 400157ec: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 400157f0: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 400157f4: 22 80 00 02 be,a 400157fc <_Objects_Get_next+0x18> <== NOT EXECUTED 400157f8: 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) 400157fc: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 40015800: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 40015804: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 40015808: 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); 4001580c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40015810: 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) 40015814: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40015818: 08 80 00 08 bleu 40015838 <_Objects_Get_next+0x54> <== NOT EXECUTED 4001581c: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 40015820: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 40015824: 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; 40015828: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001582c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 40015830: 10 80 00 09 b 40015854 <_Objects_Get_next+0x70> <== NOT EXECUTED 40015834: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 40015838: 7f ff d8 27 call 4000b8d4 <_Objects_Get> <== NOT EXECUTED 4001583c: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 40015840: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40015844: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40015848: 32 bf ff f0 bne,a 40015808 <_Objects_Get_next+0x24> <== NOT EXECUTED 4001584c: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 40015850: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 40015854: 81 c7 e0 08 ret <== NOT EXECUTED 40015858: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400080e4 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 400080e4: 9d e3 bf 90 save %sp, -112, %sp 400080e8: 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 ) 400080ec: 80 a6 60 00 cmp %i1, 0 400080f0: 02 80 00 22 be 40008178 <_Objects_Id_to_name+0x94> 400080f4: b0 10 20 01 mov 1, %i0 return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 400080f8: 80 a2 60 00 cmp %o1, 0 400080fc: 12 80 00 06 bne 40008114 <_Objects_Id_to_name+0x30> 40008100: 83 32 60 18 srl %o1, 0x18, %g1 40008104: 03 10 00 75 sethi %hi(0x4001d400), %g1 40008108: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 ! 4001d430 <_Thread_Executing> 4000810c: d2 00 60 08 ld [ %g1 + 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); 40008110: 83 32 60 18 srl %o1, 0x18, %g1 40008114: 84 08 60 07 and %g1, 7, %g2 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40008118: 82 00 bf ff add %g2, -1, %g1 4000811c: 80 a0 60 03 cmp %g1, 3 40008120: 38 80 00 16 bgu,a 40008178 <_Objects_Id_to_name+0x94> 40008124: 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 ] ) 40008128: 10 80 00 18 b 40008188 <_Objects_Id_to_name+0xa4> 4000812c: 85 28 a0 02 sll %g2, 2, %g2 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 40008130: 83 28 60 02 sll %g1, 2, %g1 40008134: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !information ) 40008138: 80 a2 20 00 cmp %o0, 0 4000813c: 02 80 00 0f be 40008178 <_Objects_Id_to_name+0x94> 40008140: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; if ( information->is_string ) 40008144: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1 40008148: 80 a0 60 00 cmp %g1, 0 4000814c: 12 80 00 0d bne 40008180 <_Objects_Id_to_name+0x9c> 40008150: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 40008154: 7f ff ff c7 call 40008070 <_Objects_Get> 40008158: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 4000815c: 80 a2 20 00 cmp %o0, 0 40008160: 22 80 00 06 be,a 40008178 <_Objects_Id_to_name+0x94> 40008164: b0 10 20 03 mov 3, %i0 return OBJECTS_INVALID_ID; *name = the_object->name; 40008168: c2 02 20 0c ld [ %o0 + 0xc ], %g1 _Thread_Enable_dispatch(); 4000816c: b0 10 20 00 clr %i0 40008170: 40 00 02 44 call 40008a80 <_Thread_Enable_dispatch> 40008174: c2 26 40 00 st %g1, [ %i1 ] 40008178: 81 c7 e0 08 ret 4000817c: 81 e8 00 00 restore return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 40008180: 81 c7 e0 08 ret <== NOT EXECUTED 40008184: 81 e8 00 00 restore <== 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 ] ) 40008188: 03 10 00 74 sethi %hi(0x4001d000), %g1 4000818c: 82 10 62 d0 or %g1, 0x2d0, %g1 ! 4001d2d0 <_Objects_Information_table> 40008190: c4 00 40 02 ld [ %g1 + %g2 ], %g2 40008194: 80 a0 a0 00 cmp %g2, 0 40008198: 12 bf ff e6 bne 40008130 <_Objects_Id_to_name+0x4c> 4000819c: 83 32 60 1b srl %o1, 0x1b, %g1 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 400081a0: 81 c7 e0 08 ret <== NOT EXECUTED 400081a4: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 400125d8 <_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 ) { 400125d8: 9d e3 bf 98 save %sp, -104, %sp 400125dc: a6 10 00 18 mov %i0, %l3 uint32_t index; uint32_t name_length; /* ASSERT: information->is_string == TRUE */ if ( !id ) 400125e0: 80 a6 a0 00 cmp %i2, 0 400125e4: 02 80 00 22 be 4001266c <_Objects_Name_to_id_string+0x94> 400125e8: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( !name ) 400125ec: 80 a6 60 00 cmp %i1, 0 400125f0: 22 80 00 1f be,a 4001266c <_Objects_Name_to_id_string+0x94> 400125f4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { 400125f8: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1 400125fc: a4 90 60 00 orcc %g1, 0, %l2 40012600: 12 80 00 17 bne 4001265c <_Objects_Name_to_id_string+0x84> 40012604: a2 10 20 01 mov 1, %l1 name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40012608: 81 c7 e0 08 ret <== NOT EXECUTED 4001260c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED the_object = information->local_table[ index ]; 40012610: c2 04 e0 1c ld [ %l3 + 0x1c ], %g1 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40012614: a2 04 60 01 inc %l1 the_object = information->local_table[ index ]; 40012618: e0 00 40 02 ld [ %g1 + %g2 ], %l0 if ( !the_object ) 4001261c: 80 a4 20 00 cmp %l0, 0 40012620: 02 80 00 0f be 4001265c <_Objects_Name_to_id_string+0x84> 40012624: 90 10 00 19 mov %i1, %o0 continue; if ( !the_object->name.name_p ) 40012628: d2 04 20 0c ld [ %l0 + 0xc ], %o1 4001262c: 80 a2 60 00 cmp %o1, 0 40012630: 02 80 00 0c be 40012660 <_Objects_Name_to_id_string+0x88> 40012634: 80 a4 40 12 cmp %l1, %l2 continue; if (!strncmp( name, the_object->name.name_p, information->name_length)) { 40012638: 40 00 0c 77 call 40015814 4001263c: d4 14 e0 3a lduh [ %l3 + 0x3a ], %o2 40012640: 80 a2 20 00 cmp %o0, 0 40012644: 32 80 00 07 bne,a 40012660 <_Objects_Name_to_id_string+0x88> 40012648: 80 a4 40 12 cmp %l1, %l2 *id = the_object->id; 4001264c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40012650: c2 26 80 00 st %g1, [ %i2 ] 40012654: 81 c7 e0 08 ret 40012658: 91 e8 20 00 restore %g0, 0, %o0 return OBJECTS_INVALID_NAME; if ( information->maximum != 0 ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 4001265c: 80 a4 40 12 cmp %l1, %l2 40012660: 08 bf ff ec bleu 40012610 <_Objects_Name_to_id_string+0x38> 40012664: 85 2c 60 02 sll %l1, 2, %g2 40012668: b0 10 20 01 mov 1, %i0 } } } return OBJECTS_INVALID_NAME; } 4001266c: 81 c7 e0 08 ret 40012670: 81 e8 00 00 restore 40006e08 <_Objects_Name_to_id_u32>: Objects_Information *information, uint32_t name, uint32_t node, Objects_Id *id ) { 40006e08: 9a 10 00 08 mov %o0, %o5 Objects_Name name_for_mp; #endif /* ASSERT: information->is_string == FALSE */ if ( !id ) 40006e0c: 80 a2 e0 00 cmp %o3, 0 40006e10: 02 80 00 29 be 40006eb4 <_Objects_Name_to_id_u32+0xac> 40006e14: 90 10 20 02 mov 2, %o0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 40006e18: 80 a2 60 00 cmp %o1, 0 40006e1c: 22 80 00 26 be,a 40006eb4 <_Objects_Name_to_id_u32+0xac> 40006e20: 90 10 20 01 mov 1, %o0 return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40006e24: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1 40006e28: 84 90 60 00 orcc %g1, 0, %g2 40006e2c: 22 80 00 22 be,a 40006eb4 <_Objects_Name_to_id_u32+0xac> 40006e30: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 40006e34: 80 a2 a0 00 cmp %o2, 0 40006e38: 02 80 00 19 be 40006e9c <_Objects_Name_to_id_u32+0x94> 40006e3c: 83 28 a0 10 sll %g2, 0x10, %g1 40006e40: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 40006e44: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff 40006e48: 80 a2 80 01 cmp %o2, %g1 40006e4c: 02 80 00 13 be 40006e98 <_Objects_Name_to_id_u32+0x90> 40006e50: 80 a2 a0 01 cmp %o2, 1 40006e54: 32 80 00 18 bne,a 40006eb4 <_Objects_Name_to_id_u32+0xac> 40006e58: 90 10 20 01 mov 1, %o0 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40006e5c: 10 80 00 10 b 40006e9c <_Objects_Name_to_id_u32+0x94> 40006e60: 83 28 a0 10 sll %g2, 0x10, %g1 the_object = information->local_table[ index ]; 40006e64: c2 03 60 1c ld [ %o5 + 0x1c ], %g1 40006e68: c4 00 40 02 ld [ %g1 + %g2 ], %g2 if ( !the_object ) 40006e6c: 80 a0 a0 00 cmp %g2, 0 40006e70: 02 80 00 0d be 40006ea4 <_Objects_Name_to_id_u32+0x9c> 40006e74: 86 00 e0 01 inc %g3 continue; if ( name == the_object->name.name_u32 ) { 40006e78: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40006e7c: 80 a2 40 01 cmp %o1, %g1 40006e80: 32 80 00 0a bne,a 40006ea8 <_Objects_Name_to_id_u32+0xa0> 40006e84: 80 a0 c0 04 cmp %g3, %g4 *id = the_object->id; 40006e88: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40006e8c: 90 10 20 00 clr %o0 40006e90: 81 c3 e0 08 retl 40006e94: c2 22 c0 00 st %g1, [ %o3 ] search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; for ( index = 1; index <= information->maximum; index++ ) { 40006e98: 83 28 a0 10 sll %g2, 0x10, %g1 40006e9c: 86 10 20 01 mov 1, %g3 40006ea0: 89 30 60 10 srl %g1, 0x10, %g4 40006ea4: 80 a0 c0 04 cmp %g3, %g4 40006ea8: 08 bf ff ef bleu 40006e64 <_Objects_Name_to_id_u32+0x5c> 40006eac: 85 28 e0 02 sll %g3, 2, %g2 40006eb0: 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 } 40006eb4: 81 c3 e0 08 retl 40006eb8: 01 00 00 00 nop 40006ec4 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40006ec4: 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; 40006ec8: 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; 40006ecc: e0 06 20 14 ld [ %i0 + 0x14 ], %l0 40006ed0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 40006ed4: 03 00 00 3f sethi %hi(0xfc00), %g1 40006ed8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006edc: 92 10 00 10 mov %l0, %o1 40006ee0: a2 08 80 01 and %g2, %g1, %l1 40006ee4: 40 00 33 5d call 40013c58 <.udiv> 40006ee8: 90 22 00 11 sub %o0, %l1, %o0 40006eec: 10 80 00 2e b 40006fa4 <_Objects_Shrink_information+0xe0> 40006ef0: 84 10 20 00 clr %g2 for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 40006ef4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40006ef8: c2 00 40 12 ld [ %g1 + %l2 ], %g1 40006efc: 80 a0 40 10 cmp %g1, %l0 40006f00: 12 80 00 28 bne 40006fa0 <_Objects_Shrink_information+0xdc> 40006f04: 84 00 a0 01 inc %g2 /* * 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; 40006f08: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 40006f0c: 03 00 00 3f sethi %hi(0xfc00), %g1 40006f10: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff 40006f14: c2 04 20 08 ld [ %l0 + 8 ], %g1 40006f18: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40006f1c: 80 a0 80 11 cmp %g2, %l1 40006f20: 2a 80 00 0c bcs,a 40006f50 <_Objects_Shrink_information+0x8c> 40006f24: e0 04 00 00 ld [ %l0 ], %l0 40006f28: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40006f2c: 82 04 40 01 add %l1, %g1, %g1 40006f30: 80 a0 80 01 cmp %g2, %g1 40006f34: 1a 80 00 06 bcc 40006f4c <_Objects_Shrink_information+0x88> 40006f38: 90 10 00 10 mov %l0, %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 ); 40006f3c: 40 00 11 3f call 4000b438 <_Chain_Extract> 40006f40: e0 04 00 00 ld [ %l0 ], %l0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40006f44: 10 80 00 04 b 40006f54 <_Objects_Shrink_information+0x90> 40006f48: 80 a4 20 00 cmp %l0, 0 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40006f4c: e0 04 00 00 ld [ %l0 ], %l0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40006f50: 80 a4 20 00 cmp %l0, 0 40006f54: 22 80 00 07 be,a 40006f70 <_Objects_Shrink_information+0xac> 40006f58: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED 40006f5c: c2 04 00 00 ld [ %l0 ], %g1 40006f60: 80 a0 60 00 cmp %g1, 0 40006f64: 32 bf ff ed bne,a 40006f18 <_Objects_Shrink_information+0x54> 40006f68: c2 04 20 08 ld [ %l0 + 8 ], %g1 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 40006f6c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 40006f70: 40 00 06 a1 call 400089f4 <_Workspace_Free> 40006f74: d0 00 40 12 ld [ %g1 + %l2 ], %o0 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 40006f78: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 information->inactive -= information->allocation_size; 40006f7c: 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; 40006f80: c0 20 80 12 clr [ %g2 + %l2 ] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40006f84: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40006f88: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 40006f8c: c0 20 80 12 clr [ %g2 + %l2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 40006f90: 82 20 40 03 sub %g1, %g3, %g1 40006f94: c2 36 20 2c sth %g1, [ %i0 + 0x2c ] 40006f98: 81 c7 e0 08 ret 40006f9c: 81 e8 00 00 restore return; } index_base += information->allocation_size; 40006fa0: a2 04 40 10 add %l1, %l0, %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++ ) { 40006fa4: 80 a0 80 08 cmp %g2, %o0 40006fa8: 0a bf ff d3 bcs 40006ef4 <_Objects_Shrink_information+0x30> 40006fac: a5 28 a0 02 sll %g2, 2, %l2 40006fb0: 81 c7 e0 08 ret 40006fb4: 81 e8 00 00 restore 40005bd4 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40005bd4: 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; 40005bd8: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 if ( !api_configuration ) 40005bdc: 80 a6 20 00 cmp %i0, 0 40005be0: 32 80 00 05 bne,a 40005bf4 <_POSIX_API_Initialize+0x20> 40005be4: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 40005be8: 03 10 00 5c sethi %hi(0x40017000), %g1 <== NOT EXECUTED 40005bec: b0 10 61 a8 or %g1, 0x1a8, %i0 ! 400171a8 <_POSIX_Default_configuration> <== NOT EXECUTED api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 40005bf0: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 <== NOT EXECUTED api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 40005bf4: 05 10 00 63 sethi %hi(0x40018c00), %g2 40005bf8: 03 10 00 64 sethi %hi(0x40019000), %g1 40005bfc: 82 10 61 74 or %g1, 0x174, %g1 ! 40019174 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 40005c00: 40 00 13 7e call 4000a9f8 <_POSIX_signals_Manager_Initialization> 40005c04: c2 20 a0 0c st %g1, [ %g2 + 0xc ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 40005c08: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 40005c0c: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 40005c10: 40 00 13 fb call 4000abfc <_POSIX_Threads_Manager_initialization> 40005c14: 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( 40005c18: 40 00 13 21 call 4000a89c <_POSIX_Condition_variables_Manager_initialization> 40005c1c: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 40005c20: 40 00 13 2c call 4000a8d0 <_POSIX_Key_Manager_initialization> 40005c24: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 40005c28: 40 00 13 4d call 4000a95c <_POSIX_Mutex_Manager_initialization> 40005c2c: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 40005c30: 40 00 13 35 call 4000a904 <_POSIX_Message_queue_Manager_initialization> 40005c34: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 40005c38: 40 00 14 ac call 4000aee8 <_POSIX_Semaphore_Manager_initialization> 40005c3c: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 40005c40: 40 00 14 9d call 4000aeb4 <_POSIX_Timer_Manager_initialization> 40005c44: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 40005c48: 40 00 13 52 call 4000a990 <_POSIX_Barrier_Manager_initialization> 40005c4c: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 40005c50: 40 00 13 5d call 4000a9c4 <_POSIX_RWLock_Manager_initialization> 40005c54: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40005c58: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40005c5c: 40 00 13 d1 call 4000aba0 <_POSIX_Spinlock_Manager_initialization> 40005c60: 81 e8 00 00 restore 40005c64: 01 00 00 00 nop 40005de4 <_POSIX_Condition_variables_Get>: POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( pthread_cond_t *cond, Objects_Locations *location ) { 40005de4: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40005de8: 80 a6 20 00 cmp %i0, 0 40005dec: 02 80 00 0c be 40005e1c <_POSIX_Condition_variables_Get+0x38> 40005df0: b4 10 00 19 mov %i1, %i2 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40005df4: c2 06 00 00 ld [ %i0 ], %g1 40005df8: 80 a0 7f ff cmp %g1, -1 40005dfc: 32 80 00 0c bne,a 40005e2c <_POSIX_Condition_variables_Get+0x48> 40005e00: f2 06 00 00 ld [ %i0 ], %i1 /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40005e04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40005e08: 40 00 00 0d call 40005e3c <== NOT EXECUTED 40005e0c: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40005e10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005e14: 22 80 00 06 be,a 40005e2c <_POSIX_Condition_variables_Get+0x48> <== NOT EXECUTED 40005e18: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED *location = OBJECTS_ERROR; 40005e1c: 82 10 20 01 mov 1, %g1 40005e20: c2 26 80 00 st %g1, [ %i2 ] * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) _Objects_Get( &_POSIX_Condition_variables_Information, *id, location ); } 40005e24: 81 c7 e0 08 ret 40005e28: 91 e8 20 00 restore %g0, 0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40005e2c: 31 10 00 5a sethi %hi(0x40016800), %i0 40005e30: 40 00 0b c2 call 40008d38 <_Objects_Get> 40005e34: 91 ee 21 e4 restore %i0, 0x1e4, %o0 40005e38: 01 00 00 00 nop 40005fe0 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 40005fe0: 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 ) ) { 40005fe4: a0 07 bf f4 add %fp, -12, %l0 40005fe8: 90 10 00 19 mov %i1, %o0 40005fec: 40 00 00 7d call 400061e0 <_POSIX_Mutex_Get> 40005ff0: 92 10 00 10 mov %l0, %o1 40005ff4: 80 a2 20 00 cmp %o0, 0 40005ff8: 22 80 00 18 be,a 40006058 <_POSIX_Condition_variables_Wait_support+0x78> 40005ffc: b0 10 20 16 mov 0x16, %i0 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006000: 03 10 00 59 sethi %hi(0x40016400), %g1 40006004: c4 00 61 50 ld [ %g1 + 0x150 ], %g2 ! 40016550 <_Thread_Dispatch_disable_level> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 40006008: 92 10 00 10 mov %l0, %o1 4000600c: 84 00 bf ff add %g2, -1, %g2 40006010: 90 10 00 18 mov %i0, %o0 40006014: c4 20 61 50 st %g2, [ %g1 + 0x150 ] 40006018: 7f ff ff 73 call 40005de4 <_POSIX_Condition_variables_Get> 4000601c: 01 00 00 00 nop switch ( location ) { 40006020: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006024: 80 a0 60 00 cmp %g1, 0 40006028: 12 80 00 33 bne 400060f4 <_POSIX_Condition_variables_Wait_support+0x114> 4000602c: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 40006030: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40006034: 80 a0 a0 00 cmp %g2, 0 40006038: 02 80 00 0a be 40006060 <_POSIX_Condition_variables_Wait_support+0x80> 4000603c: 01 00 00 00 nop 40006040: c2 06 40 00 ld [ %i1 ], %g1 40006044: 80 a0 80 01 cmp %g2, %g1 40006048: 02 80 00 06 be 40006060 <_POSIX_Condition_variables_Wait_support+0x80> 4000604c: 01 00 00 00 nop _Thread_Enable_dispatch(); 40006050: 40 00 0d 60 call 400095d0 <_Thread_Enable_dispatch> <== NOT EXECUTED 40006054: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 40006058: 81 c7 e0 08 ret 4000605c: 81 e8 00 00 restore return EINVAL; } (void) pthread_mutex_unlock( mutex ); 40006060: 40 00 00 f0 call 40006420 40006064: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 40006068: 80 8e e0 ff btst 0xff, %i3 4000606c: 12 80 00 1b bne 400060d8 <_POSIX_Condition_variables_Wait_support+0xf8> 40006070: 21 10 00 59 sethi %hi(0x40016400), %l0 the_cond->Mutex = *mutex; 40006074: c2 06 40 00 ld [ %i1 ], %g1 40006078: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 4000607c: c2 04 22 10 ld [ %l0 + 0x210 ], %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 40006080: c6 06 00 00 ld [ %i0 ], %g3 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; 40006084: 84 04 60 18 add %l1, 0x18, %g2 _Thread_Executing->Wait.id = *cond; 40006088: c6 20 60 20 st %g3, [ %g1 + 0x20 ] 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; 4000608c: c4 20 60 44 st %g2, [ %g1 + 0x44 ] _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 40006090: 92 10 00 1a mov %i2, %o1 40006094: 90 10 00 02 mov %g2, %o0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40006098: c0 20 60 34 clr [ %g1 + 0x34 ] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 4000609c: 15 10 00 27 sethi %hi(0x40009c00), %o2 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; 400060a0: 82 10 20 01 mov 1, %g1 400060a4: 94 12 a3 1c or %o2, 0x31c, %o2 400060a8: 40 00 0e 8a call 40009ad0 <_Thread_queue_Enqueue_with_handler> 400060ac: c2 24 60 48 st %g1, [ %l1 + 0x48 ] _Thread_Enable_dispatch(); 400060b0: 40 00 0d 48 call 400095d0 <_Thread_Enable_dispatch> 400060b4: 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; 400060b8: c2 04 22 10 ld [ %l0 + 0x210 ], %g1 400060bc: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 400060c0: 80 a6 20 00 cmp %i0, 0 400060c4: 02 80 00 07 be 400060e0 <_POSIX_Condition_variables_Wait_support+0x100> 400060c8: 80 a6 20 74 cmp %i0, 0x74 400060cc: 12 80 00 0b bne 400060f8 <_POSIX_Condition_variables_Wait_support+0x118> 400060d0: 01 00 00 00 nop 400060d4: 30 80 00 03 b,a 400060e0 <_POSIX_Condition_variables_Wait_support+0x100> return status; } else { _Thread_Enable_dispatch(); 400060d8: 40 00 0d 3e call 400095d0 <_Thread_Enable_dispatch> 400060dc: b0 10 20 74 mov 0x74, %i0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 400060e0: 40 00 00 af call 4000639c 400060e4: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 400060e8: 80 a2 20 00 cmp %o0, 0 400060ec: 02 80 00 03 be 400060f8 <_POSIX_Condition_variables_Wait_support+0x118> 400060f0: 01 00 00 00 nop 400060f4: b0 10 20 16 mov 0x16, %i0 ! 16 case OBJECTS_ERROR: break; } return EINVAL; } 400060f8: 81 c7 e0 08 ret 400060fc: 81 e8 00 00 restore 4000c450 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000c450: 9d e3 bf 98 save %sp, -104, %sp uint32_t iterations; bool are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4000c454: c2 06 20 08 ld [ %i0 + 8 ], %g1 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 ]; 4000c458: 05 00 00 3f sethi %hi(0xfc00), %g2 4000c45c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000c460: 84 08 40 02 and %g1, %g2, %g2 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000c464: 83 30 60 18 srl %g1, 0x18, %g1 4000c468: 82 08 60 07 and %g1, 7, %g1 4000c46c: 82 00 60 06 add %g1, 6, %g1 4000c470: a9 28 a0 02 sll %g2, 2, %l4 4000c474: a7 28 60 02 sll %g1, 2, %l3 4000c478: a4 10 20 00 clr %l2 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000c47c: 03 10 00 64 sethi %hi(0x40019000), %g1 4000c480: aa 10 60 f4 or %g1, 0xf4, %l5 ! 400190f4 <_POSIX_Keys_Information> 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 ]; 4000c484: a0 10 20 01 mov 1, %l0 4000c488: 10 80 00 1b b 4000c4f4 <_POSIX_Keys_Run_destructors+0xa4> 4000c48c: a2 10 20 01 mov 1, %l1 are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { the_key = (POSIX_Keys_Control *) 4000c490: c2 05 60 1c ld [ %l5 + 0x1c ], %g1 4000c494: f0 00 40 02 ld [ %g1 + %g2 ], %i0 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000c498: 80 a6 20 00 cmp %i0, 0 4000c49c: 02 80 00 16 be 4000c4f4 <_POSIX_Keys_Run_destructors+0xa4> 4000c4a0: a0 04 20 01 inc %l0 4000c4a4: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1 4000c4a8: 80 a0 60 00 cmp %g1, 0 4000c4ac: 22 80 00 13 be,a 4000c4f8 <_POSIX_Keys_Run_destructors+0xa8> 4000c4b0: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED 4000c4b4: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000c4b8: 80 a0 a0 00 cmp %g2, 0 4000c4bc: 22 80 00 0f be,a 4000c4f8 <_POSIX_Keys_Run_destructors+0xa8> 4000c4c0: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000c4c4: c2 06 00 13 ld [ %i0 + %l3 ], %g1 4000c4c8: c2 00 40 14 ld [ %g1 + %l4 ], %g1 if ( value ) { 4000c4cc: 90 90 60 00 orcc %g1, 0, %o0 4000c4d0: 22 80 00 0a be,a 4000c4f8 <_POSIX_Keys_Run_destructors+0xa8> 4000c4d4: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000c4d8: 9f c0 80 00 call %g2 4000c4dc: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000c4e0: c2 06 00 13 ld [ %i0 + %l3 ], %g1 4000c4e4: c2 00 40 14 ld [ %g1 + %l4 ], %g1 4000c4e8: 80 a0 00 01 cmp %g0, %g1 4000c4ec: 82 40 3f ff addx %g0, -1, %g1 4000c4f0: a2 0c 40 01 and %l1, %g1, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000c4f4: c2 15 60 10 lduh [ %l5 + 0x10 ], %g1 4000c4f8: 80 a4 00 01 cmp %l0, %g1 4000c4fc: 08 bf ff e5 bleu 4000c490 <_POSIX_Keys_Run_destructors+0x40> 4000c500: 85 2c 20 02 sll %l0, 2, %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000c504: 80 8c 60 ff btst 0xff, %l1 4000c508: 12 80 00 05 bne 4000c51c <_POSIX_Keys_Run_destructors+0xcc> 4000c50c: a4 04 a0 01 inc %l2 * 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 ) 4000c510: 80 a4 a0 04 cmp %l2, 4 4000c514: 12 bf ff dd bne 4000c488 <_POSIX_Keys_Run_destructors+0x38> 4000c518: a0 10 20 01 mov 1, %l0 4000c51c: 81 c7 e0 08 ret 4000c520: 81 e8 00 00 restore 4001126c <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 4001126c: 9d e3 bf 88 save %sp, -120, %sp CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 40011270: 92 10 20 ff mov 0xff, %o1 40011274: 40 00 11 f8 call 40015a54 40011278: 90 10 00 18 mov %i0, %o0 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 4001127c: a8 10 00 18 mov %i0, %l4 CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 40011280: a6 10 00 08 mov %o0, %l3 const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40011284: 92 10 00 1a mov %i2, %o1 struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); if ( n > NAME_MAX ) 40011288: 80 a2 20 ff cmp %o0, 0xff 4001128c: 18 80 00 5d bgu 40011400 <_POSIX_Message_queue_Create_support+0x194> 40011290: b0 10 20 5b mov 0x5b, %i0 40011294: 05 10 00 8e sethi %hi(0x40023800), %g2 40011298: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 ! 40023b30 <_Thread_Dispatch_disable_level> 4001129c: 82 00 60 01 inc %g1 400112a0: c2 20 a3 30 st %g1, [ %g2 + 0x330 ] * 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 ) { 400112a4: a4 10 20 10 mov 0x10, %l2 400112a8: 80 a6 a0 00 cmp %i2, 0 400112ac: 02 80 00 14 be 400112fc <_POSIX_Message_queue_Create_support+0x90> 400112b0: a2 10 20 0a mov 0xa, %l1 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 400112b4: c2 06 a0 04 ld [ %i2 + 4 ], %g1 400112b8: 80 a0 60 00 cmp %g1, 0 400112bc: 04 80 00 06 ble 400112d4 <_POSIX_Message_queue_Create_support+0x68> 400112c0: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 400112c4: c2 06 a0 08 ld [ %i2 + 8 ], %g1 400112c8: 80 a0 60 00 cmp %g1, 0 400112cc: 34 80 00 08 bg,a 400112ec <_POSIX_Message_queue_Create_support+0x80> 400112d0: 90 07 bf e8 add %fp, -24, %o0 _Thread_Enable_dispatch(); 400112d4: 7f ff f2 98 call 4000dd34 <_Thread_Enable_dispatch> 400112d8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); 400112dc: 40 00 0a 3f call 40013bd8 <__errno> 400112e0: 01 00 00 00 nop 400112e4: 10 80 00 39 b 400113c8 <_POSIX_Message_queue_Create_support+0x15c> 400112e8: 82 10 20 16 mov 0x16, %g1 ! 16 } attr = *attr_ptr; 400112ec: 40 00 0c 4c call 4001441c 400112f0: 94 10 20 10 mov 0x10, %o2 400112f4: e4 07 bf f0 ld [ %fp + -16 ], %l2 400112f8: e2 07 bf ec ld [ %fp + -20 ], %l1 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 400112fc: 21 10 00 8f sethi %hi(0x40023c00), %l0 40011300: 7f ff ee e1 call 4000ce84 <_Objects_Allocate> 40011304: 90 14 22 c0 or %l0, 0x2c0, %o0 ! 40023ec0 <_POSIX_Message_queue_Information> } the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 40011308: b4 92 20 00 orcc %o0, 0, %i2 4001130c: 32 80 00 08 bne,a 4001132c <_POSIX_Message_queue_Create_support+0xc0> 40011310: 82 10 20 01 mov 1, %g1 _Thread_Enable_dispatch(); 40011314: 7f ff f2 88 call 4000dd34 <_Thread_Enable_dispatch> <== NOT EXECUTED 40011318: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENFILE ); 4001131c: 40 00 0a 2f call 40013bd8 <__errno> <== NOT EXECUTED 40011320: 01 00 00 00 nop <== NOT EXECUTED 40011324: 10 80 00 29 b 400113c8 <_POSIX_Message_queue_Create_support+0x15c> <== NOT EXECUTED 40011328: 82 10 20 17 mov 0x17, %g1 ! 17 <== NOT EXECUTED } the_mq->process_shared = pshared; 4001132c: f2 26 a0 10 st %i1, [ %i2 + 0x10 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 40011330: 90 10 00 13 mov %l3, %o0 } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 40011334: c2 2e a0 15 stb %g1, [ %i2 + 0x15 ] rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; the_mq->open_count = 1; 40011338: c2 26 a0 18 st %g1, [ %i2 + 0x18 ] /* * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); 4001133c: 7f ff f7 da call 4000f2a4 <_Workspace_Allocate> 40011340: c2 2e a0 14 stb %g1, [ %i2 + 0x14 ] if (!name) { 40011344: b2 92 20 00 orcc %o0, 0, %i1 40011348: 12 80 00 0b bne 40011374 <_POSIX_Message_queue_Create_support+0x108> 4001134c: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 40011350: 90 14 22 c0 or %l0, 0x2c0, %o0 <== NOT EXECUTED 40011354: 7f ff ef b9 call 4000d238 <_Objects_Free> <== NOT EXECUTED 40011358: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); 4001135c: 7f ff f2 76 call 4000dd34 <_Thread_Enable_dispatch> <== NOT EXECUTED 40011360: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOMEM ); 40011364: 40 00 0a 1d call 40013bd8 <__errno> <== NOT EXECUTED 40011368: 01 00 00 00 nop <== NOT EXECUTED 4001136c: 10 80 00 17 b 400113c8 <_POSIX_Message_queue_Create_support+0x15c> <== NOT EXECUTED 40011370: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED } strcpy( name, name_arg ); 40011374: 40 00 0f 4d call 400150a8 40011378: 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( 4001137c: 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; 40011380: c0 26 a0 5c clr [ %i2 + 0x5c ] if ( ! _CORE_message_queue_Initialize( 40011384: 96 10 00 12 mov %l2, %o3 40011388: 90 06 a0 1c add %i2, 0x1c, %o0 4001138c: 40 00 03 2a call 40012034 <_CORE_message_queue_Initialize> 40011390: 92 06 a0 5c add %i2, 0x5c, %o1 40011394: 80 8a 20 ff btst 0xff, %o0 40011398: 12 80 00 0f bne 400113d4 <_POSIX_Message_queue_Create_support+0x168> 4001139c: 82 14 22 c0 or %l0, 0x2c0, %g1 400113a0: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 400113a4: 7f ff ef a5 call 4000d238 <_Objects_Free> <== NOT EXECUTED 400113a8: 90 14 22 c0 or %l0, 0x2c0, %o0 <== NOT EXECUTED attr.mq_maxmsg, attr.mq_msgsize ) ) { _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); 400113ac: 7f ff f7 b7 call 4000f288 <_Workspace_Free> <== NOT EXECUTED 400113b0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400113b4: 7f ff f2 60 call 4000dd34 <_Thread_Enable_dispatch> <== NOT EXECUTED 400113b8: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSPC ); 400113bc: 40 00 0a 07 call 40013bd8 <__errno> <== NOT EXECUTED 400113c0: 01 00 00 00 nop <== NOT EXECUTED 400113c4: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 400113c8: c2 22 00 00 st %g1, [ %o0 ] 400113cc: 81 c7 e0 08 ret 400113d0: 91 e8 3f ff restore %g0, -1, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400113d4: c4 06 a0 08 ld [ %i2 + 8 ], %g2 400113d8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 400113dc: 03 00 00 3f sethi %hi(0xfc00), %g1 400113e0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400113e4: 84 08 80 01 and %g2, %g1, %g2 400113e8: 85 28 a0 02 sll %g2, 2, %g2 400113ec: f4 20 c0 02 st %i2, [ %g3 + %g2 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string */ the_object->name.name_p = name; 400113f0: f2 26 a0 0c st %i1, [ %i2 + 0xc ] &_POSIX_Message_queue_Information, &the_mq->Object, name ); *message_queue = the_mq; 400113f4: f4 26 c0 00 st %i2, [ %i3 ] _Thread_Enable_dispatch(); 400113f8: 7f ff f2 4f call 4000dd34 <_Thread_Enable_dispatch> 400113fc: b0 10 20 00 clr %i0 return 0; } 40011400: 81 c7 e0 08 ret 40011404: 81 e8 00 00 restore 40009b48 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 40009b48: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 40009b4c: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1 40009b50: 80 a0 60 00 cmp %g1, 0 40009b54: 12 80 00 16 bne 40009bac <_POSIX_Message_queue_Delete+0x64> 40009b58: b2 10 00 18 mov %i0, %i1 40009b5c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40009b60: 80 a0 60 00 cmp %g1, 0 40009b64: 12 80 00 12 bne 40009bac <_POSIX_Message_queue_Delete+0x64> 40009b68: 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 ) 40009b6c: d0 06 20 0c ld [ %i0 + 0xc ], %o0 40009b70: 80 a2 20 00 cmp %o0, 0 40009b74: 02 80 00 04 be 40009b84 <_POSIX_Message_queue_Delete+0x3c> 40009b78: 31 10 00 8f sethi %hi(0x40023c00), %i0 _Workspace_Free( (void *)the_object->name.name_p ); 40009b7c: 40 00 15 c3 call 4000f288 <_Workspace_Free> <== NOT EXECUTED 40009b80: 01 00 00 00 nop <== NOT EXECUTED _Objects_Close( &_POSIX_Message_queue_Information, the_object ); 40009b84: 92 10 00 19 mov %i1, %o1 40009b88: 40 00 0c e9 call 4000cf2c <_Objects_Close> 40009b8c: 90 16 22 c0 or %i0, 0x2c0, %o0 _CORE_message_queue_Close( 40009b90: 90 06 60 1c add %i1, 0x1c, %o0 40009b94: 92 10 20 00 clr %o1 40009b98: 94 10 20 05 mov 5, %o2 40009b9c: 40 00 09 eb call 4000c348 <_CORE_message_queue_Close> 40009ba0: b0 16 22 c0 or %i0, 0x2c0, %i0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 40009ba4: 40 00 0d a5 call 4000d238 <_Objects_Free> 40009ba8: 81 e8 00 00 restore 40009bac: 81 c7 e0 08 ret 40009bb0: 81 e8 00 00 restore 40006f34 <_POSIX_Mutex_Get>: POSIX_Mutex_Control *_POSIX_Mutex_Get ( pthread_mutex_t *mutex, Objects_Locations *location ) { 40006f34: 9d e3 bf 98 save %sp, -104, %sp Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40006f38: 80 a6 20 00 cmp %i0, 0 40006f3c: 02 80 00 0c be 40006f6c <_POSIX_Mutex_Get+0x38> 40006f40: b4 10 00 19 mov %i1, %i2 40006f44: c2 06 00 00 ld [ %i0 ], %g1 40006f48: 80 a0 7f ff cmp %g1, -1 40006f4c: 32 80 00 0c bne,a 40006f7c <_POSIX_Mutex_Get+0x48> 40006f50: f2 06 00 00 ld [ %i0 ], %i1 40006f54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40006f58: 40 00 00 20 call 40006fd8 <== NOT EXECUTED 40006f5c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006f60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006f64: 22 80 00 06 be,a 40006f7c <_POSIX_Mutex_Get+0x48> <== NOT EXECUTED 40006f68: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED 40006f6c: 82 10 20 01 mov 1, %g1 40006f70: c2 26 80 00 st %g1, [ %i2 ] return (POSIX_Mutex_Control *) _Objects_Get( &_POSIX_Mutex_Information, *id, location ); } 40006f74: 81 c7 e0 08 ret 40006f78: 91 e8 20 00 restore %g0, 0, %o0 { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 40006f7c: 31 10 00 62 sethi %hi(0x40018800), %i0 40006f80: 40 00 0b 9b call 40009dec <_Objects_Get> 40006f84: 91 ee 21 30 restore %i0, 0x130, %o0 40006f88: 01 00 00 00 nop 40006ed4 <_POSIX_Mutex_Get_interrupt_disable>: POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable ( pthread_mutex_t *mutex, Objects_Locations *location, ISR_Level *level ) { 40006ed4: 9d e3 bf 98 save %sp, -104, %sp 40006ed8: a0 10 00 19 mov %i1, %l0 Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40006edc: 80 a6 20 00 cmp %i0, 0 40006ee0: 02 80 00 0c be 40006f10 <_POSIX_Mutex_Get_interrupt_disable+0x3c> 40006ee4: b6 10 00 1a mov %i2, %i3 40006ee8: c2 06 00 00 ld [ %i0 ], %g1 40006eec: 80 a0 7f ff cmp %g1, -1 40006ef0: 32 80 00 0c bne,a 40006f20 <_POSIX_Mutex_Get_interrupt_disable+0x4c> 40006ef4: f2 06 00 00 ld [ %i0 ], %i1 40006ef8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40006efc: 40 00 00 37 call 40006fd8 <== NOT EXECUTED 40006f00: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006f04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006f08: 22 80 00 06 be,a 40006f20 <_POSIX_Mutex_Get_interrupt_disable+0x4c> <== NOT EXECUTED 40006f0c: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED 40006f10: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40006f14: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED return (POSIX_Mutex_Control *) _Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level ); } 40006f18: 81 c7 e0 08 ret <== NOT EXECUTED 40006f1c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); return (POSIX_Mutex_Control *) 40006f20: b4 10 00 10 mov %l0, %i2 40006f24: 31 10 00 62 sethi %hi(0x40018800), %i0 40006f28: 40 00 0b 93 call 40009d74 <_Objects_Get_isr_disable> 40006f2c: 91 ee 21 30 restore %i0, 0x130, %o0 40006f30: 01 00 00 00 nop 4000e5e8 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 4000e5e8: 9d e3 bf 98 save %sp, -104, %sp 4000e5ec: 03 10 00 7d sethi %hi(0x4001f400), %g1 4000e5f0: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 4001f4b0 <_Thread_Dispatch_disable_level> 4000e5f4: 84 00 a0 01 inc %g2 4000e5f8: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 4000e5fc: 80 a6 60 00 cmp %i1, 0 4000e600: 02 80 00 08 be 4000e620 <_POSIX_Semaphore_Create_support+0x38> 4000e604: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 4000e608: 7f ff f0 b7 call 4000a8e4 <_Thread_Enable_dispatch> 4000e60c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSYS ); 4000e610: 40 00 08 80 call 40010810 <__errno> 4000e614: 01 00 00 00 nop 4000e618: 10 80 00 19 b 4000e67c <_POSIX_Semaphore_Create_support+0x94> 4000e61c: 82 10 20 58 mov 0x58, %g1 ! 58 } if ( name ) { 4000e620: 02 80 00 0d be 4000e654 <_POSIX_Semaphore_Create_support+0x6c> 4000e624: 11 10 00 7d sethi %hi(0x4001f400), %o0 if( strlen(name) > PATH_MAX ) { 4000e628: 40 00 0f 44 call 40012338 4000e62c: 90 10 00 18 mov %i0, %o0 4000e630: 80 a2 20 ff cmp %o0, 0xff 4000e634: 28 80 00 08 bleu,a 4000e654 <_POSIX_Semaphore_Create_support+0x6c> 4000e638: 11 10 00 7d sethi %hi(0x4001f400), %o0 _Thread_Enable_dispatch(); 4000e63c: 7f ff f0 aa call 4000a8e4 <_Thread_Enable_dispatch> <== NOT EXECUTED 4000e640: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000e644: 40 00 08 73 call 40010810 <__errno> <== NOT EXECUTED 4000e648: 01 00 00 00 nop <== NOT EXECUTED 4000e64c: 10 80 00 0c b 4000e67c <_POSIX_Semaphore_Create_support+0x94> <== NOT EXECUTED 4000e650: 82 10 20 5b mov 0x5b, %g1 ! 5b <== NOT EXECUTED * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 4000e654: 7f ff ed 24 call 40009ae4 <_Objects_Allocate> 4000e658: 90 12 23 c0 or %o0, 0x3c0, %o0 } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 4000e65c: b2 92 20 00 orcc %o0, 0, %i1 4000e660: 12 80 00 0a bne 4000e688 <_POSIX_Semaphore_Create_support+0xa0> 4000e664: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); 4000e668: 7f ff f0 9f call 4000a8e4 <_Thread_Enable_dispatch> 4000e66c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); 4000e670: 40 00 08 68 call 40010810 <__errno> 4000e674: 01 00 00 00 nop 4000e678: 82 10 20 1c mov 0x1c, %g1 ! 1c 4000e67c: c2 22 00 00 st %g1, [ %o0 ] 4000e680: 81 c7 e0 08 ret 4000e684: 91 e8 3f ff restore %g0, -1, %o0 } the_semaphore->process_shared = pshared; if ( name ) { 4000e688: 02 80 00 07 be 4000e6a4 <_POSIX_Semaphore_Create_support+0xbc> 4000e68c: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000e690: 82 10 20 01 mov 1, %g1 the_semaphore->linked = TRUE; 4000e694: c2 2e 60 15 stb %g1, [ %i1 + 0x15 ] the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; 4000e698: c2 26 60 18 st %g1, [ %i1 + 0x18 ] } the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 4000e69c: 10 80 00 05 b 4000e6b0 <_POSIX_Semaphore_Create_support+0xc8> 4000e6a0: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ] the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 4000e6a4: c0 2e 60 14 clrb [ %i1 + 0x14 ] the_semaphore->open_count = 0; 4000e6a8: c0 26 60 18 clr [ %i1 + 0x18 ] the_semaphore->linked = FALSE; 4000e6ac: c0 2e 60 15 clrb [ %i1 + 0x15 ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000e6b0: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000e6b4: 94 10 00 1a mov %i2, %o2 4000e6b8: 90 06 60 1c add %i1, 0x1c, %o0 4000e6bc: 92 06 60 5c add %i1, 0x5c, %o1 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 4000e6c0: c2 26 60 5c st %g1, [ %i1 + 0x5c ] _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 4000e6c4: 7f ff eb e0 call 40009644 <_CORE_semaphore_Initialize> 4000e6c8: c0 26 60 60 clr [ %i1 + 0x60 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000e6cc: c4 06 60 08 ld [ %i1 + 8 ], %g2 4000e6d0: 03 10 00 7d sethi %hi(0x4001f400), %g1 4000e6d4: c6 00 63 dc ld [ %g1 + 0x3dc ], %g3 ! 4001f7dc <_POSIX_Semaphore_Information+0x1c> 4000e6d8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000e6dc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000e6e0: 84 08 80 01 and %g2, %g1, %g2 4000e6e4: 85 28 a0 02 sll %g2, 2, %g2 4000e6e8: 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; 4000e6ec: f0 26 60 0c st %i0, [ %i1 + 0xc ] &_POSIX_Semaphore_Information, &the_semaphore->Object, name_p ); *the_sem = the_semaphore; 4000e6f0: f2 26 c0 00 st %i1, [ %i3 ] _Thread_Enable_dispatch(); 4000e6f4: 7f ff f0 7c call 4000a8e4 <_Thread_Enable_dispatch> 4000e6f8: b0 10 20 00 clr %i0 return 0; } 4000e6fc: 81 c7 e0 08 ret 4000e700: 81 e8 00 00 restore 4000ace4 <_POSIX_Threads_Create_extension>: bool _POSIX_Threads_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4000ace4: 9d e3 bf 98 save %sp, -104, %sp POSIX_API_Control *api; POSIX_API_Control *executing_api; api = _Workspace_Allocate( sizeof( POSIX_API_Control ) ); 4000ace8: 90 10 20 e4 mov 0xe4, %o0 4000acec: 7f ff f7 49 call 40008a10 <_Workspace_Allocate> 4000acf0: b0 10 20 00 clr %i0 if ( !api ) 4000acf4: a2 92 20 00 orcc %o0, 0, %l1 4000acf8: 02 80 00 38 be 4000add8 <_POSIX_Threads_Create_extension+0xf4> 4000acfc: 94 10 20 38 mov 0x38, %o2 return false; created->API_Extensions[ THREAD_API_POSIX ] = api; 4000ad00: e2 26 61 60 st %l1, [ %i1 + 0x160 ] /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; 4000ad04: 21 10 00 5d sethi %hi(0x40017400), %l0 4000ad08: a0 14 21 c0 or %l0, 0x1c0, %l0 ! 400175c0 <_POSIX_Threads_Default_attributes> 4000ad0c: 40 00 09 f5 call 4000d4e0 4000ad10: 92 10 00 10 mov %l0, %o1 api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 4000ad14: 82 10 20 01 mov 1, %g1 api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 4000ad18: 92 04 20 18 add %l0, 0x18, %o1 created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; 4000ad1c: c2 24 60 7c st %g1, [ %l1 + 0x7c ] created->API_Extensions[ THREAD_API_POSIX ] = api; /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; 4000ad20: c2 24 60 38 st %g1, [ %l1 + 0x38 ] api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; 4000ad24: 90 04 60 80 add %l1, 0x80, %o0 4000ad28: 40 00 09 ee call 4000d4e0 4000ad2c: 94 10 20 18 mov 0x18, %o2 api->schedparam.sched_priority = 4000ad30: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 4000ad34: 82 10 20 ff mov 0xff, %g1 4000ad38: 82 20 40 02 sub %g1, %g2, %g1 * If the thread is not a posix thread, then all posix signals are blocked * by default. */ /* XXX use signal constants */ api->signals_pending = 0; 4000ad3c: c0 24 60 c8 clr [ %l1 + 0xc8 ] /* XXX check all fields are touched */ api->Attributes = _POSIX_Threads_Default_attributes; api->detachstate = _POSIX_Threads_Default_attributes.detachstate; api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy; api->schedparam = _POSIX_Threads_Default_attributes.schedparam; api->schedparam.sched_priority = 4000ad40: c2 24 60 80 st %g1, [ %l1 + 0x80 ] * by default. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API && 4000ad44: c6 06 60 08 ld [ %i1 + 8 ], %g3 4000ad48: 82 04 60 dc add %l1, 0xdc, %g1 _POSIX_Priority_From_core( created->current_priority ); /* * POSIX 1003.1 1996, 18.2.2.2 */ api->cancelation_requested = 0; 4000ad4c: c0 24 60 d4 clr [ %l1 + 0xd4 ] 4000ad50: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] api->cancelability_state = PTHREAD_CANCEL_ENABLE; 4000ad54: c0 24 60 cc clr [ %l1 + 0xcc ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ad58: 82 04 60 d8 add %l1, 0xd8, %g1 api->cancelability_type = PTHREAD_CANCEL_DEFERRED; 4000ad5c: c0 24 60 d0 clr [ %l1 + 0xd0 ] 4000ad60: c2 24 60 e0 st %g1, [ %l1 + 0xe0 ] * by default. */ /* XXX use signal constants */ api->signals_pending = 0; if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API && 4000ad64: 83 30 e0 18 srl %g3, 0x18, %g1 4000ad68: 82 08 60 07 and %g1, 7, %g1 4000ad6c: 80 a0 60 03 cmp %g1, 3 4000ad70: 12 80 00 0b bne 4000ad9c <_POSIX_Threads_Create_extension+0xb8> 4000ad74: c0 24 60 dc clr [ %l1 + 0xdc ] 4000ad78: 83 30 e0 1b srl %g3, 0x1b, %g1 4000ad7c: 80 a0 60 01 cmp %g1, 1 4000ad80: 32 80 00 08 bne,a 4000ada0 <_POSIX_Threads_Create_extension+0xbc> 4000ad84: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED _Objects_Get_class( created->Object.id ) == 1 ) { executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api->signals_blocked = executing_api->signals_blocked; 4000ad88: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000ad8c: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 40018d60 <_Thread_Executing> 4000ad90: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 4000ad94: 10 80 00 03 b 4000ada0 <_POSIX_Threads_Create_extension+0xbc> 4000ad98: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 } else { api->signals_blocked = 0xffffffff; 4000ad9c: 82 10 3f ff mov -1, %g1 4000ada0: c2 24 60 c4 st %g1, [ %l1 + 0xc4 ] } _Thread_queue_Initialize( 4000ada4: 90 04 60 3c add %l1, 0x3c, %o0 4000ada8: 92 10 20 00 clr %o1 4000adac: 15 00 00 04 sethi %hi(0x1000), %o2 4000adb0: 7f ff f4 02 call 40007db8 <_Thread_queue_Initialize> 4000adb4: 96 10 20 00 clr %o3 THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_JOIN_AT_EXIT, 0 ); _Watchdog_Initialize( 4000adb8: c2 06 60 08 ld [ %i1 + 8 ], %g1 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4000adbc: f2 24 60 c0 st %i1, [ %l1 + 0xc0 ] void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000adc0: c2 24 60 bc st %g1, [ %l1 + 0xbc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000adc4: c0 24 60 a4 clr [ %l1 + 0xa4 ] the_watchdog->routine = routine; 4000adc8: 03 10 00 2b sethi %hi(0x4000ac00), %g1 the_watchdog->id = id; the_watchdog->user_data = user_data; 4000adcc: b0 10 20 01 mov 1, %i0 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000add0: 82 10 62 30 or %g1, 0x230, %g1 4000add4: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] created->Object.id, created ); return true; } 4000add8: 81 c7 e0 08 ret 4000addc: 81 e8 00 00 restore 4000ae30 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000ae30: 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 ]; 4000ae34: f0 06 61 60 ld [ %i1 + 0x160 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000ae38: 40 00 03 fb call 4000be24 <_Timespec_To_ticks> 4000ae3c: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000ae40: 80 a2 20 00 cmp %o0, 0 4000ae44: 22 80 00 02 be,a 4000ae4c <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000ae48: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000ae4c: 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 || 4000ae50: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000ae54: 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; 4000ae58: d0 26 60 78 st %o0, [ %i1 + 0x78 ] 4000ae5c: 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 || 4000ae60: 80 a0 e0 00 cmp %g3, 0 4000ae64: 02 80 00 06 be 4000ae7c <_POSIX_Threads_Sporadic_budget_TSR+0x4c> 4000ae68: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000ae6c: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000ae70: 80 a0 40 09 cmp %g1, %o1 4000ae74: 08 80 00 05 bleu 4000ae88 <_POSIX_Threads_Sporadic_budget_TSR+0x58> 4000ae78: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000ae7c: 90 10 00 19 mov %i1, %o0 4000ae80: 7f ff f0 63 call 4000700c <_Thread_Change_priority> 4000ae84: 94 10 20 01 mov 1, %o2 ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000ae88: 40 00 03 e7 call 4000be24 <_Timespec_To_ticks> 4000ae8c: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000ae90: 80 a2 20 00 cmp %o0, 0 4000ae94: 22 80 00 02 be,a 4000ae9c <_POSIX_Threads_Sporadic_budget_TSR+0x6c> 4000ae98: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000ae9c: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000aea0: b2 06 20 9c add %i0, 0x9c, %i1 4000aea4: 31 10 00 63 sethi %hi(0x40018c00), %i0 4000aea8: 7f ff f6 25 call 4000873c <_Watchdog_Insert> 4000aeac: 91 ee 21 80 restore %i0, 0x180, %o0 4000aeb0: 01 00 00 00 nop 4000ade0 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000ade0: c2 02 21 60 ld [ %o0 + 0x160 ], %g1 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 || 4000ade4: c6 02 20 1c ld [ %o0 + 0x1c ], %g3 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000ade8: c4 00 60 84 ld [ %g1 + 0x84 ], %g2 * 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 */ 4000adec: 82 10 3f ff mov -1, %g1 4000adf0: c2 22 20 78 st %g1, [ %o0 + 0x78 ] 4000adf4: 82 10 20 ff mov 0xff, %g1 4000adf8: 92 20 40 02 sub %g1, %g2, %o1 new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000adfc: 80 a0 e0 00 cmp %g3, 0 4000ae00: 02 80 00 06 be 4000ae18 <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000ae04: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000ae08: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000ae0c: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED 4000ae10: 08 80 00 06 bleu 4000ae28 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000ae14: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000ae18: 94 10 20 01 mov 1, %o2 ! 1 4000ae1c: 82 13 c0 00 mov %o7, %g1 4000ae20: 7f ff f0 7b call 4000700c <_Thread_Change_priority> 4000ae24: 9e 10 40 00 mov %g1, %o7 4000ae28: 81 c3 e0 08 retl <== NOT EXECUTED 4000ae2c: 01 00 00 00 nop 4000c3e8 <_POSIX_Threads_cancel_run>: #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4000c3e8: 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 ]; 4000c3ec: f0 06 21 60 ld [ %i0 + 0x160 ], %i0 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4000c3f0: 82 10 20 01 mov 1, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000c3f4: a2 06 20 dc add %i0, 0xdc, %l1 4000c3f8: 10 80 00 10 b 4000c438 <_POSIX_Threads_cancel_run+0x50> 4000c3fc: c2 26 20 cc st %g1, [ %i0 + 0xcc ] while ( !_Chain_Is_empty( handler_stack ) ) { _ISR_Disable( level ); 4000c400: 7f ff d6 37 call 40001cdc <== NOT EXECUTED 4000c404: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 4000c408: e0 04 60 04 ld [ %l1 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000c40c: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 4000c410: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000c414: 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; 4000c418: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4000c41c: 7f ff d6 34 call 40001cec <== NOT EXECUTED 4000c420: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 4000c424: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000c428: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000c42c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED _Workspace_Free( handler ); 4000c430: 7f ff f1 71 call 400089f4 <_Workspace_Free> <== NOT EXECUTED 4000c434: 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 ) ) { 4000c438: c2 06 20 d8 ld [ %i0 + 0xd8 ], %g1 4000c43c: 80 a0 40 11 cmp %g1, %l1 4000c440: 12 bf ff f0 bne 4000c400 <_POSIX_Threads_cancel_run+0x18> 4000c444: 01 00 00 00 nop (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4000c448: 81 c7 e0 08 ret 4000c44c: 81 e8 00 00 restore 4000d1dc <_POSIX_Timer_Insert_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000d1dc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000d1e0: 7f ff f5 91 call 4000a824 <_Watchdog_Remove> 4000d1e4: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000d1e8: 7f ff d5 b5 call 400028bc 4000d1ec: 01 00 00 00 nop 4000d1f0: 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 ) { 4000d1f4: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000d1f8: 80 a0 60 00 cmp %g1, 0 4000d1fc: 22 80 00 06 be,a 4000d214 <_POSIX_Timer_Insert_helper+0x38> 4000d200: f6 26 20 1c st %i3, [ %i0 + 0x1c ] _ISR_Enable( level ); 4000d204: 7f ff d5 b2 call 400028cc <== NOT EXECUTED 4000d208: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000d20c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d210: 81 e8 00 00 restore <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000d214: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000d218: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000d21c: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000d220: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000d224: 92 10 00 18 mov %i0, %o1 4000d228: 11 10 00 76 sethi %hi(0x4001d800), %o0 4000d22c: 7f ff f5 24 call 4000a6bc <_Watchdog_Insert> 4000d230: 90 12 20 00 mov %o0, %o0 ! 4001d800 <_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 ); 4000d234: b0 10 20 01 mov 1, %i0 4000d238: 7f ff d5 a5 call 400028cc 4000d23c: 90 10 00 10 mov %l0, %o0 return true; } 4000d240: 81 c7 e0 08 ret 4000d244: 81 e8 00 00 restore 40006a10 <_POSIX_Timer_TSR>: /* * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 40006a10: 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; 40006a14: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40006a18: 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; 40006a1c: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 40006a20: 80 a0 a0 00 cmp %g2, 0 40006a24: 12 80 00 06 bne 40006a3c <_POSIX_Timer_TSR+0x2c> 40006a28: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 40006a2c: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 40006a30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006a34: 02 80 00 0f be 40006a70 <_POSIX_Timer_TSR+0x60> <== NOT EXECUTED 40006a38: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 40006a3c: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 40006a40: d4 06 60 08 ld [ %i1 + 8 ], %o2 40006a44: 90 06 60 10 add %i1, 0x10, %o0 40006a48: 17 10 00 1a sethi %hi(0x40006800), %o3 40006a4c: 98 10 00 19 mov %i1, %o4 40006a50: 40 00 19 e3 call 4000d1dc <_POSIX_Timer_Insert_helper> 40006a54: 96 12 e2 10 or %o3, 0x210, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 40006a58: 80 8a 20 ff btst 0xff, %o0 40006a5c: 02 80 00 0a be 40006a84 <_POSIX_Timer_TSR+0x74> 40006a60: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 40006a64: 40 00 05 e9 call 40008208 <_TOD_Get> 40006a68: 90 06 60 6c add %i1, 0x6c, %o0 40006a6c: 82 10 20 03 mov 3, %g1 /* * 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 ) ) { 40006a70: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 40006a74: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 40006a78: 40 00 18 fe call 4000ce70 40006a7c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 40006a80: c0 26 60 68 clr [ %i1 + 0x68 ] 40006a84: 81 c7 e0 08 ret 40006a88: 81 e8 00 00 restore 4000c5c8 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, bool is_global, bool check_blocked ) { 4000c5c8: 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 ); 4000c5cc: 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 ) 4000c5d0: 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 ); 4000c5d4: 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 ) 4000c5d8: b8 10 3f ff mov -1, %i4 4000c5dc: 02 80 00 04 be 4000c5ec <_POSIX_signals_Clear_signals+0x24> 4000c5e0: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000c5e4: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000c5e8: 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 ); 4000c5ec: 7f ff d5 bc call 40001cdc 4000c5f0: 01 00 00 00 nop 4000c5f4: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000c5f8: 80 8e e0 ff btst 0xff, %i3 4000c5fc: 22 80 00 35 be,a 4000c6d0 <_POSIX_signals_Clear_signals+0x108> 4000c600: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000c604: 03 10 00 65 sethi %hi(0x40019400), %g1 4000c608: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001943c <_POSIX_signals_Pending> 4000c60c: 82 0c 00 01 and %l0, %g1, %g1 4000c610: 80 88 40 1c btst %g1, %i4 4000c614: 02 80 00 35 be 4000c6e8 <_POSIX_signals_Clear_signals+0x120> 4000c618: 83 2e 60 02 sll %i1, 2, %g1 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000c61c: 85 2e 60 04 sll %i1, 4, %g2 4000c620: 84 20 80 01 sub %g2, %g1, %g2 4000c624: 03 10 00 64 sethi %hi(0x40019000), %g1 4000c628: 82 10 62 70 or %g1, 0x270, %g1 ! 40019270 <_POSIX_signals_Vectors> 4000c62c: c2 00 40 02 ld [ %g1 + %g2 ], %g1 4000c630: 80 a0 60 02 cmp %g1, 2 4000c634: 12 80 00 23 bne 4000c6c0 <_POSIX_signals_Clear_signals+0xf8> 4000c638: 03 10 00 65 sethi %hi(0x40019400), %g1 psiginfo = (POSIX_signals_Siginfo_node *) 4000c63c: 88 10 60 40 or %g1, 0x40, %g4 ! 40019440 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000c640: f8 00 80 04 ld [ %g2 + %g4 ], %i4 4000c644: 86 00 80 04 add %g2, %g4, %g3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000c648: 9a 00 e0 04 add %g3, 4, %o5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4000c64c: 80 a7 00 0d cmp %i4, %o5 4000c650: 32 80 00 04 bne,a 4000c660 <_POSIX_signals_Clear_signals+0x98> 4000c654: c2 07 00 00 ld [ %i4 ], %g1 4000c658: 10 80 00 04 b 4000c668 <_POSIX_signals_Clear_signals+0xa0> <== NOT EXECUTED 4000c65c: b8 10 20 00 clr %i4 <== NOT EXECUTED Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4000c660: c2 20 80 04 st %g1, [ %g2 + %g4 ] new_first->previous = _Chain_Head(the_chain); 4000c664: c6 20 60 04 st %g3, [ %g1 + 4 ] _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000c668: c2 00 80 04 ld [ %g2 + %g4 ], %g1 4000c66c: 80 a0 40 0d cmp %g1, %o5 4000c670: 12 80 00 05 bne 4000c684 <_POSIX_signals_Clear_signals+0xbc> 4000c674: 80 a7 20 00 cmp %i4, 0 _POSIX_signals_Clear_process_signals( mask ); 4000c678: 40 00 01 90 call 4000ccb8 <_POSIX_signals_Clear_process_signals> 4000c67c: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000c680: 80 a7 20 00 cmp %i4, 0 4000c684: 02 80 00 1a be 4000c6ec <_POSIX_signals_Clear_signals+0x124> 4000c688: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000c68c: 90 10 00 1a mov %i2, %o0 4000c690: 92 07 20 08 add %i4, 8, %o1 4000c694: 40 00 03 93 call 4000d4e0 4000c698: 94 10 20 0c mov 0xc, %o2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000c69c: 03 10 00 64 sethi %hi(0x40019000), %g1 4000c6a0: 82 10 63 f4 or %g1, 0x3f4, %g1 ! 400193f4 <_POSIX_signals_Inactive_siginfo+0x4> 4000c6a4: c2 27 00 00 st %g1, [ %i4 ] old_last_node = the_chain->last; 4000c6a8: 82 00 7f fc add %g1, -4, %g1 4000c6ac: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000c6b0: f8 20 60 08 st %i4, [ %g1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000c6b4: 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; 4000c6b8: 10 80 00 04 b 4000c6c8 <_POSIX_signals_Clear_signals+0x100> 4000c6bc: f8 20 80 00 st %i4, [ %g2 ] &psiginfo->Node ); } else do_callout = false; } else _POSIX_signals_Clear_process_signals( mask ); 4000c6c0: 40 00 01 7e call 4000ccb8 <_POSIX_signals_Clear_process_signals> 4000c6c4: 90 10 00 10 mov %l0, %o0 4000c6c8: 10 80 00 09 b 4000c6ec <_POSIX_signals_Clear_signals+0x124> 4000c6cc: b0 10 20 01 mov 1, %i0 do_callout = true; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000c6d0: 82 0c 00 02 and %l0, %g2, %g1 4000c6d4: 80 88 40 1c btst %g1, %i4 4000c6d8: 02 80 00 04 be 4000c6e8 <_POSIX_signals_Clear_signals+0x120> 4000c6dc: 82 28 80 10 andn %g2, %l0, %g1 api->signals_pending &= ~mask; 4000c6e0: 10 bf ff fa b 4000c6c8 <_POSIX_signals_Clear_signals+0x100> 4000c6e4: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000c6e8: b0 10 20 00 clr %i0 do_callout = true; } } _ISR_Enable( level ); 4000c6ec: 7f ff d5 80 call 40001cec 4000c6f0: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000c6f4: 81 c7 e0 08 ret 4000c6f8: 81 e8 00 00 restore 40005ec0 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 40005ec0: 86 10 00 08 mov %o0, %g3 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 40005ec4: 84 10 20 01 mov 1, %g2 #include int _POSIX_signals_Get_highest( sigset_t set ) { 40005ec8: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 40005ecc: 82 02 3f ff add %o0, -1, %g1 40005ed0: 83 28 80 01 sll %g2, %g1, %g1 40005ed4: 80 88 40 03 btst %g1, %g3 40005ed8: 12 80 00 12 bne 40005f20 <_POSIX_signals_Get_highest+0x60> 40005edc: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 40005ee0: 90 02 20 01 inc %o0 40005ee4: 80 a2 20 20 cmp %o0, 0x20 40005ee8: 12 bf ff fa bne 40005ed0 <_POSIX_signals_Get_highest+0x10> 40005eec: 82 02 3f ff add %o0, -1, %g1 40005ef0: 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 ) ) 40005ef4: 84 10 20 01 mov 1, %g2 40005ef8: 82 02 3f ff add %o0, -1, %g1 40005efc: 83 28 80 01 sll %g2, %g1, %g1 40005f00: 80 88 40 03 btst %g1, %g3 40005f04: 12 80 00 07 bne 40005f20 <_POSIX_signals_Get_highest+0x60> 40005f08: 01 00 00 00 nop return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 40005f0c: 90 02 20 01 inc %o0 40005f10: 80 a2 20 1b cmp %o0, 0x1b 40005f14: 12 bf ff fa bne 40005efc <_POSIX_signals_Get_highest+0x3c> 40005f18: 82 02 3f ff add %o0, -1, %g1 40005f1c: 90 10 20 00 clr %o0 <== NOT EXECUTED if ( set & signo_to_mask( signo ) ) return signo; } return 0; } 40005f20: 81 c3 e0 08 retl 40005f24: 01 00 00 00 nop 4000aab0 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000aab0: 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 ]; 4000aab4: e0 06 21 60 ld [ %i0 + 0x160 ], %l0 if ( !api ) 4000aab8: 80 a4 20 00 cmp %l0, 0 4000aabc: 02 80 00 33 be 4000ab88 <_POSIX_signals_Post_switch_extension+0xd8> 4000aac0: 03 10 00 65 sethi %hi(0x40019400), %g1 * processed at all. No point in doing this loop otherwise. */ while (1) { restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & 4000aac4: a2 10 60 3c or %g1, 0x3c, %l1 ! 4001943c <_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 ); 4000aac8: 7f ff dc 85 call 40001cdc 4000aacc: 01 00 00 00 nop 4000aad0: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000aad4: c2 04 40 00 ld [ %l1 ], %g1 4000aad8: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000aadc: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000aae0: 82 10 40 02 or %g1, %g2, %g1 4000aae4: 80 a8 40 03 andncc %g1, %g3, %g0 4000aae8: 12 80 00 04 bne 4000aaf8 <_POSIX_signals_Post_switch_extension+0x48> 4000aaec: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000aaf0: 7f ff dc 7f call 40001cec 4000aaf4: 81 e8 00 00 restore break; } _ISR_Enable( level ); 4000aaf8: 7f ff dc 7d call 40001cec 4000aafc: b0 10 20 1b mov 0x1b, %i0 for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, false ) ) 4000ab00: 92 10 00 18 mov %i0, %o1 4000ab04: 94 10 20 00 clr %o2 4000ab08: 40 00 06 87 call 4000c524 <_POSIX_signals_Check_signal> 4000ab0c: 90 10 00 10 mov %l0, %o0 4000ab10: 80 8a 20 ff btst 0xff, %o0 4000ab14: 12 bf ff ed bne 4000aac8 <_POSIX_signals_Post_switch_extension+0x18> 4000ab18: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000ab1c: 90 10 00 10 mov %l0, %o0 4000ab20: 94 10 20 01 mov 1, %o2 4000ab24: 40 00 06 80 call 4000c524 <_POSIX_signals_Check_signal> 4000ab28: b0 06 20 01 inc %i0 4000ab2c: 80 8a 20 ff btst 0xff, %o0 4000ab30: 12 bf ff e6 bne 4000aac8 <_POSIX_signals_Post_switch_extension+0x18> 4000ab34: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000ab38: 12 bf ff f3 bne 4000ab04 <_POSIX_signals_Post_switch_extension+0x54> 4000ab3c: 92 10 00 18 mov %i0, %o1 4000ab40: 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 ) ) 4000ab44: 92 10 00 18 mov %i0, %o1 4000ab48: 94 10 20 00 clr %o2 4000ab4c: 40 00 06 76 call 4000c524 <_POSIX_signals_Check_signal> 4000ab50: 90 10 00 10 mov %l0, %o0 4000ab54: 80 8a 20 ff btst 0xff, %o0 4000ab58: 12 bf ff dc bne 4000aac8 <_POSIX_signals_Post_switch_extension+0x18> 4000ab5c: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, true ) ) 4000ab60: 90 10 00 10 mov %l0, %o0 4000ab64: 94 10 20 01 mov 1, %o2 4000ab68: 40 00 06 6f call 4000c524 <_POSIX_signals_Check_signal> 4000ab6c: b0 06 20 01 inc %i0 4000ab70: 80 8a 20 ff btst 0xff, %o0 4000ab74: 12 bf ff d5 bne 4000aac8 <_POSIX_signals_Post_switch_extension+0x18> 4000ab78: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000ab7c: 12 bf ff f3 bne 4000ab48 <_POSIX_signals_Post_switch_extension+0x98> 4000ab80: 92 10 00 18 mov %i0, %o1 4000ab84: 30 bf ff d1 b,a 4000aac8 <_POSIX_signals_Post_switch_extension+0x18> <== NOT EXECUTED 4000ab88: 81 c7 e0 08 ret <== NOT EXECUTED 4000ab8c: 81 e8 00 00 restore <== NOT EXECUTED 40005114 <_POSIX_signals_Ualarm_TSR>: void _POSIX_signals_Ualarm_TSR( Objects_Id id, void *argument ) { 40005114: 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 ); 40005118: 7f ff f4 6b call 400022c4 4000511c: 33 10 00 54 sethi %hi(0x40015000), %i1 40005120: 7f ff ff 1a call 40004d88 40005124: 92 10 20 0e mov 0xe, %o1 RTEMS_INLINE_ROUTINE void _Watchdog_Reset( Watchdog_Control *the_watchdog ) { (void) _Watchdog_Remove( the_watchdog ); 40005128: 40 00 0f 94 call 40008f78 <_Watchdog_Remove> 4000512c: 90 16 63 1c or %i1, 0x31c, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40005130: 31 10 00 55 sethi %hi(0x40015400), %i0 40005134: b2 16 63 1c or %i1, 0x31c, %i1 40005138: 40 00 0f 36 call 40008e10 <_Watchdog_Insert> 4000513c: 91 ee 21 60 restore %i0, 0x160, %o0 40005140: 01 00 00 00 nop <== NOT EXECUTED 4002316c <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 4002316c: 9d e3 bf 98 save %sp, -104, %sp Heap_Get_information_status status; if ( !the_heap ) 40023170: 80 a6 20 00 cmp %i0, 0 40023174: 02 80 00 10 be 400231b4 <_Protected_heap_Get_information+0x48> 40023178: 80 a6 60 00 cmp %i1, 0 return false; if ( !the_info ) 4002317c: 02 80 00 0e be 400231b4 <_Protected_heap_Get_information+0x48> 40023180: 23 10 01 72 sethi %hi(0x4005c800), %l1 return false; _RTEMS_Lock_allocator(); 40023184: 7f ff 9b 42 call 40009e8c <_API_Mutex_Lock> 40023188: d0 04 61 38 ld [ %l1 + 0x138 ], %o0 ! 4005c938 <_RTEMS_Allocator_Mutex> status = _Heap_Get_information( the_heap, the_info ); 4002318c: 90 10 00 18 mov %i0, %o0 40023190: 40 00 28 7e call 4002d388 <_Heap_Get_information> 40023194: 92 10 00 19 mov %i1, %o1 40023198: a0 10 00 08 mov %o0, %l0 _RTEMS_Unlock_allocator(); 4002319c: 7f ff 9b 52 call 40009ee4 <_API_Mutex_Unlock> 400231a0: d0 04 61 38 ld [ %l1 + 0x138 ], %o0 if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 400231a4: 80 a0 00 10 cmp %g0, %l0 400231a8: 82 60 3f ff subx %g0, -1, %g1 400231ac: 81 c7 e0 08 ret 400231b0: 91 e8 00 01 restore %g0, %g1, %o0 return true; return false; } 400231b4: 81 c7 e0 08 ret <== NOT EXECUTED 400231b8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40006a64 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 40006a64: 9d e3 bf 90 save %sp, -112, %sp 40006a68: 11 10 00 76 sethi %hi(0x4001d800), %o0 40006a6c: 92 10 00 18 mov %i0, %o1 40006a70: 90 12 23 4c or %o0, 0x34c, %o0 40006a74: 40 00 07 c3 call 40008980 <_Objects_Get> 40006a78: 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 ) { 40006a7c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006a80: 80 a0 60 00 cmp %g1, 0 40006a84: 12 80 00 26 bne 40006b1c <_Rate_monotonic_Timeout+0xb8> 40006a88: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: the_thread = the_period->owner; 40006a8c: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 40006a90: 03 00 00 10 sethi %hi(0x4000), %g1 40006a94: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 40006a98: 80 88 80 01 btst %g2, %g1 40006a9c: 22 80 00 0c be,a 40006acc <_Rate_monotonic_Timeout+0x68> 40006aa0: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 40006aa4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006aa8: c2 06 20 08 ld [ %i0 + 8 ], %g1 40006aac: 80 a0 80 01 cmp %g2, %g1 40006ab0: 32 80 00 07 bne,a 40006acc <_Rate_monotonic_Timeout+0x68> 40006ab4: 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 ); 40006ab8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006abc: 40 00 09 09 call 40008ee0 <_Thread_Clear_state> 40006ac0: 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 ); 40006ac4: 10 80 00 08 b 40006ae4 <_Rate_monotonic_Timeout+0x80> 40006ac8: 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 ) { 40006acc: 80 a0 60 01 cmp %g1, 1 40006ad0: 12 80 00 0e bne 40006b08 <_Rate_monotonic_Timeout+0xa4> 40006ad4: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40006ad8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006adc: 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; 40006ae0: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 40006ae4: 7f ff fe 4a call 4000640c <_Rate_monotonic_Initiate_statistics> 40006ae8: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006aec: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006af0: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006af4: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006af8: 11 10 00 77 sethi %hi(0x4001dc00), %o0 40006afc: 40 00 0f 30 call 4000a7bc <_Watchdog_Insert> 40006b00: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 4001dda0 <_Watchdog_Ticks_chain> 40006b04: 30 80 00 02 b,a 40006b0c <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 40006b08: 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; 40006b0c: 05 10 00 77 sethi %hi(0x4001dc00), %g2 40006b10: c2 00 a0 c0 ld [ %g2 + 0xc0 ], %g1 ! 4001dcc0 <_Thread_Dispatch_disable_level> 40006b14: 82 00 7f ff add %g1, -1, %g1 40006b18: c2 20 a0 c0 st %g1, [ %g2 + 0xc0 ] 40006b1c: 81 c7 e0 08 ret 40006b20: 81 e8 00 00 restore 40007378 <_Thread_Create_idle>: * * _Thread_Create_idle */ void _Thread_Create_idle( void ) { 40007378: 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 ); 4000737c: 11 10 00 63 sethi %hi(0x40018c00), %o0 40007380: 7f ff fc e9 call 40006724 <_Objects_Allocate> 40007384: 90 12 22 00 or %o0, 0x200, %o0 ! 40018e00 <_Thread_Internal_information> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007388: 05 10 00 63 sethi %hi(0x40018c00), %g2 4000738c: c2 00 a0 a0 ld [ %g2 + 0xa0 ], %g1 ! 40018ca0 <_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(); 40007390: 07 10 00 63 sethi %hi(0x40018c00), %g3 40007394: 82 00 60 01 inc %g1 40007398: d0 20 e2 4c st %o0, [ %g3 + 0x24c ] 4000739c: c2 20 a0 a0 st %g1, [ %g2 + 0xa0 ] * that when _Thread_Initialize unnests dispatch that we do not * do anything stupid. */ _Thread_Disable_dispatch(); _Thread_Initialize( 400073a0: 03 10 00 63 sethi %hi(0x40018c00), %g1 400073a4: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 ! 40018d38 <_Configuration_Table> 400073a8: d2 00 e2 4c ld [ %g3 + 0x24c ], %o1 400073ac: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 400073b0: 03 10 00 5f sethi %hi(0x40017c00), %g1 400073b4: d6 00 63 50 ld [ %g1 + 0x350 ], %o3 ! 40017f50 400073b8: 03 10 00 5c sethi %hi(0x40017000), %g1 400073bc: 82 10 62 00 or %g1, 0x200, %g1 ! 40017200 400073c0: 80 a2 c0 02 cmp %o3, %g2 400073c4: 1a 80 00 03 bcc 400073d0 <_Thread_Create_idle+0x58> 400073c8: c2 27 bf f4 st %g1, [ %fp + -12 ] 400073cc: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 400073d0: 03 10 00 5f sethi %hi(0x40017c00), %g1 400073d4: da 08 63 54 ldub [ %g1 + 0x354 ], %o5 ! 40017f54 400073d8: 82 10 20 01 mov 1, %g1 400073dc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400073e0: 82 07 bf f4 add %fp, -12, %g1 400073e4: c0 23 a0 60 clr [ %sp + 0x60 ] 400073e8: c0 23 a0 64 clr [ %sp + 0x64 ] 400073ec: c0 23 a0 68 clr [ %sp + 0x68 ] 400073f0: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 400073f4: 94 10 20 00 clr %o2 400073f8: 98 10 20 00 clr %o4 400073fc: 11 10 00 63 sethi %hi(0x40018c00), %o0 40007400: 40 00 00 af call 400076bc <_Thread_Initialize> 40007404: 90 12 22 00 or %o0, 0x200, %o0 ! 40018e00 <_Thread_Internal_information> * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = _Thread_Executing = _Thread_Idle; _Thread_Start( 40007408: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000740c: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 ! 40018d38 <_Configuration_Table> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40007410: 07 10 00 63 sethi %hi(0x40018c00), %g3 40007414: f4 00 60 14 ld [ %g1 + 0x14 ], %i2 40007418: c2 00 e0 a0 ld [ %g3 + 0xa0 ], %g1 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 4000741c: 05 10 00 63 sethi %hi(0x40018c00), %g2 40007420: 82 00 7f ff add %g1, -1, %g1 40007424: c4 00 a2 4c ld [ %g2 + 0x24c ], %g2 40007428: c2 20 e0 a0 st %g1, [ %g3 + 0xa0 ] 4000742c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40007430: c4 20 61 60 st %g2, [ %g1 + 0x160 ] ! 40018d60 <_Thread_Executing> 40007434: 03 10 00 63 sethi %hi(0x40018c00), %g1 _Thread_Executing = _Thread_Idle; _Thread_Start( 40007438: b0 10 00 02 mov %g2, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 4000743c: c4 20 61 2c st %g2, [ %g1 + 0x12c ] _Thread_Executing = _Thread_Idle; _Thread_Start( 40007440: b2 10 20 00 clr %i1 40007444: b6 10 20 00 clr %i3 40007448: 40 00 03 81 call 4000824c <_Thread_Start> 4000744c: 99 e8 20 00 restore %g0, 0, %o4 40007450: 01 00 00 00 nop 4000ca98 <_Thread_Evaluate_mode>: bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 4000ca98: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000ca9c: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 40018d60 <_Thread_Executing> if ( !_States_Is_ready( executing->current_state ) || 4000caa0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000caa4: 80 a0 60 00 cmp %g1, 0 4000caa8: 32 80 00 0b bne,a 4000cad4 <_Thread_Evaluate_mode+0x3c> 4000caac: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 4000cab0: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000cab4: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 40018d2c <_Thread_Heir> 4000cab8: 80 a0 80 01 cmp %g2, %g1 4000cabc: 02 80 00 0b be 4000cae8 <_Thread_Evaluate_mode+0x50> 4000cac0: 01 00 00 00 nop 4000cac4: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1 4000cac8: 80 a0 60 00 cmp %g1, 0 4000cacc: 02 80 00 07 be 4000cae8 <_Thread_Evaluate_mode+0x50> 4000cad0: 84 10 20 01 mov 1, %g2 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { _Context_Switch_necessary = TRUE; 4000cad4: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000cad8: 90 10 20 01 mov 1, %o0 4000cadc: c4 28 61 70 stb %g2, [ %g1 + 0x170 ] 4000cae0: 81 c3 e0 08 retl 4000cae4: 01 00 00 00 nop return TRUE; } return FALSE; } 4000cae8: 81 c3 e0 08 retl 4000caec: 90 10 20 00 clr %o0 ! 0 4000760c <_Thread_Get>: Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { 4000760c: 88 10 00 08 mov %o0, %g4 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 ) ) { 40007610: 80 a2 20 00 cmp %o0, 0 40007614: 12 80 00 0a bne 4000763c <_Thread_Get+0x30> 40007618: 94 10 00 09 mov %o1, %o2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000761c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40007620: c4 00 60 a0 ld [ %g1 + 0xa0 ], %g2 ! 40018ca0 <_Thread_Dispatch_disable_level> 40007624: 84 00 a0 01 inc %g2 40007628: c4 20 60 a0 st %g2, [ %g1 + 0xa0 ] _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000762c: 03 10 00 63 sethi %hi(0x40018c00), %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; 40007630: c0 22 40 00 clr [ %o1 ] tp = _Thread_Executing; 40007634: 81 c3 e0 08 retl 40007638: d0 00 61 60 ld [ %g1 + 0x160 ], %o0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000763c: 83 32 20 18 srl %o0, 0x18, %g1 40007640: 84 08 60 07 and %g1, 7, %g2 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 40007644: 82 00 bf ff add %g2, -1, %g1 40007648: 80 a0 60 03 cmp %g1, 3 4000764c: 08 80 00 16 bleu 400076a4 <_Thread_Get+0x98> 40007650: 87 32 20 1b srl %o0, 0x1b, %g3 goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; 40007654: 82 10 20 01 mov 1, %g1 40007658: 10 80 00 09 b 4000767c <_Thread_Get+0x70> 4000765c: c2 22 80 00 st %g1, [ %o2 ] goto done; } api_information = _Objects_Information_table[ the_api ]; 40007660: 03 10 00 63 sethi %hi(0x40018c00), %g1 40007664: 82 10 60 00 mov %g1, %g1 ! 40018c00 <_Objects_Information_table> 40007668: c2 00 40 02 ld [ %g1 + %g2 ], %g1 if ( !api_information ) { 4000766c: 80 a0 60 00 cmp %g1, 0 40007670: 32 80 00 05 bne,a 40007684 <_Thread_Get+0x78> 40007674: d0 00 60 04 ld [ %g1 + 4 ], %o0 *location = OBJECTS_ERROR; 40007678: c6 22 80 00 st %g3, [ %o2 ] 4000767c: 81 c3 e0 08 retl 40007680: 90 10 20 00 clr %o0 goto done; } information = api_information[ the_class ]; if ( !information ) { 40007684: 80 a2 20 00 cmp %o0, 0 40007688: 12 80 00 04 bne 40007698 <_Thread_Get+0x8c> 4000768c: 92 10 00 04 mov %g4, %o1 *location = OBJECTS_ERROR; 40007690: 81 c3 e0 08 retl <== NOT EXECUTED 40007694: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007698: 82 13 c0 00 mov %o7, %g1 4000769c: 7f ff fd 7c call 40006c8c <_Objects_Get> 400076a0: 9e 10 40 00 mov %g1, %o7 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400076a4: 80 a0 e0 01 cmp %g3, 1 400076a8: 22 bf ff ee be,a 40007660 <_Thread_Get+0x54> 400076ac: 85 28 a0 02 sll %g2, 2, %g2 *location = OBJECTS_ERROR; 400076b0: 10 bf ff ea b 40007658 <_Thread_Get+0x4c> 400076b4: 82 10 20 01 mov 1, %g1 4000caf0 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000caf0: 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; 4000caf4: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000caf8: e2 00 61 60 ld [ %g1 + 0x160 ], %l1 ! 40018d60 <_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(); 4000cafc: 3f 10 00 32 sethi %hi(0x4000c800), %i7 4000cb00: be 17 e2 f0 or %i7, 0x2f0, %i7 ! 4000caf0 <_Thread_Handler> /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4000cb04: d0 04 60 b8 ld [ %l1 + 0xb8 ], %o0 _ISR_Set_level(level); 4000cb08: 7f ff d4 79 call 40001cec 4000cb0c: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000cb10: 05 10 00 62 sethi %hi(0x40018800), %g2 doneConstructors = 1; 4000cb14: 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; 4000cb18: e0 08 a2 9c ldub [ %g2 + 0x29c ], %l0 * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 4000cb1c: 90 10 00 11 mov %l1, %o0 4000cb20: 7f ff ee 84 call 40008530 <_User_extensions_Thread_begin> 4000cb24: c2 28 a2 9c stb %g1, [ %g2 + 0x29c ] /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4000cb28: 7f ff ea ac call 400075d8 <_Thread_Enable_dispatch> 4000cb2c: a1 2c 20 18 sll %l0, 0x18, %l0 /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ 4000cb30: 80 a4 20 00 cmp %l0, 0 4000cb34: 32 80 00 05 bne,a 4000cb48 <_Thread_Handler+0x58> 4000cb38: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 { _init (); 4000cb3c: 40 00 2c cd call 40017e70 <_init> 4000cb40: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000cb44: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 4000cb48: 80 a0 60 01 cmp %g1, 1 4000cb4c: 22 80 00 0d be,a 4000cb80 <_Thread_Handler+0x90> 4000cb50: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000cb54: 2a 80 00 09 bcs,a 4000cb78 <_Thread_Handler+0x88> 4000cb58: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 4000cb5c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000cb60: 02 80 00 0d be 4000cb94 <_Thread_Handler+0xa4> <== NOT EXECUTED 4000cb64: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000cb68: 12 80 00 14 bne 4000cbb8 <_Thread_Handler+0xc8> <== NOT EXECUTED 4000cb6c: 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 = 4000cb70: 10 80 00 0d b 4000cba4 <_Thread_Handler+0xb4> <== NOT EXECUTED 4000cb74: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000cb78: 10 80 00 03 b 4000cb84 <_Thread_Handler+0x94> 4000cb7c: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000cb80: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 4000cb84: 9f c0 40 00 call %g1 4000cb88: 01 00 00 00 nop executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000cb8c: 10 80 00 0b b 4000cbb8 <_Thread_Handler+0xc8> 4000cb90: d0 24 60 28 st %o0, [ %l1 + 0x28 ] (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000cb94: c2 04 60 9c ld [ %l1 + 0x9c ], %g1 <== NOT EXECUTED 4000cb98: d0 04 60 a4 ld [ %l1 + 0xa4 ], %o0 <== NOT EXECUTED 4000cb9c: 10 80 00 04 b 4000cbac <_Thread_Handler+0xbc> <== NOT EXECUTED 4000cba0: d2 04 60 a8 ld [ %l1 + 0xa8 ], %o1 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000cba4: d0 04 60 a8 ld [ %l1 + 0xa8 ], %o0 <== NOT EXECUTED 4000cba8: d2 04 60 a4 ld [ %l1 + 0xa4 ], %o1 <== NOT EXECUTED 4000cbac: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000cbb0: 01 00 00 00 nop <== NOT EXECUTED 4000cbb4: d0 24 60 28 st %o0, [ %l1 + 0x28 ] <== NOT EXECUTED * 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 ); 4000cbb8: 7f ff ee 6f call 40008574 <_User_extensions_Thread_exitted> 4000cbbc: 90 10 00 11 mov %l1, %o0 _Internal_error_Occurred( 4000cbc0: 90 10 20 00 clr %o0 4000cbc4: 92 10 20 01 mov 1, %o1 4000cbc8: 7f ff e6 a8 call 40006668 <_Internal_error_Occurred> 4000cbcc: 94 10 20 06 mov 6, %o2 4000cbd0: 01 00 00 00 nop 400076bc <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 400076bc: 9d e3 bf 98 save %sp, -104, %sp 400076c0: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 400076c4: 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 ) { 400076c8: e4 00 40 00 ld [ %g1 ], %l2 400076cc: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 400076d0: 12 80 00 0e bne 40007708 <_Thread_Initialize+0x4c> 400076d4: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 400076d8: 90 10 00 19 mov %i1, %o0 400076dc: 40 00 02 a3 call 40008168 <_Thread_Stack_Allocate> 400076e0: 92 10 00 1b mov %i3, %o1 if ( !actual_stack_size || actual_stack_size < stack_size ) 400076e4: 80 a2 20 00 cmp %o0, 0 400076e8: 02 80 00 1e be 40007760 <_Thread_Initialize+0xa4> 400076ec: 80 a2 00 1b cmp %o0, %i3 400076f0: 0a 80 00 1c bcs 40007760 <_Thread_Initialize+0xa4> 400076f4: 01 00 00 00 nop return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 400076f8: 82 10 20 01 mov 1, %g1 ! 1 actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 400076fc: f4 06 60 cc ld [ %i1 + 0xcc ], %i2 the_thread->Start.core_allocated_stack = TRUE; 40007700: 10 80 00 04 b 40007710 <_Thread_Initialize+0x54> 40007704: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ] } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 40007708: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED 4000770c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40007710: 03 10 00 63 sethi %hi(0x40018c00), %g1 40007714: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 ! 40018d40 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 40007718: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ] the_stack->size = size; 4000771c: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007720: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 40007724: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 40007728: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 4000772c: c0 26 60 6c clr [ %i1 + 0x6c ] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 40007730: c0 26 61 58 clr [ %i1 + 0x158 ] /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 40007734: 80 a0 60 00 cmp %g1, 0 40007738: 02 80 00 0c be 40007768 <_Thread_Initialize+0xac> 4000773c: b6 10 20 00 clr %i3 extensions_area = _Workspace_Allocate( 40007740: 90 00 60 01 add %g1, 1, %o0 40007744: 40 00 04 b3 call 40008a10 <_Workspace_Allocate> 40007748: 91 2a 20 02 sll %o0, 2, %o0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 4000774c: b6 92 20 00 orcc %o0, 0, %i3 40007750: 12 80 00 07 bne 4000776c <_Thread_Initialize+0xb0> 40007754: 80 a6 e0 00 cmp %i3, 0 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40007758: 40 00 02 9c call 400081c8 <_Thread_Stack_Free> <== NOT EXECUTED 4000775c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007760: 81 c7 e0 08 ret 40007764: 91 e8 20 00 restore %g0, 0, %o0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 40007768: 80 a6 e0 00 cmp %i3, 0 4000776c: 02 80 00 0d be 400077a0 <_Thread_Initialize+0xe4> 40007770: f6 26 61 68 st %i3, [ %i1 + 0x168 ] uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40007774: 03 10 00 63 sethi %hi(0x40018c00), %g1 40007778: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 ! 40018d40 <_Thread_Maximum_extensions> 4000777c: 86 10 20 00 clr %g3 40007780: 10 80 00 05 b 40007794 <_Thread_Initialize+0xd8> 40007784: 88 00 60 01 add %g1, 1, %g4 the_thread->extensions[i] = NULL; 40007788: 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++ ) 4000778c: 86 00 e0 01 inc %g3 the_thread->extensions[i] = NULL; 40007790: c0 20 80 01 clr [ %g2 + %g1 ] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 40007794: 80 a0 c0 04 cmp %g3, %g4 40007798: 2a bf ff fc bcs,a 40007788 <_Thread_Initialize+0xcc> 4000779c: c4 06 61 68 ld [ %i1 + 0x168 ], %g2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 400077a0: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 400077a4: e0 2e 60 ac stb %l0, [ %i1 + 0xac ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 400077a8: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ] switch ( budget_algorithm ) { 400077ac: 80 a4 60 02 cmp %l1, 2 400077b0: 12 80 00 05 bne 400077c4 <_Thread_Initialize+0x108> 400077b4: e2 26 60 b0 st %l1, [ %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; 400077b8: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 400077bc: c2 00 63 f8 ld [ %g1 + 0x3f8 ], %g1 ! 40018bf8 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 400077c0: c2 26 60 78 st %g1, [ %i1 + 0x78 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 400077c4: 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 ); 400077c8: 92 10 00 1d mov %i5, %o1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 400077cc: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->current_state = STATES_DORMANT; 400077d0: 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 ); 400077d4: 90 10 00 19 mov %i1, %o0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 400077d8: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; 400077dc: c0 26 60 44 clr [ %i1 + 0x44 ] the_thread->resource_count = 0; 400077e0: c0 26 60 1c clr [ %i1 + 0x1c ] the_thread->suspend_count = 0; 400077e4: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 400077e8: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 400077ec: 40 00 01 be call 40007ee4 <_Thread_Set_priority> 400077f0: fa 26 60 bc st %i5, [ %i1 + 0xbc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400077f4: c4 06 60 08 ld [ %i1 + 8 ], %g2 400077f8: c6 06 20 1c ld [ %i0 + 0x1c ], %g3 400077fc: 03 00 00 3f sethi %hi(0xfc00), %g1 40007800: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007804: 84 08 80 01 and %g2, %g1, %g2 40007808: 85 28 a0 02 sll %g2, 2, %g2 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000780c: 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; 40007810: c0 26 60 84 clr [ %i1 + 0x84 ] the_thread->cpu_time_used.tv_nsec = 0; 40007814: c0 26 60 88 clr [ %i1 + 0x88 ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007818: 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 ); 4000781c: 90 10 00 19 mov %i1, %o0 40007820: 40 00 03 79 call 40008604 <_User_extensions_Thread_create> 40007824: b0 10 20 01 mov 1, %i0 if ( !extension_status ) { 40007828: 80 8a 20 ff btst 0xff, %o0 4000782c: 12 80 00 09 bne 40007850 <_Thread_Initialize+0x194> 40007830: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 40007834: 02 80 00 05 be 40007848 <_Thread_Initialize+0x18c> <== NOT EXECUTED 40007838: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 4000783c: 40 00 04 6e call 400089f4 <_Workspace_Free> <== NOT EXECUTED 40007840: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 40007844: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40007848: 40 00 02 60 call 400081c8 <_Thread_Stack_Free> <== NOT EXECUTED 4000784c: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; } return TRUE; } 40007850: 81 c7 e0 08 ret 40007854: 81 e8 00 00 restore 4000caa8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4000caa8: 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; 4000caac: 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; 4000cab0: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000cab4: 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; 4000cab8: 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; 4000cabc: c6 26 20 80 st %g3, [ %i0 + 0x80 ] the_thread->Start.pointer_argument = pointer_argument; 4000cac0: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ] the_thread->Start.numeric_argument = numeric_argument; 4000cac4: 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; 4000cac8: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000cacc: 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 ) ) { 4000cad0: 7f ff ef 99 call 40008934 <_Thread_queue_Extract_with_proxy> 4000cad4: 90 10 00 18 mov %i0, %o0 4000cad8: 80 8a 20 ff btst 0xff, %o0 4000cadc: 32 80 00 09 bne,a 4000cb00 <_Thread_Reset+0x58> 4000cae0: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000cae4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000cae8: 80 a0 60 02 cmp %g1, 2 4000caec: 32 80 00 05 bne,a 4000cb00 <_Thread_Reset+0x58> 4000caf0: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000caf4: 7f ff f2 8e call 4000952c <_Watchdog_Remove> <== NOT EXECUTED 4000caf8: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000cafc: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED 4000cb00: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000cb04: 80 a0 40 19 cmp %g1, %i1 4000cb08: 02 80 00 05 be 4000cb1c <_Thread_Reset+0x74> 4000cb0c: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000cb10: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000cb14: 7f ff f0 03 call 40008b20 <_Thread_Set_priority> 4000cb18: 81 e8 00 00 restore 4000cb1c: 81 c7 e0 08 ret 4000cb20: 81 e8 00 00 restore 4000bd8c <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000bd8c: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000bd90: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000bd94: e0 00 61 60 ld [ %g1 + 0x160 ], %l0 ! 40018d60 <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000bd98: 7f ff d7 d1 call 40001cdc 4000bd9c: e2 04 20 8c ld [ %l0 + 0x8c ], %l1 4000bda0: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000bda4: c4 04 40 00 ld [ %l1 ], %g2 4000bda8: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000bdac: 80 a0 80 01 cmp %g2, %g1 4000bdb0: 32 80 00 03 bne,a 4000bdbc <_Thread_Reset_timeslice+0x30> 4000bdb4: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 4000bdb8: 30 80 00 18 b,a 4000be18 <_Thread_Reset_timeslice+0x8c> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000bdbc: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000bdc0: 82 04 60 04 add %l1, 4, %g1 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 4000bdc4: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000bdc8: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000bdcc: 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; 4000bdd0: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000bdd4: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000bdd8: 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; 4000bddc: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000bde0: 7f ff d7 c3 call 40001cec 4000bde4: 01 00 00 00 nop 4000bde8: 7f ff d7 bd call 40001cdc 4000bdec: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000bdf0: 05 10 00 63 sethi %hi(0x40018c00), %g2 4000bdf4: c2 00 a1 2c ld [ %g2 + 0x12c ], %g1 ! 40018d2c <_Thread_Heir> 4000bdf8: 80 a4 00 01 cmp %l0, %g1 4000bdfc: 32 80 00 05 bne,a 4000be10 <_Thread_Reset_timeslice+0x84> 4000be00: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000be04: c2 04 40 00 ld [ %l1 ], %g1 4000be08: c2 20 a1 2c st %g1, [ %g2 + 0x12c ] _Context_Switch_necessary = TRUE; 4000be0c: 84 10 20 01 mov 1, %g2 4000be10: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000be14: c4 28 61 70 stb %g2, [ %g1 + 0x170 ] ! 40018d70 <_Context_Switch_necessary> _ISR_Enable( level ); 4000be18: 7f ff d7 b5 call 40001cec 4000be1c: 81 e8 00 00 restore 4000be20: 01 00 00 00 nop 40009894 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 40009894: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 40009898: 7f ff e4 84 call 40002aa8 4000989c: 01 00 00 00 nop 400098a0: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 400098a4: 80 8e 60 ff btst 0xff, %i1 400098a8: 22 80 00 04 be,a 400098b8 <_Thread_Resume+0x24> 400098ac: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED the_thread->suspend_count = 0; 400098b0: 10 80 00 04 b 400098c0 <_Thread_Resume+0x2c> 400098b4: c0 26 20 70 clr [ %i0 + 0x70 ] else the_thread->suspend_count--; 400098b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400098bc: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 400098c0: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 400098c4: 80 a0 60 00 cmp %g1, 0 400098c8: 22 80 00 03 be,a 400098d4 <_Thread_Resume+0x40> 400098cc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 _ISR_Enable( level ); 400098d0: 30 80 00 2e b,a 40009988 <_Thread_Resume+0xf4> <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 400098d4: 80 88 60 02 btst 2, %g1 400098d8: 02 80 00 2c be 40009988 <_Thread_Resume+0xf4> 400098dc: 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 ) ) { 400098e0: 80 a0 60 00 cmp %g1, 0 400098e4: 12 80 00 29 bne 40009988 <_Thread_Resume+0xf4> 400098e8: c2 26 20 10 st %g1, [ %i0 + 0x10 ] RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 400098ec: c8 06 20 90 ld [ %i0 + 0x90 ], %g4 400098f0: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2 400098f4: c2 11 00 00 lduh [ %g4 ], %g1 _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 400098f8: c6 06 20 8c ld [ %i0 + 0x8c ], %g3 400098fc: 82 10 40 02 or %g1, %g2, %g1 40009900: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40009904: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 40009908: 1b 10 00 95 sethi %hi(0x40025400), %o5 4000990c: c2 26 00 00 st %g1, [ %i0 ] 40009910: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2 old_last_node = the_chain->last; 40009914: c2 00 e0 08 ld [ %g3 + 8 ], %g1 40009918: c8 13 63 94 lduh [ %o5 + 0x394 ], %g4 the_chain->last = the_node; 4000991c: f0 20 e0 08 st %i0, [ %g3 + 8 ] 40009920: 84 10 80 04 or %g2, %g4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 40009924: c2 26 20 04 st %g1, [ %i0 + 4 ] 40009928: c4 33 63 94 sth %g2, [ %o5 + 0x394 ] 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; 4000992c: f0 20 40 00 st %i0, [ %g1 ] _ISR_Flash( level ); 40009930: 7f ff e4 62 call 40002ab8 40009934: 90 10 00 10 mov %l0, %o0 40009938: 7f ff e4 5c call 40002aa8 4000993c: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 40009940: 07 10 00 95 sethi %hi(0x40025400), %g3 40009944: c2 00 e3 6c ld [ %g3 + 0x36c ], %g1 ! 4002576c <_Thread_Heir> 40009948: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000994c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 40009950: 80 a0 80 01 cmp %g2, %g1 40009954: 1a 80 00 0d bcc 40009988 <_Thread_Resume+0xf4> 40009958: 03 10 00 95 sethi %hi(0x40025400), %g1 _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000995c: c2 00 63 a0 ld [ %g1 + 0x3a0 ], %g1 ! 400257a0 <_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; 40009960: f0 20 e3 6c st %i0, [ %g3 + 0x36c ] if ( _Thread_Executing->is_preemptible || 40009964: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1 40009968: 80 a0 60 00 cmp %g1, 0 4000996c: 32 80 00 05 bne,a 40009980 <_Thread_Resume+0xec> 40009970: 84 10 20 01 mov 1, %g2 40009974: 80 a0 a0 00 cmp %g2, 0 40009978: 12 80 00 04 bne 40009988 <_Thread_Resume+0xf4> 4000997c: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 40009980: 03 10 00 95 sethi %hi(0x40025400), %g1 40009984: c4 28 63 b0 stb %g2, [ %g1 + 0x3b0 ] ! 400257b0 <_Context_Switch_necessary> } } } _ISR_Enable( level ); 40009988: 7f ff e4 4c call 40002ab8 4000998c: 91 e8 00 10 restore %g0, %l0, %o0 40009990: 01 00 00 00 nop 40008168 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 40008168: 9d e3 bf 98 save %sp, -104, %sp 4000816c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40008170: c2 00 63 50 ld [ %g1 + 0x350 ], %g1 ! 40017f50 40008174: 80 a6 40 01 cmp %i1, %g1 40008178: 2a 80 00 02 bcs,a 40008180 <_Thread_Stack_Allocate+0x18> 4000817c: 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 ) { 40008180: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008184: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 ! 40018d38 <_Configuration_Table> 40008188: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000818c: 80 a0 60 00 cmp %g1, 0 40008190: 22 80 00 06 be,a 400081a8 <_Thread_Stack_Allocate+0x40> 40008194: b2 06 60 10 add %i1, 0x10, %i1 stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 40008198: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000819c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 400081a0: 10 80 00 05 b 400081b4 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED 400081a4: d0 26 20 cc st %o0, [ %i0 + 0xcc ] <== 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 ); 400081a8: 40 00 02 1a call 40008a10 <_Workspace_Allocate> 400081ac: 90 10 00 19 mov %i1, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 400081b0: d0 26 20 cc st %o0, [ %i0 + 0xcc ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 400081b4: 80 a0 00 08 cmp %g0, %o0 400081b8: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 400081bc: b0 0e 40 18 and %i1, %i0, %i0 400081c0: 81 c7 e0 08 ret 400081c4: 81 e8 00 00 restore 400081c8 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 400081c8: 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 ) 400081cc: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1 400081d0: 80 a0 60 00 cmp %g1, 0 400081d4: 02 80 00 09 be 400081f8 <_Thread_Stack_Free+0x30> 400081d8: 03 10 00 63 sethi %hi(0x40018c00), %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 ) 400081dc: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 ! 40018d38 <_Configuration_Table> 400081e0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1 400081e4: 80 a0 60 00 cmp %g1, 0 400081e8: 02 80 00 06 be 40008200 <_Thread_Stack_Free+0x38> 400081ec: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 (*_Configuration_Table->stack_free_hook)( 400081f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400081f4: 01 00 00 00 nop <== NOT EXECUTED 400081f8: 81 c7 e0 08 ret <== NOT EXECUTED 400081fc: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 40008200: 40 00 01 fd call 400089f4 <_Workspace_Free> 40008204: 91 e8 00 08 restore %g0, %o0, %o0 40008208: 01 00 00 00 nop 40007b6c <_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 ) { 40007b6c: 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; 40007b70: 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); 40007b74: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; 40007b78: c0 26 60 3c clr [ %i1 + 0x3c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40007b7c: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40007b80: 82 06 60 38 add %i1, 0x38, %g1 40007b84: c2 26 60 40 st %g1, [ %i1 + 0x40 ] 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 ) ) 40007b88: 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); 40007b8c: 83 34 a0 06 srl %l2, 6, %g1 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 40007b90: ec 06 20 38 ld [ %i0 + 0x38 ], %l6 _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 40007b94: 85 28 60 04 sll %g1, 4, %g2 40007b98: 83 28 60 02 sll %g1, 2, %g1 40007b9c: 84 20 80 01 sub %g2, %g1, %g2 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 40007ba0: 12 80 00 31 bne 40007c64 <_Thread_queue_Enqueue_priority+0xf8> 40007ba4: a6 06 00 02 add %i0, %g2, %l3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40007ba8: a8 04 e0 04 add %l3, 4, %l4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 40007bac: aa 10 00 02 mov %g2, %l5 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 40007bb0: 7f ff e8 4b call 40001cdc 40007bb4: 01 00 00 00 nop 40007bb8: a6 10 00 08 mov %o0, %l3 search_thread = (Thread_Control *) header->first; 40007bbc: a2 10 3f ff mov -1, %l1 40007bc0: 10 80 00 18 b 40007c20 <_Thread_queue_Enqueue_priority+0xb4> 40007bc4: e0 06 00 15 ld [ %i0 + %l5 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; if ( priority <= search_priority ) 40007bc8: 80 a4 80 11 cmp %l2, %l1 40007bcc: 28 80 00 19 bleu,a 40007c30 <_Thread_queue_Enqueue_priority+0xc4> 40007bd0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 40007bd4: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 40007bd8: 80 a4 00 14 cmp %l0, %l4 40007bdc: 22 80 00 15 be,a 40007c30 <_Thread_queue_Enqueue_priority+0xc4> 40007be0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40007be4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 40007be8: 80 a4 80 11 cmp %l2, %l1 40007bec: 28 80 00 11 bleu,a 40007c30 <_Thread_queue_Enqueue_priority+0xc4> 40007bf0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 40007bf4: 7f ff e8 3e call 40001cec 40007bf8: 90 10 00 13 mov %l3, %o0 40007bfc: 7f ff e8 38 call 40001cdc 40007c00: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40007c04: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007c08: 80 8d 80 01 btst %l6, %g1 40007c0c: 32 80 00 05 bne,a 40007c20 <_Thread_queue_Enqueue_priority+0xb4> 40007c10: e0 04 00 00 ld [ %l0 ], %l0 _ISR_Enable( level ); 40007c14: 7f ff e8 36 call 40001cec <== NOT EXECUTED 40007c18: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40007c1c: 30 bf ff e5 b,a 40007bb0 <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED 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 ) ) { 40007c20: 80 a4 00 14 cmp %l0, %l4 40007c24: 32 bf ff e9 bne,a 40007bc8 <_Thread_queue_Enqueue_priority+0x5c> 40007c28: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 40007c2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007c30: 80 a0 60 01 cmp %g1, 1 40007c34: 12 80 00 48 bne 40007d54 <_Thread_queue_Enqueue_priority+0x1e8> 40007c38: 90 10 00 13 mov %l3, %o0 THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) 40007c3c: 80 a4 80 11 cmp %l2, %l1 40007c40: 02 80 00 3a be 40007d28 <_Thread_queue_Enqueue_priority+0x1bc> 40007c44: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 40007c48: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40007c4c: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 40007c50: 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; 40007c54: f0 26 60 44 st %i0, [ %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; 40007c58: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 40007c5c: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007c60: 30 80 00 39 b,a 40007d44 <_Thread_queue_Enqueue_priority+0x1d8> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40007c64: 03 10 00 5f sethi %hi(0x40017c00), %g1 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 40007c68: aa 10 00 13 mov %l3, %l5 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 40007c6c: ae 10 63 54 or %g1, 0x354, %l7 40007c70: c2 0d c0 00 ldub [ %l7 ], %g1 _ISR_Disable( level ); 40007c74: 7f ff e8 1a call 40001cdc 40007c78: a2 00 60 01 add %g1, 1, %l1 40007c7c: a8 10 00 08 mov %o0, %l4 search_thread = (Thread_Control *) header->last; 40007c80: 10 80 00 19 b 40007ce4 <_Thread_queue_Enqueue_priority+0x178> 40007c84: e0 05 60 08 ld [ %l5 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; if ( priority >= search_priority ) 40007c88: 80 a4 80 11 cmp %l2, %l1 40007c8c: 3a 80 00 1a bcc,a 40007cf4 <_Thread_queue_Enqueue_priority+0x188> 40007c90: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 40007c94: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 40007c98: 80 a4 00 13 cmp %l0, %l3 40007c9c: 22 80 00 16 be,a 40007cf4 <_Thread_queue_Enqueue_priority+0x188> 40007ca0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 40007ca4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 40007ca8: 80 a4 80 11 cmp %l2, %l1 40007cac: 3a 80 00 12 bcc,a 40007cf4 <_Thread_queue_Enqueue_priority+0x188> 40007cb0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 break; #endif _ISR_Flash( level ); 40007cb4: 7f ff e8 0e call 40001cec 40007cb8: 90 10 00 14 mov %l4, %o0 40007cbc: 7f ff e8 08 call 40001cdc 40007cc0: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 40007cc4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007cc8: 80 8d 80 01 btst %l6, %g1 40007ccc: 32 80 00 06 bne,a 40007ce4 <_Thread_queue_Enqueue_priority+0x178> 40007cd0: e0 04 20 04 ld [ %l0 + 4 ], %l0 _ISR_Enable( level ); 40007cd4: 7f ff e8 06 call 40001cec <== NOT EXECUTED 40007cd8: 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; 40007cdc: 10 bf ff e6 b 40007c74 <_Thread_queue_Enqueue_priority+0x108> <== NOT EXECUTED 40007ce0: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 40007ce4: 80 a4 00 13 cmp %l0, %l3 40007ce8: 32 bf ff e8 bne,a 40007c88 <_Thread_queue_Enqueue_priority+0x11c> 40007cec: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 40007cf0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40007cf4: 80 a0 60 01 cmp %g1, 1 40007cf8: 12 80 00 17 bne 40007d54 <_Thread_queue_Enqueue_priority+0x1e8> 40007cfc: 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 ) 40007d00: 80 a4 80 11 cmp %l2, %l1 40007d04: 02 80 00 09 be 40007d28 <_Thread_queue_Enqueue_priority+0x1bc> 40007d08: c0 26 20 30 clr [ %i0 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 40007d0c: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 40007d10: 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; 40007d14: 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; 40007d18: f0 26 60 44 st %i0, [ %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; 40007d1c: 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; 40007d20: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007d24: 30 80 00 08 b,a 40007d44 <_Thread_queue_Enqueue_priority+0x1d8> 40007d28: 82 04 20 3c add %l0, 0x3c, %g1 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; 40007d2c: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 40007d30: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 40007d34: 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; 40007d38: f0 26 60 44 st %i0, [ %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; 40007d3c: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 40007d40: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 40007d44: 7f ff e7 ea call 40001cec 40007d48: b0 10 20 01 mov 1, %i0 40007d4c: 81 c7 e0 08 ret 40007d50: 81 e8 00 00 restore * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 40007d54: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 <== NOT EXECUTED * 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; 40007d58: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED return the_thread_queue->sync_state; } 40007d5c: 81 c7 e0 08 ret <== NOT EXECUTED 40007d60: 81 e8 00 00 restore <== NOT EXECUTED 4000cbd4 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000cbd4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000cbd8: 7f ff d4 41 call 40001cdc 4000cbdc: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000cbe0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000cbe4: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000cbe8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000cbec: 80 88 80 01 btst %g2, %g1 4000cbf0: 32 80 00 04 bne,a 4000cc00 <_Thread_queue_Extract_fifo+0x2c> 4000cbf4: c2 06 40 00 ld [ %i1 ], %g1 _ISR_Enable( level ); 4000cbf8: 7f ff d4 3d call 40001cec <== NOT EXECUTED 4000cbfc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000cc00: 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 ) ) { 4000cc04: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000cc08: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000cc0c: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000cc10: 80 a0 e0 02 cmp %g3, 2 4000cc14: 02 80 00 06 be 4000cc2c <_Thread_queue_Extract_fifo+0x58> 4000cc18: c0 26 60 44 clr [ %i1 + 0x44 ] _ISR_Enable( level ); 4000cc1c: 7f ff d4 34 call 40001cec 4000cc20: 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 ); 4000cc24: 10 80 00 0a b 4000cc4c <_Thread_queue_Extract_fifo+0x78> 4000cc28: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000cc2c: 82 10 20 03 mov 3, %g1 4000cc30: c2 26 60 50 st %g1, [ %i1 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000cc34: 7f ff d4 2e call 40001cec 4000cc38: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000cc3c: 7f ff ef 1a call 400088a4 <_Watchdog_Remove> 4000cc40: 90 06 60 48 add %i1, 0x48, %o0 4000cc44: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000cc48: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000cc4c: 7f ff e9 68 call 400071ec <_Thread_Clear_state> 4000cc50: 81 e8 00 00 restore 4000cc54: 01 00 00 00 nop 4000bb08 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 4000bb08: 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 ); 4000bb0c: 7f ff d8 74 call 40001cdc 4000bb10: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000bb14: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000bb18: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000bb1c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000bb20: 80 88 80 01 btst %g2, %g1 4000bb24: 32 80 00 03 bne,a 4000bb30 <_Thread_queue_Extract_priority_helper+0x28> 4000bb28: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 _ISR_Enable( level ); 4000bb2c: 30 80 00 1c b,a 4000bb9c <_Thread_queue_Extract_priority_helper+0x94> <== NOT EXECUTED */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000bb30: 82 06 60 3c add %i1, 0x3c, %g1 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4000bb34: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000bb38: 80 a0 c0 01 cmp %g3, %g1 4000bb3c: 02 80 00 13 be 4000bb88 <_Thread_queue_Extract_priority_helper+0x80> 4000bb40: 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; 4000bb44: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000bb48: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000bb4c: 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; 4000bb50: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000bb54: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000bb58: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000bb5c: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000bb60: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000bb64: 80 a0 80 01 cmp %g2, %g1 4000bb68: 02 80 00 0a be 4000bb90 <_Thread_queue_Extract_priority_helper+0x88> 4000bb6c: 82 00 e0 38 add %g3, 0x38, %g1 /* > two threads on 2-n */ new_second_node->previous = 4000bb70: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000bb74: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000bb78: da 20 e0 40 st %o5, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000bb7c: 82 00 e0 3c add %g3, 0x3c, %g1 4000bb80: 10 80 00 04 b 4000bb90 <_Thread_queue_Extract_priority_helper+0x88> 4000bb84: c2 23 40 00 st %g1, [ %o5 ] } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000bb88: 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; 4000bb8c: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000bb90: 80 8e a0 ff btst 0xff, %i2 4000bb94: 22 80 00 04 be,a 4000bba4 <_Thread_queue_Extract_priority_helper+0x9c> 4000bb98: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 _ISR_Enable( level ); 4000bb9c: 7f ff d8 54 call 40001cec 4000bba0: 91 e8 00 08 restore %g0, %o0, %o0 return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000bba4: 80 a0 60 02 cmp %g1, 2 4000bba8: 02 80 00 06 be 4000bbc0 <_Thread_queue_Extract_priority_helper+0xb8> 4000bbac: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000bbb0: 7f ff d8 4f call 40001cec 4000bbb4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000bbb8: 10 80 00 08 b 4000bbd8 <_Thread_queue_Extract_priority_helper+0xd0> 4000bbbc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000bbc0: c2 26 20 50 st %g1, [ %i0 + 0x50 ] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000bbc4: 7f ff d8 4a call 40001cec 4000bbc8: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000bbcc: 7f ff f3 36 call 400088a4 <_Watchdog_Remove> 4000bbd0: 90 06 20 48 add %i0, 0x48, %o0 4000bbd4: b2 16 63 f8 or %i1, 0x3f8, %i1 4000bbd8: 7f ff ed 85 call 400071ec <_Thread_Clear_state> 4000bbdc: 81 e8 00 00 restore 4000bbe0: 01 00 00 00 nop 4000bbe4 <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000bbe4: c4 02 20 44 ld [ %o0 + 0x44 ], %g2 * 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 && 4000bbe8: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3 4000bbec: 80 a0 e0 00 cmp %g3, 0 4000bbf0: 02 80 00 0f be 4000bc2c <_Thread_queue_Process_timeout+0x48> 4000bbf4: 92 10 00 08 mov %o0, %o1 4000bbf8: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000bbfc: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 ! 40018d60 <_Thread_Executing> 4000bc00: 80 a2 00 01 cmp %o0, %g1 4000bc04: 32 80 00 0b bne,a 4000bc30 <_Thread_queue_Process_timeout+0x4c> 4000bc08: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4000bc0c: 80 a0 e0 03 cmp %g3, 3 4000bc10: 02 80 00 0d be 4000bc44 <_Thread_queue_Process_timeout+0x60> 4000bc14: 01 00 00 00 nop the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000bc18: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 4000bc1c: c2 22 20 34 st %g1, [ %o0 + 0x34 ] the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4000bc20: 82 10 20 02 mov 2, %g1 4000bc24: 81 c3 e0 08 retl 4000bc28: c2 20 a0 30 st %g1, [ %g2 + 0x30 ] } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000bc2c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000bc30: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 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; 4000bc34: c2 22 60 34 st %g1, [ %o1 + 0x34 ] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000bc38: 82 13 c0 00 mov %o7, %g1 4000bc3c: 7f ff ff a8 call 4000badc <_Thread_queue_Extract> 4000bc40: 9e 10 40 00 mov %g1, %o7 4000bc44: 81 c3 e0 08 retl <== NOT EXECUTED 4000bc48: 01 00 00 00 nop 4000a08c <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000a08c: 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; 4000a090: c2 06 40 00 ld [ %i1 ], %g1 right += rhs->tv_nsec; 4000a094: 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; 4000a098: 91 38 60 1f sra %g1, 0x1f, %o0 4000a09c: 92 10 00 01 mov %g1, %o1 4000a0a0: 83 30 60 1d srl %g1, 0x1d, %g1 4000a0a4: 87 2a 60 03 sll %o1, 3, %g3 4000a0a8: 85 2a 20 03 sll %o0, 3, %g2 4000a0ac: 84 10 40 02 or %g1, %g2, %g2 4000a0b0: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a0b4: 99 28 a0 05 sll %g2, 5, %o4 4000a0b8: 9b 28 e0 05 sll %g3, 5, %o5 4000a0bc: 98 10 40 0c or %g1, %o4, %o4 4000a0c0: 9a a3 40 03 subcc %o5, %g3, %o5 4000a0c4: 83 33 60 1a srl %o5, 0x1a, %g1 4000a0c8: 98 63 00 02 subx %o4, %g2, %o4 4000a0cc: 97 2b 60 06 sll %o5, 6, %o3 4000a0d0: 95 2b 20 06 sll %o4, 6, %o2 4000a0d4: 96 a2 c0 0d subcc %o3, %o5, %o3 4000a0d8: 94 10 40 0a or %g1, %o2, %o2 4000a0dc: 94 62 80 0c subx %o2, %o4, %o2 4000a0e0: 96 82 c0 09 addcc %o3, %o1, %o3 4000a0e4: 94 42 80 08 addx %o2, %o0, %o2 4000a0e8: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a0ec: 85 2a a0 02 sll %o2, 2, %g2 4000a0f0: 84 10 40 02 or %g1, %g2, %g2 4000a0f4: 87 2a e0 02 sll %o3, 2, %g3 4000a0f8: 96 82 c0 03 addcc %o3, %g3, %o3 4000a0fc: 94 42 80 02 addx %o2, %g2, %o2 4000a100: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a104: 85 2a a0 02 sll %o2, 2, %g2 4000a108: 84 10 40 02 or %g1, %g2, %g2 4000a10c: 87 2a e0 02 sll %o3, 2, %g3 4000a110: 96 82 c0 03 addcc %o3, %g3, %o3 4000a114: 94 42 80 02 addx %o2, %g2, %o2 4000a118: 83 32 e0 1e srl %o3, 0x1e, %g1 4000a11c: 85 2a a0 02 sll %o2, 2, %g2 4000a120: 84 10 40 02 or %g1, %g2, %g2 4000a124: 87 2a e0 02 sll %o3, 2, %g3 4000a128: 96 82 c0 03 addcc %o3, %g3, %o3 4000a12c: 94 42 80 02 addx %o2, %g2, %o2 4000a130: 85 32 e0 17 srl %o3, 0x17, %g2 4000a134: 83 2a a0 09 sll %o2, 9, %g1 4000a138: 9b 2a e0 09 sll %o3, 9, %o5 4000a13c: 98 10 80 01 or %g2, %g1, %o4 right += rhs->tv_nsec; 4000a140: 96 83 40 0f addcc %o5, %o7, %o3 4000a144: 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; 4000a148: e4 06 20 04 ld [ %i0 + 4 ], %l2 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; right += rhs->tv_nsec; 4000a14c: 94 43 00 02 addx %o4, %g2, %o2 if ( right == 0 ) { 4000a150: 80 92 80 0b orcc %o2, %o3, %g0 4000a154: 12 80 00 06 bne 4000a16c <_Timespec_Divide+0xe0> 4000a158: d0 06 00 00 ld [ %i0 ], %o0 *ival_percentage = 0; 4000a15c: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000a160: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000a164: 81 c7 e0 08 ret <== NOT EXECUTED 4000a168: 81 e8 00 00 restore <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000a16c: 92 10 00 08 mov %o0, %o1 4000a170: 83 32 60 1d srl %o1, 0x1d, %g1 4000a174: 9b 2a 60 03 sll %o1, 3, %o5 4000a178: 91 3a 20 1f sra %o0, 0x1f, %o0 4000a17c: 99 2a 20 03 sll %o0, 3, %o4 4000a180: 98 10 40 0c or %g1, %o4, %o4 4000a184: 83 33 60 1b srl %o5, 0x1b, %g1 4000a188: 85 2b 20 05 sll %o4, 5, %g2 4000a18c: 87 2b 60 05 sll %o5, 5, %g3 4000a190: 84 10 40 02 or %g1, %g2, %g2 4000a194: 86 a0 c0 0d subcc %g3, %o5, %g3 4000a198: 83 30 e0 1a srl %g3, 0x1a, %g1 4000a19c: 84 60 80 0c subx %g2, %o4, %g2 4000a1a0: 9b 28 e0 06 sll %g3, 6, %o5 4000a1a4: 99 28 a0 06 sll %g2, 6, %o4 4000a1a8: 9a a3 40 03 subcc %o5, %g3, %o5 4000a1ac: 98 10 40 0c or %g1, %o4, %o4 4000a1b0: 98 63 00 02 subx %o4, %g2, %o4 4000a1b4: 9a 83 40 09 addcc %o5, %o1, %o5 4000a1b8: 83 33 60 1e srl %o5, 0x1e, %g1 4000a1bc: 98 43 00 08 addx %o4, %o0, %o4 4000a1c0: 87 2b 60 02 sll %o5, 2, %g3 4000a1c4: 85 2b 20 02 sll %o4, 2, %g2 4000a1c8: 9a 83 40 03 addcc %o5, %g3, %o5 4000a1cc: 84 10 40 02 or %g1, %g2, %g2 4000a1d0: 83 33 60 1e srl %o5, 0x1e, %g1 4000a1d4: 98 43 00 02 addx %o4, %g2, %o4 4000a1d8: 87 2b 60 02 sll %o5, 2, %g3 4000a1dc: 85 2b 20 02 sll %o4, 2, %g2 4000a1e0: 9a 83 40 03 addcc %o5, %g3, %o5 4000a1e4: 84 10 40 02 or %g1, %g2, %g2 4000a1e8: 83 33 60 1e srl %o5, 0x1e, %g1 4000a1ec: 98 43 00 02 addx %o4, %g2, %o4 4000a1f0: 87 2b 60 02 sll %o5, 2, %g3 4000a1f4: 85 2b 20 02 sll %o4, 2, %g2 4000a1f8: 9a 83 40 03 addcc %o5, %g3, %o5 4000a1fc: 84 10 40 02 or %g1, %g2, %g2 4000a200: 98 43 00 02 addx %o4, %g2, %o4 4000a204: 83 2b 20 09 sll %o4, 9, %g1 4000a208: 85 33 60 17 srl %o5, 0x17, %g2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000a20c: 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; 4000a210: a0 10 80 01 or %g2, %g1, %l0 4000a214: 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; 4000a218: a2 84 40 13 addcc %l1, %l3, %l1 4000a21c: 83 34 60 1e srl %l1, 0x1e, %g1 4000a220: 87 2c 60 02 sll %l1, 2, %g3 4000a224: a5 3c a0 1f sra %l2, 0x1f, %l2 4000a228: a0 44 00 12 addx %l0, %l2, %l0 4000a22c: 85 2c 20 02 sll %l0, 2, %g2 4000a230: 84 10 40 02 or %g1, %g2, %g2 4000a234: 83 30 e0 1b srl %g3, 0x1b, %g1 4000a238: 99 28 a0 05 sll %g2, 5, %o4 4000a23c: 9b 28 e0 05 sll %g3, 5, %o5 4000a240: 98 10 40 0c or %g1, %o4, %o4 4000a244: 9a a3 40 03 subcc %o5, %g3, %o5 4000a248: 98 63 00 02 subx %o4, %g2, %o4 4000a24c: 9a 83 40 11 addcc %o5, %l1, %o5 4000a250: 83 33 60 1e srl %o5, 0x1e, %g1 4000a254: 98 43 00 10 addx %o4, %l0, %o4 4000a258: 87 2b 60 02 sll %o5, 2, %g3 4000a25c: 85 2b 20 02 sll %o4, 2, %g2 4000a260: 9a 83 40 03 addcc %o5, %g3, %o5 4000a264: 84 10 40 02 or %g1, %g2, %g2 4000a268: 83 33 60 1e srl %o5, 0x1e, %g1 4000a26c: 87 2b 60 02 sll %o5, 2, %g3 4000a270: 98 43 00 02 addx %o4, %g2, %o4 4000a274: 9a 83 40 03 addcc %o5, %g3, %o5 4000a278: 85 2b 20 02 sll %o4, 2, %g2 4000a27c: 84 10 40 02 or %g1, %g2, %g2 4000a280: 83 33 60 1b srl %o5, 0x1b, %g1 4000a284: 98 43 00 02 addx %o4, %g2, %o4 4000a288: 99 2b 20 05 sll %o4, 5, %o4 4000a28c: 98 10 40 0c or %g1, %o4, %o4 4000a290: 93 2b 60 05 sll %o5, 5, %o1 4000a294: 40 00 35 cb call 400179c0 <__udivdi3> 4000a298: 90 10 00 0c mov %o4, %o0 *ival_percentage = answer / 1000; 4000a29c: 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; 4000a2a0: a0 10 00 08 mov %o0, %l0 4000a2a4: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000a2a8: 96 10 23 e8 mov 0x3e8, %o3 4000a2ac: 40 00 35 c5 call 400179c0 <__udivdi3> 4000a2b0: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000a2b4: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000a2b8: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000a2bc: 94 10 20 00 clr %o2 4000a2c0: 92 10 00 11 mov %l1, %o1 4000a2c4: 40 00 36 9b call 40017d30 <__umoddi3> 4000a2c8: 96 10 23 e8 mov 0x3e8, %o3 4000a2cc: d2 26 c0 00 st %o1, [ %i3 ] 4000a2d0: 81 c7 e0 08 ret 4000a2d4: 81 e8 00 00 restore 4000d27c <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 4000d27c: 9d e3 bf 98 save %sp, -104, %sp _Chain_Extract( &the_extension->Node ); 4000d280: 40 00 13 9d call 400120f4 <_Chain_Extract> 4000d284: 90 10 00 18 mov %i0, %o0 /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 4000d288: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 4000d28c: 80 a0 60 00 cmp %g1, 0 4000d290: 02 80 00 04 be 4000d2a0 <_User_extensions_Remove_set+0x24> 4000d294: 01 00 00 00 nop _Chain_Extract( &the_extension->Switch.Node ); 4000d298: 40 00 13 97 call 400120f4 <_Chain_Extract> <== NOT EXECUTED 4000d29c: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 4000d2a0: 81 c7 e0 08 ret 4000d2a4: 81 e8 00 00 restore 40008604 <_User_extensions_Thread_create>: */ bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 40008604: 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 ; 40008608: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000860c: e0 00 62 d8 ld [ %g1 + 0x2d8 ], %l0 ! 40018ed8 <_User_extensions_List> 40008610: 82 10 62 d8 or %g1, 0x2d8, %g1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 40008614: a4 00 60 04 add %g1, 4, %l2 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)( 40008618: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000861c: 10 80 00 0d b 40008650 <_User_extensions_Thread_create+0x4c> 40008620: a2 10 61 60 or %g1, 0x160, %l1 ! 40018d60 <_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 ) { 40008624: 80 a0 60 00 cmp %g1, 0 40008628: 02 80 00 09 be 4000864c <_User_extensions_Thread_create+0x48> 4000862c: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 40008630: 9f c0 40 00 call %g1 40008634: d0 04 40 00 ld [ %l1 ], %o0 _Thread_Executing, the_thread ); if ( !status ) 40008638: 80 8a 20 ff btst 0xff, %o0 4000863c: 32 80 00 05 bne,a 40008650 <_User_extensions_Thread_create+0x4c> 40008640: e0 04 00 00 ld [ %l0 ], %l0 40008644: 81 c7 e0 08 ret <== NOT EXECUTED 40008648: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 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 ) { 4000864c: 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 ) ; 40008650: 80 a4 00 12 cmp %l0, %l2 40008654: 32 bf ff f4 bne,a 40008624 <_User_extensions_Thread_create+0x20> 40008658: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 4000865c: 81 c7 e0 08 ret 40008660: 91 e8 20 01 restore %g0, 1, %o0 40015e60 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 40015e60: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 40015e64: 80 a6 60 00 cmp %i1, 0 40015e68: 02 80 00 31 be 40015f2c <_Watchdog_Adjust_to_chain+0xcc> 40015e6c: 01 00 00 00 nop return; } _ISR_Disable( level ); 40015e70: 7f ff d5 89 call 4000b494 40015e74: 01 00 00 00 nop 40015e78: a4 10 00 08 mov %o0, %l2 if ( !_Chain_Is_empty( header ) ) { 40015e7c: c2 06 00 00 ld [ %i0 ], %g1 40015e80: a2 06 20 04 add %i0, 4, %l1 40015e84: 80 a0 40 11 cmp %g1, %l1 40015e88: 02 80 00 27 be 40015f24 <_Watchdog_Adjust_to_chain+0xc4> 40015e8c: 01 00 00 00 nop 40015e90: a6 06 a0 04 add %i2, 4, %l3 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 40015e94: c4 06 00 00 ld [ %i0 ], %g2 while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 40015e98: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0 40015e9c: 80 a6 40 10 cmp %i1, %l0 40015ea0: 3a 80 00 05 bcc,a 40015eb4 <_Watchdog_Adjust_to_chain+0x54> 40015ea4: c0 20 a0 10 clr [ %g2 + 0x10 ] _Watchdog_First( header )->delta_interval -= units; 40015ea8: 82 24 00 19 sub %l0, %i1, %g1 40015eac: 10 80 00 1e b 40015f24 <_Watchdog_Adjust_to_chain+0xc4> 40015eb0: c2 20 a0 10 st %g1, [ %g2 + 0x10 ] */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40015eb4: c4 06 00 00 ld [ %i0 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 40015eb8: 80 a0 80 11 cmp %g2, %l1 40015ebc: 32 80 00 04 bne,a 40015ecc <_Watchdog_Adjust_to_chain+0x6c> 40015ec0: c2 00 80 00 ld [ %g2 ], %g1 40015ec4: 10 80 00 04 b 40015ed4 <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED 40015ec8: 84 10 20 00 clr %g2 <== NOT EXECUTED Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 40015ecc: c2 26 00 00 st %g1, [ %i0 ] new_first->previous = _Chain_Head(the_chain); 40015ed0: f0 20 60 04 st %i0, [ %g1 + 4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 40015ed4: e6 20 80 00 st %l3, [ %g2 ] old_last_node = the_chain->last; 40015ed8: c2 06 a0 08 ld [ %i2 + 8 ], %g1 the_chain->last = the_node; 40015edc: c4 26 a0 08 st %g2, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 40015ee0: 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; 40015ee4: c4 20 40 00 st %g2, [ %g1 ] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 40015ee8: 7f ff d5 6f call 4000b4a4 40015eec: 90 10 00 12 mov %l2, %o0 40015ef0: 7f ff d5 69 call 4000b494 40015ef4: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40015ef8: c2 06 00 00 ld [ %i0 ], %g1 } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 40015efc: 80 a0 40 11 cmp %g1, %l1 40015f00: 02 80 00 09 be 40015f24 <_Watchdog_Adjust_to_chain+0xc4> 40015f04: 01 00 00 00 nop 40015f08: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40015f0c: 80 a0 60 00 cmp %g1, 0 40015f10: 22 bf ff ea be,a 40015eb8 <_Watchdog_Adjust_to_chain+0x58> 40015f14: c4 06 00 00 ld [ %i0 ], %g2 return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 40015f18: b2 a6 40 10 subcc %i1, %l0, %i1 40015f1c: 32 bf ff df bne,a 40015e98 <_Watchdog_Adjust_to_chain+0x38> 40015f20: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED break; } } } _ISR_Enable( level ); 40015f24: 7f ff d5 60 call 4000b4a4 40015f28: 91 e8 00 12 restore %g0, %l2, %o0 40015f2c: 81 c7 e0 08 ret 40015f30: 81 e8 00 00 restore 4000873c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4000873c: 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; 40008740: 03 10 00 63 sethi %hi(0x40018c00), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 40008744: aa 10 00 18 mov %i0, %l5 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 40008748: e6 00 61 3c ld [ %g1 + 0x13c ], %l3 _ISR_Disable( level ); 4000874c: 7f ff e5 64 call 40001cdc 40008750: 01 00 00 00 nop 40008754: 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 ) { 40008758: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000875c: 80 a0 60 00 cmp %g1, 0 40008760: 02 80 00 03 be 4000876c <_Watchdog_Insert+0x30> 40008764: 07 10 00 63 sethi %hi(0x40018c00), %g3 _ISR_Enable( level ); 40008768: 30 80 00 39 b,a 4000884c <_Watchdog_Insert+0x110> <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 4000876c: c2 00 e1 f0 ld [ %g3 + 0x1f0 ], %g1 ! 40018df0 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40008770: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 40008774: 82 00 60 01 inc %g1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 40008778: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 4000877c: c2 20 e1 f0 st %g1, [ %g3 + 0x1f0 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 40008780: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008784: a8 10 61 5c or %g1, 0x15c, %l4 ! 40018d5c <_Watchdog_Sync_level> 40008788: ac 10 00 14 mov %l4, %l6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000878c: 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 ; 40008790: e2 05 40 00 ld [ %l5 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 40008794: 80 a4 a0 00 cmp %l2, 0 40008798: 22 80 00 1c be,a 40008808 <_Watchdog_Insert+0xcc> 4000879c: c4 04 60 04 ld [ %l1 + 4 ], %g2 400087a0: c2 04 40 00 ld [ %l1 ], %g1 400087a4: 80 a0 60 00 cmp %g1, 0 400087a8: 22 80 00 18 be,a 40008808 <_Watchdog_Insert+0xcc> 400087ac: c4 04 60 04 ld [ %l1 + 4 ], %g2 break; if ( delta_interval < after->delta_interval ) { 400087b0: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 400087b4: 80 a4 80 10 cmp %l2, %l0 400087b8: 1a 80 00 04 bcc 400087c8 <_Watchdog_Insert+0x8c> 400087bc: 82 24 00 12 sub %l0, %l2, %g1 after->delta_interval -= delta_interval; 400087c0: 10 80 00 11 b 40008804 <_Watchdog_Insert+0xc8> 400087c4: c2 24 60 10 st %g1, [ %l1 + 0x10 ] * 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 ); 400087c8: 7f ff e5 49 call 40001cec 400087cc: 90 10 00 18 mov %i0, %o0 400087d0: 7f ff e5 43 call 40001cdc 400087d4: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 400087d8: c2 06 60 08 ld [ %i1 + 8 ], %g1 400087dc: 80 a0 60 01 cmp %g1, 1 400087e0: 12 80 00 15 bne 40008834 <_Watchdog_Insert+0xf8> 400087e4: a4 24 80 10 sub %l2, %l0, %l2 goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 400087e8: c2 05 00 00 ld [ %l4 ], %g1 400087ec: 80 a0 40 13 cmp %g1, %l3 400087f0: 28 bf ff e9 bleu,a 40008794 <_Watchdog_Insert+0x58> 400087f4: e2 04 40 00 ld [ %l1 ], %l1 _Watchdog_Sync_level = insert_isr_nest_level; 400087f8: e6 25 80 00 st %l3, [ %l6 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 400087fc: 10 bf ff e5 b 40008790 <_Watchdog_Insert+0x54> 40008800: e4 06 60 0c ld [ %i1 + 0xc ], %l2 _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 40008804: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 40008808: 03 10 00 63 sethi %hi(0x40018c00), %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4000880c: c6 00 80 00 ld [ %g2 ], %g3 40008810: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 after_node->next = the_node; 40008814: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 40008818: c4 26 60 04 st %g2, [ %i1 + 4 ] 4000881c: c2 26 60 14 st %g1, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 40008820: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 40008824: 82 10 20 02 mov 2, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 40008828: f2 20 e0 04 st %i1, [ %g3 + 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; 4000882c: c6 26 40 00 st %g3, [ %i1 ] 40008830: c2 26 60 08 st %g1, [ %i1 + 8 ] _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; 40008834: 03 10 00 63 sethi %hi(0x40018c00), %g1 _Watchdog_Sync_count--; 40008838: 05 10 00 63 sethi %hi(0x40018c00), %g2 _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; 4000883c: e6 20 61 5c st %l3, [ %g1 + 0x15c ] _Watchdog_Sync_count--; 40008840: c2 00 a1 f0 ld [ %g2 + 0x1f0 ], %g1 40008844: 82 00 7f ff add %g1, -1, %g1 40008848: c2 20 a1 f0 st %g1, [ %g2 + 0x1f0 ] _ISR_Enable( level ); 4000884c: 7f ff e5 28 call 40001cec 40008850: 81 e8 00 00 restore 40008854: 01 00 00 00 nop 400088a4 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 400088a4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 400088a8: 7f ff e5 0d call 40001cdc 400088ac: 01 00 00 00 nop previous_state = the_watchdog->state; 400088b0: e0 06 20 08 ld [ %i0 + 8 ], %l0 switch ( previous_state ) { 400088b4: 80 a4 20 01 cmp %l0, 1 400088b8: 22 80 00 1e be,a 40008930 <_Watchdog_Remove+0x8c> 400088bc: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED 400088c0: 0a 80 00 1d bcs 40008934 <_Watchdog_Remove+0x90> 400088c4: 03 10 00 63 sethi %hi(0x40018c00), %g1 400088c8: 80 a4 20 03 cmp %l0, 3 400088cc: 18 80 00 1a bgu 40008934 <_Watchdog_Remove+0x90> 400088d0: 01 00 00 00 nop 400088d4: c6 06 00 00 ld [ %i0 ], %g3 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 400088d8: c0 26 20 08 clr [ %i0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 400088dc: c2 00 c0 00 ld [ %g3 ], %g1 400088e0: 80 a0 60 00 cmp %g1, 0 400088e4: 02 80 00 07 be 40008900 <_Watchdog_Remove+0x5c> 400088e8: 03 10 00 63 sethi %hi(0x40018c00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 400088ec: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 400088f0: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 400088f4: 82 00 40 02 add %g1, %g2, %g1 400088f8: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if ( _Watchdog_Sync_count ) 400088fc: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008900: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1 ! 40018df0 <_Watchdog_Sync_count> 40008904: 80 a0 60 00 cmp %g1, 0 40008908: 22 80 00 07 be,a 40008924 <_Watchdog_Remove+0x80> 4000890c: c4 06 00 00 ld [ %i0 ], %g2 _Watchdog_Sync_level = _ISR_Nest_level; 40008910: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED 40008914: c4 00 61 3c ld [ %g1 + 0x13c ], %g2 ! 40018d3c <_ISR_Nest_level> <== NOT EXECUTED 40008918: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED 4000891c: c4 20 61 5c st %g2, [ %g1 + 0x15c ] ! 40018d5c <_Watchdog_Sync_level> <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 40008920: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 40008924: c2 06 20 04 ld [ %i0 + 4 ], %g1 next->previous = previous; previous->next = next; 40008928: c4 20 40 00 st %g2, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000892c: c2 20 a0 04 st %g1, [ %g2 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 40008930: 03 10 00 63 sethi %hi(0x40018c00), %g1 40008934: c2 00 61 f4 ld [ %g1 + 0x1f4 ], %g1 ! 40018df4 <_Watchdog_Ticks_since_boot> 40008938: c2 26 20 18 st %g1, [ %i0 + 0x18 ] _ISR_Enable( level ); 4000893c: 7f ff e4 ec call 40001cec 40008940: b0 10 00 10 mov %l0, %i0 return( previous_state ); } 40008944: 81 c7 e0 08 ret 40008948: 81 e8 00 00 restore 40008a5c <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 40008a5c: 9d e3 bf 98 save %sp, -104, %sp uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 40008a60: 80 a6 20 00 cmp %i0, 0 40008a64: 02 80 00 04 be 40008a74 <_Workspace_Handler_initialization+0x18> 40008a68: 80 8e 20 07 btst 7, %i0 40008a6c: 02 80 00 06 be 40008a84 <_Workspace_Handler_initialization+0x28> 40008a70: 03 10 00 63 sethi %hi(0x40018c00), %g1 _Internal_error_Occurred( 40008a74: 90 10 20 00 clr %o0 40008a78: 92 10 20 01 mov 1, %o1 40008a7c: 10 80 00 15 b 40008ad0 <_Workspace_Handler_initialization+0x74> 40008a80: 94 10 20 02 mov 2, %o2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 40008a84: c2 00 61 38 ld [ %g1 + 0x138 ], %g1 40008a88: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1 40008a8c: 80 a0 60 00 cmp %g1, 0 40008a90: 02 80 00 07 be 40008aac <_Workspace_Handler_initialization+0x50> 40008a94: 92 10 00 18 mov %i0, %o1 memset( starting_address, 0, size ); 40008a98: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008a9c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008aa0: 40 00 12 c9 call 4000d5c4 <== NOT EXECUTED 40008aa4: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED memory_available = _Heap_Initialize( 40008aa8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40008aac: 94 10 00 19 mov %i1, %o2 40008ab0: 11 10 00 63 sethi %hi(0x40018c00), %o0 40008ab4: 96 10 20 08 mov 8, %o3 40008ab8: 7f ff f6 62 call 40006440 <_Heap_Initialize> 40008abc: 90 12 20 c4 or %o0, 0xc4, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 40008ac0: 80 a2 20 00 cmp %o0, 0 40008ac4: 12 80 00 05 bne 40008ad8 <_Workspace_Handler_initialization+0x7c> 40008ac8: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 40008acc: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED 40008ad0: 7f ff f6 e6 call 40006668 <_Internal_error_Occurred> 40008ad4: 01 00 00 00 nop 40008ad8: 81 c7 e0 08 ret 40008adc: 81 e8 00 00 restore 40001e80 <__assert>: void __assert( const char *file, int line, const char *failedexpr ) { 40001e80: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED __assert_func (file, line, NULL, failedexpr); 40001e84: 94 10 20 00 clr %o2 <== NOT EXECUTED 40001e88: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40001e8c: 7f ff ff eb call 40001e38 <__assert_func> <== NOT EXECUTED 40001e90: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40001e94: 01 00 00 00 nop 40001e38 <__assert_func>: const char *file, int line, const char *func, const char *failedexpr ) { 40001e38: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40001e3c: 03 10 00 5b sethi %hi(0x40016c00), %g1 <== NOT EXECUTED const char *file, int line, const char *func, const char *failedexpr ) { 40001e40: 9a 10 00 1a mov %i2, %o5 <== NOT EXECUTED 40001e44: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED 40001e48: 96 10 00 19 mov %i1, %o3 <== NOT EXECUTED 40001e4c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n", 40001e50: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 40001e54: 12 80 00 05 bne 40001e68 <__assert_func+0x30> <== NOT EXECUTED 40001e58: 98 10 63 98 or %g1, 0x398, %o4 <== NOT EXECUTED 40001e5c: 03 10 00 5b sethi %hi(0x40016c00), %g1 <== NOT EXECUTED 40001e60: 9a 10 62 a0 or %g1, 0x2a0, %o5 ! 40016ea0 <__func__.4776+0x148> <== NOT EXECUTED 40001e64: 98 10 00 0d mov %o5, %o4 <== NOT EXECUTED 40001e68: 11 10 00 5b sethi %hi(0x40016c00), %o0 <== NOT EXECUTED 40001e6c: 40 00 03 87 call 40002c88 <== NOT EXECUTED 40001e70: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 40016fa8 <__func__.4776+0x250> <== NOT EXECUTED file, line, (func) ? ", function: " : "", (func) ? func : "" ); rtems_fatal_error_occurred(0); 40001e74: 40 00 0f 1f call 40005af0 <== NOT EXECUTED 40001e78: 90 10 20 00 clr %o0 <== NOT EXECUTED 40001e7c: 01 00 00 00 nop 40016190 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) _fini(); 40016190: 9d e3 bf 98 save %sp, -104, %sp 40016194: 40 00 07 3e call 40017e8c <_fini> 40016198: 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(); 4001619c: 7f ff ff e1 call 40016120 400161a0: 01 00 00 00 nop rtems_shutdown_executive(status); 400161a4: 40 00 00 4e call 400162dc 400161a8: 90 10 00 18 mov %i0, %o0 400161ac: 30 80 00 00 b,a 400161ac <_exit+0x1c> <== NOT EXECUTED 4002c7d8 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 4002c7d8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002c7dc: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002c7e0: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 4002c7e4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4002c7e8: 7f ff ff 79 call 4002c5cc <== NOT EXECUTED 4002c7ec: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002c7f0: 01 00 00 00 nop 40021100 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); } 40021100: 81 c3 e0 08 retl <== NOT EXECUTED 40021104: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000a158 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000a158: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000a15c: 7f ff ff e6 call 4000a0f4 <== NOT EXECUTED 4000a160: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000a164: 01 00 00 00 nop 40020318 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 40020318: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4002031c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40020320: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40020324: 7f ff ff 65 call 400200b8 <== NOT EXECUTED 40020328: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4002032c: 01 00 00 00 nop 40020524 <_lstat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40020524: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40020528: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4002052c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40020530: 7f ff ff c4 call 40020440 <== NOT EXECUTED 40020534: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40020538: 01 00 00 00 nop 400162a8 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 400162a8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400162ac: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 400162b0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400162b4: 40 00 00 17 call 40016310 <== NOT EXECUTED 400162b8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400162bc: 01 00 00 00 nop 400407f8 <_rename_r>: int _rename_r( struct _reent *ptr, const char *old, const char *new ) { 400407f8: 9d e3 bf 48 save %sp, -184, %sp <== NOT EXECUTED struct stat sb; int s; s = stat( old, &sb); 400407fc: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 40040800: 7f ff 18 d7 call 40006b5c <== NOT EXECUTED 40040804: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 40040808: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4004080c: 06 80 00 13 bl 40040858 <_rename_r+0x60> <== NOT EXECUTED 40040810: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED return s; s = link( old, new ); 40040814: 7f ff 7e 29 call 400200b8 <== NOT EXECUTED 40040818: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( s < 0 ) 4004081c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40040820: 06 80 00 0e bl 40040858 <_rename_r+0x60> <== NOT EXECUTED 40040824: c2 17 bf b4 lduh [ %fp + -76 ], %g1 <== NOT EXECUTED return s; return S_ISDIR(sb.st_mode) ? rmdir( old ) : unlink( old ); 40040828: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 4004082c: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40040830: 05 00 00 10 sethi %hi(0x4000), %g2 <== NOT EXECUTED 40040834: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40040838: 12 80 00 06 bne 40040850 <_rename_r+0x58> <== NOT EXECUTED 4004083c: 01 00 00 00 nop <== NOT EXECUTED 40040840: 7f ff 81 2d call 40020cf4 <== NOT EXECUTED 40040844: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 40040848: 81 c7 e0 08 ret <== NOT EXECUTED 4004084c: 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 ); 40040850: 7f ff 82 38 call 40021130 <== NOT EXECUTED 40040854: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } 40040858: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4004085c: 81 c7 e0 08 ret <== NOT EXECUTED 40040860: 81 e8 00 00 restore <== NOT EXECUTED 40006c40 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40006c40: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40006c44: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40006c48: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40006c4c: 7f ff ff c4 call 40006b5c <== NOT EXECUTED 40006c50: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006c54: 01 00 00 00 nop 400212a0 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 400212a0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 400212a4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400212a8: 7f ff ff a2 call 40021130 <== NOT EXECUTED 400212ac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400212b0: 01 00 00 00 nop 40005294 : int alphasort( const void *d1, const void *d2 ) { return(strcmp((*(struct dirent **)d1)->d_name, 40005294: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 40005298: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED 4000529c: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED 400052a0: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED 400052a4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400052a8: 40 00 32 48 call 40011bc8 <== NOT EXECUTED 400052ac: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400052b0: 01 00 00 00 nop 4001e8a0 : #include int chdir( const char *pathname ) { 4001e8a0: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 4001e8a4: 92 10 20 01 mov 1, %o1 4001e8a8: 90 10 00 18 mov %i0, %o0 4001e8ac: a0 07 bf e8 add %fp, -24, %l0 4001e8b0: 96 10 20 01 mov 1, %o3 4001e8b4: 94 10 00 10 mov %l0, %o2 4001e8b8: 7f ff 9a af call 40005374 4001e8bc: b0 10 3f ff mov -1, %i0 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 4001e8c0: 80 a2 20 00 cmp %o0, 0 4001e8c4: 12 80 00 37 bne 4001e9a0 4001e8c8: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4001e8cc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4001e8d0: 80 a0 60 00 cmp %g1, 0 4001e8d4: 12 80 00 0c bne 4001e904 4001e8d8: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 4001e8dc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4001e8e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001e8e4: 02 80 00 04 be 4001e8f4 <== NOT EXECUTED 4001e8e8: 01 00 00 00 nop <== NOT EXECUTED 4001e8ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001e8f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001e8f4: 40 00 41 11 call 4002ed38 <__errno> <== NOT EXECUTED 4001e8f8: 01 00 00 00 nop <== NOT EXECUTED 4001e8fc: 10 80 00 14 b 4001e94c <== NOT EXECUTED 4001e900: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4001e904: 9f c0 40 00 call %g1 4001e908: 90 10 00 10 mov %l0, %o0 4001e90c: 80 a2 20 01 cmp %o0, 1 4001e910: 02 80 00 12 be 4001e958 4001e914: 03 10 01 20 sethi %hi(0x40048000), %g1 rtems_filesystem_freenode( &loc ); 4001e918: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001e91c: 80 a0 60 00 cmp %g1, 0 4001e920: 02 80 00 08 be 4001e940 4001e924: 01 00 00 00 nop 4001e928: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001e92c: 80 a0 60 00 cmp %g1, 0 4001e930: 02 80 00 04 be 4001e940 4001e934: 01 00 00 00 nop 4001e938: 9f c0 40 00 call %g1 4001e93c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4001e940: 40 00 40 fe call 4002ed38 <__errno> 4001e944: 01 00 00 00 nop 4001e948: 82 10 20 14 mov 0x14, %g1 ! 14 4001e94c: c2 22 00 00 st %g1, [ %o0 ] 4001e950: 81 c7 e0 08 ret 4001e954: 91 e8 3f ff restore %g0, -1, %o0 } rtems_filesystem_freenode( &rtems_filesystem_current ); 4001e958: d0 00 61 24 ld [ %g1 + 0x124 ], %o0 4001e95c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 4001e960: 80 a0 60 00 cmp %g1, 0 4001e964: 22 80 00 09 be,a 4001e988 4001e968: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4001e96c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4004801c 4001e970: 80 a0 60 00 cmp %g1, 0 4001e974: 22 80 00 05 be,a 4001e988 4001e978: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4001e97c: 9f c0 40 00 call %g1 4001e980: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 4001e984: 03 10 01 20 sethi %hi(0x40048000), %g1 4001e988: d0 00 61 24 ld [ %g1 + 0x124 ], %o0 ! 40048124 4001e98c: 92 07 bf e8 add %fp, -24, %o1 4001e990: 90 02 20 04 add %o0, 4, %o0 4001e994: 94 10 20 10 mov 0x10, %o2 4001e998: 40 00 4a d5 call 400314ec 4001e99c: b0 10 20 00 clr %i0 return 0; } 4001e9a0: 81 c7 e0 08 ret 4001e9a4: 81 e8 00 00 restore 400050fc : int chmod( const char *path, mode_t mode ) { 400050fc: 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 ); 40005100: 92 10 20 00 clr %o1 40005104: 90 10 00 18 mov %i0, %o0 40005108: a0 07 bf e8 add %fp, -24, %l0 4000510c: 96 10 20 01 mov 1, %o3 40005110: 94 10 00 10 mov %l0, %o2 40005114: 40 00 00 98 call 40005374 40005118: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 4000511c: 80 a2 20 00 cmp %o0, 0 40005120: 12 80 00 24 bne 400051b0 40005124: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers ){ 40005128: 80 a0 60 00 cmp %g1, 0 4000512c: 32 80 00 10 bne,a 4000516c 40005130: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 rtems_filesystem_freenode( &loc ); 40005134: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40005138: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000513c: 02 80 00 08 be 4000515c <== NOT EXECUTED 40005140: 01 00 00 00 nop <== NOT EXECUTED 40005144: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40005148: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000514c: 02 80 00 04 be 4000515c <== NOT EXECUTED 40005150: 01 00 00 00 nop <== NOT EXECUTED 40005154: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005158: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4000515c: 40 00 a6 f7 call 4002ed38 <__errno> <== NOT EXECUTED 40005160: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005164: 10 80 00 12 b 400051ac <== NOT EXECUTED 40005168: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED } if ( !loc.handlers->fchmod_h ){ 4000516c: 80 a0 60 00 cmp %g1, 0 40005170: 12 80 00 12 bne 400051b8 40005174: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 40005178: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4000517c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005180: 02 80 00 08 be 400051a0 <== NOT EXECUTED 40005184: 01 00 00 00 nop <== NOT EXECUTED 40005188: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4000518c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005190: 02 80 00 04 be 400051a0 <== NOT EXECUTED 40005194: 01 00 00 00 nop <== NOT EXECUTED 40005198: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000519c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400051a0: 40 00 a6 e6 call 4002ed38 <__errno> <== NOT EXECUTED 400051a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400051a8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400051ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400051b0: 81 c7 e0 08 ret 400051b4: 81 e8 00 00 restore } result = (*loc.handlers->fchmod_h)( &loc, mode ); 400051b8: 90 10 00 10 mov %l0, %o0 400051bc: 9f c0 40 00 call %g1 400051c0: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 400051c4: c2 07 bf f0 ld [ %fp + -16 ], %g1 400051c8: 80 a0 60 00 cmp %g1, 0 400051cc: 02 bf ff f9 be 400051b0 400051d0: b0 10 00 08 mov %o0, %i0 400051d4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400051d8: 80 a0 60 00 cmp %g1, 0 400051dc: 02 80 00 04 be 400051ec 400051e0: 01 00 00 00 nop 400051e4: 9f c0 40 00 call %g1 400051e8: 90 10 00 10 mov %l0, %o0 return result; } 400051ec: 81 c7 e0 08 ret 400051f0: 81 e8 00 00 restore 4001e9a8 : int chown( const char *path, uid_t owner, gid_t group ) { 4001e9a8: 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 ) ) 4001e9ac: 92 10 20 00 clr %o1 4001e9b0: 90 10 00 18 mov %i0, %o0 4001e9b4: a0 07 bf e8 add %fp, -24, %l0 4001e9b8: 96 10 20 01 mov 1, %o3 4001e9bc: 94 10 00 10 mov %l0, %o2 4001e9c0: 7f ff 9a 6d call 40005374 4001e9c4: b0 10 3f ff mov -1, %i0 4001e9c8: 80 a2 20 00 cmp %o0, 0 4001e9cc: 12 80 00 10 bne 4001ea0c 4001e9d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !loc.ops->chown_h ) { 4001e9d4: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 4001e9d8: 80 a0 a0 00 cmp %g2, 0 4001e9dc: 12 80 00 0e bne 4001ea14 4001e9e0: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 4001e9e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001e9e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001e9ec: 02 80 00 04 be 4001e9fc <== NOT EXECUTED 4001e9f0: 01 00 00 00 nop <== NOT EXECUTED 4001e9f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001e9f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001e9fc: 40 00 40 cf call 4002ed38 <__errno> <== NOT EXECUTED 4001ea00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001ea04: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001ea08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001ea0c: 81 c7 e0 08 ret 4001ea10: 81 e8 00 00 restore } result = (*loc.ops->chown_h)( &loc, owner, group ); 4001ea14: 95 2e a0 10 sll %i2, 0x10, %o2 4001ea18: 93 32 60 10 srl %o1, 0x10, %o1 4001ea1c: 95 32 a0 10 srl %o2, 0x10, %o2 4001ea20: 9f c0 80 00 call %g2 4001ea24: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4001ea28: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001ea2c: 80 a0 60 00 cmp %g1, 0 4001ea30: 02 bf ff f7 be 4001ea0c 4001ea34: b0 10 00 08 mov %o0, %i0 4001ea38: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001ea3c: 80 a0 60 00 cmp %g1, 0 4001ea40: 02 80 00 04 be 4001ea50 4001ea44: 01 00 00 00 nop 4001ea48: 9f c0 40 00 call %g1 4001ea4c: 90 10 00 10 mov %l0, %o0 return result; } 4001ea50: 81 c7 e0 08 ret 4001ea54: 81 e8 00 00 restore 4001ea58 : #include int chroot( const char *pathname ) { 4001ea58: 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) { 4001ea5c: 23 10 01 20 sethi %hi(0x40048000), %l1 4001ea60: e0 04 61 24 ld [ %l1 + 0x124 ], %l0 ! 40048124 4001ea64: 03 10 01 73 sethi %hi(0x4005cc00), %g1 4001ea68: 82 10 63 2c or %g1, 0x32c, %g1 ! 4005cf2c 4001ea6c: 80 a4 00 01 cmp %l0, %g1 4001ea70: 12 80 00 0e bne 4001eaa8 4001ea74: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ 4001ea78: 40 00 07 90 call 400208b8 4001ea7c: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 4001ea80: c2 04 61 24 ld [ %l1 + 0x124 ], %g1 4001ea84: 80 a0 40 10 cmp %g1, %l0 4001ea88: 12 80 00 08 bne 4001eaa8 4001ea8c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001ea90: 40 00 40 aa call 4002ed38 <__errno> <== NOT EXECUTED 4001ea94: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4001ea98: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001ea9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001eaa0: 81 c7 e0 08 ret <== NOT EXECUTED 4001eaa4: 81 e8 00 00 restore <== NOT EXECUTED } result = chdir(pathname); 4001eaa8: 7f ff ff 7e call 4001e8a0 4001eaac: 90 10 00 18 mov %i0, %o0 if (result) { 4001eab0: 80 a2 20 00 cmp %o0, 0 4001eab4: 12 80 00 0b bne 4001eae0 4001eab8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( errno ); } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4001eabc: 11 10 01 0a sethi %hi(0x40042800), %o0 4001eac0: 92 10 20 00 clr %o1 4001eac4: 90 12 23 10 or %o0, 0x310, %o0 4001eac8: 94 07 bf e8 add %fp, -24, %o2 4001eacc: 7f ff 9a 2a call 40005374 4001ead0: 96 10 20 00 clr %o3 4001ead4: 80 a2 20 00 cmp %o0, 0 4001ead8: 02 80 00 0a be 4001eb00 4001eadc: 03 10 01 20 sethi %hi(0x40048000), %g1 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 4001eae0: 40 00 40 96 call 4002ed38 <__errno> <== NOT EXECUTED 4001eae4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001eae8: 40 00 40 94 call 4002ed38 <__errno> <== NOT EXECUTED 4001eaec: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4001eaf0: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001eaf4: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 4001eaf8: 81 c7 e0 08 ret <== NOT EXECUTED 4001eafc: 81 e8 00 00 restore <== NOT EXECUTED } rtems_filesystem_freenode(&rtems_filesystem_root); 4001eb00: d0 00 61 24 ld [ %g1 + 0x124 ], %o0 4001eb04: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4001eb08: 80 a0 60 00 cmp %g1, 0 4001eb0c: 22 80 00 09 be,a 4001eb30 4001eb10: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4001eb14: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4004801c 4001eb18: 80 a0 60 00 cmp %g1, 0 4001eb1c: 22 80 00 05 be,a 4001eb30 4001eb20: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4001eb24: 9f c0 40 00 call %g1 4001eb28: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_root = loc; 4001eb2c: 03 10 01 20 sethi %hi(0x40048000), %g1 4001eb30: d0 00 61 24 ld [ %g1 + 0x124 ], %o0 ! 40048124 4001eb34: 92 07 bf e8 add %fp, -24, %o1 4001eb38: 94 10 20 10 mov 0x10, %o2 4001eb3c: 90 02 20 14 add %o0, 0x14, %o0 4001eb40: 40 00 4a 6b call 400314ec 4001eb44: b0 10 20 00 clr %i0 return 0; } 4001eb48: 81 c7 e0 08 ret 4001eb4c: 81 e8 00 00 restore 4002c3dc : * close a directory. */ int closedir( DIR *dirp ) { 4002c3dc: 9d e3 bf 98 save %sp, -104, %sp int fd; if ( !dirp ) 4002c3e0: a0 96 20 00 orcc %i0, 0, %l0 4002c3e4: 32 80 00 08 bne,a 4002c404 4002c3e8: d0 04 20 0c ld [ %l0 + 0xc ], %o0 rtems_set_errno_and_return_minus_one( EBADF ); 4002c3ec: 40 00 0a 53 call 4002ed38 <__errno> <== NOT EXECUTED 4002c3f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c3f4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4002c3f8: 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)); } 4002c3fc: 81 c7 e0 08 ret <== NOT EXECUTED 4002c400: 81 e8 00 00 restore <== NOT EXECUTED if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; 4002c404: 82 10 3f ff mov -1, %g1 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 4002c408: f0 04 00 00 ld [ %l0 ], %i0 dirp->dd_fd = -1; dirp->dd_loc = 0; 4002c40c: c0 24 20 04 clr [ %l0 + 4 ] (void)free((void *)dirp->dd_buf); 4002c410: 7f ff 64 2b call 400054bc 4002c414: c2 24 00 00 st %g1, [ %l0 ] (void)free((void *)dirp); 4002c418: 7f ff 64 29 call 400054bc 4002c41c: 90 10 00 10 mov %l0, %o0 return(close(fd)); 4002c420: 7f ff 63 75 call 400051f4 4002c424: 81 e8 00 00 restore 4002c428: 01 00 00 00 nop 4000c06c : */ int device_close( rtems_libio_t *iop ) { 4000c06c: 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; 4000c070: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 4000c074: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 4000c078: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 4000c07c: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 4000c080: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 4000c084: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 4000c088: 94 07 bf ec add %fp, -20, %o2 4000c08c: 40 00 02 15 call 4000c8e0 4000c090: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000c094: 80 a2 20 00 cmp %o0, 0 4000c098: 02 80 00 05 be 4000c0ac 4000c09c: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000c0a0: 7f ff ff a3 call 4000bf2c <== NOT EXECUTED 4000c0a4: 01 00 00 00 nop <== NOT EXECUTED 4000c0a8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } return 0; } 4000c0ac: 81 c7 e0 08 ret 4000c0b0: 81 e8 00 00 restore 4000bf60 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000bf60: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000bf64: 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; 4000bf68: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 4000bf6c: 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; 4000bf70: 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( 4000bf74: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 4000bf78: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 4000bf7c: 40 00 02 6f call 4000c938 <== NOT EXECUTED 4000bf80: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000bf84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000bf88: 22 80 00 06 be,a 4000bfa0 <== NOT EXECUTED 4000bf8c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000bf90: 7f ff ff e7 call 4000bf2c <== NOT EXECUTED 4000bf94: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 4000bf98: 81 c7 e0 08 ret <== NOT EXECUTED 4000bf9c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000bfa0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000bfa4: 81 c7 e0 08 ret <== NOT EXECUTED 4000bfa8: 81 e8 00 00 restore <== NOT EXECUTED 4000c0b4 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000c0b4: 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; 4000c0b8: 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; 4000c0bc: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 4000c0c0: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 4000c0c4: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 4000c0c8: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 4000c0cc: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 4000c0d0: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 4000c0d4: 94 07 bf ec add %fp, -20, %o2 4000c0d8: 40 00 02 2e call 4000c990 4000c0dc: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c0e0: 80 a2 20 00 cmp %o0, 0 4000c0e4: 02 80 00 05 be 4000c0f8 4000c0e8: 01 00 00 00 nop return rtems_deviceio_errno(status); 4000c0ec: 7f ff ff 90 call 4000bf2c <== NOT EXECUTED 4000c0f0: 01 00 00 00 nop <== NOT EXECUTED 4000c0f4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED return 0; } 4000c0f8: 81 c7 e0 08 ret 4000c0fc: 81 e8 00 00 restore 4000c00c : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000c00c: 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; 4000c010: 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; 4000c014: 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; 4000c018: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4000c01c: 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; 4000c020: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000c024: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 4000c028: 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; 4000c02c: 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; 4000c030: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 4000c034: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 4000c038: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 4000c03c: 40 00 02 6b call 4000c9e8 <== NOT EXECUTED 4000c040: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000c044: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c048: 22 80 00 06 be,a 4000c060 <== NOT EXECUTED 4000c04c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED return rtems_deviceio_errno(status); 4000c050: 7f ff ff b7 call 4000bf2c <== NOT EXECUTED 4000c054: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000c058: 81 c7 e0 08 ret <== NOT EXECUTED 4000c05c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c060: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4000c064: 81 c7 e0 08 ret <== NOT EXECUTED 4000c068: 81 e8 00 00 restore <== NOT EXECUTED 4000bfac : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000bfac: 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; 4000bfb0: 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; 4000bfb4: 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; 4000bfb8: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4000bfbc: 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; 4000bfc0: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 4000bfc4: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 4000bfc8: 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; 4000bfcc: 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; 4000bfd0: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 4000bfd4: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 4000bfd8: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 4000bfdc: 40 00 02 99 call 4000ca40 4000bfe0: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000bfe4: 80 a2 20 00 cmp %o0, 0 4000bfe8: 22 80 00 06 be,a 4000c000 4000bfec: d0 07 bf f4 ld [ %fp + -12 ], %o0 return rtems_deviceio_errno(status); 4000bff0: 7f ff ff cf call 4000bf2c <== NOT EXECUTED 4000bff4: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000bff8: 81 c7 e0 08 ret <== NOT EXECUTED 4000bffc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000c000: b0 10 00 08 mov %o0, %i0 4000c004: 81 c7 e0 08 ret 4000c008: 81 e8 00 00 restore 40003b14 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40003b14: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40003b18: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40003b1c: 80 a0 60 00 cmp %g1, 0 40003b20: 02 80 00 1a be 40003b88 40003b24: 01 00 00 00 nop rtems_interrupt_disable (level); 40003b28: 7f ff f8 6d call 40001cdc <== NOT EXECUTED 40003b2c: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 40003b30: 10 80 00 0f b 40003b6c <== NOT EXECUTED 40003b34: a0 10 20 02 mov 2, %l0 ! 2 <== NOT EXECUTED rtems_interrupt_enable (level); 40003b38: 7f ff f8 6d call 40001cec <== NOT EXECUTED 40003b3c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40003b40: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40003b44: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003b48: 40 00 06 28 call 400053e8 <== NOT EXECUTED 40003b4c: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40003b50: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003b54: 02 80 00 04 be 40003b64 <== NOT EXECUTED 40003b58: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003b5c: 40 00 07 e5 call 40005af0 <== NOT EXECUTED 40003b60: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40003b64: 7f ff f8 5e call 40001cdc <== NOT EXECUTED 40003b68: 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) { 40003b6c: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40003b70: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40003b74: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003b78: 32 bf ff f0 bne,a 40003b38 <== NOT EXECUTED 40003b7c: 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); 40003b80: 7f ff f8 5b call 40001cec <== NOT EXECUTED 40003b84: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40003b88: 81 c7 e0 08 ret 40003b8c: 81 e8 00 00 restore 40002d2c : int dup2( int fildes, int fildes2 ) { 40002d2c: 9d e3 bf 48 save %sp, -184, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40002d30: a0 07 bf a8 add %fp, -88, %l0 40002d34: 90 10 00 18 mov %i0, %o0 40002d38: 40 00 01 dd call 400034ac 40002d3c: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40002d40: 80 a2 3f ff cmp %o0, -1 40002d44: 02 80 00 0e be 40002d7c 40002d48: 90 10 3f ff mov -1, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40002d4c: 92 10 00 10 mov %l0, %o1 40002d50: 40 00 01 d7 call 400034ac 40002d54: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40002d58: 80 a2 3f ff cmp %o0, -1 40002d5c: 02 80 00 07 be 40002d78 40002d60: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40002d64: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40002d68: 40 00 00 97 call 40002fc4 <== NOT EXECUTED 40002d6c: 92 10 20 00 clr %o1 <== NOT EXECUTED } 40002d70: 81 c7 e0 08 ret <== NOT EXECUTED 40002d74: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40002d78: 90 10 3f ff mov -1, %o0 } 40002d7c: b0 10 00 08 mov %o0, %i0 40002d80: 81 c7 e0 08 ret 40002d84: 81 e8 00 00 restore 40003580 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 40003580: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40003584: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003588: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 4000358c: 02 80 00 1b be 400035f8 <== NOT EXECUTED 40003590: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003594: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 40003598: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40018460 <__ctype_ptr> <== NOT EXECUTED 4000359c: 84 0e 20 ff and %i0, 0xff, %g2 <== NOT EXECUTED 400035a0: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 400035a4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400035a8: 22 80 00 15 be,a 400035fc <== NOT EXECUTED 400035ac: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 400035b0: 80 a0 a0 09 cmp %g2, 9 <== NOT EXECUTED 400035b4: 02 80 00 11 be 400035f8 <== NOT EXECUTED 400035b8: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED 400035bc: 02 80 00 10 be 400035fc <== NOT EXECUTED 400035c0: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 400035c4: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED 400035c8: 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] = '^'; 400035cc: 82 10 20 5e mov 0x5e, %g1 <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 400035d0: 90 07 bf f0 add %fp, -16, %o0 <== 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] = '^'; 400035d4: c2 2f bf f0 stb %g1, [ %fp + -16 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 400035d8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400035dc: 7f ff ff 3b call 400032c8 <== NOT EXECUTED 400035e0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 400035e4: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 400035e8: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 400035ec: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 400035f0: 81 c7 e0 08 ret <== NOT EXECUTED 400035f4: 81 e8 00 00 restore <== NOT EXECUTED } else { oproc (c, tty); 400035f8: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 400035fc: 7f ff ff 7f call 400033f8 <== NOT EXECUTED 40003600: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003604: 81 c7 e0 08 ret <== NOT EXECUTED 40003608: 81 e8 00 00 restore <== NOT EXECUTED 4001f5c0 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 4001f5c0: 03 10 01 6f sethi %hi(0x4005bc00), %g1 <== NOT EXECUTED 4001f5c4: d0 00 62 94 ld [ %g1 + 0x294 ], %o0 ! 4005be94 <== NOT EXECUTED 4001f5c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f5cc: 02 80 00 05 be 4001f5e0 <== NOT EXECUTED 4001f5d0: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 4001f5d4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001f5d8: 40 00 3e 30 call 4002ee98 <== NOT EXECUTED 4001f5dc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001f5e0: 81 c3 e0 08 retl <== NOT EXECUTED 4001f5e4: 01 00 00 00 nop 4001f5e8 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 4001f5e8: 03 10 01 6f sethi %hi(0x4005bc00), %g1 <== NOT EXECUTED 4001f5ec: d0 00 61 ac ld [ %g1 + 0x1ac ], %o0 ! 4005bdac <== NOT EXECUTED 4001f5f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f5f4: 02 80 00 05 be 4001f608 <== NOT EXECUTED 4001f5f8: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 4001f5fc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001f600: 40 00 3e 26 call 4002ee98 <== NOT EXECUTED 4001f604: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001f608: 81 c3 e0 08 retl <== NOT EXECUTED 4001f60c: 01 00 00 00 nop 4000360c : * 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) { 4000360c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 40003610: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED 40003614: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003618: 02 80 00 0a be 40003640 <== NOT EXECUTED 4000361c: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 40003620: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003624: 02 80 00 78 be 40003804 <== NOT EXECUTED 40003628: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 4000362c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40003630: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 40003634: 32 80 00 05 bne,a 40003648 <== NOT EXECUTED 40003638: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED tty->ccount = 0; 4000363c: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED 40003640: 81 c7 e0 08 ret <== NOT EXECUTED 40003644: 81 e8 00 00 restore <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { 40003648: 12 80 00 6f bne 40003804 <== NOT EXECUTED 4000364c: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40003650: 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; 40003654: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40003658: 7f ff ff ca call 40003580 <== NOT EXECUTED 4000365c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40003660: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED echo ('\n', tty); 40003664: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED return; } if (!(tty->termios.c_lflag & ECHOE)) { tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); if (tty->termios.c_lflag & ECHOK) 40003668: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 4000366c: 02 bf ff f5 be 40003640 <== NOT EXECUTED 40003670: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED 40003674: 30 80 00 0f b,a 400036b0 <== NOT EXECUTED } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 40003678: c4 04 20 3c ld [ %l0 + 0x3c ], %g2 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 4000367c: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED 40003680: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40003684: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 40003688: 02 80 00 5a be 400037f0 <== NOT EXECUTED 4000368c: c2 08 40 03 ldub [ %g1 + %g3 ], %g1 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40003690: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003694: 12 80 00 09 bne 400036b8 <== NOT EXECUTED 40003698: b0 08 60 ff and %g1, 0xff, %i0 <== NOT EXECUTED 4000369c: 80 88 a0 10 btst 0x10, %g2 <== NOT EXECUTED 400036a0: 12 80 00 07 bne 400036bc <== NOT EXECUTED 400036a4: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 400036a8: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED 400036ac: b2 10 00 10 mov %l0, %i1 <== NOT EXECUTED 400036b0: 7f ff ff b4 call 40003580 <== NOT EXECUTED 400036b4: 81 e8 00 00 restore <== NOT EXECUTED } else if (c == '\t') { 400036b8: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED 400036bc: 32 80 00 29 bne,a 40003760 <== NOT EXECUTED 400036c0: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 400036c4: 9a 08 a2 00 and %g2, 0x200, %o5 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { int col = tty->read_start_column; 400036c8: f0 04 20 2c ld [ %l0 + 0x2c ], %i0 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 400036cc: c8 04 40 00 ld [ %l1 ], %g4 <== NOT EXECUTED 400036d0: 10 80 00 12 b 40003718 <== NOT EXECUTED 400036d4: 84 10 20 00 clr %g2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 400036d8: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 400036dc: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 400036e0: 32 80 00 05 bne,a 400036f4 <== NOT EXECUTED 400036e4: c2 09 00 01 ldub [ %g4 + %g1 ], %g1 <== NOT EXECUTED col = (col | 7) + 1; 400036e8: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 400036ec: 10 80 00 0a b 40003714 <== NOT EXECUTED 400036f0: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED } else if (iscntrl (c)) { 400036f4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400036f8: 22 80 00 07 be,a 40003714 <== NOT EXECUTED 400036fc: b0 06 20 01 inc %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40003700: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED 40003704: 32 80 00 04 bne,a 40003714 <== NOT EXECUTED 40003708: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 4000370c: 10 80 00 03 b 40003718 <== NOT EXECUTED 40003710: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40003714: 84 00 a0 01 inc %g2 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40003718: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 4000371c: 32 bf ff ef bne,a 400036d8 <== NOT EXECUTED 40003720: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003724: 10 80 00 08 b 40003744 <== NOT EXECUTED 40003728: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 4000372c: 7f ff fe e7 call 400032c8 <== NOT EXECUTED 40003730: 01 00 00 00 nop <== NOT EXECUTED tty->column--; 40003734: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003738: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000373c: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40003740: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40003744: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40003748: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 4000374c: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40003750: 14 bf ff f7 bg 4000372c <== NOT EXECUTED 40003754: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40003758: 10 80 00 27 b 400037f4 <== NOT EXECUTED 4000375c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40003760: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 40003764: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003768: 22 80 00 10 be,a 400037a8 <== NOT EXECUTED 4000376c: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 40003770: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 40003774: 22 80 00 0d be,a 400037a8 <== NOT EXECUTED 40003778: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 4000377c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003780: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40003784: 7f ff fe d1 call 400032c8 <== NOT EXECUTED 40003788: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 4000378c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40003790: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003794: 22 80 00 05 be,a 400037a8 <== NOT EXECUTED 40003798: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED tty->column--; 4000379c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400037a0: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 400037a4: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 400037a8: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 400037ac: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400037b0: 02 80 00 07 be 400037cc <== NOT EXECUTED 400037b4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400037b8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 400037bc: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400037c0: 02 80 00 0d be 400037f4 <== NOT EXECUTED 400037c4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 400037c8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400037cc: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 400037d0: 7f ff fe be call 400032c8 <== NOT EXECUTED 400037d4: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 400037d8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 400037dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400037e0: 02 80 00 05 be 400037f4 <== NOT EXECUTED 400037e4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 400037e8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400037ec: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } } } if (!lineFlag) 400037f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400037f4: 32 80 00 0a bne,a 4000381c <== NOT EXECUTED 400037f8: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 400037fc: 81 c7 e0 08 ret <== NOT EXECUTED 40003800: 81 e8 00 00 restore <== NOT EXECUTED 40003804: a2 10 60 60 or %g1, 0x60, %l1 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); if (tty->column) tty->column--; } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40003808: 03 10 00 5c sethi %hi(0x40017000), %g1 <== NOT EXECUTED 4000380c: a4 10 60 20 or %g1, 0x20, %l2 ! 40017020 <__func__.4776+0x2c8> <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 40003810: 03 10 00 5c sethi %hi(0x40017000), %g1 <== NOT EXECUTED 40003814: a6 10 60 18 or %g1, 0x18, %l3 ! 40017018 <__func__.4776+0x2c0> <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 40003818: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED 4000381c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40003820: 32 bf ff 96 bne,a 40003678 <== NOT EXECUTED 40003824: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED 40003828: 81 c7 e0 08 ret <== NOT EXECUTED 4000382c: 81 e8 00 00 restore <== NOT EXECUTED 4002c42c : #include int fchdir( int fd ) { 4002c42c: 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 ); 4002c430: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 4002c434: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 40047698 <== NOT EXECUTED 4002c438: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4002c43c: 1a 80 00 0e bcc 4002c474 <== NOT EXECUTED 4002c440: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4002c444: 03 10 01 71 sethi %hi(0x4005c400), %g1 <== NOT EXECUTED 4002c448: c6 00 62 8c ld [ %g1 + 0x28c ], %g3 ! 4005c68c <== NOT EXECUTED 4002c44c: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4002c450: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4002c454: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002c458: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4002c45c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002c460: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4002c464: c8 00 60 0c ld [ %g1 + 0xc ], %g4 <== NOT EXECUTED 4002c468: 80 89 21 00 btst 0x100, %g4 <== NOT EXECUTED 4002c46c: 12 80 00 06 bne 4002c484 <== NOT EXECUTED 4002c470: 80 89 20 02 btst 2, %g4 <== NOT EXECUTED 4002c474: 40 00 0a 31 call 4002ed38 <__errno> <== NOT EXECUTED 4002c478: 01 00 00 00 nop <== NOT EXECUTED 4002c47c: 10 80 00 1b b 4002c4e8 <== NOT EXECUTED 4002c480: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4002c484: 32 80 00 06 bne,a 4002c49c <== NOT EXECUTED 4002c488: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 <== NOT EXECUTED 4002c48c: 40 00 0a 2b call 4002ed38 <__errno> <== NOT EXECUTED 4002c490: 01 00 00 00 nop <== NOT EXECUTED 4002c494: 10 80 00 15 b 4002c4e8 <== NOT EXECUTED 4002c498: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 4002c49c: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 4002c4a0: 02 80 00 06 be 4002c4b8 <== NOT EXECUTED 4002c4a4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 4002c4a8: c4 01 20 10 ld [ %g4 + 0x10 ], %g2 <== NOT EXECUTED 4002c4ac: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4002c4b0: 32 80 00 06 bne,a 4002c4c8 <== NOT EXECUTED 4002c4b4: b0 00 60 10 add %g1, 0x10, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002c4b8: 40 00 0a 20 call 4002ed38 <__errno> <== NOT EXECUTED 4002c4bc: 01 00 00 00 nop <== NOT EXECUTED 4002c4c0: 10 80 00 0a b 4002c4e8 <== NOT EXECUTED 4002c4c4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 4002c4c8: 9f c0 80 00 call %g2 <== NOT EXECUTED 4002c4cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002c4d0: 80 a2 20 01 cmp %o0, 1 <== NOT EXECUTED 4002c4d4: 02 80 00 07 be 4002c4f0 <== NOT EXECUTED 4002c4d8: 25 10 01 20 sethi %hi(0x40048000), %l2 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 4002c4dc: 40 00 0a 17 call 4002ed38 <__errno> <== NOT EXECUTED 4002c4e0: 01 00 00 00 nop <== NOT EXECUTED 4002c4e4: 82 10 20 14 mov 0x14, %g1 ! 14 <== NOT EXECUTED 4002c4e8: 10 80 00 1b b 4002c554 <== NOT EXECUTED 4002c4ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 4002c4f0: e0 04 a1 24 ld [ %l2 + 0x124 ], %l0 <== NOT EXECUTED 4002c4f4: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4002c4f8: a0 04 20 04 add %l0, 4, %l0 <== NOT EXECUTED 4002c4fc: a2 07 bf d8 add %fp, -40, %l1 <== NOT EXECUTED 4002c500: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4002c504: 40 00 13 fa call 400314ec <== NOT EXECUTED 4002c508: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 4002c50c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4002c510: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4002c514: 40 00 13 f6 call 400314ec <== NOT EXECUTED 4002c518: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 4002c51c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002c520: 11 10 01 0a sethi %hi(0x40042800), %o0 <== NOT EXECUTED 4002c524: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED 4002c528: 90 12 23 10 or %o0, 0x310, %o0 <== NOT EXECUTED 4002c52c: 7f ff 63 92 call 40005374 <== NOT EXECUTED 4002c530: 96 10 20 00 clr %o3 <== NOT EXECUTED 4002c534: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002c538: 02 80 00 09 be 4002c55c <== NOT EXECUTED 4002c53c: c2 07 bf e0 ld [ %fp + -32 ], %g1 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 4002c540: d0 04 a1 24 ld [ %l2 + 0x124 ], %o0 <== NOT EXECUTED 4002c544: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4002c548: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4002c54c: 40 00 13 e8 call 400314ec <== NOT EXECUTED 4002c550: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4002c554: 81 c7 e0 08 ret <== NOT EXECUTED 4002c558: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } /* release the old one */ rtems_filesystem_freenode( &saved ); 4002c55c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c560: 22 80 00 09 be,a 4002c584 <== NOT EXECUTED 4002c564: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4002c568: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4004801c <== NOT EXECUTED 4002c56c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002c570: 22 80 00 05 be,a 4002c584 <== NOT EXECUTED 4002c574: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4002c578: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002c57c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_filesystem_current = loc; 4002c580: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4002c584: d0 00 61 24 ld [ %g1 + 0x124 ], %o0 ! 40048124 <== NOT EXECUTED 4002c588: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED 4002c58c: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 4002c590: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 4002c594: 40 00 13 d6 call 400314ec <== NOT EXECUTED 4002c598: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 4002c59c: 81 c7 e0 08 ret <== NOT EXECUTED 4002c5a0: 81 e8 00 00 restore <== NOT EXECUTED 4001ed8c : int fchmod( int fd, mode_t mode ) { 4001ed8c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001ed90: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 4001ed94: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 40047698 <== NOT EXECUTED 4001ed98: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4001ed9c: 1a 80 00 0e bcc 4001edd4 <== NOT EXECUTED 4001eda0: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4001eda4: 03 10 01 71 sethi %hi(0x4005c400), %g1 <== NOT EXECUTED 4001eda8: c6 00 62 8c ld [ %g1 + 0x28c ], %g3 ! 4005c68c <== NOT EXECUTED 4001edac: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4001edb0: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4001edb4: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4001edb8: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4001edbc: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4001edc0: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4001edc4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 4001edc8: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4001edcc: 12 80 00 06 bne 4001ede4 <== NOT EXECUTED 4001edd0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 4001edd4: 40 00 3f d9 call 4002ed38 <__errno> <== NOT EXECUTED 4001edd8: 01 00 00 00 nop <== NOT EXECUTED 4001eddc: 10 80 00 0f b 4001ee18 <== NOT EXECUTED 4001ede0: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001ede4: 32 80 00 06 bne,a 4001edfc <== NOT EXECUTED 4001ede8: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED 4001edec: 40 00 3f d3 call 4002ed38 <__errno> <== NOT EXECUTED 4001edf0: 01 00 00 00 nop <== NOT EXECUTED 4001edf4: 10 80 00 09 b 4001ee18 <== NOT EXECUTED 4001edf8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 4001edfc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001ee00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001ee04: 32 80 00 08 bne,a 4001ee24 <== NOT EXECUTED 4001ee08: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001ee0c: 40 00 3f cb call 4002ed38 <__errno> <== NOT EXECUTED 4001ee10: 01 00 00 00 nop <== NOT EXECUTED 4001ee14: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001ee18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001ee1c: 10 80 00 07 b 4001ee38 <== NOT EXECUTED 4001ee20: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 4001ee24: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED 4001ee28: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001ee2c: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 4001ee30: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001ee34: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED } 4001ee38: 81 c7 e0 08 ret <== NOT EXECUTED 4001ee3c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4001ee40 : int fchown( int fd, uid_t owner, gid_t group ) { 4001ee40: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001ee44: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 4001ee48: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 40047698 <== NOT EXECUTED 4001ee4c: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4001ee50: 1a 80 00 0e bcc 4001ee88 <== NOT EXECUTED 4001ee54: 01 00 00 00 nop <== NOT EXECUTED iop = rtems_libio_iop( fd ); 4001ee58: 03 10 01 71 sethi %hi(0x4005c400), %g1 <== NOT EXECUTED 4001ee5c: c6 00 62 8c ld [ %g1 + 0x28c ], %g3 ! 4005c68c <== NOT EXECUTED 4001ee60: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 4001ee64: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4001ee68: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4001ee6c: 82 00 40 18 add %g1, %i0, %g1 <== NOT EXECUTED 4001ee70: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4001ee74: 84 00 c0 01 add %g3, %g1, %g2 <== NOT EXECUTED rtems_libio_check_is_open(iop); 4001ee78: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 <== NOT EXECUTED 4001ee7c: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 4001ee80: 12 80 00 06 bne 4001ee98 <== NOT EXECUTED 4001ee84: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 4001ee88: 40 00 3f ac call 4002ed38 <__errno> <== NOT EXECUTED 4001ee8c: 01 00 00 00 nop <== NOT EXECUTED 4001ee90: 10 80 00 0f b 4001eecc <== NOT EXECUTED 4001ee94: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001ee98: 32 80 00 06 bne,a 4001eeb0 <== NOT EXECUTED 4001ee9c: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 4001eea0: 40 00 3f a6 call 4002ed38 <__errno> <== NOT EXECUTED 4001eea4: 01 00 00 00 nop <== NOT EXECUTED 4001eea8: 10 80 00 09 b 4001eecc <== NOT EXECUTED 4001eeac: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 4001eeb0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 4001eeb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001eeb8: 12 80 00 08 bne 4001eed8 <== NOT EXECUTED 4001eebc: 93 2e 60 10 sll %i1, 0x10, %o1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001eec0: 40 00 3f 9e call 4002ed38 <__errno> <== NOT EXECUTED 4001eec4: 01 00 00 00 nop <== NOT EXECUTED 4001eec8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001eecc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001eed0: 10 80 00 07 b 4001eeec <== NOT EXECUTED 4001eed4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 4001eed8: 95 2e a0 10 sll %i2, 0x10, %o2 <== NOT EXECUTED 4001eedc: 90 00 a0 10 add %g2, 0x10, %o0 <== NOT EXECUTED 4001eee0: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4001eee4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001eee8: 95 32 a0 10 srl %o2, 0x10, %o2 <== NOT EXECUTED } 4001eeec: 81 c7 e0 08 ret <== NOT EXECUTED 4001eef0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4002c5cc : int fcntl( int fd, int cmd, ... ) { 4002c5cc: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4002c5d0: 03 10 01 1d sethi %hi(0x40047400), %g1 4002c5d4: da 00 62 98 ld [ %g1 + 0x298 ], %o5 ! 40047698 ... ) { int ret; va_list ap; va_start( ap, cmd ); 4002c5d8: 86 07 a0 4c add %fp, 0x4c, %g3 4002c5dc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4002c5e0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4002c5e4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4002c5e8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 4002c5ec: 80 a6 00 0d cmp %i0, %o5 4002c5f0: 1a 80 00 0e bcc 4002c628 4002c5f4: c6 27 bf f4 st %g3, [ %fp + -12 ] iop = rtems_libio_iop( fd ); 4002c5f8: 03 10 01 71 sethi %hi(0x4005c400), %g1 4002c5fc: c8 00 62 8c ld [ %g1 + 0x28c ], %g4 ! 4005c68c 4002c600: 85 2e 20 02 sll %i0, 2, %g2 4002c604: 83 2e 20 04 sll %i0, 4, %g1 4002c608: 82 20 40 02 sub %g1, %g2, %g1 4002c60c: 82 00 40 18 add %g1, %i0, %g1 4002c610: 83 28 60 02 sll %g1, 2, %g1 4002c614: b8 01 00 01 add %g4, %g1, %i4 rtems_libio_check_is_open(iop); 4002c618: d0 07 20 0c ld [ %i4 + 0xc ], %o0 4002c61c: 80 8a 21 00 btst 0x100, %o0 4002c620: 12 80 00 06 bne 4002c638 4002c624: 80 a6 60 09 cmp %i1, 9 4002c628: 40 00 09 c4 call 4002ed38 <__errno> <== NOT EXECUTED 4002c62c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4002c630: 10 80 00 55 b 4002c784 <== NOT EXECUTED 4002c634: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 4002c638: 18 80 00 50 bgu 4002c778 4002c63c: 83 2e 60 02 sll %i1, 2, %g1 4002c640: 05 10 00 b1 sethi %hi(0x4002c400), %g2 4002c644: 84 10 a1 a4 or %g2, 0x1a4, %g2 ! 4002c5a4 4002c648: c2 00 80 01 ld [ %g2 + %g1 ], %g1 4002c64c: 81 c0 40 00 jmp %g1 4002c650: 01 00 00 00 nop case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 4002c654: d0 00 c0 00 ld [ %g3 ], %o0 if ( fd2 ) 4002c658: 80 a2 20 00 cmp %o0, 0 4002c65c: 02 80 00 0b be 4002c688 4002c660: 80 a2 00 0d cmp %o0, %o5 diop = rtems_libio_iop( fd2 ); 4002c664: 1a 80 00 0e bcc 4002c69c <== NOT EXECUTED 4002c668: ba 10 20 00 clr %i5 <== NOT EXECUTED 4002c66c: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 4002c670: 83 2a 20 04 sll %o0, 4, %g1 <== NOT EXECUTED 4002c674: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4002c678: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 4002c67c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4002c680: 10 80 00 07 b 4002c69c <== NOT EXECUTED 4002c684: ba 01 00 01 add %g4, %g1, %i5 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 4002c688: 7f ff 64 7f call 40005884 4002c68c: b0 10 3f ff mov -1, %i0 if ( diop == 0 ) { 4002c690: ba 92 20 00 orcc %o0, 0, %i5 4002c694: 02 80 00 4f be 4002c7d0 4002c698: 01 00 00 00 nop ret = -1; break; } } diop->handlers = iop->handlers; 4002c69c: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 diop->file_info = iop->file_info; 4002c6a0: c4 07 20 2c ld [ %i4 + 0x2c ], %g2 diop->flags = iop->flags; 4002c6a4: c6 07 20 0c ld [ %i4 + 0xc ], %g3 ret = -1; break; } } diop->handlers = iop->handlers; 4002c6a8: c2 27 60 30 st %g1, [ %i5 + 0x30 ] diop->file_info = iop->file_info; 4002c6ac: c4 27 60 2c st %g2, [ %i5 + 0x2c ] diop->flags = iop->flags; 4002c6b0: c6 27 60 0c st %g3, [ %i5 + 0xc ] diop->pathinfo = iop->pathinfo; 4002c6b4: 90 07 60 10 add %i5, 0x10, %o0 4002c6b8: 92 07 20 10 add %i4, 0x10, %o1 4002c6bc: 40 00 13 8c call 400314ec 4002c6c0: 94 10 20 10 mov 0x10, %o2 ret = (int) (diop - rtems_libio_iops); 4002c6c4: 03 10 01 71 sethi %hi(0x4005c400), %g1 4002c6c8: c6 00 62 8c ld [ %g1 + 0x28c ], %g3 ! 4005c68c 4002c6cc: 86 27 40 03 sub %i5, %g3, %g3 4002c6d0: 87 38 e0 02 sra %g3, 2, %g3 4002c6d4: 83 28 e0 02 sll %g3, 2, %g1 4002c6d8: 85 28 e0 06 sll %g3, 6, %g2 4002c6dc: 84 20 80 01 sub %g2, %g1, %g2 4002c6e0: 83 28 a0 06 sll %g2, 6, %g1 4002c6e4: 82 20 40 02 sub %g1, %g2, %g1 4002c6e8: 85 28 60 0c sll %g1, 0xc, %g2 4002c6ec: 82 00 40 02 add %g1, %g2, %g1 4002c6f0: 82 00 40 03 add %g1, %g3, %g1 4002c6f4: 83 28 60 04 sll %g1, 4, %g1 4002c6f8: 82 20 40 03 sub %g1, %g3, %g1 4002c6fc: 83 28 60 02 sll %g1, 2, %g1 4002c700: 10 80 00 24 b 4002c790 4002c704: b0 20 c0 01 sub %g3, %g1, %i0 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 4002c708: 83 32 20 0b srl %o0, 0xb, %g1 4002c70c: 10 80 00 24 b 4002c79c 4002c710: b0 08 60 01 and %g1, 1, %i0 * 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 ) ) 4002c714: c2 00 c0 00 ld [ %g3 ], %g1 4002c718: 80 a0 60 00 cmp %g1, 0 4002c71c: 22 80 00 03 be,a 4002c728 4002c720: 82 0a 37 ff and %o0, -2049, %g1 <== NOT EXECUTED 4002c724: 82 12 28 00 or %o0, 0x800, %g1 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 4002c728: c2 27 20 0c st %g1, [ %i4 + 0xc ] 4002c72c: 10 80 00 1c b 4002c79c 4002c730: b0 10 20 00 clr %i0 break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 4002c734: 7f ff 63 e8 call 400056d4 4002c738: 01 00 00 00 nop 4002c73c: 10 80 00 15 b 4002c790 4002c740: b0 10 00 08 mov %o0, %i0 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 4002c744: d0 00 c0 00 ld [ %g3 ], %o0 4002c748: 7f ff 64 85 call 4000595c 4002c74c: 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); 4002c750: c2 07 20 0c ld [ %i4 + 0xc ], %g1 4002c754: 90 0a 22 01 and %o0, 0x201, %o0 4002c758: 82 08 7d fe and %g1, -514, %g1 4002c75c: 90 12 00 01 or %o0, %g1, %o0 4002c760: 10 80 00 0f b 4002c79c 4002c764: d0 27 20 0c st %o0, [ %i4 + 0xc ] errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 4002c768: 40 00 09 74 call 4002ed38 <__errno> 4002c76c: b0 10 3f ff mov -1, %i0 4002c770: 10 80 00 05 b 4002c784 4002c774: 82 10 20 86 mov 0x86, %g1 ret = -1; break; default: errno = EINVAL; 4002c778: 40 00 09 70 call 4002ed38 <__errno> 4002c77c: b0 10 3f ff mov -1, %i0 4002c780: 82 10 20 16 mov 0x16, %g1 4002c784: c2 22 00 00 st %g1, [ %o0 ] 4002c788: 81 c7 e0 08 ret 4002c78c: 81 e8 00 00 restore /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 4002c790: 80 a6 20 00 cmp %i0, 0 4002c794: 06 80 00 0f bl 4002c7d0 4002c798: 01 00 00 00 nop if (iop->handlers->fcntl_h) { 4002c79c: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 4002c7a0: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 4002c7a4: 80 a0 60 00 cmp %g1, 0 4002c7a8: 02 bf ff f8 be 4002c788 4002c7ac: 90 10 00 19 mov %i1, %o0 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 4002c7b0: 9f c0 40 00 call %g1 4002c7b4: 92 10 00 1c mov %i4, %o1 if (err) { 4002c7b8: ba 92 20 00 orcc %o0, 0, %i5 4002c7bc: 02 80 00 05 be 4002c7d0 4002c7c0: 01 00 00 00 nop errno = err; 4002c7c4: 40 00 09 5d call 4002ed38 <__errno> <== NOT EXECUTED 4002c7c8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4002c7cc: 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; } 4002c7d0: 81 c7 e0 08 ret 4002c7d4: 81 e8 00 00 restore 400212cc : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 400212cc: 03 10 01 71 sethi %hi(0x4005c400), %g1 <== NOT EXECUTED 400212d0: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 ! 4005c730 <== NOT EXECUTED 400212d4: 82 10 63 30 or %g1, 0x330, %g1 <== NOT EXECUTED !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 400212d8: 10 80 00 08 b 400212f8 <== NOT EXECUTED 400212dc: 88 00 60 04 add %g1, 4, %g4 <== 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 ) { 400212e0: c2 02 60 0c ld [ %o1 + 0xc ], %g1 <== NOT EXECUTED 400212e4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400212e8: 32 80 00 04 bne,a 400212f8 <== NOT EXECUTED 400212ec: c6 00 c0 00 ld [ %g3 ], %g3 <== NOT EXECUTED 400212f0: 81 c3 e0 08 retl <== NOT EXECUTED 400212f4: 90 10 20 01 mov 1, %o0 <== 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 ); 400212f8: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 400212fc: 32 bf ff f9 bne,a 400212e0 <== NOT EXECUTED 40021300: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED return true; } } return false; } 40021304: 81 c3 e0 08 retl <== NOT EXECUTED 40021308: 90 10 20 00 clr %o0 <== NOT EXECUTED 400032c4 : long fpathconf( int fd, int name ) { 400032c4: 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); 400032c8: 03 10 00 58 sethi %hi(0x40016000), %g1 400032cc: c2 00 63 58 ld [ %g1 + 0x358 ], %g1 ! 40016358 400032d0: 80 a6 00 01 cmp %i0, %g1 400032d4: 1a 80 00 0e bcc 4000330c 400032d8: 01 00 00 00 nop iop = rtems_libio_iop(fd); 400032dc: 03 10 00 5b sethi %hi(0x40016c00), %g1 400032e0: c6 00 63 18 ld [ %g1 + 0x318 ], %g3 ! 40016f18 400032e4: 85 2e 20 02 sll %i0, 2, %g2 400032e8: 83 2e 20 04 sll %i0, 4, %g1 400032ec: 82 20 40 02 sub %g1, %g2, %g1 400032f0: 82 00 40 18 add %g1, %i0, %g1 400032f4: 83 28 60 02 sll %g1, 2, %g1 400032f8: 82 00 c0 01 add %g3, %g1, %g1 rtems_libio_check_is_open(iop); 400032fc: c8 00 60 0c ld [ %g1 + 0xc ], %g4 40003300: 80 89 21 00 btst 0x100, %g4 40003304: 12 80 00 06 bne 4000331c 40003308: 80 89 20 02 btst 2, %g4 4000330c: 40 00 30 7c call 4000f4fc <__errno> 40003310: 01 00 00 00 nop 40003314: 10 80 00 07 b 40003330 40003318: 82 10 20 09 mov 9, %g1 ! 9 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 4000331c: 12 80 00 08 bne 4000333c 40003320: 80 a6 60 0b cmp %i1, 0xb 40003324: 40 00 30 76 call 4000f4fc <__errno> <== NOT EXECUTED 40003328: 01 00 00 00 nop <== NOT EXECUTED 4000332c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40003330: c2 22 00 00 st %g1, [ %o0 ] 40003334: 81 c7 e0 08 ret 40003338: 91 e8 3f ff restore %g0, -1, %o0 * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 4000333c: 18 80 00 2c bgu 400033ec 40003340: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 40003344: 83 2e 60 02 sll %i1, 2, %g1 40003348: 05 10 00 0c sethi %hi(0x40003000), %g2 4000334c: 84 10 a2 94 or %g2, 0x294, %g2 ! 40003294 40003350: c2 00 80 01 ld [ %g2 + %g1 ], %g1 40003354: 81 c0 40 00 jmp %g1 40003358: 01 00 00 00 nop case _PC_LINK_MAX: return_value = the_limits->link_max; 4000335c: f0 00 e0 30 ld [ %g3 + 0x30 ], %i0 40003360: 81 c7 e0 08 ret 40003364: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 40003368: f0 00 e0 34 ld [ %g3 + 0x34 ], %i0 4000336c: 81 c7 e0 08 ret 40003370: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 40003374: f0 00 e0 38 ld [ %g3 + 0x38 ], %i0 40003378: 81 c7 e0 08 ret 4000337c: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; 40003380: f0 00 e0 3c ld [ %g3 + 0x3c ], %i0 40003384: 81 c7 e0 08 ret 40003388: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; 4000338c: f0 00 e0 40 ld [ %g3 + 0x40 ], %i0 40003390: 81 c7 e0 08 ret 40003394: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 40003398: f0 00 e0 44 ld [ %g3 + 0x44 ], %i0 4000339c: 81 c7 e0 08 ret 400033a0: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 400033a4: f0 00 e0 4c ld [ %g3 + 0x4c ], %i0 400033a8: 81 c7 e0 08 ret 400033ac: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 400033b0: f0 00 e0 50 ld [ %g3 + 0x50 ], %i0 400033b4: 81 c7 e0 08 ret 400033b8: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 400033bc: f0 00 e0 5c ld [ %g3 + 0x5c ], %i0 400033c0: 81 c7 e0 08 ret 400033c4: 81 e8 00 00 restore break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 400033c8: f0 00 e0 48 ld [ %g3 + 0x48 ], %i0 400033cc: 81 c7 e0 08 ret 400033d0: 81 e8 00 00 restore break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 400033d4: f0 00 e0 54 ld [ %g3 + 0x54 ], %i0 400033d8: 81 c7 e0 08 ret 400033dc: 81 e8 00 00 restore break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 400033e0: f0 00 e0 58 ld [ %g3 + 0x58 ], %i0 400033e4: 81 c7 e0 08 ret 400033e8: 81 e8 00 00 restore break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 400033ec: 40 00 30 44 call 4000f4fc <__errno> 400033f0: b0 10 3f ff mov -1, %i0 400033f4: 82 10 20 16 mov 0x16, %g1 400033f8: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 400033fc: 81 c7 e0 08 ret 40003400: 81 e8 00 00 restore 40009f38 : void free( void *ptr ) { MSBUMP(free_calls, 1); 40009f38: 9d e3 bf 98 save %sp, -104, %sp 40009f3c: 05 10 00 62 sethi %hi(0x40018800), %g2 40009f40: 84 10 a3 30 or %g2, 0x330, %g2 ! 40018b30 40009f44: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40009f48: b2 10 00 18 mov %i0, %i1 40009f4c: 82 00 60 01 inc %g1 if ( !ptr ) 40009f50: 80 a6 20 00 cmp %i0, 0 40009f54: 02 80 00 21 be 40009fd8 40009f58: 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()) && 40009f5c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40009f60: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 40018e44 <_System_state_Current> 40009f64: 80 a0 60 03 cmp %g1, 3 40009f68: 12 80 00 09 bne 40009f8c 40009f6c: 03 10 00 62 sethi %hi(0x40018800), %g1 40009f70: 40 00 01 33 call 4000a43c 40009f74: 01 00 00 00 nop 40009f78: 80 8a 20 ff btst 0xff, %o0 40009f7c: 12 80 00 04 bne 40009f8c 40009f80: 03 10 00 62 sethi %hi(0x40018800), %g1 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 40009f84: 40 00 01 41 call 4000a488 <== NOT EXECUTED 40009f88: 81 e8 00 00 restore <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 40009f8c: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 40009f90: 80 a0 60 00 cmp %g1, 0 40009f94: 02 80 00 06 be 40009fac 40009f98: 37 10 00 62 sethi %hi(0x40018800), %i3 (*rtems_malloc_statistics_helpers->at_free)(ptr); 40009f9c: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED 40009fa0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40009fa4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 40009fa8: 37 10 00 62 sethi %hi(0x40018800), %i3 <== NOT EXECUTED 40009fac: 92 10 00 19 mov %i1, %o1 40009fb0: 40 00 06 75 call 4000b984 <_Protected_heap_Free> 40009fb4: 90 16 e2 d8 or %i3, 0x2d8, %o0 40009fb8: 80 8a 20 ff btst 0xff, %o0 40009fbc: 12 80 00 07 bne 40009fd8 40009fc0: 82 16 e2 d8 or %i3, 0x2d8, %g1 printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 40009fc4: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 40009fc8: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 40009fcc: 31 10 00 5c sethi %hi(0x40017000), %i0 <== NOT EXECUTED 40009fd0: 7f ff e3 2e call 40002c88 <== NOT EXECUTED 40009fd4: 91 ee 23 68 restore %i0, 0x368, %o0 <== NOT EXECUTED 40009fd8: 81 c7 e0 08 ret 40009fdc: 81 e8 00 00 restore 40020788 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 40020788: 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 4002078c: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED 40020790: 82 10 63 2c or %g1, 0x32c, %g1 ! 4005cf2c <== NOT EXECUTED 40020794: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40020798: 02 80 00 18 be 400207f8 <== NOT EXECUTED 4002079c: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 400207a0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 400207a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400207a8: 22 80 00 09 be,a 400207cc <== NOT EXECUTED 400207ac: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 400207b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400207b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400207b8: 22 80 00 05 be,a 400207cc <== NOT EXECUTED 400207bc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 400207c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400207c4: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 400207c8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 400207cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400207d0: 02 80 00 08 be 400207f0 <== NOT EXECUTED 400207d4: 01 00 00 00 nop <== NOT EXECUTED 400207d8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400207dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400207e0: 02 80 00 04 be 400207f0 <== NOT EXECUTED 400207e4: 01 00 00 00 nop <== NOT EXECUTED 400207e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400207ec: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 400207f0: 7f ff 93 33 call 400054bc <== NOT EXECUTED 400207f4: 81 e8 00 00 restore <== NOT EXECUTED 400207f8: 81 c7 e0 08 ret <== NOT EXECUTED 400207fc: 81 e8 00 00 restore <== NOT EXECUTED 40015ed8 : int fstat( int fd, struct stat *sbuf ) { 40015ed8: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40015edc: 80 a6 60 00 cmp %i1, 0 40015ee0: 32 80 00 06 bne,a 40015ef8 40015ee4: 03 10 00 5f sethi %hi(0x40017c00), %g1 rtems_set_errno_and_return_minus_one( EFAULT ); 40015ee8: 7f ff db 8c call 4000cd18 <__errno> 40015eec: 01 00 00 00 nop 40015ef0: 10 80 00 2a b 40015f98 40015ef4: 82 10 20 0e mov 0xe, %g1 ! e /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 40015ef8: c2 00 62 a8 ld [ %g1 + 0x2a8 ], %g1 40015efc: 80 a6 00 01 cmp %i0, %g1 40015f00: 1a 80 00 23 bcc 40015f8c 40015f04: 03 10 00 62 sethi %hi(0x40018800), %g1 40015f08: c6 00 62 c8 ld [ %g1 + 0x2c8 ], %g3 ! 40018ac8 40015f0c: 85 2e 20 02 sll %i0, 2, %g2 40015f10: 83 2e 20 04 sll %i0, 4, %g1 40015f14: 82 20 40 02 sub %g1, %g2, %g1 40015f18: 82 00 40 18 add %g1, %i0, %g1 40015f1c: 83 28 60 02 sll %g1, 2, %g1 40015f20: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 40015f24: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40015f28: 80 88 61 00 btst 0x100, %g1 40015f2c: 02 80 00 18 be 40015f8c 40015f30: 01 00 00 00 nop if ( !iop->handlers ) 40015f34: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40015f38: 80 a0 60 00 cmp %g1, 0 40015f3c: 02 80 00 14 be 40015f8c 40015f40: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 40015f44: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40015f48: 80 a0 60 00 cmp %g1, 0 40015f4c: 12 80 00 06 bne 40015f64 40015f50: 92 10 20 00 clr %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40015f54: 7f ff db 71 call 4000cd18 <__errno> <== NOT EXECUTED 40015f58: 01 00 00 00 nop <== NOT EXECUTED 40015f5c: 10 80 00 0f b 40015f98 <== NOT EXECUTED 40015f60: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 40015f64: 94 10 20 50 mov 0x50, %o2 40015f68: 7f ff dd 97 call 4000d5c4 40015f6c: 90 10 00 19 mov %i1, %o0 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 40015f70: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40015f74: 90 06 20 10 add %i0, 0x10, %o0 40015f78: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40015f7c: 9f c0 40 00 call %g1 40015f80: 92 10 00 19 mov %i1, %o1 } 40015f84: 81 c7 e0 08 ret 40015f88: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); 40015f8c: 7f ff db 63 call 4000cd18 <__errno> 40015f90: 01 00 00 00 nop 40015f94: 82 10 20 09 mov 9, %g1 ! 9 40015f98: c2 22 00 00 st %g1, [ %o0 ] 40015f9c: 10 bf ff fa b 40015f84 40015fa0: 90 10 3f ff mov -1, %o0 4001efd8 : #include int fsync( int fd ) { 4001efd8: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 4001efdc: 03 10 01 1d sethi %hi(0x40047400), %g1 4001efe0: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 40047698 4001efe4: 80 a6 00 01 cmp %i0, %g1 4001efe8: 1a 80 00 18 bcc 4001f048 4001efec: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 4001eff0: 03 10 01 71 sethi %hi(0x4005c400), %g1 4001eff4: c6 00 62 8c ld [ %g1 + 0x28c ], %g3 ! 4005c68c 4001eff8: 85 2e 20 02 sll %i0, 2, %g2 4001effc: 83 2e 20 04 sll %i0, 4, %g1 4001f000: 82 20 40 02 sub %g1, %g2, %g1 4001f004: 82 00 40 18 add %g1, %i0, %g1 4001f008: 83 28 60 02 sll %g1, 2, %g1 4001f00c: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 4001f010: c8 02 20 0c ld [ %o0 + 0xc ], %g4 4001f014: 80 89 21 00 btst 0x100, %g4 4001f018: 02 80 00 0c be 4001f048 4001f01c: 01 00 00 00 nop rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4001f020: 80 89 20 04 btst 4, %g4 4001f024: 32 80 00 06 bne,a 4001f03c 4001f028: c8 02 20 30 ld [ %o0 + 0x30 ], %g4 4001f02c: 40 00 3f 43 call 4002ed38 <__errno> 4001f030: 01 00 00 00 nop 4001f034: 10 80 00 0f b 4001f070 4001f038: 82 10 20 16 mov 0x16, %g1 ! 16 /* * Now process the fsync(). */ if ( !iop->handlers ) 4001f03c: 80 a1 20 00 cmp %g4, 0 4001f040: 32 80 00 06 bne,a 4001f058 4001f044: c2 01 20 28 ld [ %g4 + 0x28 ], %g1 rtems_set_errno_and_return_minus_one( EBADF ); 4001f048: 40 00 3f 3c call 4002ed38 <__errno> <== NOT EXECUTED 4001f04c: 01 00 00 00 nop <== NOT EXECUTED 4001f050: 10 80 00 08 b 4001f070 <== NOT EXECUTED 4001f054: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 4001f058: 80 a0 60 00 cmp %g1, 0 4001f05c: 12 80 00 08 bne 4001f07c 4001f060: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001f064: 40 00 3f 35 call 4002ed38 <__errno> 4001f068: 01 00 00 00 nop 4001f06c: 82 10 20 86 mov 0x86, %g1 ! 86 4001f070: c2 22 00 00 st %g1, [ %o0 ] 4001f074: 10 80 00 04 b 4001f084 4001f078: 90 10 3f ff mov -1, %o0 return (*iop->handlers->fsync_h)( iop ); 4001f07c: 9f c0 40 00 call %g1 4001f080: 01 00 00 00 nop } 4001f084: 81 c7 e0 08 ret 4001f088: 91 e8 00 08 restore %g0, %o0, %o0 40009fe0 : int ftruncate( int fd, off_t length ) { 40009fe0: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 40009fe4: 03 10 00 5f sethi %hi(0x40017c00), %g1 40009fe8: c2 00 62 a8 ld [ %g1 + 0x2a8 ], %g1 ! 40017ea8 40009fec: 80 a6 00 01 cmp %i0, %g1 40009ff0: 1a 80 00 0e bcc 4000a028 40009ff4: 01 00 00 00 nop iop = rtems_libio_iop( fd ); 40009ff8: 03 10 00 62 sethi %hi(0x40018800), %g1 40009ffc: c6 00 62 c8 ld [ %g1 + 0x2c8 ], %g3 ! 40018ac8 4000a000: 85 2e 20 02 sll %i0, 2, %g2 4000a004: 83 2e 20 04 sll %i0, 4, %g1 4000a008: 82 20 40 02 sub %g1, %g2, %g1 4000a00c: 82 00 40 18 add %g1, %i0, %g1 4000a010: 83 28 60 02 sll %g1, 2, %g1 4000a014: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 4000a018: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000a01c: 80 88 61 00 btst 0x100, %g1 4000a020: 12 80 00 06 bne 4000a038 4000a024: a0 07 bf e8 add %fp, -24, %l0 4000a028: 40 00 0b 3c call 4000cd18 <__errno> <== NOT EXECUTED 4000a02c: 01 00 00 00 nop <== NOT EXECUTED 4000a030: 10 80 00 22 b 4000a0b8 <== NOT EXECUTED 4000a034: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000a038: 92 06 20 10 add %i0, 0x10, %o1 4000a03c: 90 10 00 10 mov %l0, %o0 4000a040: 40 00 0d 28 call 4000d4e0 4000a044: 94 10 20 10 mov 0x10, %o2 if ( !loc.ops->node_type_h ) 4000a048: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000a04c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000a050: 80 a0 60 00 cmp %g1, 0 4000a054: 02 80 00 16 be 4000a0ac 4000a058: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000a05c: 9f c0 40 00 call %g1 4000a060: 90 10 00 10 mov %l0, %o0 4000a064: 80 a2 20 01 cmp %o0, 1 4000a068: 32 80 00 06 bne,a 4000a080 4000a06c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( EISDIR ); 4000a070: 40 00 0b 2a call 4000cd18 <__errno> 4000a074: 01 00 00 00 nop 4000a078: 10 80 00 10 b 4000a0b8 4000a07c: 82 10 20 15 mov 0x15, %g1 ! 15 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000a080: 80 88 60 04 btst 4, %g1 4000a084: 32 80 00 06 bne,a 4000a09c 4000a088: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000a08c: 40 00 0b 23 call 4000cd18 <__errno> <== NOT EXECUTED 4000a090: 01 00 00 00 nop <== NOT EXECUTED 4000a094: 10 80 00 09 b 4000a0b8 <== NOT EXECUTED 4000a098: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 4000a09c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000a0a0: 80 a0 60 00 cmp %g1, 0 4000a0a4: 32 80 00 08 bne,a 4000a0c4 4000a0a8: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000a0ac: 40 00 0b 1b call 4000cd18 <__errno> <== NOT EXECUTED 4000a0b0: 01 00 00 00 nop <== NOT EXECUTED 4000a0b4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000a0b8: c2 22 00 00 st %g1, [ %o0 ] 4000a0bc: 10 80 00 04 b 4000a0cc 4000a0c0: 90 10 3f ff mov -1, %o0 return (*iop->handlers->ftruncate_h)( iop, length ); 4000a0c4: 9f c0 40 00 call %g1 4000a0c8: 92 10 00 19 mov %i1, %o1 } 4000a0cc: 81 c7 e0 08 ret 4000a0d0: 91 e8 00 08 restore %g0, %o0, %o0 4001f180 : char * getcwd ( char *pt, size_t size) { 4001f180: 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) 4001f184: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4001f188: 02 80 00 0b be 4001f1b4 <== NOT EXECUTED 4001f18c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 4001f190: ac 10 20 00 clr %l6 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 4001f194: 12 80 00 0e bne 4001f1cc <== NOT EXECUTED 4001f198: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED { errno = EINVAL; 4001f19c: 40 00 3e e7 call 4002ed38 <__errno> <== NOT EXECUTED 4001f1a0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001f1a4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001f1a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001f1ac: 81 c7 e0 08 ret <== NOT EXECUTED 4001f1b0: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 4001f1b4: 7f ff 9a 54 call 40005b04 <== NOT EXECUTED 4001f1b8: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 4001f1bc: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4001f1c0: 02 bf ff fb be 4001f1ac <== NOT EXECUTED 4001f1c4: b2 06 23 fc add %i0, 0x3fc, %i1 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 4001f1c8: ac 10 23 fc mov 0x3fc, %l6 <== NOT EXECUTED } bpt = ept - 1; *bpt = '\0'; 4001f1cc: 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))) 4001f1d0: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 4001f1d4: 7f ff 9a 4c call 40005b04 <== NOT EXECUTED 4001f1d8: aa 06 7f ff add %i1, -1, %l5 <== NOT EXECUTED 4001f1dc: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 4001f1e0: 02 80 00 d9 be 4001f544 <== NOT EXECUTED 4001f1e4: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 4001f1e8: c0 2c a0 01 clrb [ %l2 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 4001f1ec: c2 2c 80 00 stb %g1, [ %l2 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 4001f1f0: a0 07 bf a8 add %fp, -88, %l0 <== NOT EXECUTED 4001f1f4: 11 10 01 09 sethi %hi(0x40042400), %o0 <== NOT EXECUTED 4001f1f8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001f1fc: 7f ff 9e 58 call 40006b5c <== NOT EXECUTED 4001f200: 90 12 21 60 or %o0, 0x160, %o0 <== NOT EXECUTED 4001f204: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f208: 12 80 00 d0 bne 4001f548 <== NOT EXECUTED 4001f20c: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED goto err; root_dev = s.st_dev; 4001f210: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 4001f214: c4 07 bf ac ld [ %fp + -84 ], %g2 <== NOT EXECUTED root_ino = s.st_ino; 4001f218: 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; 4001f21c: c2 27 bf 98 st %g1, [ %fp + -104 ] <== NOT EXECUTED 4001f220: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 4001f224: 82 04 a4 00 add %l2, 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. */ 4001f228: 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; 4001f22c: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 4001f230: 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. */ 4001f234: c4 27 bf 9c st %g2, [ %fp + -100 ] <== NOT EXECUTED 4001f238: 40 00 3e c0 call 4002ed38 <__errno> <== NOT EXECUTED 4001f23c: a8 10 00 12 mov %l2, %l4 <== NOT EXECUTED 4001f240: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED 4001f244: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 4001f248: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001f24c: 7f ff 9e 44 call 40006b5c <== NOT EXECUTED 4001f250: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 4001f254: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f258: 12 80 00 bb bne 4001f544 <== NOT EXECUTED 4001f25c: f8 07 bf a8 ld [ %fp + -88 ], %i4 <== 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) 4001f260: 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; 4001f264: f6 07 bf b0 ld [ %fp + -80 ], %i3 <== NOT EXECUTED dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 4001f268: 80 a0 c0 1c cmp %g3, %i4 <== NOT EXECUTED 4001f26c: 12 80 00 14 bne 4001f2bc <== NOT EXECUTED 4001f270: fa 07 bf ac ld [ %fp + -84 ], %i5 <== NOT EXECUTED 4001f274: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 4001f278: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 4001f27c: 12 80 00 11 bne 4001f2c0 <== NOT EXECUTED 4001f280: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 4001f284: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 4001f288: 80 a0 80 1b cmp %g2, %i3 <== NOT EXECUTED 4001f28c: 12 80 00 0e bne 4001f2c4 <== NOT EXECUTED 4001f290: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 4001f294: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 4001f298: 92 05 7f ff add %l5, -1, %o1 <== NOT EXECUTED 4001f29c: c2 2d 7f ff stb %g1, [ %l5 + -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); 4001f2a0: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 4001f2a4: 40 00 48 cb call 400315d0 <== NOT EXECUTED 4001f2a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 4001f2ac: 7f ff 98 84 call 400054bc <== NOT EXECUTED 4001f2b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001f2b4: 81 c7 e0 08 ret <== NOT EXECUTED 4001f2b8: 81 e8 00 00 restore <== 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) 4001f2bc: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 4001f2c0: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED 4001f2c4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 4001f2c8: 18 80 00 0c bgu 4001f2f8 <== NOT EXECUTED 4001f2cc: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED { if (!(up = (char *) realloc (up, upsize *= 2))) 4001f2d0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001f2d4: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 4001f2d8: 40 00 06 37 call 40020bb4 <== NOT EXECUTED 4001f2dc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4001f2e0: a4 92 20 00 orcc %o0, 0, %l2 <== NOT EXECUTED 4001f2e4: 02 80 00 98 be 4001f544 <== NOT EXECUTED 4001f2e8: 82 04 80 1a add %l2, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 4001f2ec: a8 10 00 12 mov %l2, %l4 <== NOT EXECUTED 4001f2f0: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED } *bup++ = '.'; 4001f2f4: 84 10 20 2e mov 0x2e, %g2 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 4001f2f8: c0 2d 20 02 clrb [ %l4 + 2 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 4001f2fc: c4 2d 00 00 stb %g2, [ %l4 ] <== NOT EXECUTED *bup++ = '.'; 4001f300: c4 2d 20 01 stb %g2, [ %l4 + 1 ] <== NOT EXECUTED *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 4001f304: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001f308: 40 00 04 fc call 400206f8 <== NOT EXECUTED 4001f30c: a0 05 20 02 add %l4, 2, %l0 <== NOT EXECUTED 4001f310: ae 92 20 00 orcc %o0, 0, %l7 <== NOT EXECUTED 4001f314: 02 80 00 8d be 4001f548 <== NOT EXECUTED 4001f318: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4001f31c: d0 05 c0 00 ld [ %l7 ], %o0 <== NOT EXECUTED 4001f320: 7f ff fe f5 call 4001eef4 <== NOT EXECUTED 4001f324: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 4001f328: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f32c: 12 80 00 90 bne 4001f56c <== NOT EXECUTED 4001f330: 86 10 20 2f mov 0x2f, %g3 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 4001f334: 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) 4001f338: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 4001f33c: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 4001f340: 12 80 00 06 bne 4001f358 <== NOT EXECUTED 4001f344: a8 05 20 03 add %l4, 3, %l4 <== NOT EXECUTED 4001f348: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 4001f34c: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 4001f350: 02 80 00 04 be 4001f360 <== NOT EXECUTED 4001f354: 01 00 00 00 nop <== NOT EXECUTED 4001f358: 10 80 00 0c b 4001f388 <== NOT EXECUTED 4001f35c: a6 10 20 00 clr %l3 ! 0 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 4001f360: 40 00 05 9e call 400209d8 <== NOT EXECUTED 4001f364: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4001f368: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4001f36c: 02 80 00 69 be 4001f510 <== NOT EXECUTED 4001f370: a6 10 20 00 clr %l3 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 4001f374: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED 4001f378: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 4001f37c: 12 bf ff f9 bne 4001f360 <== NOT EXECUTED 4001f380: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED 4001f384: 30 80 00 33 b,a 4001f450 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 4001f388: 40 00 05 94 call 400209d8 <== NOT EXECUTED 4001f38c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 4001f390: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 4001f394: 02 80 00 5f be 4001f510 <== NOT EXECUTED 4001f398: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 4001f39c: c2 4c 60 0c ldsb [ %l1 + 0xc ], %g1 <== NOT EXECUTED 4001f3a0: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 4001f3a4: 12 80 00 0c bne 4001f3d4 <== NOT EXECUTED 4001f3a8: a0 04 60 0c add %l1, 0xc, %l0 <== NOT EXECUTED 4001f3ac: c2 4c 60 0d ldsb [ %l1 + 0xd ], %g1 <== NOT EXECUTED 4001f3b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f3b4: 02 bf ff f5 be 4001f388 <== NOT EXECUTED 4001f3b8: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 4001f3bc: 12 80 00 06 bne 4001f3d4 <== NOT EXECUTED 4001f3c0: 01 00 00 00 nop <== NOT EXECUTED 4001f3c4: c2 4c 60 0e ldsb [ %l1 + 0xe ], %g1 <== NOT EXECUTED 4001f3c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f3cc: 02 bf ff ef be 4001f388 <== NOT EXECUTED 4001f3d0: 01 00 00 00 nop <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 4001f3d4: 40 00 54 fb call 400347c0 <== NOT EXECUTED 4001f3d8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001f3dc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001f3e0: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 4001f3e4: 40 00 48 7b call 400315d0 <== NOT EXECUTED 4001f3e8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 4001f3ec: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001f3f0: 7f ff 9d db call 40006b5c <== NOT EXECUTED 4001f3f4: 92 07 bf a8 add %fp, -88, %o1 <== NOT EXECUTED 4001f3f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f3fc: 02 80 00 0c be 4001f42c <== NOT EXECUTED 4001f400: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 4001f404: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 4001f408: 12 80 00 05 bne 4001f41c <== NOT EXECUTED 4001f40c: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; 4001f410: 40 00 3e 4a call 4002ed38 <__errno> <== NOT EXECUTED 4001f414: 01 00 00 00 nop <== NOT EXECUTED 4001f418: e6 02 00 00 ld [ %o0 ], %l3 <== NOT EXECUTED errno = 0; 4001f41c: 40 00 3e 47 call 4002ed38 <__errno> <== NOT EXECUTED 4001f420: 01 00 00 00 nop <== NOT EXECUTED 4001f424: 10 bf ff d9 b 4001f388 <== NOT EXECUTED 4001f428: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED continue; } if (s.st_dev == dev && s.st_ino == ino) 4001f42c: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED 4001f430: 12 bf ff d6 bne 4001f388 <== NOT EXECUTED 4001f434: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 4001f438: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 4001f43c: 12 bf ff d3 bne 4001f388 <== NOT EXECUTED 4001f440: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 4001f444: 80 a0 40 1b cmp %g1, %i3 <== NOT EXECUTED 4001f448: 12 bf ff d0 bne 4001f388 <== NOT EXECUTED 4001f44c: a0 04 60 0c add %l1, 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)) 4001f450: 40 00 54 dc call 400347c0 <== NOT EXECUTED 4001f454: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001f458: c6 07 bf 9c ld [ %fp + -100 ], %g3 <== NOT EXECUTED 4001f45c: a2 25 40 18 sub %l5, %i0, %l1 <== NOT EXECUTED 4001f460: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 4001f464: 82 20 80 03 sub %g2, %g3, %g1 <== NOT EXECUTED 4001f468: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 4001f46c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4001f470: 18 80 00 17 bgu 4001f4cc <== NOT EXECUTED 4001f474: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED { size_t len, off; if (!ptsize) 4001f478: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4001f47c: 32 80 00 07 bne,a 4001f498 <== NOT EXECUTED 4001f480: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED { errno = ERANGE; 4001f484: 40 00 3e 2d call 4002ed38 <__errno> <== NOT EXECUTED 4001f488: 01 00 00 00 nop <== NOT EXECUTED 4001f48c: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 4001f490: 10 80 00 37 b 4001f56c <== NOT EXECUTED 4001f494: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 4001f498: ad 2d a0 01 sll %l6, 1, %l6 <== NOT EXECUTED 4001f49c: 40 00 05 c6 call 40020bb4 <== NOT EXECUTED 4001f4a0: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED 4001f4a4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4001f4a8: 02 80 00 31 be 4001f56c <== NOT EXECUTED 4001f4ac: 82 26 40 15 sub %i1, %l5, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 4001f4b0: 92 06 00 11 add %i0, %l1, %o1 <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 4001f4b4: b2 06 00 16 add %i0, %l6, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 4001f4b8: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 4001f4bc: aa 26 40 01 sub %i1, %g1, %l5 <== NOT EXECUTED 4001f4c0: 40 00 48 44 call 400315d0 <== NOT EXECUTED 4001f4c4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 4001f4c8: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 4001f4cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f4d0: 12 80 00 04 bne 4001f4e0 <== NOT EXECUTED 4001f4d4: 84 10 20 2f mov 0x2f, %g2 <== NOT EXECUTED *--bpt = '/'; 4001f4d8: aa 05 7f ff add %l5, -1, %l5 <== NOT EXECUTED 4001f4dc: c4 2d 40 00 stb %g2, [ %l5 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 4001f4e0: 40 00 54 b8 call 400347c0 <== NOT EXECUTED 4001f4e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 4001f4e8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001f4ec: 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); 4001f4f0: aa 25 40 08 sub %l5, %o0, %l5 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); (void) _closedir (dir); dir = 0; /* Truncate any file name. */ *bup = '\0'; 4001f4f4: 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)); 4001f4f8: 40 00 48 36 call 400315d0 <== NOT EXECUTED 4001f4fc: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED (void) _closedir (dir); 4001f500: 40 00 33 b7 call 4002c3dc <== NOT EXECUTED 4001f504: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 4001f508: 10 bf ff 50 b 4001f248 <== NOT EXECUTED 4001f50c: c0 2d 00 00 clrb [ %l4 ] <== 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) 4001f510: 40 00 3e 0a call 4002ed38 <__errno> <== NOT EXECUTED 4001f514: 01 00 00 00 nop <== NOT EXECUTED 4001f518: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001f51c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f520: 12 80 00 13 bne 4001f56c <== NOT EXECUTED 4001f524: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; 4001f528: 40 00 3e 04 call 4002ed38 <__errno> <== NOT EXECUTED 4001f52c: 01 00 00 00 nop <== NOT EXECUTED 4001f530: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 4001f534: 22 80 00 02 be,a 4001f53c <== NOT EXECUTED 4001f538: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED 4001f53c: 10 80 00 0c b 4001f56c <== NOT EXECUTED 4001f540: e6 22 00 00 st %l3, [ %o0 ] <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 4001f544: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4001f548: 02 80 00 05 be 4001f55c <== NOT EXECUTED 4001f54c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED free (pt); 4001f550: 7f ff 97 db call 400054bc <== NOT EXECUTED 4001f554: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 4001f558: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001f55c: 7f ff 97 d8 call 400054bc <== NOT EXECUTED 4001f560: b0 10 20 00 clr %i0 <== NOT EXECUTED return (char *) NULL; } 4001f564: 81 c7 e0 08 ret <== NOT EXECUTED 4001f568: 81 e8 00 00 restore <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 4001f56c: 40 00 33 9c call 4002c3dc <== NOT EXECUTED 4001f570: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED if (ptsize) 4001f574: 10 bf ff f5 b 4001f548 <== NOT EXECUTED 4001f578: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4002c7f4 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4002c7f4: 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 ); 4002c7f8: 03 10 01 1d sethi %hi(0x40047400), %g1 4002c7fc: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 40047698 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4002c800: 88 10 00 18 mov %i0, %g4 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 4002c804: 80 a6 00 01 cmp %i0, %g1 4002c808: 1a 80 00 0a bcc 4002c830 4002c80c: b0 10 20 00 clr %i0 4002c810: 03 10 01 71 sethi %hi(0x4005c400), %g1 4002c814: c6 00 62 8c ld [ %g1 + 0x28c ], %g3 ! 4005c68c 4002c818: 85 29 20 02 sll %g4, 2, %g2 4002c81c: 83 29 20 04 sll %g4, 4, %g1 4002c820: 82 20 40 02 sub %g1, %g2, %g1 4002c824: 82 00 40 04 add %g1, %g4, %g1 4002c828: 83 28 60 02 sll %g1, 2, %g1 4002c82c: b0 00 c0 01 add %g3, %g1, %i0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4002c830: a0 07 bf e8 add %fp, -24, %l0 4002c834: 92 06 20 10 add %i0, 0x10, %o1 4002c838: 90 10 00 10 mov %l0, %o0 4002c83c: 40 00 13 2c call 400314ec 4002c840: 94 10 20 10 mov 0x10, %o2 if ( !loc.ops->node_type_h ) 4002c844: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002c848: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4002c84c: 80 a0 60 00 cmp %g1, 0 4002c850: 02 80 00 11 be 4002c894 4002c854: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 4002c858: 9f c0 40 00 call %g1 4002c85c: 90 10 00 10 mov %l0, %o0 4002c860: 80 a2 20 01 cmp %o0, 1 4002c864: 22 80 00 08 be,a 4002c884 4002c868: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4002c86c: 40 00 09 33 call 4002ed38 <__errno> 4002c870: 01 00 00 00 nop 4002c874: 82 10 20 14 mov 0x14, %g1 ! 14 4002c878: c2 22 00 00 st %g1, [ %o0 ] 4002c87c: 10 80 00 0d b 4002c8b0 4002c880: 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 ) 4002c884: c2 00 60 08 ld [ %g1 + 8 ], %g1 4002c888: 80 a0 60 00 cmp %g1, 0 4002c88c: 32 80 00 06 bne,a 4002c8a4 4002c890: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4002c894: 40 00 09 29 call 4002ed38 <__errno> <== NOT EXECUTED 4002c898: 01 00 00 00 nop <== NOT EXECUTED 4002c89c: 10 bf ff f7 b 4002c878 <== NOT EXECUTED 4002c8a0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 4002c8a4: 92 10 00 19 mov %i1, %o1 4002c8a8: 9f c0 40 00 call %g1 4002c8ac: 94 10 00 1a mov %i2, %o2 } 4002c8b0: 81 c7 e0 08 ret 4002c8b4: 91 e8 00 08 restore %g0, %o0, %o0 4001f59c : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 4001f59c: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4001f5a0: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 40048124 <== NOT EXECUTED return _POSIX_types_Gid; } 4001f5a4: 81 c3 e0 08 retl <== NOT EXECUTED 4001f5a8: d0 10 60 2a lduh [ %g1 + 0x2a ], %o0 <== NOT EXECUTED 4001fc1c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4001fc1c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 4001fc20: 7f ff ff b5 call 4001faf4 <== NOT EXECUTED 4001fc24: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 4001fc28: 11 10 01 12 sethi %hi(0x40044800), %o0 <== NOT EXECUTED 4001fc2c: 13 10 01 1c sethi %hi(0x40047000), %o1 <== NOT EXECUTED 4001fc30: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED 4001fc34: 40 00 3e b3 call 4002f700 <== NOT EXECUTED 4001fc38: 92 12 62 58 or %o1, 0x258, %o1 <== NOT EXECUTED 4001fc3c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4001fc40: 12 80 00 08 bne 4001fc60 <== NOT EXECUTED 4001fc44: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED errno = EINVAL; 4001fc48: 40 00 3c 3c call 4002ed38 <__errno> <== NOT EXECUTED 4001fc4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001fc50: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001fc54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001fc58: 81 c7 e0 08 ret <== NOT EXECUTED 4001fc5c: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 4001fc60: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001fc64: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 4001fc68: 7f ff fe e8 call 4001f808 <== NOT EXECUTED 4001fc6c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001fc70: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fc74: 12 80 00 0a bne 4001fc9c <== NOT EXECUTED 4001fc78: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; 4001fc7c: 40 00 3c 2f call 4002ed38 <__errno> <== NOT EXECUTED 4001fc80: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001fc84: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001fc88: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4001fc8c: 40 00 3c 83 call 4002ee98 <== NOT EXECUTED 4001fc90: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001fc94: 81 c7 e0 08 ret <== NOT EXECUTED 4001fc98: 81 e8 00 00 restore <== NOT EXECUTED return -1; } if (name) { 4001fc9c: 22 80 00 07 be,a 4001fcb8 <== NOT EXECUTED 4001fca0: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); 4001fca4: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED 4001fca8: 40 00 50 a8 call 40033f48 <== NOT EXECUTED 4001fcac: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4001fcb0: 10 80 00 04 b 4001fcc0 <== NOT EXECUTED 4001fcb4: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); 4001fcb8: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4001fcbc: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4001fcc0: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4001fcc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001fcc8: 02 bf ff e6 be 4001fc60 <== NOT EXECUTED 4001fccc: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4001fcd0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001fcd4: 40 00 3c 71 call 4002ee98 <== NOT EXECUTED 4001fcd8: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 4001fcdc: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 4001fce0: 81 c7 e0 08 ret <== NOT EXECUTED 4001fce4: 81 e8 00 00 restore <== NOT EXECUTED 4001f948 : return NULL; return p; } struct group *getgrent() { 4001f948: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 4001f94c: 03 10 01 6f sethi %hi(0x4005bc00), %g1 <== NOT EXECUTED 4001f950: d0 00 62 94 ld [ %g1 + 0x294 ], %o0 ! 4005be94 <== NOT EXECUTED 4001f954: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f958: 02 80 00 0b be 4001f984 <== NOT EXECUTED 4001f95c: 15 10 01 6f sethi %hi(0x4005bc00), %o2 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 4001f960: 21 10 01 6f sethi %hi(0x4005bc00), %l0 <== NOT EXECUTED 4001f964: 92 14 23 60 or %l0, 0x360, %o1 ! 4005bf60 <== NOT EXECUTED 4001f968: 94 12 a2 98 or %o2, 0x298, %o2 <== NOT EXECUTED 4001f96c: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001f970: 7f ff ff a6 call 4001f808 <== NOT EXECUTED 4001f974: b0 14 23 60 or %l0, 0x360, %i0 <== NOT EXECUTED 4001f978: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f97c: 12 80 00 03 bne 4001f988 <== NOT EXECUTED 4001f980: 01 00 00 00 nop <== NOT EXECUTED 4001f984: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED return NULL; return &grent; } 4001f988: 81 c7 e0 08 ret <== NOT EXECUTED 4001f98c: 81 e8 00 00 restore <== NOT EXECUTED 4001fd20 : } struct group *getgrgid( gid_t gid ) { 4001fd20: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4001fd24: 13 10 01 6f sethi %hi(0x4005bc00), %o1 <== NOT EXECUTED 4001fd28: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4001fd2c: 92 12 63 60 or %o1, 0x360, %o1 <== NOT EXECUTED 4001fd30: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4001fd34: 15 10 01 6f sethi %hi(0x4005bc00), %o2 <== NOT EXECUTED 4001fd38: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001fd3c: 94 12 a2 98 or %o2, 0x298, %o2 <== NOT EXECUTED 4001fd40: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001fd44: 7f ff ff e9 call 4001fce8 <== NOT EXECUTED 4001fd48: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001fd4c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fd50: 22 80 00 02 be,a 4001fd58 <== NOT EXECUTED 4001fd54: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001fd58: 81 c7 e0 08 ret <== NOT EXECUTED 4001fd5c: 81 e8 00 00 restore <== NOT EXECUTED 4001fce8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4001fce8: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 4001fcec: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4001fcf0: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4001fcf4: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4001fcf8: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4001fcfc: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 4001fd00: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4001fd04: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4001fd08: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 4001fd0c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001fd10: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001fd14: 7f ff ff c2 call 4001fc1c <== NOT EXECUTED 4001fd18: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001fd1c: 01 00 00 00 nop 4001fd8c : } struct group *getgrnam( const char *name ) { 4001fd8c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 4001fd90: 13 10 01 6f sethi %hi(0x4005bc00), %o1 <== NOT EXECUTED 4001fd94: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001fd98: 92 12 63 60 or %o1, 0x360, %o1 <== NOT EXECUTED 4001fd9c: 15 10 01 6f sethi %hi(0x4005bc00), %o2 <== NOT EXECUTED 4001fda0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001fda4: 94 12 a2 98 or %o2, 0x298, %o2 <== NOT EXECUTED 4001fda8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001fdac: 7f ff ff ed call 4001fd60 <== NOT EXECUTED 4001fdb0: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001fdb4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fdb8: 22 80 00 02 be,a 4001fdc0 <== NOT EXECUTED 4001fdbc: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001fdc0: 81 c7 e0 08 ret <== NOT EXECUTED 4001fdc4: 81 e8 00 00 restore <== NOT EXECUTED 4001fd60 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4001fd60: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 4001fd64: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 4001fd68: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 4001fd6c: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4001fd70: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 4001fd74: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 4001fd78: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001fd7c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001fd80: 7f ff ff a7 call 4001fc1c <== NOT EXECUTED 4001fd84: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001fd88: 01 00 00 00 nop 4001fe14 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001fe14: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 4001fe18: 7f ff ff 37 call 4001faf4 <== NOT EXECUTED 4001fe1c: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 4001fe20: 11 10 01 11 sethi %hi(0x40044400), %o0 <== NOT EXECUTED 4001fe24: 13 10 01 1c sethi %hi(0x40047000), %o1 <== NOT EXECUTED 4001fe28: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001fe2c: 40 00 3e 35 call 4002f700 <== NOT EXECUTED 4001fe30: 92 12 62 58 or %o1, 0x258, %o1 <== NOT EXECUTED 4001fe34: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4001fe38: 12 80 00 08 bne 4001fe58 <== NOT EXECUTED 4001fe3c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED errno = EINVAL; 4001fe40: 40 00 3b be call 4002ed38 <__errno> <== NOT EXECUTED 4001fe44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001fe48: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001fe4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001fe50: 81 c7 e0 08 ret <== NOT EXECUTED 4001fe54: 81 e8 00 00 restore <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 4001fe58: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001fe5c: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 4001fe60: 7f ff fe cc call 4001f990 <== NOT EXECUTED 4001fe64: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001fe68: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fe6c: 12 80 00 0a bne 4001fe94 <== NOT EXECUTED 4001fe70: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; 4001fe74: 40 00 3b b1 call 4002ed38 <__errno> <== NOT EXECUTED 4001fe78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001fe7c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001fe80: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4001fe84: 40 00 3c 05 call 4002ee98 <== NOT EXECUTED 4001fe88: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001fe8c: 81 c7 e0 08 ret <== NOT EXECUTED 4001fe90: 81 e8 00 00 restore <== NOT EXECUTED return -1; } if (name) { 4001fe94: 22 80 00 07 be,a 4001feb0 <== NOT EXECUTED 4001fe98: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); 4001fe9c: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED 4001fea0: 40 00 50 2a call 40033f48 <== NOT EXECUTED 4001fea4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4001fea8: 10 80 00 04 b 4001feb8 <== NOT EXECUTED 4001feac: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); 4001feb0: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4001feb4: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4001feb8: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4001febc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001fec0: 02 bf ff e6 be 4001fe58 <== NOT EXECUTED 4001fec4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4001fec8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001fecc: 40 00 3b f3 call 4002ee98 <== NOT EXECUTED 4001fed0: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 4001fed4: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 4001fed8: 81 c7 e0 08 ret <== NOT EXECUTED 4001fedc: 81 e8 00 00 restore <== NOT EXECUTED 4001faac : return NULL; return p; } struct passwd *getpwent() { 4001faac: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 4001fab0: 03 10 01 6f sethi %hi(0x4005bc00), %g1 <== NOT EXECUTED 4001fab4: d0 00 61 ac ld [ %g1 + 0x1ac ], %o0 ! 4005bdac <== NOT EXECUTED 4001fab8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fabc: 02 80 00 0b be 4001fae8 <== NOT EXECUTED 4001fac0: 15 10 01 6f sethi %hi(0x4005bc00), %o2 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 4001fac4: 21 10 01 6f sethi %hi(0x4005bc00), %l0 <== NOT EXECUTED 4001fac8: 92 14 22 78 or %l0, 0x278, %o1 ! 4005be78 <== NOT EXECUTED 4001facc: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 4001fad0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001fad4: 7f ff ff af call 4001f990 <== NOT EXECUTED 4001fad8: b0 14 22 78 or %l0, 0x278, %i0 <== NOT EXECUTED 4001fadc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fae0: 12 80 00 03 bne 4001faec <== NOT EXECUTED 4001fae4: 01 00 00 00 nop <== NOT EXECUTED 4001fae8: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED return NULL; return &pwent; } 4001faec: 81 c7 e0 08 ret <== NOT EXECUTED 4001faf0: 81 e8 00 00 restore <== NOT EXECUTED 4001ff84 : } struct passwd *getpwnam( const char *name ) { 4001ff84: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 4001ff88: 13 10 01 6f sethi %hi(0x4005bc00), %o1 <== NOT EXECUTED 4001ff8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001ff90: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED 4001ff94: 15 10 01 6f sethi %hi(0x4005bc00), %o2 <== NOT EXECUTED 4001ff98: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001ff9c: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 4001ffa0: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001ffa4: 7f ff ff ed call 4001ff58 <== NOT EXECUTED 4001ffa8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001ffac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001ffb0: 22 80 00 02 be,a 4001ffb8 <== NOT EXECUTED 4001ffb4: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001ffb8: 81 c7 e0 08 ret <== NOT EXECUTED 4001ffbc: 81 e8 00 00 restore <== NOT EXECUTED 4001ff58 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001ff58: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 4001ff5c: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 4001ff60: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 4001ff64: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4001ff68: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 4001ff6c: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 4001ff70: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001ff74: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001ff78: 7f ff ff a7 call 4001fe14 <== NOT EXECUTED 4001ff7c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001ff80: 01 00 00 00 nop 4001ff18 : } struct passwd *getpwuid( uid_t uid ) { 4001ff18: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 4001ff1c: 13 10 01 6f sethi %hi(0x4005bc00), %o1 <== NOT EXECUTED 4001ff20: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4001ff24: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED 4001ff28: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4001ff2c: 15 10 01 6f sethi %hi(0x4005bc00), %o2 <== NOT EXECUTED 4001ff30: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001ff34: 94 12 a1 b0 or %o2, 0x1b0, %o2 <== NOT EXECUTED 4001ff38: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001ff3c: 7f ff ff e9 call 4001fee0 <== NOT EXECUTED 4001ff40: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001ff44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001ff48: 22 80 00 02 be,a 4001ff50 <== NOT EXECUTED 4001ff4c: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001ff50: 81 c7 e0 08 ret <== NOT EXECUTED 4001ff54: 81 e8 00 00 restore <== NOT EXECUTED 4001fee0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001fee0: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 4001fee4: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4001fee8: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4001feec: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001fef0: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4001fef4: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 4001fef8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4001fefc: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4001ff00: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 4001ff04: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001ff08: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001ff0c: 7f ff ff c2 call 4001fe14 <== NOT EXECUTED 4001ff10: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001ff14: 01 00 00 00 nop 4000a0f4 : int gettimeofday( struct timeval *tp, void * __tz ) { 4000a0f4: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000a0f8: 80 a6 20 00 cmp %i0, 0 4000a0fc: 12 80 00 08 bne 4000a11c 4000a100: 01 00 00 00 nop errno = EFAULT; 4000a104: 40 00 0b 05 call 4000cd18 <__errno> <== NOT EXECUTED 4000a108: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000a10c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000a110: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a114: 81 c7 e0 08 ret <== NOT EXECUTED 4000a118: 81 e8 00 00 restore <== NOT EXECUTED ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 4000a11c: 7f ff de f0 call 40001cdc 4000a120: 01 00 00 00 nop 4000a124: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000a128: 7f ff f0 7c call 40006318 <_TOD_Get> 4000a12c: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 4000a130: 7f ff de ef call 40001cec 4000a134: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000a138: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 4000a13c: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000a140: 92 10 23 e8 mov 0x3e8, %o1 4000a144: 40 00 26 c5 call 40013c58 <.udiv> 4000a148: c2 26 00 00 st %g1, [ %i0 ] 4000a14c: 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; } 4000a150: 81 c7 e0 08 ret 4000a154: 91 e8 20 00 restore %g0, 0, %o0 400055f0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 400055f0: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 400055f4: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 40048124 <== NOT EXECUTED return _POSIX_types_Uid; } 400055f8: 81 c3 e0 08 retl <== NOT EXECUTED 400055fc: d0 10 60 28 lduh [ %g1 + 0x28 ], %o0 <== NOT EXECUTED 4002c0c4 : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4002c0c4: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4002c0c8: 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 ) ) 4002c0cc: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 4002c0d0: 82 04 20 50 add %l0, 0x50, %g1 4002c0d4: 80 a0 80 01 cmp %g2, %g1 4002c0d8: 22 80 00 06 be,a 4002c0f0 4002c0dc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 4002c0e0: 40 00 0b 16 call 4002ed38 <__errno> 4002c0e4: 01 00 00 00 nop 4002c0e8: 10 80 00 0d b 4002c11c 4002c0ec: 82 10 20 5a mov 0x5a, %g1 ! 5a /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 4002c0f0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 4002c0f4: 80 a0 40 10 cmp %g1, %l0 4002c0f8: 02 80 00 06 be 4002c110 4002c0fc: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 4002c100: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 4002c104: 80 a0 60 00 cmp %g1, 0 4002c108: 22 80 00 08 be,a 4002c128 4002c10c: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 4002c110: 40 00 0b 0a call 4002ed38 <__errno> 4002c114: 01 00 00 00 nop 4002c118: 82 10 20 10 mov 0x10, %g1 ! 10 4002c11c: c2 22 00 00 st %g1, [ %o0 ] 4002c120: 81 c7 e0 08 ret 4002c124: 91 e8 3f ff restore %g0, -1, %o0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4002c128: 80 a0 60 00 cmp %g1, 0 4002c12c: 22 80 00 06 be,a 4002c144 4002c130: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4002c134: 7f ff da 3f call 40022a30 <_Chain_Extract> 4002c138: 90 10 00 10 mov %l0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 4002c13c: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4002c140: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4002c144: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4002c148: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4002c14c: 90 07 bf f0 add %fp, -16, %o0 4002c150: 7f ff 65 05 call 40005564 4002c154: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4002c158: 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) ) { 4002c15c: 90 10 00 10 mov %l0, %o0 4002c160: 7f ff 65 73 call 4000572c 4002c164: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4002c168: 80 a2 20 00 cmp %o0, 0 4002c16c: 12 80 00 11 bne 4002c1b0 4002c170: 01 00 00 00 nop 4002c174: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4002c178: 80 a0 60 00 cmp %g1, 0 4002c17c: 12 80 00 0d bne 4002c1b0 4002c180: 03 10 01 20 sethi %hi(0x40048000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4002c184: c6 00 61 24 ld [ %g1 + 0x124 ], %g3 ! 40048124 4002c188: c4 06 00 00 ld [ %i0 ], %g2 4002c18c: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4002c190: 80 a0 40 02 cmp %g1, %g2 4002c194: 22 80 00 02 be,a 4002c19c 4002c198: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 4002c19c: 90 10 00 10 mov %l0, %o0 4002c1a0: 7f ff 64 c7 call 400054bc 4002c1a4: b0 10 20 00 clr %i0 4002c1a8: 81 c7 e0 08 ret 4002c1ac: 81 e8 00 00 restore } return 0; } 4002c1b0: 81 c7 e0 08 ret 4002c1b4: 91 e8 20 00 restore %g0, 0, %o0 4001faf4 : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 4001faf4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 4001faf8: 05 10 01 6f sethi %hi(0x4005bc00), %g2 <== NOT EXECUTED 4001fafc: c2 48 a1 a8 ldsb [ %g2 + 0x1a8 ], %g1 ! 4005bda8 <== NOT EXECUTED 4001fb00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001fb04: 12 80 00 31 bne 4001fbc8 <== NOT EXECUTED 4001fb08: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 4001fb0c: 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; 4001fb10: c2 28 a1 a8 stb %g1, [ %g2 + 0x1a8 ] <== NOT EXECUTED mkdir("/etc", 0777); 4001fb14: 11 10 01 11 sethi %hi(0x40044400), %o0 <== NOT EXECUTED 4001fb18: 7f ff 98 6a call 40005cc0 <== NOT EXECUTED 4001fb1c: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 400447a8 <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4001fb20: 31 10 01 11 sethi %hi(0x40044400), %i0 <== NOT EXECUTED 4001fb24: 13 10 01 1c sethi %hi(0x40047000), %o1 <== NOT EXECUTED 4001fb28: 90 16 23 b0 or %i0, 0x3b0, %o0 <== NOT EXECUTED 4001fb2c: 40 00 3e f5 call 4002f700 <== NOT EXECUTED 4001fb30: 92 12 62 58 or %o1, 0x258, %o1 <== NOT EXECUTED 4001fb34: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fb38: 12 80 00 0d bne 4001fb6c <== NOT EXECUTED 4001fb3c: 01 00 00 00 nop <== NOT EXECUTED fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 4001fb40: 90 16 23 b0 or %i0, 0x3b0, %o0 <== NOT EXECUTED 4001fb44: 13 10 01 0e sethi %hi(0x40043800), %o1 <== NOT EXECUTED 4001fb48: 40 00 3e ee call 4002f700 <== NOT EXECUTED 4001fb4c: 92 12 61 20 or %o1, 0x120, %o1 ! 40043920 <== NOT EXECUTED 4001fb50: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4001fb54: 02 80 00 08 be 4001fb74 <== NOT EXECUTED 4001fb58: 11 10 01 11 sethi %hi(0x40044400), %o0 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4001fb5c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4001fb60: 40 00 3f 42 call 4002f868 <== NOT EXECUTED 4001fb64: 90 12 23 c0 or %o0, 0x3c0, %o0 <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4001fb68: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001fb6c: 40 00 3c cb call 4002ee98 <== NOT EXECUTED 4001fb70: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 4001fb74: 31 10 01 12 sethi %hi(0x40044800), %i0 <== NOT EXECUTED 4001fb78: 13 10 01 1c sethi %hi(0x40047000), %o1 <== NOT EXECUTED 4001fb7c: 90 16 20 28 or %i0, 0x28, %o0 <== NOT EXECUTED 4001fb80: 40 00 3e e0 call 4002f700 <== NOT EXECUTED 4001fb84: 92 12 62 58 or %o1, 0x258, %o1 <== NOT EXECUTED 4001fb88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fb8c: 22 80 00 04 be,a 4001fb9c <== NOT EXECUTED 4001fb90: 90 16 20 28 or %i0, 0x28, %o0 <== NOT EXECUTED fclose(fp); 4001fb94: 10 80 00 0b b 4001fbc0 <== NOT EXECUTED 4001fb98: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } else if ((fp = fopen("/etc/group", "w")) != NULL) { 4001fb9c: 13 10 01 0e sethi %hi(0x40043800), %o1 <== NOT EXECUTED 4001fba0: 40 00 3e d8 call 4002f700 <== NOT EXECUTED 4001fba4: 92 12 61 20 or %o1, 0x120, %o1 ! 40043920 <== NOT EXECUTED 4001fba8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4001fbac: 02 80 00 07 be 4001fbc8 <== NOT EXECUTED 4001fbb0: 11 10 01 12 sethi %hi(0x40044800), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 4001fbb4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4001fbb8: 40 00 3f 2c call 4002f868 <== NOT EXECUTED 4001fbbc: 90 12 20 38 or %o0, 0x38, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 4001fbc0: 40 00 3c b6 call 4002ee98 <== NOT EXECUTED 4001fbc4: 81 e8 00 00 restore <== NOT EXECUTED 4001fbc8: 81 c7 e0 08 ret <== NOT EXECUTED 4001fbcc: 81 e8 00 00 restore <== NOT EXECUTED 40014de8 : int ioctl( int fd, ioctl_command_t command, ... ) { 40014de8: 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 ); 40014dec: 03 10 00 97 sethi %hi(0x40025c00), %g1 40014df0: c2 00 61 c8 ld [ %g1 + 0x1c8 ], %g1 ! 40025dc8 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); 40014df4: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40014df8: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40014dfc: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40014e00: 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 ); 40014e04: 80 a6 00 01 cmp %i0, %g1 40014e08: 1a 80 00 14 bcc 40014e58 40014e0c: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 40014e10: 03 10 00 9e sethi %hi(0x40027800), %g1 40014e14: c6 00 63 2c ld [ %g1 + 0x32c ], %g3 ! 40027b2c 40014e18: 85 2e 20 02 sll %i0, 2, %g2 40014e1c: 83 2e 20 04 sll %i0, 4, %g1 40014e20: 82 20 40 02 sub %g1, %g2, %g1 40014e24: 82 00 40 18 add %g1, %i0, %g1 40014e28: 83 28 60 02 sll %g1, 2, %g1 40014e2c: 90 00 c0 01 add %g3, %g1, %o0 rtems_libio_check_is_open(iop); 40014e30: c2 02 20 0c ld [ %o0 + 0xc ], %g1 40014e34: 80 88 61 00 btst 0x100, %g1 40014e38: 02 80 00 08 be 40014e58 40014e3c: 01 00 00 00 nop /* * Now process the ioctl(). */ if ( !iop->handlers ) 40014e40: 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 *); 40014e44: 82 07 a0 50 add %fp, 0x50, %g1 40014e48: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 40014e4c: 80 a0 a0 00 cmp %g2, 0 40014e50: 12 80 00 06 bne 40014e68 40014e54: d4 07 a0 4c ld [ %fp + 0x4c ], %o2 rtems_set_errno_and_return_minus_one( EBADF ); 40014e58: 40 00 02 f9 call 40015a3c <__errno> <== NOT EXECUTED 40014e5c: 01 00 00 00 nop <== NOT EXECUTED 40014e60: 10 80 00 09 b 40014e84 <== NOT EXECUTED 40014e64: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) 40014e68: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40014e6c: 80 a0 60 00 cmp %g1, 0 40014e70: 12 80 00 08 bne 40014e90 40014e74: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 40014e78: 40 00 02 f1 call 40015a3c <__errno> <== NOT EXECUTED 40014e7c: 01 00 00 00 nop <== NOT EXECUTED 40014e80: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40014e84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014e88: 10 80 00 04 b 40014e98 <== NOT EXECUTED 40014e8c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 40014e90: 9f c0 40 00 call %g1 40014e94: 01 00 00 00 nop return rc; } 40014e98: 81 c7 e0 08 ret 40014e9c: 91 e8 00 08 restore %g0, %o0, %o0 40003830 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40003830: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40003834: c4 06 60 30 ld [ %i1 + 0x30 ], %g2 <== NOT EXECUTED 40003838: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 4000383c: 02 80 00 03 be 40003848 <== NOT EXECUTED 40003840: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40003844: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40003848: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 4000384c: 02 80 00 0b be 40003878 <== NOT EXECUTED 40003850: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 40003854: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 40003858: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40018460 <__ctype_ptr> <== NOT EXECUTED 4000385c: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003860: c2 08 40 08 ldub [ %g1 + %o0 ], %g1 <== NOT EXECUTED 40003864: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40003868: 32 80 00 02 bne,a 40003870 <== NOT EXECUTED 4000386c: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 40003870: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == '\r') { 40003874: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED 40003878: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 4000387c: 12 80 00 09 bne 400038a0 <== NOT EXECUTED 40003880: 80 a0 60 0a cmp %g1, 0xa <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 40003884: 80 88 a0 80 btst 0x80, %g2 <== NOT EXECUTED 40003888: 12 80 00 5d bne 400039fc <== NOT EXECUTED 4000388c: 80 88 a1 00 btst 0x100, %g2 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 40003890: 32 80 00 0d bne,a 400038c4 <== NOT EXECUTED 40003894: 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)) { 40003898: 10 80 00 0c b 400038c8 <== NOT EXECUTED 4000389c: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== 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)) { 400038a0: 12 80 00 07 bne 400038bc <== NOT EXECUTED 400038a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400038a8: 80 88 a0 40 btst 0x40, %g2 <== NOT EXECUTED 400038ac: 32 80 00 06 bne,a 400038c4 <== NOT EXECUTED 400038b0: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 400038b4: 10 80 00 05 b 400038c8 <== NOT EXECUTED 400038b8: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED 400038bc: 02 80 00 3c be 400039ac <== NOT EXECUTED 400038c0: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED 400038c4: c6 06 60 3c ld [ %i1 + 0x3c ], %g3 <== NOT EXECUTED 400038c8: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED 400038cc: 02 80 00 38 be 400039ac <== NOT EXECUTED 400038d0: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 400038d4: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 400038d8: 84 0c 20 ff and %l0, 0xff, %g2 <== NOT EXECUTED erase (tty, 0); 400038dc: 90 10 00 19 mov %i1, %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]) { 400038e0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400038e4: 02 80 00 08 be 40003904 <== NOT EXECUTED 400038e8: 92 10 20 00 clr %o1 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 400038ec: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 400038f0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400038f4: 32 80 00 07 bne,a 40003910 <== NOT EXECUTED 400038f8: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED erase (tty, 1); 400038fc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40003900: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003904: 7f ff ff 42 call 4000360c <== NOT EXECUTED 40003908: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000390c: 30 80 00 3d b,a 40003a00 <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40003910: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003914: 02 80 00 3b be 40003a00 <== NOT EXECUTED 40003918: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 4000391c: 80 a0 a0 0a cmp %g2, 0xa <== NOT EXECUTED 40003920: 32 80 00 0f bne,a 4000395c <== NOT EXECUTED 40003924: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 40003928: 80 88 e0 48 btst 0x48, %g3 <== NOT EXECUTED 4000392c: 22 80 00 06 be,a 40003944 <== NOT EXECUTED 40003930: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003934: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED 40003938: 7f ff ff 12 call 40003580 <== NOT EXECUTED 4000393c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003940: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003944: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED 40003948: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED 4000394c: c4 28 c0 01 stb %g2, [ %g3 + %g1 ] <== NOT EXECUTED 40003950: 82 00 60 01 inc %g1 <== NOT EXECUTED 40003954: 10 80 00 14 b 400039a4 <== NOT EXECUTED 40003958: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 4000395c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003960: 02 80 00 07 be 4000397c <== NOT EXECUTED 40003964: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 40003968: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 4000396c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003970: 12 80 00 0f bne 400039ac <== NOT EXECUTED 40003974: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 40003978: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 4000397c: 22 80 00 06 be,a 40003994 <== NOT EXECUTED 40003980: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 40003984: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40003988: 7f ff fe fe call 40003580 <== NOT EXECUTED 4000398c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 40003990: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40003994: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40003998: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 4000399c: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 400039a0: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 400039a4: 81 c7 e0 08 ret <== NOT EXECUTED 400039a8: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 400039ac: c4 06 60 20 ld [ %i1 + 0x20 ], %g2 <== NOT EXECUTED 400039b0: c2 00 63 bc ld [ %g1 + 0x3bc ], %g1 <== NOT EXECUTED 400039b4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400039b8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400039bc: 16 80 00 11 bge 40003a00 <== NOT EXECUTED 400039c0: b0 10 20 00 clr %i0 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 400039c4: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 400039c8: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 400039cc: 22 80 00 06 be,a 400039e4 <== NOT EXECUTED 400039d0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED echo (c, tty); 400039d4: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 400039d8: 7f ff fe ea call 40003580 <== NOT EXECUTED 400039dc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 400039e0: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 400039e4: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 400039e8: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 400039ec: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 400039f0: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 400039f4: 81 c7 e0 08 ret <== NOT EXECUTED 400039f8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 400039fc: b0 10 20 00 clr %i0 <== NOT EXECUTED } return 0; } 40003a00: 81 c7 e0 08 ret <== NOT EXECUTED 40003a04: 81 e8 00 00 restore <== NOT EXECUTED 40021490 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40021490: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40021494: 7f ff ff 19 call 400210f8 40021498: 01 00 00 00 nop 4002149c: 80 a6 00 08 cmp %i0, %o0 400214a0: 02 80 00 06 be 400214b8 400214a4: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 400214a8: 7f ff d1 65 call 40015a3c <__errno> 400214ac: 01 00 00 00 nop 400214b0: 10 80 00 07 b 400214cc 400214b4: 82 10 20 03 mov 3, %g1 ! 3 /* * Validate the signal passed. */ if ( !sig ) 400214b8: 12 80 00 08 bne 400214d8 400214bc: 86 06 7f ff add %i1, -1, %g3 rtems_set_errno_and_return_minus_one( EINVAL ); 400214c0: 7f ff d1 5f call 40015a3c <__errno> 400214c4: 01 00 00 00 nop 400214c8: 82 10 20 16 mov 0x16, %g1 ! 16 400214cc: c2 22 00 00 st %g1, [ %o0 ] 400214d0: 10 80 00 ae b 40021788 400214d4: 90 10 3f ff mov -1, %o0 if ( !is_valid_signo(sig) ) 400214d8: 80 a0 e0 1f cmp %g3, 0x1f 400214dc: 18 bf ff f9 bgu 400214c0 400214e0: 01 00 00 00 nop /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 400214e4: 83 2e 60 02 sll %i1, 2, %g1 400214e8: 85 2e 60 04 sll %i1, 4, %g2 400214ec: 84 20 80 01 sub %g2, %g1, %g2 400214f0: 03 10 00 a0 sethi %hi(0x40028000), %g1 400214f4: 82 10 63 4c or %g1, 0x34c, %g1 ! 4002834c <_POSIX_signals_Vectors> 400214f8: 82 00 40 02 add %g1, %g2, %g1 400214fc: c2 00 60 08 ld [ %g1 + 8 ], %g1 40021500: 80 a0 60 01 cmp %g1, 1 40021504: 02 80 00 a1 be 40021788 40021508: 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 ) ) 4002150c: 80 a6 60 08 cmp %i1, 8 40021510: 02 80 00 06 be 40021528 40021514: 80 a6 60 04 cmp %i1, 4 40021518: 02 80 00 04 be 40021528 4002151c: 80 a6 60 0b cmp %i1, 0xb 40021520: 12 80 00 08 bne 40021540 40021524: 82 10 20 01 mov 1, %g1 return pthread_kill( pthread_self(), sig ); 40021528: 40 00 01 34 call 400219f8 4002152c: 01 00 00 00 nop 40021530: 40 00 00 f6 call 40021908 40021534: 92 10 00 19 mov %i1, %o1 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 40021538: 81 c7 e0 08 ret 4002153c: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 40021540: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 40021544: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 40021548: 80 a6 a0 00 cmp %i2, 0 4002154c: 12 80 00 04 bne 4002155c 40021550: b1 28 40 03 sll %g1, %g3, %i0 siginfo->si_value.sival_int = 0; 40021554: 10 80 00 04 b 40021564 40021558: c0 27 bf f4 clr [ %fp + -12 ] } else { siginfo->si_value = *value; 4002155c: c2 06 80 00 ld [ %i2 ], %g1 40021560: c2 27 bf f4 st %g1, [ %fp + -12 ] 40021564: 05 10 00 9f sethi %hi(0x40027c00), %g2 40021568: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40027d10 <_Thread_Dispatch_disable_level> 4002156c: 82 00 60 01 inc %g1 40021570: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] /* * 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; 40021574: 03 10 00 9f sethi %hi(0x40027c00), %g1 40021578: c6 00 61 d0 ld [ %g1 + 0x1d0 ], %g3 ! 40027dd0 <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 4002157c: c2 00 e1 60 ld [ %g3 + 0x160 ], %g1 40021580: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 40021584: 80 ae 00 01 andncc %i0, %g1, %g0 40021588: 12 80 00 58 bne 400216e8 4002158c: 03 10 00 a1 sethi %hi(0x40028400), %g1 goto process_it; 40021590: 88 10 60 d8 or %g1, 0xd8, %g4 ! 400284d8 <_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 ; 40021594: 96 01 20 30 add %g4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 40021598: c4 01 00 00 ld [ %g4 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4002159c: 10 80 00 0b b 400215c8 400215a0: 98 01 20 04 add %g4, 4, %o4 !_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 ]; 400215a4: da 00 a1 60 ld [ %g2 + 0x160 ], %o5 if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 400215a8: 80 8e 00 01 btst %i0, %g1 400215ac: 12 80 00 4f bne 400216e8 400215b0: 86 10 00 02 mov %g2, %g3 400215b4: c2 03 60 c4 ld [ %o5 + 0xc4 ], %g1 <== NOT EXECUTED 400215b8: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 400215bc: 12 80 00 4c bne 400216ec <== NOT EXECUTED 400215c0: 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 ) { 400215c4: 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 ) ; 400215c8: 80 a0 80 0c cmp %g2, %o4 400215cc: 32 bf ff f6 bne,a 400215a4 400215d0: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 400215d4: 88 01 20 0c add %g4, 0xc, %g4 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 400215d8: 80 a1 00 0b cmp %g4, %o3 400215dc: 12 bf ff ef bne 40021598 400215e0: 03 10 00 97 sethi %hi(0x40025c00), %g1 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 400215e4: c2 08 62 74 ldub [ %g1 + 0x274 ], %g1 ! 40025e74 400215e8: 90 10 20 00 clr %o0 400215ec: 96 00 60 01 add %g1, 1, %o3 * 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 ) 400215f0: 1f 04 00 00 sethi %hi(0x10000000), %o7 * * + rtems internal threads do not receive signals. */ interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 400215f4: 03 10 00 9f sethi %hi(0x40027c00), %g1 400215f8: 98 10 60 78 or %g1, 0x78, %o4 ! 40027c78 <_Objects_Information_table+0x8> for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 400215fc: b4 03 20 0c add %o4, 0xc, %i2 the_api++ ) { /* * Thie can occur when no one is interested and ITRON is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 40021600: c2 03 00 00 ld [ %o4 ], %g1 40021604: 80 a0 60 00 cmp %g1, 0 40021608: 22 80 00 32 be,a 400216d0 4002160c: 98 03 20 04 add %o4, 4, %o4 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 40021610: 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 ) 40021614: 80 a0 60 00 cmp %g1, 0 40021618: 22 80 00 2e be,a 400216d0 4002161c: 98 03 20 04 add %o4, 4, %o4 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; 40021620: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 * structure for a particular manager may not be installed. */ if ( !the_info ) continue; maximum = the_info->maximum; 40021624: d4 10 60 10 lduh [ %g1 + 0x10 ], %o2 object_table = the_info->local_table; 40021628: 10 80 00 26 b 400216c0 4002162c: 9a 10 20 01 mov 1, %o5 for ( index = 1 ; index <= maximum ; index++ ) { the_thread = (Thread_Control *) object_table[ index ]; 40021630: c4 02 40 01 ld [ %o1 + %g1 ], %g2 if ( !the_thread ) 40021634: 80 a0 a0 00 cmp %g2, 0 40021638: 02 80 00 20 be 400216b8 4002163c: 88 10 00 0b mov %o3, %g4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 40021640: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4 40021644: 80 a1 00 0b cmp %g4, %o3 40021648: 38 80 00 1c bgu,a 400216b8 4002164c: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40021650: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 40021654: 80 a0 60 00 cmp %g1, 0 40021658: 22 80 00 18 be,a 400216b8 4002165c: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED 40021660: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 40021664: 80 ae 00 01 andncc %i0, %g1, %g0 40021668: 22 80 00 14 be,a 400216b8 4002166c: 88 10 00 0b mov %o3, %g4 * 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 ) { 40021670: 80 a1 00 0b cmp %g4, %o3 40021674: 2a 80 00 11 bcs,a 400216b8 40021678: 90 10 00 02 mov %g2, %o0 * 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 ) ) 4002167c: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 <== NOT EXECUTED 40021680: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40021684: 22 80 00 0d be,a 400216b8 <== NOT EXECUTED 40021688: 88 10 00 0b mov %o3, %g4 <== 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 ) ) { 4002168c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40021690: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021694: 22 80 00 09 be,a 400216b8 <== NOT EXECUTED 40021698: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED * 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 ) 4002169c: 80 88 c0 0f btst %g3, %o7 <== NOT EXECUTED 400216a0: 32 80 00 06 bne,a 400216b8 <== NOT EXECUTED 400216a4: 88 10 00 0b mov %o3, %g4 <== 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 ) { 400216a8: 80 88 40 0f btst %g1, %o7 <== NOT EXECUTED 400216ac: 32 80 00 03 bne,a 400216b8 <== NOT EXECUTED 400216b0: 90 10 00 02 mov %g2, %o0 <== NOT EXECUTED 400216b4: 88 10 00 0b mov %o3, %g4 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 400216b8: 9a 03 60 01 inc %o5 400216bc: 96 10 00 04 mov %g4, %o3 400216c0: 80 a3 40 0a cmp %o5, %o2 400216c4: 08 bf ff db bleu 40021630 400216c8: 83 2b 60 02 sll %o5, 2, %g1 400216cc: 98 03 20 04 add %o4, 4, %o4 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; 400216d0: 80 a3 00 1a cmp %o4, %i2 400216d4: 32 bf ff cc bne,a 40021604 400216d8: c2 03 00 00 ld [ %o4 ], %g1 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 400216dc: 80 a2 20 00 cmp %o0, 0 400216e0: 02 80 00 0b be 4002170c 400216e4: 86 10 00 08 mov %o0, %g3 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 400216e8: 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 ) ) { 400216ec: 90 10 00 03 mov %g3, %o0 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = true; 400216f0: c2 28 e0 75 stb %g1, [ %g3 + 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 ) ) { 400216f4: 92 10 00 19 mov %i1, %o1 400216f8: 40 00 00 38 call 400217d8 <_POSIX_signals_Unblock_thread> 400216fc: 94 07 bf ec add %fp, -20, %o2 40021700: 80 8a 20 ff btst 0xff, %o0 40021704: 12 80 00 1e bne 4002177c 40021708: 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 ); 4002170c: 40 00 00 22 call 40021794 <_POSIX_signals_Set_process_signals> 40021710: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 40021714: 83 2e 60 02 sll %i1, 2, %g1 40021718: 85 2e 60 04 sll %i1, 4, %g2 4002171c: b2 20 80 01 sub %g2, %g1, %i1 40021720: 03 10 00 a0 sethi %hi(0x40028000), %g1 40021724: 82 10 63 4c or %g1, 0x34c, %g1 ! 4002834c <_POSIX_signals_Vectors> 40021728: c2 00 40 19 ld [ %g1 + %i1 ], %g1 4002172c: 80 a0 60 02 cmp %g1, 2 40021730: 12 80 00 13 bne 4002177c 40021734: 11 10 00 a1 sethi %hi(0x40028400), %o0 psiginfo = (POSIX_signals_Siginfo_node *) 40021738: 7f ff a4 fa call 4000ab20 <_Chain_Get> 4002173c: 90 12 20 cc or %o0, 0xcc, %o0 ! 400284cc <_POSIX_signals_Inactive_siginfo> _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 40021740: b4 92 20 00 orcc %o0, 0, %i2 40021744: 12 80 00 06 bne 4002175c 40021748: 92 07 bf ec add %fp, -20, %o1 rtems_set_errno_and_return_minus_one( EAGAIN ); 4002174c: 7f ff d0 bc call 40015a3c <__errno> <== NOT EXECUTED 40021750: 01 00 00 00 nop <== NOT EXECUTED 40021754: 10 bf ff 5e b 400214cc <== NOT EXECUTED 40021758: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED } psiginfo->Info = *siginfo; 4002175c: 90 06 a0 08 add %i2, 8, %o0 40021760: 7f ff d6 e9 call 40017304 40021764: 94 10 20 0c mov 0xc, %o2 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 40021768: 11 10 00 a1 sethi %hi(0x40028400), %o0 4002176c: 92 10 00 1a mov %i2, %o1 40021770: 90 12 21 1c or %o0, 0x11c, %o0 40021774: 7f ff a4 df call 4000aaf0 <_Chain_Append> 40021778: 90 02 00 19 add %o0, %i1, %o0 } _Thread_Enable_dispatch(); 4002177c: 7f ff aa c1 call 4000c280 <_Thread_Enable_dispatch> 40021780: 01 00 00 00 nop 40021784: 90 10 20 00 clr %o0 ! 0 return 0; } 40021788: b0 10 00 08 mov %o0, %i0 4002178c: 81 c7 e0 08 ret 40021790: 81 e8 00 00 restore 40016120 : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 40016120: 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())) 40016124: 03 10 00 63 sethi %hi(0x40018c00), %g1 40016128: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 40018e44 <_System_state_Current> 4001612c: 80 a0 60 03 cmp %g1, 3 40016130: 12 80 00 16 bne 40016188 40016134: 31 10 00 61 sethi %hi(0x40018400), %i0 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != &libc_global_reent) { 40016138: c4 06 20 68 ld [ %i0 + 0x68 ], %g2 ! 40018468 <_impure_ptr> 4001613c: 03 10 00 5f sethi %hi(0x40017c00), %g1 40016140: a0 10 63 b8 or %g1, 0x3b8, %l0 ! 40017fb8 40016144: 80 a0 80 10 cmp %g2, %l0 40016148: 22 80 00 06 be,a 40016160 4001614c: 21 10 00 61 sethi %hi(0x40018400), %l0 _wrapup_reent(&libc_global_reent); 40016150: 40 00 01 c9 call 40016874 <_wrapup_reent> 40016154: 90 10 00 10 mov %l0, %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; 40016158: e0 26 20 68 st %l0, [ %i0 + 0x68 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 4001615c: 21 10 00 61 sethi %hi(0x40018400), %l0 40016160: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 ! 40018468 <_impure_ptr> 40016164: 7f ff db 45 call 4000ce78 40016168: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 4001616c: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 40016170: 7f ff db 42 call 4000ce78 40016174: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40016178: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 4001617c: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40016180: 7f ff db 3e call 4000ce78 40016184: 81 e8 00 00 restore 40016188: 81 c7 e0 08 ret <== NOT EXECUTED 4001618c: 81 e8 00 00 restore <== NOT EXECUTED 400200b8 : int link( const char *existing, const char *new ) { 400200b8: 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 ); 400200bc: 92 10 20 00 clr %o1 400200c0: 90 10 00 18 mov %i0, %o0 400200c4: 94 07 bf e4 add %fp, -28, %o2 400200c8: 96 10 20 01 mov 1, %o3 400200cc: 7f ff 94 aa call 40005374 400200d0: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 400200d4: 80 a2 20 00 cmp %o0, 0 400200d8: 12 80 00 8e bne 40020310 400200dc: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 400200e0: c2 4e 40 00 ldsb [ %i1 ], %g1 400200e4: 80 a0 60 2f cmp %g1, 0x2f 400200e8: 02 80 00 06 be 40020100 400200ec: 80 a0 60 5c cmp %g1, 0x5c 400200f0: 02 80 00 04 be 40020100 400200f4: 80 a0 60 00 cmp %g1, 0 400200f8: 12 80 00 0a bne 40020120 400200fc: 03 10 01 20 sethi %hi(0x40048000), %g1 40020100: 03 10 01 20 sethi %hi(0x40048000), %g1 40020104: d2 00 61 24 ld [ %g1 + 0x124 ], %o1 ! 40048124 40020108: 90 07 bf d4 add %fp, -44, %o0 4002010c: 92 02 60 14 add %o1, 0x14, %o1 40020110: 40 00 44 f7 call 400314ec 40020114: 94 10 20 10 mov 0x10, %o2 40020118: 10 80 00 08 b 40020138 4002011c: 84 10 20 01 mov 1, %g2 40020120: d2 00 61 24 ld [ %g1 + 0x124 ], %o1 40020124: 90 07 bf d4 add %fp, -44, %o0 40020128: 92 02 60 04 add %o1, 4, %o1 4002012c: 40 00 44 f0 call 400314ec 40020130: 94 10 20 10 mov 0x10, %o2 40020134: 84 10 20 00 clr %g2 if ( !parent_loc.ops->evalformake_h ) { 40020138: c2 07 bf dc ld [ %fp + -36 ], %g1 4002013c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40020140: 80 a0 60 00 cmp %g1, 0 40020144: 12 80 00 0b bne 40020170 40020148: 90 06 40 02 add %i1, %g2, %o0 rtems_filesystem_freenode( &existing_loc ); 4002014c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40020150: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020154: 02 80 00 51 be 40020298 <== NOT EXECUTED 40020158: 01 00 00 00 nop <== NOT EXECUTED 4002015c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020160: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020164: 12 80 00 4b bne 40020290 <== NOT EXECUTED 40020168: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED 4002016c: 30 80 00 4b b,a 40020298 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 40020170: b0 07 bf d4 add %fp, -44, %i0 40020174: 94 07 bf f4 add %fp, -12, %o2 40020178: 9f c0 40 00 call %g1 4002017c: 92 10 00 18 mov %i0, %o1 if ( result != 0 ) { 40020180: b2 92 20 00 orcc %o0, 0, %i1 40020184: 02 80 00 11 be 400201c8 40020188: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &existing_loc ); 4002018c: c2 07 bf ec ld [ %fp + -20 ], %g1 40020190: 80 a0 60 00 cmp %g1, 0 40020194: 02 80 00 08 be 400201b4 40020198: 01 00 00 00 nop 4002019c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400201a0: 80 a0 60 00 cmp %g1, 0 400201a4: 02 80 00 04 be 400201b4 400201a8: 01 00 00 00 nop 400201ac: 9f c0 40 00 call %g1 400201b0: 90 07 bf e4 add %fp, -28, %o0 rtems_set_errno_and_return_minus_one( result ); 400201b4: 40 00 3a e1 call 4002ed38 <__errno> 400201b8: b0 10 3f ff mov -1, %i0 400201bc: f2 22 00 00 st %i1, [ %o0 ] 400201c0: 81 c7 e0 08 ret 400201c4: 81 e8 00 00 restore /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 400201c8: c2 07 bf e0 ld [ %fp + -32 ], %g1 400201cc: 80 a0 40 02 cmp %g1, %g2 400201d0: 02 80 00 1a be 40020238 400201d4: c2 07 bf dc ld [ %fp + -36 ], %g1 rtems_filesystem_freenode( &existing_loc ); 400201d8: c2 07 bf ec ld [ %fp + -20 ], %g1 400201dc: 80 a0 60 00 cmp %g1, 0 400201e0: 22 80 00 09 be,a 40020204 400201e4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400201e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400201ec: 80 a0 60 00 cmp %g1, 0 400201f0: 22 80 00 05 be,a 40020204 400201f4: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400201f8: 9f c0 40 00 call %g1 400201fc: 90 07 bf e4 add %fp, -28, %o0 rtems_filesystem_freenode( &parent_loc ); 40020200: c2 07 bf dc ld [ %fp + -36 ], %g1 40020204: 80 a0 60 00 cmp %g1, 0 40020208: 02 80 00 08 be 40020228 4002020c: 01 00 00 00 nop 40020210: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40020214: 80 a0 60 00 cmp %g1, 0 40020218: 02 80 00 04 be 40020228 4002021c: 01 00 00 00 nop 40020220: 9f c0 40 00 call %g1 40020224: 90 07 bf d4 add %fp, -44, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 40020228: 40 00 3a c4 call 4002ed38 <__errno> 4002022c: b0 10 3f ff mov -1, %i0 40020230: 10 80 00 1d b 400202a4 40020234: 82 10 20 12 mov 0x12, %g1 } if ( !parent_loc.ops->link_h ) { 40020238: c2 00 60 08 ld [ %g1 + 8 ], %g1 4002023c: 80 a0 60 00 cmp %g1, 0 40020240: 12 80 00 1c bne 400202b0 40020244: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &existing_loc ); 40020248: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 4002024c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020250: 22 80 00 09 be,a 40020274 <== NOT EXECUTED 40020254: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40020258: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4002025c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020260: 22 80 00 05 be,a 40020274 <== NOT EXECUTED 40020264: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40020268: 9f c0 40 00 call %g1 <== NOT EXECUTED 4002026c: 90 07 bf e4 add %fp, -28, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 40020270: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40020274: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020278: 02 80 00 08 be 40020298 <== NOT EXECUTED 4002027c: 01 00 00 00 nop <== NOT EXECUTED 40020280: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020284: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020288: 02 80 00 04 be 40020298 <== NOT EXECUTED 4002028c: 90 07 bf d4 add %fp, -44, %o0 <== NOT EXECUTED 40020290: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020294: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020298: 40 00 3a a8 call 4002ed38 <__errno> <== NOT EXECUTED 4002029c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400202a0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400202a4: c2 22 00 00 st %g1, [ %o0 ] 400202a8: 81 c7 e0 08 ret 400202ac: 81 e8 00 00 restore } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 400202b0: 92 10 00 18 mov %i0, %o1 400202b4: b2 07 bf e4 add %fp, -28, %i1 400202b8: 9f c0 40 00 call %g1 400202bc: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &existing_loc ); 400202c0: c2 07 bf ec ld [ %fp + -20 ], %g1 400202c4: 80 a0 60 00 cmp %g1, 0 400202c8: 02 80 00 08 be 400202e8 400202cc: b0 10 00 08 mov %o0, %i0 400202d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400202d4: 80 a0 60 00 cmp %g1, 0 400202d8: 22 80 00 05 be,a 400202ec 400202dc: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 400202e0: 9f c0 40 00 call %g1 400202e4: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &parent_loc ); 400202e8: c2 07 bf dc ld [ %fp + -36 ], %g1 400202ec: 80 a0 60 00 cmp %g1, 0 400202f0: 02 80 00 08 be 40020310 400202f4: 01 00 00 00 nop 400202f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400202fc: 80 a0 60 00 cmp %g1, 0 40020300: 02 80 00 04 be 40020310 40020304: 01 00 00 00 nop 40020308: 9f c0 40 00 call %g1 4002030c: 90 07 bf d4 add %fp, -44, %o0 return result; } 40020310: 81 c7 e0 08 ret 40020314: 81 e8 00 00 restore 40015ffc : off_t lseek( int fd, off_t offset, int whence ) { 40015ffc: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 40016000: 03 10 00 5f sethi %hi(0x40017c00), %g1 40016004: c2 00 62 a8 ld [ %g1 + 0x2a8 ], %g1 ! 40017ea8 off_t lseek( int fd, off_t offset, int whence ) { 40016008: 92 10 00 19 mov %i1, %o1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 4001600c: 80 a6 00 01 cmp %i0, %g1 40016010: 1a 80 00 0e bcc 40016048 40016014: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 40016018: 03 10 00 62 sethi %hi(0x40018800), %g1 4001601c: c6 00 62 c8 ld [ %g1 + 0x2c8 ], %g3 ! 40018ac8 40016020: 85 2e 20 02 sll %i0, 2, %g2 40016024: 83 2e 20 04 sll %i0, 4, %g1 40016028: 82 20 40 02 sub %g1, %g2, %g1 4001602c: 82 00 40 18 add %g1, %i0, %g1 40016030: 83 28 60 02 sll %g1, 2, %g1 40016034: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open(iop); 40016038: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4001603c: 80 88 61 00 btst 0x100, %g1 40016040: 32 80 00 06 bne,a 40016058 40016044: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40016048: 7f ff db 34 call 4000cd18 <__errno> <== NOT EXECUTED 4001604c: 01 00 00 00 nop <== NOT EXECUTED 40016050: 10 80 00 1c b 400160c0 <== NOT EXECUTED 40016054: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 40016058: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 4001605c: 80 a0 60 00 cmp %g1, 0 40016060: 12 80 00 06 bne 40016078 40016064: 80 a6 a0 01 cmp %i2, 1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40016068: 7f ff db 2c call 4000cd18 <__errno> <== NOT EXECUTED 4001606c: 01 00 00 00 nop <== NOT EXECUTED 40016070: 10 80 00 14 b 400160c0 <== NOT EXECUTED 40016074: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40016078: 02 80 00 09 be 4001609c 4001607c: f4 06 20 08 ld [ %i0 + 8 ], %i2 40016080: 80 a2 a0 02 cmp %o2, 2 40016084: 02 80 00 08 be 400160a4 40016088: 80 a2 a0 00 cmp %o2, 0 4001608c: 12 80 00 0a bne 400160b4 40016090: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 40016094: 10 80 00 0e b 400160cc 40016098: f2 26 20 08 st %i1, [ %i0 + 8 ] break; case SEEK_CUR: iop->offset += offset; 4001609c: 10 80 00 04 b 400160ac 400160a0: 82 06 40 1a add %i1, %i2, %g1 break; case SEEK_END: iop->offset = iop->size + offset; 400160a4: c2 06 20 04 ld [ %i0 + 4 ], %g1 400160a8: 82 06 40 01 add %i1, %g1, %g1 400160ac: 10 80 00 08 b 400160cc 400160b0: c2 26 20 08 st %g1, [ %i0 + 8 ] break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 400160b4: 7f ff db 19 call 4000cd18 <__errno> 400160b8: 01 00 00 00 nop 400160bc: 82 10 20 16 mov 0x16, %g1 ! 16 400160c0: c2 22 00 00 st %g1, [ %o0 ] 400160c4: 10 80 00 09 b 400160e8 400160c8: 90 10 3f ff mov -1, %o0 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 400160cc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400160d0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 400160d4: 9f c0 40 00 call %g1 400160d8: 90 10 00 18 mov %i0, %o0 if ( status == (off_t) -1 ) 400160dc: 80 a2 3f ff cmp %o0, -1 400160e0: 22 80 00 02 be,a 400160e8 400160e4: f4 26 20 08 st %i2, [ %i0 + 8 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 400160e8: 81 c7 e0 08 ret 400160ec: 91 e8 00 08 restore %g0, %o0, %o0 40020440 : int _STAT_NAME( const char *path, struct stat *buf ) { 40020440: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40020444: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40020448: 12 80 00 06 bne 40020460 <== NOT EXECUTED 4002044c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 40020450: 40 00 3a 3a call 4002ed38 <__errno> <== NOT EXECUTED 40020454: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020458: 10 80 00 1c b 400204c8 <== NOT EXECUTED 4002045c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 40020460: a0 07 bf e8 add %fp, -24, %l0 <== NOT EXECUTED 40020464: 92 10 20 00 clr %o1 <== NOT EXECUTED 40020468: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 4002046c: 96 10 20 00 clr %o3 <== NOT EXECUTED 40020470: 7f ff 93 c1 call 40005374 <== NOT EXECUTED 40020474: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( status != 0 ) 40020478: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4002047c: 12 80 00 14 bne 400204cc <== NOT EXECUTED 40020480: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 40020484: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40020488: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002048c: 12 80 00 12 bne 400204d4 <== NOT EXECUTED 40020490: 92 10 20 00 clr %o1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40020494: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40020498: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002049c: 02 80 00 08 be 400204bc <== NOT EXECUTED 400204a0: 01 00 00 00 nop <== NOT EXECUTED 400204a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400204a8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400204ac: 02 80 00 04 be 400204bc <== NOT EXECUTED 400204b0: 01 00 00 00 nop <== NOT EXECUTED 400204b4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400204b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400204bc: 40 00 3a 1f call 4002ed38 <__errno> <== NOT EXECUTED 400204c0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400204c4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400204c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400204cc: 81 c7 e0 08 ret <== NOT EXECUTED 400204d0: 81 e8 00 00 restore <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 400204d4: 94 10 20 50 mov 0x50, %o2 <== NOT EXECUTED 400204d8: 40 00 44 8d call 4003170c <== NOT EXECUTED 400204dc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 400204e0: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400204e4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400204e8: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 400204ec: 9f c0 40 00 call %g1 <== NOT EXECUTED 400204f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 400204f4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400204f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400204fc: 02 bf ff f4 be 400204cc <== NOT EXECUTED 40020500: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40020504: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020508: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002050c: 02 80 00 04 be 4002051c <== NOT EXECUTED 40020510: 01 00 00 00 nop <== NOT EXECUTED 40020514: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020518: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return status; } 4002051c: 81 c7 e0 08 ret <== NOT EXECUTED 40020520: 81 e8 00 00 restore <== NOT EXECUTED 4000a4d8 : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 4000a4d8: 9d e3 bf 98 save %sp, -104, %sp 4000a4dc: 05 10 00 62 sethi %hi(0x40018800), %g2 4000a4e0: 84 10 a3 30 or %g2, 0x330, %g2 ! 40018b30 4000a4e4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 4000a4e8: a0 10 00 18 mov %i0, %l0 4000a4ec: 82 00 60 01 inc %g1 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 4000a4f0: 7f ff ff ed call 4000a4a4 4000a4f4: c2 20 a0 04 st %g1, [ %g2 + 4 ] /* * Validate the parameters */ if ( !size ) 4000a4f8: 80 a6 20 00 cmp %i0, 0 4000a4fc: 02 80 00 33 be 4000a5c8 4000a500: 03 10 00 63 sethi %hi(0x40018c00), %g1 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 4000a504: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 40018e44 <_System_state_Current> 4000a508: 80 a0 60 03 cmp %g1, 3 4000a50c: 12 80 00 07 bne 4000a528 4000a510: 11 10 00 62 sethi %hi(0x40018800), %o0 4000a514: 7f ff ff ca call 4000a43c 4000a518: 01 00 00 00 nop 4000a51c: 80 8a 20 ff btst 0xff, %o0 4000a520: 02 80 00 2a be 4000a5c8 4000a524: 11 10 00 62 sethi %hi(0x40018800), %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 ); 4000a528: 92 10 00 10 mov %l0, %o1 4000a52c: 40 00 05 0a call 4000b954 <_Protected_heap_Allocate> 4000a530: 90 12 22 d8 or %o0, 0x2d8, %o0 if ( !return_this ) { 4000a534: b0 92 20 00 orcc %o0, 0, %i0 4000a538: 12 80 00 14 bne 4000a588 4000a53c: 03 10 00 62 sethi %hi(0x40018800), %g1 if (rtems_malloc_sbrk_helpers) 4000a540: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 4000a544: c2 00 61 18 ld [ %g1 + 0x118 ], %g1 ! 40018918 <== NOT EXECUTED 4000a548: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a54c: 02 80 00 08 be 4000a56c <== NOT EXECUTED 4000a550: 01 00 00 00 nop <== NOT EXECUTED return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 4000a554: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000a558: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a55c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ( !return_this ) { 4000a560: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000a564: 32 80 00 08 bne,a 4000a584 <== NOT EXECUTED 4000a568: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED errno = ENOMEM; 4000a56c: 40 00 09 eb call 4000cd18 <__errno> <== NOT EXECUTED 4000a570: 01 00 00 00 nop <== NOT EXECUTED 4000a574: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000a578: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000a57c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a580: 81 e8 00 00 restore <== NOT EXECUTED } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 4000a584: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 4000a588: c2 00 61 1c ld [ %g1 + 0x11c ], %g1 ! 4001891c 4000a58c: 80 a0 60 00 cmp %g1, 0 4000a590: 02 80 00 04 be 4000a5a0 4000a594: 92 10 00 10 mov %l0, %o1 (*rtems_malloc_dirty_helper)( return_this, size ); 4000a598: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a59c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 4000a5a0: 03 10 00 62 sethi %hi(0x40018800), %g1 4000a5a4: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 ! 40018914 4000a5a8: 80 a0 60 00 cmp %g1, 0 4000a5ac: 02 80 00 08 be 4000a5cc 4000a5b0: 01 00 00 00 nop (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 4000a5b4: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 4000a5b8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a5bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000a5c0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a5c4: 81 e8 00 00 restore <== NOT EXECUTED 4000a5c8: b0 10 20 00 clr %i0 if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 4000a5cc: 81 c7 e0 08 ret 4000a5d0: 81 e8 00 00 restore 4000a488 : } void malloc_deferred_free( void *pointer ) { 4000a488: 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 ); 4000a48c: 11 10 00 64 sethi %hi(0x40019000), %o0 <== NOT EXECUTED 4000a490: 90 12 22 58 or %o0, 0x258, %o0 ! 40019258 <== NOT EXECUTED 4000a494: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000a498: 7f ff ee 94 call 40005ee8 <_Chain_Append> <== NOT EXECUTED 4000a49c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000a4a0: 01 00 00 00 nop 4000a4a4 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 4000a4a4: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4000a4a8: 03 10 00 64 sethi %hi(0x40019000), %g1 4000a4ac: 10 80 00 04 b 4000a4bc 4000a4b0: a0 10 62 58 or %g1, 0x258, %l0 ! 40019258 /* * 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); 4000a4b4: 7f ff fe a1 call 40009f38 <== NOT EXECUTED 4000a4b8: 01 00 00 00 nop <== NOT EXECUTED 4000a4bc: 40 00 03 e9 call 4000b460 <_Chain_Get> 4000a4c0: 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) 4000a4c4: 80 a2 20 00 cmp %o0, 0 4000a4c8: 12 bf ff fb bne 4000a4b4 4000a4cc: 01 00 00 00 nop free(to_be_freed); } 4000a4d0: 81 c7 e0 08 ret 4000a4d4: 81 e8 00 00 restore 400260b0 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 400260b0: 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) ) { 400260b4: 7f ff 7d 9e call 4000572c 400260b8: 90 10 00 18 mov %i0, %o0 400260bc: 80 a2 20 00 cmp %o0, 0 400260c0: 12 80 00 13 bne 4002610c 400260c4: 01 00 00 00 nop 400260c8: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 400260cc: 80 a0 60 00 cmp %g1, 0 400260d0: 12 80 00 0f bne 4002610c 400260d4: 03 10 01 20 sethi %hi(0x40048000), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 400260d8: c4 00 61 24 ld [ %g1 + 0x124 ], %g2 ! 40048124 400260dc: c2 00 a0 04 ld [ %g2 + 4 ], %g1 400260e0: 80 a0 40 18 cmp %g1, %i0 400260e4: 22 80 00 02 be,a 400260ec 400260e8: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED rtems_filesystem_current.node_access = NULL; /* * Free memory associated with a memory file. */ if (the_jnode->type != IMFS_LINEAR_FILE) 400260ec: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 400260f0: 80 a0 60 06 cmp %g1, 6 400260f4: 02 80 00 04 be 40026104 400260f8: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 400260fc: 7f ff ff 8c call 40025f2c 40026100: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 40026104: 7f ff 7c ee call 400054bc 40026108: 90 10 00 18 mov %i0, %o0 } return 0; } 4002610c: 81 c7 e0 08 ret 40026110: 91 e8 20 00 restore %g0, 0, %o0 40025eb8 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 40025eb8: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( block_table ); 40025ebc: 80 a6 20 00 cmp %i0, 0 40025ec0: 32 80 00 0a bne,a 40025ee8 40025ec4: e0 06 00 00 ld [ %i0 ], %l0 40025ec8: 11 10 01 13 sethi %hi(0x40044c00), %o0 <== NOT EXECUTED 40025ecc: 15 10 01 13 sethi %hi(0x40044c00), %o2 <== NOT EXECUTED 40025ed0: 17 10 01 13 sethi %hi(0x40044c00), %o3 <== NOT EXECUTED 40025ed4: 90 12 20 58 or %o0, 0x58, %o0 <== NOT EXECUTED 40025ed8: 94 12 a1 f8 or %o2, 0x1f8, %o2 <== NOT EXECUTED 40025edc: 96 12 e0 e0 or %o3, 0xe0, %o3 <== NOT EXECUTED 40025ee0: 7f ff 7c 58 call 40005040 <__assert_func> <== NOT EXECUTED 40025ee4: 92 10 21 b1 mov 0x1b1, %o1 <== NOT EXECUTED 40025ee8: 10 80 00 09 b 40025f0c 40025eec: a2 10 20 00 clr %l1 */ b = *block_table; for ( i=0 ; i 40025ef8: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 40025efc: 7f ff ff 23 call 40025b88 40025f00: 01 00 00 00 nop b[i] = 0; 40025f04: 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 40025f14: d0 04 00 00 ld [ %l0 ], %o0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 40025f18: 7f ff ff 1c call 40025b88 40025f1c: d0 06 00 00 ld [ %i0 ], %o0 *block_table = 0; 40025f20: c0 26 00 00 clr [ %i0 ] } 40025f24: 81 c7 e0 08 ret 40025f28: 81 e8 00 00 restore 4002637c : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 4002637c: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 40026380: 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 ) 40026384: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40026388: 80 a6 40 01 cmp %i1, %g1 4002638c: 04 80 00 06 ble 400263a4 40026390: 92 10 00 19 mov %i1, %o1 return IMFS_memfile_extend( the_jnode, length ); 40026394: 7f ff ff a9 call 40026238 <== NOT EXECUTED 40026398: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 4002639c: 81 c7 e0 08 ret <== NOT EXECUTED 400263a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * 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; 400263a4: f2 24 20 4c st %i1, [ %l0 + 0x4c ] iop->size = the_jnode->info.file.size; 400263a8: f2 26 20 04 st %i1, [ %i0 + 4 ] IMFS_update_atime( the_jnode ); 400263ac: 90 07 bf f0 add %fp, -16, %o0 400263b0: 7f ff 7c 6d call 40005564 400263b4: 92 10 20 00 clr %o1 400263b8: c2 07 bf f0 ld [ %fp + -16 ], %g1 400263bc: 90 10 20 00 clr %o0 400263c0: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 400263c4: b0 10 00 08 mov %o0, %i0 400263c8: 81 c7 e0 08 ret 400263cc: 81 e8 00 00 restore 400263d0 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 400263d0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 400263d4: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 400263d8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400263dc: 80 a0 60 06 cmp %g1, 6 400263e0: 12 80 00 09 bne 40026404 400263e4: d2 06 20 08 ld [ %i0 + 8 ], %o1 if (iop->offset > the_jnode->info.linearfile.size) 400263e8: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 400263ec: 80 a2 40 08 cmp %o1, %o0 <== NOT EXECUTED 400263f0: 34 80 00 11 bg,a 40026434 <== NOT EXECUTED 400263f4: d0 26 20 08 st %o0, [ %i0 + 8 ] <== NOT EXECUTED 400263f8: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 400263fc: 81 c7 e0 08 ret <== NOT EXECUTED 40026400: 81 e8 00 00 restore <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 40026404: 7f ff ff 8d call 40026238 40026408: 90 10 00 10 mov %l0, %o0 4002640c: 80 a2 20 00 cmp %o0, 0 40026410: 22 80 00 08 be,a 40026430 40026414: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 rtems_set_errno_and_return_minus_one( ENOSPC ); 40026418: 40 00 22 48 call 4002ed38 <__errno> <== NOT EXECUTED 4002641c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40026420: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40026424: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40026428: 81 c7 e0 08 ret <== NOT EXECUTED 4002642c: 81 e8 00 00 restore <== NOT EXECUTED iop->size = the_jnode->info.file.size; 40026430: c2 26 20 04 st %g1, [ %i0 + 4 ] } return iop->offset; 40026434: f0 06 20 08 ld [ %i0 + 8 ], %i0 } 40026438: 81 c7 e0 08 ret 4002643c: 81 e8 00 00 restore 400266d8 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400266d8: 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)) 400266dc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400266e0: 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)) 400266e4: 80 88 62 04 btst 0x204, %g1 400266e8: 02 80 00 17 be 40026744 400266ec: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 400266f0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 400266f4: 80 a0 60 06 cmp %g1, 6 400266f8: 32 80 00 14 bne,a 40026748 400266fc: c2 04 60 0c ld [ %l1 + 0xc ], %g1 && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; 40026700: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED const unsigned char *buffer = the_jnode->info.linearfile.direct; 40026704: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 40026708: 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; 4002670c: 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; 40026710: 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; 40026714: 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; 40026718: 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) 4002671c: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 40026720: 02 80 00 09 be 40026744 <== NOT EXECUTED 40026724: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 40026728: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002672c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40026730: 7f ff ff 44 call 40026440 <== NOT EXECUTED 40026734: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40026738: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4002673c: 02 80 00 0a be 40026764 <== NOT EXECUTED 40026740: 01 00 00 00 nop <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 40026744: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40026748: 80 88 62 00 btst 0x200, %g1 4002674c: 02 80 00 04 be 4002675c 40026750: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 iop->offset = the_jnode->info.file.size; 40026754: c2 24 60 08 st %g1, [ %l1 + 8 ] iop->size = the_jnode->info.file.size; 40026758: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4002675c: b0 10 20 00 clr %i0 40026760: c2 24 60 04 st %g1, [ %l1 + 4 ] return 0; } 40026764: 81 c7 e0 08 ret 40026768: 81 e8 00 00 restore 400269f0 : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 400269f0: 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 ); 400269f4: d2 02 20 08 ld [ %o0 + 8 ], %o1 400269f8: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 400269fc: 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 ); 40026a00: 94 10 00 01 mov %g1, %o2 40026a04: 82 13 c0 00 mov %o7, %g1 40026a08: 7f ff ff 59 call 4002676c 40026a0c: 9e 10 40 00 mov %g1, %o7 40026a10: 01 00 00 00 nop <== NOT EXECUTED 40026114 : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40026114: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40026118: 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 ) { 4002611c: c2 06 20 08 ld [ %i0 + 8 ], %g1 40026120: 80 a0 60 00 cmp %g1, 0 40026124: 22 80 00 06 be,a 4002613c 40026128: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED 4002612c: 7f ff f2 41 call 40022a30 <_Chain_Extract> 40026130: 90 10 00 18 mov %i0, %o0 rtems_chain_extract( (rtems_chain_node *) the_jnode ); the_jnode->Parent = NULL; 40026134: c0 26 20 08 clr [ %i0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40026138: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4002613c: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40026140: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40026144: 90 07 bf f0 add %fp, -16, %o0 40026148: 7f ff 7d 07 call 40005564 4002614c: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] 40026150: c2 07 bf f0 ld [ %fp + -16 ], %g1 return memfile_check_rmnod( the_jnode ); 40026154: 90 10 00 18 mov %i0, %o0 40026158: 7f ff ff d6 call 400260b0 4002615c: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } 40026160: 81 c7 e0 08 ret 40026164: 91 e8 00 08 restore %g0, %o0, %o0 40009038 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 40009038: 13 10 00 5c sethi %hi(0x40017000), %o1 4000903c: 15 10 00 62 sethi %hi(0x40018800), %o2 40009040: 92 12 62 18 or %o1, 0x218, %o1 40009044: 94 12 a2 64 or %o2, 0x264, %o2 40009048: 96 10 00 0a mov %o2, %o3 4000904c: 82 13 c0 00 mov %o7, %g1 40009050: 40 00 02 6a call 400099f8 40009054: 9e 10 40 00 mov %g1, %o7 40009058: 01 00 00 00 nop <== NOT EXECUTED 4000220c : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 4000220c: 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) ) ) 40002210: 03 00 00 3c sethi %hi(0xf000), %g1 40002214: b3 2e 60 10 sll %i1, 0x10, %i1 40002218: b3 36 60 10 srl %i1, 0x10, %i1 4000221c: 84 8e 40 01 andcc %i1, %g1, %g2 40002220: 32 80 00 06 bne,a 40002238 40002224: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); 40002228: 40 00 2a bc call 4000cd18 <__errno> <== NOT EXECUTED 4000222c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002230: 10 80 00 36 b 40002308 <== NOT EXECUTED 40002234: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED if ( S_ISFIFO(mode) ) 40002238: 80 a0 80 01 cmp %g2, %g1 4000223c: 02 80 00 30 be 400022fc 40002240: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40002244: c2 4e 00 00 ldsb [ %i0 ], %g1 40002248: 80 a0 60 2f cmp %g1, 0x2f 4000224c: 02 80 00 06 be 40002264 40002250: 80 a0 60 5c cmp %g1, 0x5c 40002254: 02 80 00 04 be 40002264 40002258: 80 a0 60 00 cmp %g1, 0 4000225c: 12 80 00 0a bne 40002284 40002260: 03 10 00 60 sethi %hi(0x40018000), %g1 40002264: 03 10 00 60 sethi %hi(0x40018000), %g1 40002268: d2 00 63 cc ld [ %g1 + 0x3cc ], %o1 ! 400183cc 4000226c: 90 07 bf e4 add %fp, -28, %o0 40002270: 92 02 60 14 add %o1, 0x14, %o1 40002274: 40 00 2c 9b call 4000d4e0 40002278: 94 10 20 10 mov 0x10, %o2 4000227c: 10 80 00 08 b 4000229c 40002280: 84 10 20 01 mov 1, %g2 40002284: d2 00 63 cc ld [ %g1 + 0x3cc ], %o1 40002288: 90 07 bf e4 add %fp, -28, %o0 4000228c: 92 02 60 04 add %o1, 4, %o1 40002290: 40 00 2c 94 call 4000d4e0 40002294: 94 10 20 10 mov 0x10, %o2 40002298: 84 10 20 00 clr %g2 if ( !temp_loc.ops->evalformake_h ) { 4000229c: c2 07 bf ec ld [ %fp + -20 ], %g1 400022a0: c2 00 60 04 ld [ %g1 + 4 ], %g1 400022a4: 80 a0 60 00 cmp %g1, 0 400022a8: 02 80 00 15 be 400022fc 400022ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 400022b0: 90 06 00 02 add %i0, %g2, %o0 400022b4: a0 07 bf e4 add %fp, -28, %l0 400022b8: 94 07 bf f4 add %fp, -12, %o2 400022bc: 92 10 00 10 mov %l0, %o1 400022c0: 9f c0 40 00 call %g1 400022c4: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 400022c8: 80 a2 20 00 cmp %o0, 0 400022cc: 12 80 00 10 bne 4000230c 400022d0: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 400022d4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 400022d8: 80 a0 a0 00 cmp %g2, 0 400022dc: 12 80 00 0e bne 40002314 400022e0: d0 07 bf f4 ld [ %fp + -12 ], %o0 rtems_filesystem_freenode( &temp_loc ); 400022e4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400022e8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400022ec: 02 80 00 04 be 400022fc <== NOT EXECUTED 400022f0: 01 00 00 00 nop <== NOT EXECUTED 400022f4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400022f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400022fc: 40 00 2a 87 call 4000cd18 <__errno> 40002300: b0 10 3f ff mov -1, %i0 40002304: 82 10 20 86 mov 0x86, %g1 40002308: c2 22 00 00 st %g1, [ %o0 ] 4000230c: 81 c7 e0 08 ret 40002310: 81 e8 00 00 restore } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 40002314: 92 10 00 19 mov %i1, %o1 40002318: 94 10 00 1a mov %i2, %o2 4000231c: 96 10 00 1b mov %i3, %o3 40002320: 9f c0 80 00 call %g2 40002324: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 40002328: c2 07 bf ec ld [ %fp + -20 ], %g1 4000232c: 80 a0 60 00 cmp %g1, 0 40002330: 02 bf ff f7 be 4000230c 40002334: b0 10 00 08 mov %o0, %i0 40002338: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000233c: 80 a0 60 00 cmp %g1, 0 40002340: 02 80 00 04 be 40002350 40002344: 01 00 00 00 nop 40002348: 9f c0 40 00 call %g1 4000234c: 90 10 00 10 mov %l0, %o0 return result; } 40002350: 81 c7 e0 08 ret 40002354: 81 e8 00 00 restore 4000a61c : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 4000a61c: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 4000a620: 80 a6 60 00 cmp %i1, 0 4000a624: 02 80 00 05 be 4000a638 4000a628: a4 10 00 18 mov %i0, %l2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4000a62c: 80 a6 a0 01 cmp %i2, 1 4000a630: 28 80 00 06 bleu,a 4000a648 4000a634: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 4000a638: 40 00 09 b8 call 4000cd18 <__errno> 4000a63c: 01 00 00 00 nop 4000a640: 10 80 00 15 b 4000a694 4000a644: 82 10 20 16 mov 0x16, %g1 ! 16 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 4000a648: 80 a0 60 00 cmp %g1, 0 4000a64c: 12 80 00 05 bne 4000a660 4000a650: 80 a6 e0 00 cmp %i3, 0 errno = ENOTSUP; 4000a654: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000a658: 10 80 00 47 b 4000a774 <== NOT EXECUTED 4000a65c: b8 10 20 00 clr %i4 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 4000a660: 02 80 00 05 be 4000a674 4000a664: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 4000a668: 40 00 0e ce call 4000e1a0 <== NOT EXECUTED 4000a66c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000a670: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4000a674: 7f ff ff 99 call 4000a4d8 4000a678: 01 00 00 00 nop if ( !temp_mt_entry ) { 4000a67c: a0 92 20 00 orcc %o0, 0, %l0 4000a680: 12 80 00 07 bne 4000a69c 4000a684: a2 10 00 10 mov %l0, %l1 errno = ENOMEM; 4000a688: 40 00 09 a4 call 4000cd18 <__errno> <== NOT EXECUTED 4000a68c: 01 00 00 00 nop <== NOT EXECUTED 4000a690: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000a694: 10 80 00 74 b 4000a864 4000a698: c2 22 00 00 st %g1, [ %o0 ] return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 4000a69c: f4 24 20 28 st %i2, [ %l0 + 0x28 ] if ( device ) { 4000a6a0: 80 a6 e0 00 cmp %i3, 0 4000a6a4: 02 80 00 08 be 4000a6c4 4000a6a8: e0 24 20 24 st %l0, [ %l0 + 0x24 ] temp_mt_entry->dev = 4000a6ac: 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 ); 4000a6b0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000a6b4: 40 00 0e 99 call 4000e118 <== NOT EXECUTED 4000a6b8: 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 ) { 4000a6bc: 10 80 00 04 b 4000a6cc <== NOT EXECUTED 4000a6c0: 80 a7 20 00 cmp %i4, 0 <== 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; 4000a6c4: c0 24 20 60 clr [ %l0 + 0x60 ] /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 4000a6c8: 80 a7 20 00 cmp %i4, 0 4000a6cc: 02 80 00 37 be 4000a7a8 4000a6d0: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 4000a6d4: 92 10 20 07 mov 7, %o1 4000a6d8: b8 07 bf e8 add %fp, -24, %i4 4000a6dc: 96 10 20 01 mov 1, %o3 4000a6e0: 7f ff de 1b call 40001f4c 4000a6e4: 94 10 00 1c mov %i4, %o2 4000a6e8: 80 a2 3f ff cmp %o0, -1 4000a6ec: 02 80 00 4e be 4000a824 4000a6f0: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 4000a6f4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000a6f8: 80 a0 60 00 cmp %g1, 0 4000a6fc: 02 80 00 1e be 4000a774 4000a700: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4000a704: 9f c0 40 00 call %g1 4000a708: 90 10 00 1c mov %i4, %o0 4000a70c: 80 a2 20 01 cmp %o0, 1 4000a710: 02 80 00 07 be 4000a72c 4000a714: 03 10 00 64 sethi %hi(0x40019000), %g1 errno = ENOTDIR; 4000a718: 40 00 09 80 call 4000cd18 <__errno> 4000a71c: 01 00 00 00 nop 4000a720: 82 10 20 14 mov 0x14, %g1 ! 14 4000a724: 10 80 00 41 b 4000a828 4000a728: c2 22 00 00 st %g1, [ %o0 ] 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 ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access ) 4000a72c: c8 07 bf e8 ld [ %fp + -24 ], %g4 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000a730: c4 00 62 64 ld [ %g1 + 0x264 ], %g2 4000a734: 82 10 62 64 or %g1, 0x264, %g1 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000a738: 10 80 00 06 b 4000a750 4000a73c: 86 00 60 04 add %g1, 4, %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 ) 4000a740: 80 a0 40 04 cmp %g1, %g4 4000a744: 02 80 00 08 be 4000a764 4000a748: 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 ) { 4000a74c: 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 ); 4000a750: 80 a0 80 03 cmp %g2, %g3 4000a754: 32 bf ff fb bne,a 4000a740 4000a758: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 * 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; 4000a75c: 10 80 00 45 b 4000a870 4000a760: c4 07 bf ec ld [ %fp + -20 ], %g2 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 4000a764: 40 00 09 6d call 4000cd18 <__errno> 4000a768: b8 07 bf e8 add %fp, -24, %i4 4000a76c: 10 bf ff ee b 4000a724 4000a770: 82 10 20 10 mov 0x10, %g1 * 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; 4000a774: 40 00 09 69 call 4000cd18 <__errno> <== NOT EXECUTED 4000a778: 01 00 00 00 nop <== NOT EXECUTED 4000a77c: 10 bf ff ea b 4000a724 <== NOT EXECUTED 4000a780: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 4000a784: 9f c0 c0 00 call %g3 4000a788: 90 10 00 10 mov %l0, %o0 4000a78c: 80 a2 20 00 cmp %o0, 0 4000a790: 02 80 00 04 be 4000a7a0 4000a794: 90 07 bf e8 add %fp, -24, %o0 4000a798: 10 80 00 24 b 4000a828 <== NOT EXECUTED 4000a79c: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED 4000a7a0: 10 80 00 0a b 4000a7c8 4000a7a4: b8 10 00 08 mov %o0, %i4 * 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; 4000a7a8: c0 24 20 18 clr [ %l0 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 4000a7ac: c0 24 20 1c clr [ %l0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 4000a7b0: c0 24 20 20 clr [ %l0 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 4000a7b4: c0 24 20 08 clr [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 4000a7b8: c0 24 20 0c clr [ %l0 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 4000a7bc: c0 24 20 10 clr [ %l0 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 4000a7c0: c0 24 20 14 clr [ %l0 + 0x14 ] 4000a7c4: b8 10 20 00 clr %i4 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4000a7c8: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000a7cc: 9f c0 40 00 call %g1 4000a7d0: 90 10 00 10 mov %l0, %o0 4000a7d4: 80 a2 20 00 cmp %o0, 0 4000a7d8: 02 80 00 09 be 4000a7fc 4000a7dc: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4000a7e0: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4000a7e4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000a7e8: 02 80 00 10 be 4000a828 <== NOT EXECUTED 4000a7ec: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000a7f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000a7f4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000a7f8: 30 80 00 0c b,a 4000a828 <== 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 ); 4000a7fc: 11 10 00 64 sethi %hi(0x40019000), %o0 4000a800: 92 10 00 10 mov %l0, %o1 4000a804: 7f ff ed b9 call 40005ee8 <_Chain_Append> 4000a808: 90 12 22 64 or %o0, 0x264, %o0 */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 4000a80c: 80 a4 a0 00 cmp %l2, 0 4000a810: 02 80 00 03 be 4000a81c 4000a814: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 4000a818: e0 24 80 00 st %l0, [ %l2 ] 4000a81c: 81 c7 e0 08 ret 4000a820: 81 e8 00 00 restore 4000a824: b8 10 20 00 clr %i4 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000a828: 7f ff fd c4 call 40009f38 4000a82c: 90 10 00 11 mov %l1, %o0 if ( loc_to_free ) 4000a830: 80 a7 20 00 cmp %i4, 0 4000a834: 02 bf ff fa be 4000a81c 4000a838: b0 10 3f ff mov -1, %i0 rtems_filesystem_freenode( loc_to_free ); 4000a83c: c2 07 20 08 ld [ %i4 + 8 ], %g1 4000a840: 80 a0 60 00 cmp %g1, 0 4000a844: 02 80 00 09 be 4000a868 4000a848: 01 00 00 00 nop 4000a84c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000a850: 80 a0 60 00 cmp %g1, 0 4000a854: 02 80 00 05 be 4000a868 4000a858: 01 00 00 00 nop 4000a85c: 9f c0 40 00 call %g1 4000a860: 90 10 00 1c mov %i4, %o0 4000a864: b0 10 3f ff mov -1, %i0 return -1; } 4000a868: 81 c7 e0 08 ret 4000a86c: 81 e8 00 00 restore * 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; 4000a870: c2 07 bf f0 ld [ %fp + -16 ], %g1 * 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; 4000a874: 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; 4000a878: c4 07 bf f4 ld [ %fp + -12 ], %g2 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 4000a87c: c6 00 60 20 ld [ %g1 + 0x20 ], %g3 * 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; 4000a880: c8 24 20 08 st %g4, [ %l0 + 8 ] temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000a884: c4 24 20 14 st %g2, [ %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 ){ 4000a888: 80 a0 e0 00 cmp %g3, 0 4000a88c: 12 bf ff be bne 4000a784 4000a890: c2 24 20 10 st %g1, [ %l0 + 0x10 ] errno = ENOTSUP; 4000a894: 10 bf ff b8 b 4000a774 <== NOT EXECUTED 4000a898: b8 07 bf e8 add %fp, -24, %i4 <== NOT EXECUTED 4000a1f8 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000a1f8: 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 ) ) { 4000a1fc: 90 10 00 1c mov %i4, %o0 4000a200: 40 00 00 4f call 4000a33c <_POSIX_Absolute_timeout_to_ticks> 4000a204: 92 07 bf f4 add %fp, -12, %o1 4000a208: 80 a2 20 02 cmp %o0, 2 4000a20c: 18 80 00 03 bgu 4000a218 4000a210: 98 10 20 01 mov 1, %o4 4000a214: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000a218: da 07 bf f4 ld [ %fp + -12 ], %o5 4000a21c: 90 10 00 18 mov %i0, %o0 4000a220: 92 10 00 19 mov %i1, %o1 4000a224: 94 10 00 1a mov %i2, %o2 4000a228: 96 10 00 1b mov %i3, %o3 4000a22c: 7f ff ff 37 call 40009f08 <_POSIX_Message_queue_Receive_support> 4000a230: 98 0b 20 01 and %o4, 1, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000a234: 81 c7 e0 08 ret 4000a238: 91 e8 00 08 restore %g0, %o0, %o0 4000a23c : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000a23c: 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 ) ) { 4000a240: 90 10 00 1c mov %i4, %o0 4000a244: 40 00 00 3e call 4000a33c <_POSIX_Absolute_timeout_to_ticks> 4000a248: 92 07 bf f4 add %fp, -12, %o1 4000a24c: 80 a2 20 02 cmp %o0, 2 4000a250: 18 80 00 03 bgu 4000a25c 4000a254: 98 10 20 01 mov 1, %o4 4000a258: 98 10 20 00 clr %o4 <== NOT EXECUTED default: /* only to silence warnings */ do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000a25c: da 07 bf f4 ld [ %fp + -12 ], %o5 4000a260: 90 10 00 18 mov %i0, %o0 4000a264: 92 10 00 19 mov %i1, %o1 4000a268: 94 10 00 1a mov %i2, %o2 4000a26c: 96 10 00 1b mov %i3, %o3 4000a270: 7f ff ff 76 call 4000a048 <_POSIX_Message_queue_Send_support> 4000a274: 98 0b 20 01 and %o4, 1, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000a278: 81 c7 e0 08 ret 4000a27c: 91 e8 00 08 restore %g0, %o0, %o0 400023dc : */ int newlib_free_buffers( FILE *fp ) { 400023dc: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 400023e0: 40 00 2b 2f call 4000d09c 400023e4: 90 10 00 18 mov %i0, %o0 400023e8: 80 a2 20 02 cmp %o0, 2 400023ec: 18 80 00 0e bgu 40002424 400023f0: 01 00 00 00 nop case 0: case 1: case 2: if (fp->_flags & __SMBF) { 400023f4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 400023f8: 80 88 60 80 btst 0x80, %g1 400023fc: 02 80 00 0c be 4000242c 40002400: 01 00 00 00 nop free( fp->_bf._base ); 40002404: 40 00 1e cd call 40009f38 40002408: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 4000240c: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 40002410: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40002414: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 40002418: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 4000241c: 10 80 00 04 b 4000242c 40002420: c2 36 20 0c sth %g1, [ %i0 + 0xc ] fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 40002424: 40 00 2a 95 call 4000ce78 <== NOT EXECUTED 40002428: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 4000242c: 81 c7 e0 08 ret 40002430: 91 e8 20 00 restore %g0, 0, %o0 400027d4 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 400027d4: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 400027d8: 05 10 00 72 sethi %hi(0x4001c800), %g2 400027dc: c2 48 a2 f0 ldsb [ %g2 + 0x2f0 ], %g1 ! 4001caf0 400027e0: 80 a0 60 00 cmp %g1, 0 400027e4: 12 80 00 0e bne 4000281c 400027e8: 82 10 20 01 mov 1, %g1 initialized = 1; status = rtems_io_register_name( 400027ec: 11 10 00 68 sethi %hi(0x4001a000), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 400027f0: c2 28 a2 f0 stb %g1, [ %g2 + 0x2f0 ] status = rtems_io_register_name( 400027f4: 90 12 23 50 or %o0, 0x350, %o0 400027f8: 92 10 00 18 mov %i0, %o1 400027fc: 40 00 00 4d call 40002930 40002800: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40002804: 80 a2 20 00 cmp %o0, 0 40002808: 02 80 00 04 be 40002818 4000280c: 03 10 00 73 sethi %hi(0x4001cc00), %g1 rtems_fatal_error_occurred(status); 40002810: 40 00 10 2a call 400068b8 <== NOT EXECUTED 40002814: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 40002818: f0 20 60 84 st %i0, [ %g1 + 0x84 ] } return RTEMS_SUCCESSFUL; } 4000281c: 81 c7 e0 08 ret 40002820: 91 e8 20 00 restore %g0, 0, %o0 400027b0 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 400027b0: 80 a2 a0 00 cmp %o2, 0 400027b4: 02 80 00 04 be 400027c4 400027b8: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 400027bc: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 400027c0: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 400027c4: 81 c3 e0 08 retl 400027c8: 90 10 20 00 clr %o0 4000262c : int open( const char *pathname, int flags, ... ) { 4000262c: 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); 40002630: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40002634: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40002638: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4000263c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40002640: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40002644: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40002648: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 4000264c: 02 80 00 03 be 40002658 40002650: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40002654: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 40002658: 82 07 a0 50 add %fp, 0x50, %g1 4000265c: f4 07 a0 4c ld [ %fp + 0x4c ], %i2 40002660: 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(); 40002664: 40 00 1f 33 call 4000a330 40002668: ba 10 20 17 mov 0x17, %i5 if ( iop == 0 ) { 4000266c: b8 92 20 00 orcc %o0, 0, %i4 40002670: 02 80 00 93 be 400028bc 40002674: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40002678: b6 07 bf e4 add %fp, -28, %i3 4000267c: 90 10 00 18 mov %i0, %o0 40002680: 94 10 00 1b mov %i3, %o2 40002684: 7f ff fe 32 call 40001f4c 40002688: 96 10 20 01 mov 1, %o3 pathname, eval_flags, &loc, true ); if ( status == -1 ) { 4000268c: 80 a2 3f ff cmp %o0, -1 40002690: 12 80 00 25 bne 40002724 40002694: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( errno != ENOENT ) { 40002698: 40 00 29 a0 call 4000cd18 <__errno> 4000269c: 01 00 00 00 nop 400026a0: c2 02 00 00 ld [ %o0 ], %g1 400026a4: 80 a0 60 02 cmp %g1, 2 400026a8: 12 80 00 11 bne 400026ec 400026ac: 01 00 00 00 nop rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 400026b0: 80 8e 62 00 btst 0x200, %i1 400026b4: ba 10 20 02 mov 2, %i5 400026b8: 02 80 00 6f be 40002874 400026bc: 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 ); 400026c0: 13 3f ff e0 sethi %hi(0xffff8000), %o1 400026c4: 90 10 00 18 mov %i0, %o0 400026c8: 92 16 80 09 or %i2, %o1, %o1 400026cc: 94 10 20 00 clr %o2 400026d0: 93 2a 60 10 sll %o1, 0x10, %o1 400026d4: 96 10 20 00 clr %o3 400026d8: 7f ff fe cd call 4000220c 400026dc: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 400026e0: 80 a2 20 00 cmp %o0, 0 400026e4: 02 80 00 06 be 400026fc 400026e8: 94 10 00 1b mov %i3, %o2 rc = errno; 400026ec: 40 00 29 8b call 4000cd18 <__errno> 400026f0: 01 00 00 00 nop 400026f4: 10 80 00 5c b 40002864 400026f8: fa 02 00 00 ld [ %o0 ], %i5 goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true ); 400026fc: 90 10 00 18 mov %i0, %o0 40002700: 92 10 20 00 clr %o1 40002704: 96 10 20 01 mov 1, %o3 40002708: 7f ff fe 11 call 40001f4c 4000270c: ba 10 20 0d mov 0xd, %i5 if ( status != 0 ) { /* The file did not exist */ 40002710: 80 a2 20 00 cmp %o0, 0 40002714: 12 80 00 58 bne 40002874 40002718: 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; 4000271c: 10 80 00 07 b 40002738 40002720: c2 07 bf e8 ld [ %fp + -24 ], %g1 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 40002724: a0 10 00 1b mov %i3, %l0 40002728: 80 a0 6a 00 cmp %g1, 0xa00 4000272c: 02 80 00 52 be 40002874 40002730: ba 10 20 11 mov 0x11, %i5 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40002734: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40002738: e0 07 20 0c ld [ %i4 + 0xc ], %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 4000273c: c2 27 20 30 st %g1, [ %i4 + 0x30 ] iop->file_info = loc.node_access; 40002740: c2 07 bf e4 ld [ %fp + -28 ], %g1 iop->flags |= rtems_libio_fcntl_flags( flags ); 40002744: 90 10 00 19 mov %i1, %o0 40002748: 40 00 1f 30 call 4000a408 4000274c: c2 27 20 2c st %g1, [ %i4 + 0x2c ] 40002750: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 40002754: 94 10 20 10 mov 0x10, %o2 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40002758: d0 27 20 0c st %o0, [ %i4 + 0xc ] iop->pathinfo = loc; 4000275c: a0 07 bf e4 add %fp, -28, %l0 40002760: 90 07 20 10 add %i4, 0x10, %o0 40002764: 40 00 2b 5f call 4000d4e0 40002768: 92 10 00 10 mov %l0, %o1 if ( !iop->handlers->open_h ) { 4000276c: c2 07 20 30 ld [ %i4 + 0x30 ], %g1 40002770: c2 00 40 00 ld [ %g1 ], %g1 40002774: 80 a0 60 00 cmp %g1, 0 40002778: 02 80 00 67 be 40002914 4000277c: 92 10 00 18 mov %i0, %o1 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40002780: 96 10 00 1a mov %i2, %o3 40002784: 90 10 00 1c mov %i4, %o0 40002788: 9f c0 40 00 call %g1 4000278c: 94 10 00 19 mov %i1, %o2 if ( rc ) 40002790: ba 92 20 00 orcc %o0, 0, %i5 40002794: 12 80 00 39 bne 40002878 40002798: 80 a7 20 00 cmp %i4, 0 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 4000279c: 80 8e 64 00 btst 0x400, %i1 400027a0: 02 80 00 4c be 400028d0 400027a4: 03 10 00 62 sethi %hi(0x40018800), %g1 rc = ftruncate( iop - rtems_libio_iops, 0 ); 400027a8: c4 00 62 c8 ld [ %g1 + 0x2c8 ], %g2 ! 40018ac8 400027ac: 92 10 20 00 clr %o1 400027b0: 84 27 00 02 sub %i4, %g2, %g2 400027b4: 85 38 a0 02 sra %g2, 2, %g2 400027b8: 87 28 a0 02 sll %g2, 2, %g3 400027bc: 83 28 a0 06 sll %g2, 6, %g1 400027c0: 82 20 40 03 sub %g1, %g3, %g1 400027c4: 91 28 60 06 sll %g1, 6, %o0 400027c8: 90 22 00 01 sub %o0, %g1, %o0 400027cc: 83 2a 20 0c sll %o0, 0xc, %g1 400027d0: 90 02 00 01 add %o0, %g1, %o0 400027d4: 90 02 00 02 add %o0, %g2, %o0 400027d8: 91 2a 20 04 sll %o0, 4, %o0 400027dc: 90 22 00 02 sub %o0, %g2, %o0 400027e0: 91 2a 20 02 sll %o0, 2, %o0 400027e4: 40 00 1d ff call 40009fe0 400027e8: 90 20 80 08 sub %g2, %o0, %o0 if ( rc ) { 400027ec: ba 92 20 00 orcc %o0, 0, %i5 400027f0: 02 80 00 38 be 400028d0 400027f4: 03 10 00 62 sethi %hi(0x40018800), %g1 if(errno) rc = errno; 400027f8: 40 00 29 48 call 4000cd18 <__errno> <== NOT EXECUTED 400027fc: 01 00 00 00 nop <== NOT EXECUTED 40002800: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40002804: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002808: 02 80 00 06 be 40002820 <== NOT EXECUTED 4000280c: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 40002810: 40 00 29 42 call 4000cd18 <__errno> <== NOT EXECUTED 40002814: 01 00 00 00 nop <== NOT EXECUTED 40002818: fa 02 00 00 ld [ %o0 ], %i5 <== NOT EXECUTED close( iop - rtems_libio_iops ); 4000281c: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 40002820: c4 00 62 c8 ld [ %g1 + 0x2c8 ], %g2 ! 40018ac8 <== NOT EXECUTED 40002824: 84 27 00 02 sub %i4, %g2, %g2 <== NOT EXECUTED 40002828: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 4000282c: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 40002830: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 40002834: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40002838: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 4000283c: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 40002840: 83 2a 20 0c sll %o0, 0xc, %g1 <== NOT EXECUTED 40002844: b8 10 20 00 clr %i4 <== NOT EXECUTED 40002848: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 4000284c: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 40002850: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 40002854: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40002858: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 4000285c: 40 00 1d 84 call 40009e6c <== NOT EXECUTED 40002860: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40002864: 80 a7 60 00 cmp %i5, 0 40002868: 02 80 00 1a be 400028d0 4000286c: 03 10 00 62 sethi %hi(0x40018800), %g1 40002870: a0 10 20 00 clr %l0 if ( iop ) 40002874: 80 a7 20 00 cmp %i4, 0 40002878: 02 80 00 05 be 4000288c 4000287c: 80 a4 20 00 cmp %l0, 0 rtems_libio_free( iop ); 40002880: 40 00 1e 94 call 4000a2d0 40002884: 90 10 00 1c mov %i4, %o0 if ( loc_to_free ) 40002888: 80 a4 20 00 cmp %l0, 0 4000288c: 02 80 00 0c be 400028bc 40002890: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40002894: c2 04 20 08 ld [ %l0 + 8 ], %g1 40002898: 80 a0 60 00 cmp %g1, 0 4000289c: 02 80 00 08 be 400028bc 400028a0: 01 00 00 00 nop 400028a4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400028a8: 80 a0 60 00 cmp %g1, 0 400028ac: 02 80 00 04 be 400028bc 400028b0: 01 00 00 00 nop 400028b4: 9f c0 40 00 call %g1 400028b8: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( rc ); 400028bc: 40 00 29 17 call 4000cd18 <__errno> 400028c0: b0 10 3f ff mov -1, %i0 400028c4: fa 22 00 00 st %i5, [ %o0 ] 400028c8: 81 c7 e0 08 ret 400028cc: 81 e8 00 00 restore } return iop - rtems_libio_iops; 400028d0: c6 00 62 c8 ld [ %g1 + 0x2c8 ], %g3 400028d4: 86 27 00 03 sub %i4, %g3, %g3 400028d8: 87 38 e0 02 sra %g3, 2, %g3 400028dc: 83 28 e0 02 sll %g3, 2, %g1 400028e0: 85 28 e0 06 sll %g3, 6, %g2 400028e4: 84 20 80 01 sub %g2, %g1, %g2 400028e8: 83 28 a0 06 sll %g2, 6, %g1 400028ec: 82 20 40 02 sub %g1, %g2, %g1 400028f0: 85 28 60 0c sll %g1, 0xc, %g2 400028f4: 82 00 40 02 add %g1, %g2, %g1 400028f8: 82 00 40 03 add %g1, %g3, %g1 400028fc: 83 28 60 04 sll %g1, 4, %g1 40002900: 82 20 40 03 sub %g1, %g3, %g1 40002904: 83 28 60 02 sll %g1, 2, %g1 40002908: b0 20 c0 01 sub %g3, %g1, %i0 } 4000290c: 81 c7 e0 08 ret 40002910: 81 e8 00 00 restore if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40002914: 10 bf ff d8 b 40002874 <== NOT EXECUTED 40002918: ba 10 20 86 mov 0x86, %i5 <== NOT EXECUTED 400025b8 : /* * This is a replaceable stub */ void open_dev_console(void) { 400025b8: 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) { 400025bc: 21 10 00 5b sethi %hi(0x40016c00), %l0 400025c0: 92 10 20 00 clr %o1 400025c4: 90 14 20 b0 or %l0, 0xb0, %o0 400025c8: 40 00 00 19 call 4000262c 400025cc: 94 10 20 00 clr %o2 400025d0: 80 a2 3f ff cmp %o0, -1 400025d4: 02 80 00 14 be 40002624 400025d8: 90 14 20 b0 or %l0, 0xb0, %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) 400025dc: 92 10 20 01 mov 1, %o1 400025e0: 40 00 00 13 call 4000262c 400025e4: 94 10 20 00 clr %o2 400025e8: 80 a2 3f ff cmp %o0, -1 400025ec: 32 80 00 05 bne,a 40002600 400025f0: 90 14 20 b0 or %l0, 0xb0, %o0 rtems_fatal_error_occurred( error_code | '1' ); 400025f4: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED 400025f8: 10 80 00 09 b 4000261c <== NOT EXECUTED 400025fc: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40002600: 92 10 20 01 mov 1, %o1 40002604: 40 00 00 0a call 4000262c 40002608: 94 10 20 00 clr %o2 4000260c: 80 a2 3f ff cmp %o0, -1 40002610: 12 80 00 05 bne 40002624 40002614: 11 14 d5 11 sethi %hi(0x53544400), %o0 rtems_fatal_error_occurred( error_code | '2' ); 40002618: 90 12 20 32 or %o0, 0x32, %o0 ! 53544432 <== NOT EXECUTED 4000261c: 40 00 0d 35 call 40005af0 <== NOT EXECUTED 40002620: 01 00 00 00 nop <== NOT EXECUTED 40002624: 81 c7 e0 08 ret 40002628: 81 e8 00 00 restore 400206f8 : * open a directory. */ DIR * opendir( const char *name ) { 400206f8: 9d e3 bf 98 save %sp, -104, %sp register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 400206fc: 92 10 20 00 clr %o1 40020700: 90 10 00 18 mov %i0, %o0 40020704: 7f ff 97 29 call 400063a8 40020708: b0 10 20 00 clr %i0 4002070c: 80 a2 3f ff cmp %o0, -1 40020710: 02 80 00 17 be 4002076c 40020714: a0 10 00 08 mov %o0, %l0 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 40020718: 92 10 20 02 mov 2, %o1 4002071c: 40 00 2f ac call 4002c5cc 40020720: 94 10 20 01 mov 1, %o2 40020724: 80 a2 3f ff cmp %o0, -1 40020728: 02 80 00 0f be 40020764 4002072c: 90 10 00 10 mov %l0, %o0 40020730: 7f ff 94 f5 call 40005b04 40020734: 90 10 20 18 mov 0x18, %o0 40020738: b0 92 20 00 orcc %o0, 0, %i0 4002073c: 02 80 00 0a be 40020764 40020740: 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); 40020744: 7f ff 94 f0 call 40005b04 40020748: 90 10 22 00 mov 0x200, %o0 dirp->dd_len = 512; 4002074c: 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); 40020750: d0 26 20 0c st %o0, [ %i0 + 0xc ] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 40020754: 80 a2 20 00 cmp %o0, 0 40020758: 12 80 00 07 bne 40020774 4002075c: c2 26 20 10 st %g1, [ %i0 + 0x10 ] close (fd); 40020760: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020764: 7f ff 92 a4 call 400051f4 <== NOT EXECUTED 40020768: b0 10 20 00 clr %i0 <== NOT EXECUTED 4002076c: 81 c7 e0 08 ret <== NOT EXECUTED 40020770: 81 e8 00 00 restore <== NOT EXECUTED return NULL; } dirp->dd_fd = fd; 40020774: e0 26 00 00 st %l0, [ %i0 ] dirp->dd_loc = 0; 40020778: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_seek = 0; 4002077c: c0 26 20 14 clr [ %i0 + 0x14 ] /* * Set up seek point for rewinddir. */ return dirp; } 40020780: 81 c7 e0 08 ret 40020784: 81 e8 00 00 restore 400033f8 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 400033f8: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 400033fc: c8 06 60 34 ld [ %i1 + 0x34 ], %g4 40003400: 80 89 20 01 btst 1, %g4 40003404: 02 80 00 59 be 40003568 40003408: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 4000340c: 82 0e 20 ff and %i0, 0xff, %g1 40003410: 80 a0 60 09 cmp %g1, 9 40003414: 22 80 00 2b be,a 400034c0 40003418: c6 06 60 28 ld [ %i1 + 0x28 ], %g3 4000341c: 18 80 00 07 bgu 40003438 40003420: 80 a0 60 0a cmp %g1, 0xa 40003424: 80 a0 60 08 cmp %g1, 8 <== NOT EXECUTED 40003428: 12 80 00 3c bne 40003518 <== NOT EXECUTED 4000342c: 80 89 20 02 btst 2, %g4 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 40003430: 10 80 00 35 b 40003504 <== NOT EXECUTED 40003434: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 40003438: 02 80 00 06 be 40003450 4000343c: 80 a0 60 0d cmp %g1, 0xd 40003440: 32 80 00 36 bne,a 40003518 40003444: 80 89 20 02 btst 2, %g4 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40003448: 10 80 00 10 b 40003488 <== NOT EXECUTED 4000344c: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 40003450: 80 89 20 20 btst 0x20, %g4 40003454: 32 80 00 02 bne,a 4000345c 40003458: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 4000345c: c2 06 60 34 ld [ %i1 + 0x34 ], %g1 40003460: 80 88 60 04 btst 4, %g1 40003464: 02 80 00 42 be 4000356c 40003468: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 4000346c: 11 10 00 5c sethi %hi(0x40017000), %o0 40003470: 92 10 20 01 mov 1, %o1 40003474: 90 12 20 00 mov %o0, %o0 40003478: 7f ff ff 94 call 400032c8 4000347c: 94 10 00 19 mov %i1, %o2 c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 40003480: 10 80 00 3a b 40003568 40003484: c0 26 60 28 clr [ %i1 + 0x28 ] tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40003488: 02 80 00 06 be 400034a0 <== NOT EXECUTED 4000348c: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED 40003490: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40003494: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003498: 02 80 00 17 be 400034f4 <== NOT EXECUTED 4000349c: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 400034a0: 22 80 00 32 be,a 40003568 <== NOT EXECUTED 400034a4: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 400034a8: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 400034ac: 80 89 20 20 btst 0x20, %g4 <== NOT EXECUTED 400034b0: 02 80 00 2e be 40003568 <== NOT EXECUTED 400034b4: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 400034b8: 10 80 00 2c b 40003568 <== NOT EXECUTED 400034bc: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 400034c0: 05 00 00 06 sethi %hi(0x1800), %g2 400034c4: 82 09 00 02 and %g4, %g2, %g1 400034c8: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 400034cc: 84 08 e0 07 and %g3, 7, %g2 400034d0: 82 10 20 08 mov 8, %g1 400034d4: 92 20 40 02 sub %g1, %g2, %o1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 400034d8: 12 80 00 09 bne 400034fc 400034dc: 84 02 40 03 add %o1, %g3, %g2 tty->column += i; 400034e0: c4 26 60 28 st %g2, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 400034e4: 94 10 00 19 mov %i1, %o2 400034e8: 11 10 00 5c sethi %hi(0x40017000), %o0 400034ec: 7f ff ff 77 call 400032c8 400034f0: 90 12 20 08 or %o0, 8, %o0 ! 40017008 <__func__.4776+0x2b0> 400034f4: 81 c7 e0 08 ret 400034f8: 81 e8 00 00 restore return; } tty->column += i; 400034fc: 10 80 00 1b b 40003568 <== NOT EXECUTED 40003500: c4 26 60 28 st %g2, [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\b': if (tty->column > 0) 40003504: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003508: 04 80 00 18 ble 40003568 <== NOT EXECUTED 4000350c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED default: if (tty->termios.c_oflag & OLCUC) c = toupper(c); if (!iscntrl(c)) tty->column++; 40003510: 10 80 00 16 b 40003568 <== NOT EXECUTED 40003514: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 40003518: 02 80 00 0b be 40003544 4000351c: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 c = toupper(c); 40003520: 03 10 00 61 sethi %hi(0x40018400), %g1 <== NOT EXECUTED 40003524: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40018460 <__ctype_ptr> <== NOT EXECUTED 40003528: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 4000352c: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 <== NOT EXECUTED 40003530: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003534: 32 80 00 02 bne,a 4000353c <== NOT EXECUTED 40003538: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 4000353c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 40003540: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 <== NOT EXECUTED 40003544: 03 10 00 61 sethi %hi(0x40018400), %g1 40003548: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 40018460 <__ctype_ptr> 4000354c: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 40003550: 80 88 60 20 btst 0x20, %g1 40003554: 12 80 00 06 bne 4000356c 40003558: 94 10 00 19 mov %i1, %o2 tty->column++; 4000355c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 40003560: 82 00 60 01 inc %g1 40003564: c2 26 60 28 st %g1, [ %i1 + 0x28 ] break; } } rtems_termios_puts (&c, 1, tty); 40003568: 94 10 00 19 mov %i1, %o2 4000356c: 90 07 a0 44 add %fp, 0x44, %o0 40003570: 7f ff ff 56 call 400032c8 40003574: 92 10 20 01 mov 1, %o1 40003578: 81 c7 e0 08 ret 4000357c: 81 e8 00 00 restore 40006114 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 40006114: 9d e3 bf 60 save %sp, -160, %sp 40006118: ac 10 00 18 mov %i0, %l6 POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; if ( !start_routine ) 4000611c: 80 a6 a0 00 cmp %i2, 0 40006120: 02 80 00 7b be 4000630c 40006124: b0 10 20 0e mov 0xe, %i0 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40006128: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000612c: 80 a6 60 00 cmp %i1, 0 40006130: 02 80 00 03 be 4000613c 40006134: a4 10 61 60 or %g1, 0x160, %l2 40006138: a4 10 00 19 mov %i1, %l2 if ( !the_attr->is_initialized ) 4000613c: c2 04 80 00 ld [ %l2 ], %g1 40006140: 80 a0 60 00 cmp %g1, 0 40006144: 22 80 00 72 be,a 4000630c 40006148: 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) ) 4000614c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 40006150: 80 a0 60 00 cmp %g1, 0 40006154: 02 80 00 07 be 40006170 40006158: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000615c: c4 00 61 80 ld [ %g1 + 0x180 ], %g2 ! 4001c180 40006160: c2 04 a0 08 ld [ %l2 + 8 ], %g1 40006164: 80 a0 40 02 cmp %g1, %g2 40006168: 2a 80 00 69 bcs,a 4000630c 4000616c: 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 ) { 40006170: c2 04 a0 10 ld [ %l2 + 0x10 ], %g1 40006174: 80 a0 60 01 cmp %g1, 1 40006178: 02 80 00 06 be 40006190 4000617c: 80 a0 60 02 cmp %g1, 2 40006180: 12 80 00 63 bne 4000630c 40006184: b0 10 20 16 mov 0x16, %i0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 40006188: 10 80 00 0a b 400061b0 4000618c: e6 04 a0 14 ld [ %l2 + 0x14 ], %l3 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006190: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40006194: c2 00 63 60 ld [ %g1 + 0x360 ], %g1 ! 4001cf60 <_Thread_Executing> schedpolicy = api->schedpolicy; schedparam = api->schedparam; 40006198: 90 07 bf e0 add %fp, -32, %o0 * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4000619c: c2 00 61 60 ld [ %g1 + 0x160 ], %g1 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 400061a0: 94 10 20 18 mov 0x18, %o2 400061a4: 92 00 60 80 add %g1, 0x80, %o1 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 400061a8: 10 80 00 05 b 400061bc 400061ac: e6 00 60 7c ld [ %g1 + 0x7c ], %l3 schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; 400061b0: 90 07 bf e0 add %fp, -32, %o0 400061b4: 92 04 a0 18 add %l2, 0x18, %o1 400061b8: 94 10 20 18 mov 0x18, %o2 400061bc: 40 00 24 48 call 4000f2dc 400061c0: b0 10 20 86 mov 0x86, %i0 /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 400061c4: c2 04 a0 0c ld [ %l2 + 0xc ], %g1 400061c8: 80 a0 60 00 cmp %g1, 0 400061cc: 12 80 00 50 bne 4000630c 400061d0: ea 07 bf e0 ld [ %fp + -32 ], %l5 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 400061d4: 82 05 7f ff add %l5, -1, %g1 400061d8: 80 a0 60 fd cmp %g1, 0xfd 400061dc: 18 80 00 7e bgu 400063d4 400061e0: 80 a4 e0 01 cmp %l3, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400061e4: 02 80 00 10 be 40006224 400061e8: a2 10 20 00 clr %l1 400061ec: 14 80 00 08 bg 4000620c 400061f0: 80 a4 e0 02 cmp %l3, 2 400061f4: 80 a4 e0 00 cmp %l3, 0 400061f8: a2 10 20 01 mov 1, %l1 400061fc: 02 80 00 1a be 40006264 40006200: a0 10 20 00 clr %l0 */ *thread = the_thread->Object.id; _RTEMS_Unlock_allocator(); return 0; 40006204: 81 c7 e0 08 ret 40006208: 91 e8 20 16 restore %g0, 0x16, %o0 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 4000620c: 02 80 00 05 be 40006220 40006210: 80 a4 e0 03 cmp %l3, 3 40006214: 12 80 00 3e bne 4000630c 40006218: b0 10 20 16 mov 0x16, %i0 4000621c: 30 80 00 04 b,a 4000622c 40006220: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED 40006224: 10 80 00 10 b 40006264 40006228: a0 10 20 00 clr %l0 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 ) < 4000622c: 40 00 10 d6 call 4000a584 <_Timespec_To_ticks> 40006230: 90 07 bf e8 add %fp, -24, %o0 40006234: a0 10 00 08 mov %o0, %l0 40006238: 40 00 10 d3 call 4000a584 <_Timespec_To_ticks> 4000623c: 90 07 bf f0 add %fp, -16, %o0 40006240: 80 a4 00 08 cmp %l0, %o0 40006244: 0a 80 00 64 bcs 400063d4 40006248: c2 07 bf e4 ld [ %fp + -28 ], %g1 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 4000624c: 82 00 7f ff add %g1, -1, %g1 40006250: 80 a0 60 fd cmp %g1, 0xfd 40006254: 18 80 00 60 bgu 400063d4 40006258: 03 10 00 19 sethi %hi(0x40006400), %g1 4000625c: a2 10 20 03 mov 3, %l1 40006260: a0 10 63 1c or %g1, 0x31c, %l0 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); 40006264: 29 10 00 73 sethi %hi(0x4001cc00), %l4 40006268: 40 00 06 f1 call 40007e2c <_API_Mutex_Lock> 4000626c: d0 05 23 58 ld [ %l4 + 0x358 ], %o0 ! 4001cf58 <_RTEMS_Allocator_Mutex> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 40006270: 11 10 00 74 sethi %hi(0x4001d000), %o0 40006274: 40 00 09 58 call 400087d4 <_Objects_Allocate> 40006278: 90 12 21 30 or %o0, 0x130, %o0 ! 4001d130 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 4000627c: b2 92 20 00 orcc %o0, 0, %i1 40006280: 32 80 00 04 bne,a 40006290 40006284: c4 04 a0 08 ld [ %l2 + 8 ], %g2 _RTEMS_Unlock_allocator(); 40006288: 10 80 00 1f b 40006304 4000628c: d0 05 23 58 ld [ %l4 + 0x358 ], %o0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( 40006290: 03 10 00 70 sethi %hi(0x4001c000), %g1 40006294: c2 00 61 80 ld [ %g1 + 0x180 ], %g1 ! 4001c180 40006298: c0 27 bf dc clr [ %fp + -36 ] 4000629c: 97 28 60 01 sll %g1, 1, %o3 400062a0: 80 a2 c0 02 cmp %o3, %g2 400062a4: 1a 80 00 03 bcc 400062b0 400062a8: d4 04 a0 04 ld [ %l2 + 4 ], %o2 400062ac: 96 10 00 02 mov %g2, %o3 400062b0: 82 07 bf dc add %fp, -36, %g1 400062b4: e2 23 a0 60 st %l1, [ %sp + 0x60 ] 400062b8: e0 23 a0 64 st %l0, [ %sp + 0x64 ] 400062bc: c0 23 a0 68 clr [ %sp + 0x68 ] 400062c0: 9a 10 20 ff mov 0xff, %o5 400062c4: a2 10 20 01 mov 1, %l1 400062c8: 9a 23 40 15 sub %o5, %l5, %o5 400062cc: e2 23 a0 5c st %l1, [ %sp + 0x5c ] 400062d0: c2 23 a0 6c st %g1, [ %sp + 0x6c ] 400062d4: 21 10 00 74 sethi %hi(0x4001d000), %l0 400062d8: 92 10 00 19 mov %i1, %o1 400062dc: 90 14 21 30 or %l0, 0x130, %o0 400062e0: 40 00 0d 0c call 40009710 <_Thread_Initialize> 400062e4: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { 400062e8: 80 8a 20 ff btst 0xff, %o0 400062ec: 12 80 00 0a bne 40006314 400062f0: 90 14 21 30 or %l0, 0x130, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 400062f4: 40 00 0a 25 call 40008b88 <_Objects_Free> 400062f8: 92 10 00 19 mov %i1, %o1 _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400062fc: 03 10 00 73 sethi %hi(0x4001cc00), %g1 40006300: d0 00 63 58 ld [ %g1 + 0x358 ], %o0 ! 4001cf58 <_RTEMS_Allocator_Mutex> 40006304: 40 00 06 e0 call 40007e84 <_API_Mutex_Unlock> 40006308: b0 10 20 0b mov 0xb, %i0 4000630c: 81 c7 e0 08 ret 40006310: 81 e8 00 00 restore /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40006314: e0 06 61 60 ld [ %i1 + 0x160 ], %l0 api->Attributes = *the_attr; 40006318: 92 10 00 12 mov %l2, %o1 4000631c: 94 10 20 38 mov 0x38, %o2 40006320: 40 00 23 ef call 4000f2dc 40006324: 90 10 00 10 mov %l0, %o0 api->detachstate = the_attr->detachstate; 40006328: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1 api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4000632c: 92 07 bf e0 add %fp, -32, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 40006330: c2 24 20 38 st %g1, [ %l0 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40006334: 94 10 20 18 mov 0x18, %o2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; 40006338: e6 24 20 7c st %l3, [ %l0 + 0x7c ] api->schedparam = schedparam; 4000633c: 40 00 23 e8 call 4000f2dc 40006340: 90 04 20 80 add %l0, 0x80, %o0 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40006344: 94 10 00 1a mov %i2, %o2 * first run. * * NOTE: Since the thread starts with all unblocked, this is necessary. */ the_thread->do_post_task_switch_extension = true; 40006348: e2 2e 60 75 stb %l1, [ %i1 + 0x75 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 4000634c: 96 10 00 1b mov %i3, %o3 40006350: 90 10 00 19 mov %i1, %o0 40006354: 92 10 20 01 mov 1, %o1 40006358: 40 00 0f d2 call 4000a2a0 <_Thread_Start> 4000635c: 98 10 20 00 clr %o4 start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 40006360: 80 a4 e0 03 cmp %l3, 3 40006364: 12 80 00 09 bne 40006388 40006368: a2 10 00 08 mov %o0, %l1 _Watchdog_Insert_ticks( 4000636c: 40 00 10 86 call 4000a584 <_Timespec_To_ticks> 40006370: 90 04 20 88 add %l0, 0x88, %o0 40006374: 92 04 20 9c add %l0, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40006378: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000637c: 11 10 00 73 sethi %hi(0x4001cc00), %o0 40006380: 40 00 11 7d call 4000a974 <_Watchdog_Insert> 40006384: 90 12 23 80 or %o0, 0x380, %o0 ! 4001cf80 <_Watchdog_Ticks_chain> * * NOTE: This can only happen if someone slips in and touches the * thread while we are creating it. */ if ( !status ) { 40006388: 80 8c 60 ff btst 0xff, %l1 4000638c: 12 80 00 0b bne 400063b8 40006390: 21 10 00 73 sethi %hi(0x4001cc00), %l0 40006394: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40006398: 11 10 00 74 sethi %hi(0x4001d000), %o0 <== NOT EXECUTED 4000639c: 40 00 09 fb call 40008b88 <_Objects_Free> <== NOT EXECUTED 400063a0: 90 12 21 30 or %o0, 0x130, %o0 ! 4001d130 <_POSIX_Threads_Information> <== NOT EXECUTED _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); 400063a4: d0 04 23 58 ld [ %l0 + 0x358 ], %o0 <== NOT EXECUTED 400063a8: 40 00 06 b7 call 40007e84 <_API_Mutex_Unlock> <== NOT EXECUTED 400063ac: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 400063b0: 81 c7 e0 08 ret <== NOT EXECUTED 400063b4: 81 e8 00 00 restore <== NOT EXECUTED /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400063b8: c2 06 60 08 ld [ %i1 + 8 ], %g1 _RTEMS_Unlock_allocator(); 400063bc: d0 04 23 58 ld [ %l0 + 0x358 ], %o0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 400063c0: c2 25 80 00 st %g1, [ %l6 ] _RTEMS_Unlock_allocator(); 400063c4: 40 00 06 b0 call 40007e84 <_API_Mutex_Unlock> 400063c8: b0 10 20 00 clr %i0 400063cc: 81 c7 e0 08 ret 400063d0: 81 e8 00 00 restore return 0; 400063d4: b0 10 20 16 mov 0x16, %i0 } 400063d8: 81 c7 e0 08 ret 400063dc: 81 e8 00 00 restore 40005124 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 40005124: 9d e3 bf 98 save %sp, -104, %sp 40005128: 03 10 00 55 sethi %hi(0x40015400), %g1 4000512c: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 400154b0 <_Thread_Dispatch_disable_level> 40005130: 84 00 a0 01 inc %g2 40005134: c4 20 60 b0 st %g2, [ %g1 + 0xb0 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 40005138: 11 10 00 56 sethi %hi(0x40015800), %o0 4000513c: 40 00 09 6e call 400076f4 <_Objects_Allocate> 40005140: 90 12 21 04 or %o0, 0x104, %o0 ! 40015904 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 40005144: a0 92 20 00 orcc %o0, 0, %l0 40005148: 32 80 00 06 bne,a 40005160 4000514c: f2 24 20 14 st %i1, [ %l0 + 0x14 ] _Thread_Enable_dispatch(); 40005150: 40 00 0c e9 call 400084f4 <_Thread_Enable_dispatch> 40005154: b0 10 20 0b mov 0xb, %i0 40005158: 81 c7 e0 08 ret 4000515c: 81 e8 00 00 restore for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 40005160: 03 10 00 55 sethi %hi(0x40015400), %g1 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 40005164: a2 10 00 10 mov %l0, %l1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 40005168: a6 10 60 10 or %g1, 0x10, %l3 if ( !the_key ) { _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 4000516c: b2 10 20 01 mov 1, %i1 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 40005170: 83 2e 60 02 sll %i1, 2, %g1 40005174: c2 04 c0 01 ld [ %l3 + %g1 ], %g1 40005178: 80 a0 60 00 cmp %g1, 0 4000517c: 22 80 00 24 be,a 4000520c 40005180: c0 24 60 1c clr [ %l1 + 0x1c ] INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 40005184: c2 00 60 04 ld [ %g1 + 4 ], %g1 40005188: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1 4000518c: 82 00 60 01 inc %g1 40005190: a5 28 60 02 sll %g1, 2, %l2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 40005194: 40 00 12 38 call 40009a74 <_Workspace_Allocate> 40005198: 90 10 00 12 mov %l2, %o0 if ( !table ) { 4000519c: 82 92 20 00 orcc %o0, 0, %g1 400051a0: 32 80 00 16 bne,a 400051f8 400051a4: c2 24 60 1c st %g1, [ %l1 + 0x1c ] for ( --the_api; 400051a8: 82 06 60 05 add %i1, 5, %g1 400051ac: b2 06 7f ff add %i1, -1, %i1 400051b0: 83 28 60 02 sll %g1, 2, %g1 400051b4: 10 80 00 05 b 400051c8 400051b8: b0 04 00 01 add %l0, %g1, %i0 the_api >= 1; the_api-- ) 400051bc: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400051c0: 40 00 12 26 call 40009a58 <_Workspace_Free> <== NOT EXECUTED 400051c4: b0 06 3f fc add %i0, -4, %i0 <== 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; 400051c8: 80 a6 60 00 cmp %i1, 0 400051cc: 32 bf ff fc bne,a 400051bc 400051d0: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 400051d4: 92 10 00 10 mov %l0, %o1 400051d8: 11 10 00 56 sethi %hi(0x40015800), %o0 400051dc: 90 12 21 04 or %o0, 0x104, %o0 ! 40015904 <_POSIX_Keys_Information> 400051e0: 40 00 0a 32 call 40007aa8 <_Objects_Free> 400051e4: b0 10 20 0c mov 0xc, %i0 the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 400051e8: 40 00 0c c3 call 400084f4 <_Thread_Enable_dispatch> 400051ec: 01 00 00 00 nop 400051f0: 81 c7 e0 08 ret 400051f4: 81 e8 00 00 restore return ENOMEM; } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); 400051f8: 94 10 00 12 mov %l2, %o2 400051fc: 40 00 24 c7 call 4000e518 40005200: 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++ ) { 40005204: 10 80 00 03 b 40005210 40005208: b2 06 60 01 inc %i1 4000520c: 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; 40005210: 80 a6 60 05 cmp %i1, 5 40005214: 12 bf ff d7 bne 40005170 40005218: a2 04 60 04 add %l1, 4, %l1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000521c: c6 04 20 08 ld [ %l0 + 8 ], %g3 40005220: 03 10 00 56 sethi %hi(0x40015800), %g1 40005224: c4 00 61 20 ld [ %g1 + 0x120 ], %g2 ! 40015920 <_POSIX_Keys_Information+0x1c> 40005228: 03 00 00 3f sethi %hi(0xfc00), %g1 4000522c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005230: 82 08 c0 01 and %g3, %g1, %g1 40005234: 83 28 60 02 sll %g1, 2, %g1 40005238: e0 20 80 01 st %l0, [ %g2 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 4000523c: c0 24 20 0c clr [ %l0 + 0xc ] } } the_key->is_active = TRUE; 40005240: 82 10 20 01 mov 1, %g1 _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 40005244: c6 26 00 00 st %g3, [ %i0 ] } } the_key->is_active = TRUE; 40005248: c2 2c 20 10 stb %g1, [ %l0 + 0x10 ] _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; _Thread_Enable_dispatch(); 4000524c: 40 00 0c aa call 400084f4 <_Thread_Enable_dispatch> 40005250: b0 10 20 00 clr %i0 return 0; } 40005254: 81 c7 e0 08 ret 40005258: 81 e8 00 00 restore 4000525c : */ int pthread_key_delete( pthread_key_t key ) { 4000525c: 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 *) 40005260: 23 10 00 56 sethi %hi(0x40015800), %l1 40005264: 92 10 00 18 mov %i0, %o1 40005268: 94 07 bf f4 add %fp, -12, %o2 4000526c: 40 00 0a 7c call 40007c5c <_Objects_Get> 40005270: 90 14 61 04 or %l1, 0x104, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40005274: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005278: a0 10 00 08 mov %o0, %l0 4000527c: 80 a0 60 00 cmp %g1, 0 40005280: 12 80 00 24 bne 40005310 40005284: b0 10 20 16 mov 0x16, %i0 case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 40005288: 90 14 61 04 or %l1, 0x104, %o0 4000528c: 40 00 09 44 call 4000779c <_Objects_Close> 40005290: 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 ] ) 40005294: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 40005298: 80 a2 20 00 cmp %o0, 0 4000529c: 02 80 00 04 be 400052ac 400052a0: c0 2c 20 10 clrb [ %l0 + 0x10 ] _Workspace_Free( the_key->Values[ the_api ] ); 400052a4: 40 00 11 ed call 40009a58 <_Workspace_Free> 400052a8: 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 ] ) 400052ac: d0 04 20 20 ld [ %l0 + 0x20 ], %o0 400052b0: 80 a2 20 00 cmp %o0, 0 400052b4: 22 80 00 05 be,a 400052c8 400052b8: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400052bc: 40 00 11 e7 call 40009a58 <_Workspace_Free> 400052c0: 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 ] ) 400052c4: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 400052c8: 80 a2 20 00 cmp %o0, 0 400052cc: 22 80 00 05 be,a 400052e0 400052d0: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED _Workspace_Free( the_key->Values[ the_api ] ); 400052d4: 40 00 11 e1 call 40009a58 <_Workspace_Free> 400052d8: 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 ] ) 400052dc: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 400052e0: 80 a2 20 00 cmp %o0, 0 400052e4: 02 80 00 05 be 400052f8 400052e8: 92 10 00 10 mov %l0, %o1 _Workspace_Free( the_key->Values[ the_api ] ); 400052ec: 40 00 11 db call 40009a58 <_Workspace_Free> <== NOT EXECUTED 400052f0: 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 ); 400052f4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400052f8: 11 10 00 56 sethi %hi(0x40015800), %o0 400052fc: 90 12 21 04 or %o0, 0x104, %o0 ! 40015904 <_POSIX_Keys_Information> 40005300: 40 00 09 ea call 40007aa8 <_Objects_Free> 40005304: 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(); 40005308: 40 00 0c 7b call 400084f4 <_Thread_Enable_dispatch> 4000530c: 01 00 00 00 nop case OBJECTS_ERROR: break; } return EINVAL; } 40005310: 81 c7 e0 08 ret 40005314: 81 e8 00 00 restore 40021908 : int pthread_kill( pthread_t thread, int sig ) { 40021908: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 4002190c: 80 a6 60 00 cmp %i1, 0 40021910: 02 80 00 06 be 40021928 40021914: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40021918: a0 06 7f ff add %i1, -1, %l0 4002191c: 80 a4 20 1f cmp %l0, 0x1f 40021920: 08 80 00 08 bleu 40021940 40021924: 11 10 00 9f sethi %hi(0x40027c00), %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40021928: 7f ff d0 45 call 40015a3c <__errno> 4002192c: b0 10 3f ff mov -1, %i0 40021930: 82 10 20 16 mov 0x16, %g1 40021934: c2 22 00 00 st %g1, [ %o0 ] 40021938: 81 c7 e0 08 ret 4002193c: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40021940: 94 07 bf f4 add %fp, -12, %o2 40021944: 7f ff a7 e4 call 4000b8d4 <_Objects_Get> 40021948: 90 12 23 e0 or %o0, 0x3e0, %o0 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4002194c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40021950: 80 a0 60 00 cmp %g1, 0 40021954: 12 80 00 23 bne 400219e0 40021958: 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 ) { 4002195c: 83 2e 60 02 sll %i1, 2, %g1 40021960: 85 2e 60 04 sll %i1, 4, %g2 40021964: 84 20 80 01 sub %g2, %g1, %g2 40021968: 03 10 00 a0 sethi %hi(0x40028000), %g1 4002196c: 82 10 63 4c or %g1, 0x34c, %g1 ! 4002834c <_POSIX_signals_Vectors> 40021970: 82 00 40 02 add %g1, %g2, %g1 40021974: c2 00 60 08 ld [ %g1 + 8 ], %g1 40021978: 80 a0 60 01 cmp %g1, 1 4002197c: 02 80 00 15 be 400219d0 40021980: c6 02 21 60 ld [ %o0 + 0x160 ], %g3 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 40021984: c4 00 e0 c8 ld [ %g3 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 40021988: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 4002198c: b2 10 20 01 mov 1, %i1 40021990: 83 2e 40 10 sll %i1, %l0, %g1 40021994: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 40021998: 94 10 20 00 clr %o2 4002199c: 7f ff ff 8f call 400217d8 <_POSIX_signals_Unblock_thread> 400219a0: c4 20 e0 c8 st %g2, [ %g3 + 0xc8 ] the_thread->do_post_task_switch_extension = true; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 400219a4: 03 10 00 9f sethi %hi(0x40027c00), %g1 400219a8: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 40027dac <_ISR_Nest_level> 400219ac: 80 a0 60 00 cmp %g1, 0 400219b0: 02 80 00 08 be 400219d0 400219b4: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ] 400219b8: 03 10 00 9f sethi %hi(0x40027c00), %g1 400219bc: c2 00 61 d0 ld [ %g1 + 0x1d0 ], %g1 ! 40027dd0 <_Thread_Executing> 400219c0: 80 a6 00 01 cmp %i0, %g1 400219c4: 12 80 00 03 bne 400219d0 400219c8: 03 10 00 9f sethi %hi(0x40027c00), %g1 _ISR_Signals_to_thread_executing = TRUE; 400219cc: f2 28 62 68 stb %i1, [ %g1 + 0x268 ] ! 40027e68 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED } _Thread_Enable_dispatch(); 400219d0: 7f ff aa 2c call 4000c280 <_Thread_Enable_dispatch> 400219d4: b0 10 20 00 clr %i0 400219d8: 81 c7 e0 08 ret 400219dc: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 400219e0: 7f ff d0 17 call 40015a3c <__errno> 400219e4: b0 10 3f ff mov -1, %i0 400219e8: 82 10 20 03 mov 3, %g1 400219ec: c2 22 00 00 st %g1, [ %o0 ] } 400219f0: 81 c7 e0 08 ret 400219f4: 81 e8 00 00 restore 40006fd8 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 40006fd8: 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; 40006fdc: 03 10 00 5a sethi %hi(0x40016800), %g1 40006fe0: 80 a6 60 00 cmp %i1, 0 40006fe4: 02 80 00 03 be 40006ff0 40006fe8: a0 10 62 0c or %g1, 0x20c, %l0 40006fec: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 40006ff0: 80 a6 20 00 cmp %i0, 0 40006ff4: 22 80 00 2f be,a 400070b0 40006ff8: b0 10 20 16 mov 0x16, %i0 break; } } #endif if ( !the_attr->is_initialized ) 40006ffc: c2 04 00 00 ld [ %l0 ], %g1 40007000: 80 a0 60 00 cmp %g1, 0 40007004: 22 80 00 2b be,a 400070b0 40007008: b0 10 20 16 mov 0x16, %i0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 4000700c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007010: 80 a0 60 00 cmp %g1, 0 40007014: 22 80 00 0a be,a 4000703c 40007018: c2 04 20 0c ld [ %l0 + 0xc ], %g1 4000701c: 11 10 00 5a sethi %hi(0x40016800), %o0 <== NOT EXECUTED 40007020: 15 10 00 5a sethi %hi(0x40016800), %o2 <== NOT EXECUTED 40007024: 17 10 00 5a sethi %hi(0x40016800), %o3 <== NOT EXECUTED 40007028: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED 4000702c: 94 12 a2 a0 or %o2, 0x2a0, %o2 <== NOT EXECUTED 40007030: 96 12 e2 68 or %o3, 0x268, %o3 <== NOT EXECUTED 40007034: 7f ff f3 b2 call 40003efc <__assert_func> <== NOT EXECUTED 40007038: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 4000703c: 80 a0 60 01 cmp %g1, 1 40007040: 02 80 00 08 be 40007060 40007044: 80 a0 60 02 cmp %g1, 2 40007048: 02 80 00 08 be 40007068 4000704c: 80 a0 60 00 cmp %g1, 0 40007050: 02 80 00 07 be 4000706c 40007054: a2 10 20 00 clr %l1 _Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; _Thread_Enable_dispatch(); return 0; 40007058: 81 c7 e0 08 ret 4000705c: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40007060: 10 80 00 03 b 4000706c 40007064: a2 10 20 02 mov 2, %l1 40007068: a2 10 20 03 mov 3, %l1 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 4000706c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007070: 82 00 7f ff add %g1, -1, %g1 40007074: 80 a0 60 fd cmp %g1, 0xfd 40007078: 38 80 00 0e bgu,a 400070b0 4000707c: b0 10 20 16 mov 0x16, %i0 40007080: 03 10 00 61 sethi %hi(0x40018400), %g1 40007084: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 40018560 <_Thread_Dispatch_disable_level> 40007088: 84 00 a0 01 inc %g2 4000708c: c4 20 61 60 st %g2, [ %g1 + 0x160 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 40007090: 11 10 00 62 sethi %hi(0x40018800), %o0 40007094: 40 00 09 fc call 40009884 <_Objects_Allocate> 40007098: 90 12 21 30 or %o0, 0x130, %o0 ! 40018930 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 4000709c: b2 92 20 00 orcc %o0, 0, %i1 400070a0: 32 80 00 06 bne,a 400070b8 400070a4: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Thread_Enable_dispatch(); 400070a8: 40 00 0d 77 call 4000a684 <_Thread_Enable_dispatch> 400070ac: b0 10 20 0b mov 0xb, %i0 400070b0: 81 c7 e0 08 ret 400070b4: 81 e8 00 00 restore return EAGAIN; } the_mutex->process_shared = the_attr->process_shared; 400070b8: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 400070bc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400070c0: 80 a0 60 00 cmp %g1, 0 400070c4: 02 80 00 04 be 400070d4 400070c8: 82 10 20 01 mov 1, %g1 the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 400070cc: 10 80 00 03 b 400070d8 <== NOT EXECUTED 400070d0: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 400070d4: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 400070d8: c4 04 20 08 ld [ %l0 + 8 ], %g2 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; 400070dc: 82 10 20 01 mov 1, %g1 400070e0: c2 2e 60 58 stb %g1, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 400070e4: 82 10 20 ff mov 0xff, %g1 400070e8: 82 20 40 02 sub %g1, %g2, %g1 /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 400070ec: 92 06 60 54 add %i1, 0x54, %o1 400070f0: 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; the_mutex_attr->priority_ceiling = 400070f4: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 400070f8: e2 26 60 5c st %l1, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 400070fc: 40 00 07 c3 call 40009008 <_CORE_mutex_Initialize> 40007100: 90 06 60 14 add %i1, 0x14, %o0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40007104: c6 06 60 08 ld [ %i1 + 8 ], %g3 40007108: 03 10 00 62 sethi %hi(0x40018800), %g1 4000710c: c4 00 61 4c ld [ %g1 + 0x14c ], %g2 ! 4001894c <_POSIX_Mutex_Information+0x1c> 40007110: 03 00 00 3f sethi %hi(0xfc00), %g1 40007114: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007118: 82 08 c0 01 and %g3, %g1, %g1 4000711c: 83 28 60 02 sll %g1, 2, %g1 40007120: f2 20 80 01 st %i1, [ %g2 + %g1 ] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == FALSE */ the_object->name.name_u32 = name; 40007124: 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; 40007128: c6 26 00 00 st %g3, [ %i0 ] _Thread_Enable_dispatch(); 4000712c: 40 00 0d 56 call 4000a684 <_Thread_Enable_dispatch> 40007130: b0 10 20 00 clr %i0 40007134: 81 c7 e0 08 ret 40007138: 81 e8 00 00 restore 400071ac : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 400071ac: 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 ) 400071b0: 80 a6 a0 00 cmp %i2, 0 400071b4: 02 80 00 1f be 40007230 400071b8: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 400071bc: 82 06 7f ff add %i1, -1, %g1 400071c0: 80 a0 60 fd cmp %g1, 0xfd 400071c4: 38 80 00 19 bgu,a 40007228 400071c8: b0 10 20 16 mov 0x16, %i0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 400071cc: 7f ff ff dc call 4000713c 400071d0: 90 10 00 18 mov %i0, %o0 if ( status ) 400071d4: b0 92 20 00 orcc %o0, 0, %i0 400071d8: 12 80 00 14 bne 40007228 400071dc: 90 10 00 10 mov %l0, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); 400071e0: 7f ff ff 55 call 40006f34 <_POSIX_Mutex_Get> 400071e4: 92 07 bf f4 add %fp, -12, %o1 switch ( location ) { 400071e8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400071ec: 80 a0 60 00 cmp %g1, 0 400071f0: 32 80 00 0e bne,a 40007228 400071f4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 400071f8: 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( 400071fc: 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( 40007200: 84 10 20 ff mov 0xff, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40007204: 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( 40007208: 84 20 80 01 sub %g2, %g1, %g2 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 4000720c: 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( 40007210: c4 26 80 00 st %g2, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40007214: 94 10 20 00 clr %o2 40007218: 40 00 07 f2 call 400091e0 <_CORE_mutex_Surrender> 4000721c: 90 02 20 14 add %o0, 0x14, %o0 &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 40007220: 40 00 0d 19 call 4000a684 <_Thread_Enable_dispatch> 40007224: 01 00 00 00 nop 40007228: 81 c7 e0 08 ret 4000722c: 81 e8 00 00 restore return 0; 40007230: b0 10 20 16 mov 0x16, %i0 case OBJECTS_ERROR: break; } return EINVAL; } 40007234: 81 c7 e0 08 ret 40007238: 81 e8 00 00 restore 40005c5c : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 40005c5c: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 40005c60: 80 a6 20 00 cmp %i0, 0 40005c64: 02 80 00 2d be 40005d18 40005c68: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40005c6c: 80 a6 60 00 cmp %i1, 0 40005c70: 32 80 00 06 bne,a 40005c88 40005c74: c2 04 00 00 ld [ %l0 ], %g1 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 40005c78: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 40005c7c: 40 00 02 b0 call 4000673c <== NOT EXECUTED 40005c80: 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 ) 40005c84: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40005c88: 80 a0 60 00 cmp %g1, 0 40005c8c: 02 80 00 23 be 40005d18 40005c90: 01 00 00 00 nop return EINVAL; switch ( the_attr->process_shared ) { 40005c94: c2 04 20 04 ld [ %l0 + 4 ], %g1 40005c98: 80 a0 60 00 cmp %g1, 0 40005c9c: 12 80 00 1f bne 40005d18 40005ca0: 05 10 00 6d sethi %hi(0x4001b400), %g2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005ca4: c2 00 a3 40 ld [ %g2 + 0x340 ], %g1 ! 4001b740 <_Thread_Dispatch_disable_level> 40005ca8: 82 00 60 01 inc %g1 40005cac: c2 20 a3 40 st %g1, [ %g2 + 0x340 ] * 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 *) 40005cb0: 33 10 00 6e sethi %hi(0x4001b800), %i1 40005cb4: 40 00 0a 95 call 40008708 <_Objects_Allocate> 40005cb8: 90 16 61 90 or %i1, 0x190, %o0 ! 4001b990 <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 40005cbc: a0 92 20 00 orcc %o0, 0, %l0 40005cc0: 12 80 00 06 bne 40005cd8 40005cc4: 90 04 20 10 add %l0, 0x10, %o0 _Thread_Enable_dispatch(); 40005cc8: 40 00 0e 10 call 40009508 <_Thread_Enable_dispatch> 40005ccc: b0 10 20 0b mov 0xb, %i0 40005cd0: 81 c7 e0 08 ret 40005cd4: 81 e8 00 00 restore return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 40005cd8: 40 00 08 97 call 40007f34 <_CORE_RWLock_Initialize> 40005cdc: 92 07 bf f4 add %fp, -12, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 40005ce0: c4 04 20 08 ld [ %l0 + 8 ], %g2 40005ce4: 82 16 61 90 or %i1, 0x190, %g1 40005ce8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 40005cec: 03 00 00 3f sethi %hi(0xfc00), %g1 40005cf0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005cf4: 82 08 80 01 and %g2, %g1, %g1 40005cf8: 83 28 60 02 sll %g1, 2, %g1 40005cfc: 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; 40005d00: c0 24 20 0c clr [ %l0 + 0xc ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 40005d04: c4 26 00 00 st %g2, [ %i0 ] _Thread_Enable_dispatch(); 40005d08: 40 00 0e 00 call 40009508 <_Thread_Enable_dispatch> 40005d0c: b0 10 20 00 clr %i0 40005d10: 81 c7 e0 08 ret 40005d14: 81 e8 00 00 restore return 0; } 40005d18: 81 c7 e0 08 ret 40005d1c: 91 e8 20 16 restore %g0, 0x16, %o0 40005d98 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40005d98: 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 ) 40005d9c: 80 a6 20 00 cmp %i0, 0 40005da0: 02 80 00 31 be 40005e64 40005da4: 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 ); 40005da8: 92 07 bf f0 add %fp, -16, %o1 40005dac: 40 00 1c 19 call 4000ce10 <_POSIX_Absolute_timeout_to_ticks> 40005db0: a0 10 20 00 clr %l0 switch (status) { 40005db4: 80 a2 20 02 cmp %o0, 2 40005db8: 08 80 00 05 bleu 40005dcc 40005dbc: b2 10 00 08 mov %o0, %i1 40005dc0: 80 a2 20 03 cmp %o0, 3 40005dc4: 22 80 00 02 be,a 40005dcc 40005dc8: a0 10 20 01 mov 1, %l0 40005dcc: d2 06 00 00 ld [ %i0 ], %o1 40005dd0: 11 10 00 6e sethi %hi(0x4001b800), %o0 40005dd4: 94 07 bf f4 add %fp, -12, %o2 40005dd8: 40 00 0b a6 call 40008c70 <_Objects_Get> 40005ddc: 90 12 21 90 or %o0, 0x190, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40005de0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005de4: 80 a0 60 00 cmp %g1, 0 40005de8: 32 80 00 20 bne,a 40005e68 40005dec: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40005df0: d2 06 00 00 ld [ %i0 ], %o1 40005df4: d6 07 bf f0 ld [ %fp + -16 ], %o3 40005df8: a0 0c 20 ff and %l0, 0xff, %l0 40005dfc: 90 02 20 10 add %o0, 0x10, %o0 40005e00: 94 10 00 10 mov %l0, %o2 40005e04: 40 00 08 57 call 40007f60 <_CORE_RWLock_Obtain_for_reading> 40005e08: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40005e0c: 40 00 0d bf call 40009508 <_Thread_Enable_dispatch> 40005e10: 01 00 00 00 nop if ( !do_wait && 40005e14: 80 a4 20 00 cmp %l0, 0 40005e18: 12 80 00 0d bne 40005e4c 40005e1c: 03 10 00 6e sethi %hi(0x4001b800), %g1 40005e20: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40005e24: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 40005e28: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40005e2c: 32 80 00 09 bne,a 40005e50 <== NOT EXECUTED 40005e30: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 40005e34: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40005e38: 02 80 00 0c be 40005e68 <== NOT EXECUTED 40005e3c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40005e40: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 40005e44: 08 80 00 09 bleu 40005e68 <== NOT EXECUTED 40005e48: 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( 40005e4c: 03 10 00 6e sethi %hi(0x4001b800), %g1 40005e50: c2 00 60 00 ld [ %g1 ], %g1 40005e54: 40 00 00 3f call 40005f50 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40005e58: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40005e5c: 81 c7 e0 08 ret 40005e60: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 40005e64: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40005e68: b0 10 00 08 mov %o0, %i0 40005e6c: 81 c7 e0 08 ret 40005e70: 81 e8 00 00 restore 40005e74 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 40005e74: 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 ) 40005e78: 80 a6 20 00 cmp %i0, 0 40005e7c: 02 80 00 31 be 40005f40 40005e80: 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 ); 40005e84: 92 07 bf f0 add %fp, -16, %o1 40005e88: 40 00 1b e2 call 4000ce10 <_POSIX_Absolute_timeout_to_ticks> 40005e8c: a0 10 20 00 clr %l0 switch (status) { 40005e90: 80 a2 20 02 cmp %o0, 2 40005e94: 08 80 00 05 bleu 40005ea8 40005e98: b2 10 00 08 mov %o0, %i1 40005e9c: 80 a2 20 03 cmp %o0, 3 40005ea0: 22 80 00 02 be,a 40005ea8 40005ea4: a0 10 20 01 mov 1, %l0 40005ea8: d2 06 00 00 ld [ %i0 ], %o1 40005eac: 11 10 00 6e sethi %hi(0x4001b800), %o0 40005eb0: 94 07 bf f4 add %fp, -12, %o2 40005eb4: 40 00 0b 6f call 40008c70 <_Objects_Get> 40005eb8: 90 12 21 90 or %o0, 0x190, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40005ebc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40005ec0: 80 a0 60 00 cmp %g1, 0 40005ec4: 32 80 00 20 bne,a 40005f44 40005ec8: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40005ecc: d2 06 00 00 ld [ %i0 ], %o1 40005ed0: d6 07 bf f0 ld [ %fp + -16 ], %o3 40005ed4: a0 0c 20 ff and %l0, 0xff, %l0 40005ed8: 90 02 20 10 add %o0, 0x10, %o0 40005edc: 94 10 00 10 mov %l0, %o2 40005ee0: 40 00 08 54 call 40008030 <_CORE_RWLock_Obtain_for_writing> 40005ee4: 98 10 20 00 clr %o4 do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 40005ee8: 40 00 0d 88 call 40009508 <_Thread_Enable_dispatch> 40005eec: 01 00 00 00 nop if ( !do_wait && 40005ef0: 80 a4 20 00 cmp %l0, 0 40005ef4: 12 80 00 0d bne 40005f28 40005ef8: 03 10 00 6e sethi %hi(0x4001b800), %g1 40005efc: c2 00 60 00 ld [ %g1 ], %g1 <== NOT EXECUTED 40005f00: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 <== NOT EXECUTED 40005f04: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40005f08: 32 80 00 09 bne,a 40005f2c <== NOT EXECUTED 40005f0c: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 40005f10: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40005f14: 02 80 00 0c be 40005f44 <== NOT EXECUTED 40005f18: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40005f1c: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED 40005f20: 08 80 00 09 bleu 40005f44 <== NOT EXECUTED 40005f24: 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( 40005f28: 03 10 00 6e sethi %hi(0x4001b800), %g1 40005f2c: c2 00 60 00 ld [ %g1 ], %g1 40005f30: 40 00 00 08 call 40005f50 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40005f34: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40005f38: 81 c7 e0 08 ret 40005f3c: 91 e8 00 08 restore %g0, %o0, %o0 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 40005f40: 90 10 20 16 mov 0x16, %o0 case OBJECTS_ERROR: break; } return EINVAL; } 40005f44: b0 10 00 08 mov %o0, %i0 40005f48: 81 c7 e0 08 ret 40005f4c: 81 e8 00 00 restore 4000530c : int pthread_setcancelstate( int state, int *oldstate ) { 4000530c: 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() ) 40005310: 03 10 00 55 sethi %hi(0x40015400), %g1 40005314: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 400155ec <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 40005318: 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() ) 4000531c: 80 a0 60 00 cmp %g1, 0 40005320: 12 80 00 26 bne 400053b8 40005324: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 40005328: 80 a6 60 00 cmp %i1, 0 4000532c: 02 80 00 25 be 400053c0 40005330: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 40005334: 38 80 00 21 bgu,a 400053b8 40005338: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4000533c: 03 10 00 55 sethi %hi(0x40015400), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40005340: 07 10 00 55 sethi %hi(0x40015400), %g3 40005344: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 40005348: c2 00 e1 50 ld [ %g3 + 0x150 ], %g1 4000534c: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40005350: 82 00 60 01 inc %g1 40005354: c2 20 e1 50 st %g1, [ %g3 + 0x150 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40005358: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000535c: 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; 40005360: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005364: 12 80 00 0b bne 40005390 40005368: c8 20 a0 cc st %g4, [ %g2 + 0xcc ] 4000536c: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40005370: 80 a0 60 01 cmp %g1, 1 40005374: 32 80 00 08 bne,a 40005394 40005378: b2 10 20 00 clr %i1 4000537c: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED 40005380: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40005384: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED 40005388: 10 80 00 03 b 40005394 <== NOT EXECUTED 4000538c: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED 40005390: b2 10 20 00 clr %i1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40005394: 40 00 0a ef call 40007f50 <_Thread_Enable_dispatch> 40005398: b0 10 20 00 clr %i0 if ( cancel ) 4000539c: 80 8e 60 ff btst 0xff, %i1 400053a0: 02 80 00 06 be 400053b8 400053a4: 03 10 00 55 sethi %hi(0x40015400), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 400053a8: d0 00 62 10 ld [ %g1 + 0x210 ], %o0 ! 40015610 <_Thread_Executing> <== NOT EXECUTED 400053ac: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 400053b0: 7f ff fe d4 call 40004f00 <_POSIX_Thread_Exit> <== NOT EXECUTED 400053b4: b0 10 20 00 clr %i0 <== NOT EXECUTED 400053b8: 81 c7 e0 08 ret 400053bc: 81 e8 00 00 restore 400053c0: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return 0; } 400053c4: 81 c7 e0 08 ret <== NOT EXECUTED 400053c8: 81 e8 00 00 restore <== NOT EXECUTED 400053cc : int pthread_setcanceltype( int type, int *oldtype ) { 400053cc: 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() ) 400053d0: 03 10 00 55 sethi %hi(0x40015400), %g1 400053d4: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 400155ec <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 400053d8: 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() ) 400053dc: 80 a0 60 00 cmp %g1, 0 400053e0: 12 80 00 26 bne 40005478 400053e4: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 400053e8: 80 a6 60 00 cmp %i1, 0 400053ec: 02 80 00 25 be 40005480 400053f0: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 400053f4: 38 80 00 21 bgu,a 40005478 400053f8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 400053fc: 03 10 00 55 sethi %hi(0x40015400), %g1 40005400: 07 10 00 55 sethi %hi(0x40015400), %g3 40005404: c4 00 62 10 ld [ %g1 + 0x210 ], %g2 40005408: c2 00 e1 50 ld [ %g3 + 0x150 ], %g1 4000540c: c4 00 a1 60 ld [ %g2 + 0x160 ], %g2 40005410: 82 00 60 01 inc %g1 40005414: c2 20 e1 50 st %g1, [ %g3 + 0x150 ] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 40005418: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 4000541c: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40005420: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 40005424: 80 a0 60 00 cmp %g1, 0 40005428: 12 80 00 0a bne 40005450 4000542c: c8 20 a0 d0 st %g4, [ %g2 + 0xd0 ] 40005430: 80 a1 20 01 cmp %g4, 1 40005434: 32 80 00 08 bne,a 40005454 40005438: b2 10 20 00 clr %i1 4000543c: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40005440: 80 a0 00 01 cmp %g0, %g1 40005444: 82 40 20 00 addx %g0, 0, %g1 40005448: 10 80 00 03 b 40005454 4000544c: b2 10 00 01 mov %g1, %i1 40005450: b2 10 20 00 clr %i1 <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 40005454: 40 00 0a bf call 40007f50 <_Thread_Enable_dispatch> 40005458: b0 10 20 00 clr %i0 if ( cancel ) 4000545c: 80 8e 60 ff btst 0xff, %i1 40005460: 02 80 00 06 be 40005478 40005464: 03 10 00 55 sethi %hi(0x40015400), %g1 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 40005468: d0 00 62 10 ld [ %g1 + 0x210 ], %o0 ! 40015610 <_Thread_Executing> <== NOT EXECUTED 4000546c: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40005470: 7f ff fe a4 call 40004f00 <_POSIX_Thread_Exit> <== NOT EXECUTED 40005474: b0 10 20 00 clr %i0 <== NOT EXECUTED 40005478: 81 c7 e0 08 ret 4000547c: 81 e8 00 00 restore 40005480: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return 0; } 40005484: 81 c7 e0 08 ret <== NOT EXECUTED 40005488: 81 e8 00 00 restore <== NOT EXECUTED 40007ac8 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 40007ac8: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 40007acc: 80 a6 a0 00 cmp %i2, 0 40007ad0: 22 80 00 5d be,a 40007c44 40007ad4: b0 10 20 16 mov 0x16, %i0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 40007ad8: c2 06 80 00 ld [ %i2 ], %g1 40007adc: 82 00 7f ff add %g1, -1, %g1 40007ae0: 80 a0 60 fd cmp %g1, 0xfd 40007ae4: 18 80 00 5a bgu 40007c4c 40007ae8: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40007aec: 02 80 00 10 be 40007b2c 40007af0: a6 10 20 00 clr %l3 40007af4: 14 80 00 08 bg 40007b14 40007af8: 80 a6 60 02 cmp %i1, 2 40007afc: 80 a6 60 00 cmp %i1, 0 40007b00: a6 10 20 01 mov 1, %l3 40007b04: 02 80 00 1b be 40007b70 40007b08: a4 10 20 00 clr %l2 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); return 0; 40007b0c: 81 c7 e0 08 ret 40007b10: 91 e8 20 16 restore %g0, 0x16, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40007b14: 02 80 00 05 be 40007b28 40007b18: 80 a6 60 03 cmp %i1, 3 40007b1c: 32 80 00 4a bne,a 40007c44 40007b20: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40007b24: 30 80 00 04 b,a 40007b34 40007b28: a6 10 20 02 mov 2, %l3 40007b2c: 10 80 00 11 b 40007b70 40007b30: a4 10 20 00 clr %l2 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 ) < 40007b34: 40 00 0e a6 call 4000b5cc <_Timespec_To_ticks> 40007b38: 90 06 a0 08 add %i2, 8, %o0 40007b3c: a0 10 00 08 mov %o0, %l0 40007b40: 40 00 0e a3 call 4000b5cc <_Timespec_To_ticks> 40007b44: 90 06 a0 10 add %i2, 0x10, %o0 40007b48: 80 a4 00 08 cmp %l0, %o0 40007b4c: 2a 80 00 3e bcs,a 40007c44 40007b50: 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 ) ) 40007b54: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40007b58: 82 00 7f ff add %g1, -1, %g1 40007b5c: 80 a0 60 fd cmp %g1, 0xfd 40007b60: 18 80 00 3b bgu 40007c4c 40007b64: 03 10 00 1e sethi %hi(0x40007800), %g1 40007b68: a6 10 20 03 mov 3, %l3 40007b6c: a4 10 61 e4 or %g1, 0x1e4, %l2 40007b70: 92 10 00 18 mov %i0, %o1 40007b74: 11 10 00 61 sethi %hi(0x40018400), %o0 40007b78: 94 07 bf f4 add %fp, -12, %o2 40007b7c: 40 00 08 9c call 40009dec <_Objects_Get> 40007b80: 90 12 23 f0 or %o0, 0x3f0, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40007b84: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b88: a2 10 00 08 mov %o0, %l1 40007b8c: 80 a0 60 00 cmp %g1, 0 40007b90: 12 80 00 2d bne 40007c44 40007b94: b0 10 20 03 mov 3, %i0 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40007b98: e0 02 21 60 ld [ %o0 + 0x160 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40007b9c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40007ba0: 80 a0 60 03 cmp %g1, 3 40007ba4: 32 80 00 05 bne,a 40007bb8 40007ba8: f2 24 20 7c st %i1, [ %l0 + 0x7c ] (void) _Watchdog_Remove( &api->Sporadic_timer ); 40007bac: 40 00 0f de call 4000bb24 <_Watchdog_Remove> 40007bb0: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40007bb4: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 40007bb8: 92 10 00 1a mov %i2, %o1 40007bbc: 90 04 20 80 add %l0, 0x80, %o0 40007bc0: 40 00 22 6f call 4001057c 40007bc4: 94 10 20 18 mov 0x18, %o2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40007bc8: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; 40007bcc: e6 24 60 7c st %l3, [ %l1 + 0x7c ] the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40007bd0: 80 a0 60 00 cmp %g1, 0 40007bd4: 06 80 00 1a bl 40007c3c 40007bd8: e4 24 60 80 st %l2, [ %l1 + 0x80 ] 40007bdc: 80 a0 60 02 cmp %g1, 2 40007be0: 24 80 00 07 ble,a 40007bfc 40007be4: c4 04 20 80 ld [ %l0 + 0x80 ], %g2 40007be8: 80 a0 60 03 cmp %g1, 3 40007bec: 12 80 00 14 bne 40007c3c 40007bf0: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 40007bf4: 10 80 00 0c b 40007c24 40007bf8: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40007bfc: 03 10 00 61 sethi %hi(0x40018400), %g1 40007c00: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 400184b8 <_Thread_Ticks_per_timeslice> the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40007c04: 90 10 00 11 mov %l1, %o0 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40007c08: c2 24 60 78 st %g1, [ %l1 + 0x78 ] 40007c0c: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40007c10: 94 10 20 01 mov 1, %o2 40007c14: 92 22 40 02 sub %o1, %g2, %o1 40007c18: 40 00 09 28 call 4000a0b8 <_Thread_Change_priority> 40007c1c: d2 24 60 18 st %o1, [ %l1 + 0x18 ] 40007c20: 30 80 00 07 b,a 40007c3c ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; _Watchdog_Remove( &api->Sporadic_timer ); 40007c24: 90 04 20 9c add %l0, 0x9c, %o0 40007c28: 40 00 0f bf call 4000bb24 <_Watchdog_Remove> 40007c2c: c2 24 20 98 st %g1, [ %l0 + 0x98 ] _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 40007c30: 92 10 00 11 mov %l1, %o1 40007c34: 7f ff ff 80 call 40007a34 <_POSIX_Threads_Sporadic_budget_TSR> 40007c38: 90 10 20 00 clr %o0 break; } _Thread_Enable_dispatch(); 40007c3c: 40 00 0a 92 call 4000a684 <_Thread_Enable_dispatch> 40007c40: b0 10 20 00 clr %i0 40007c44: 81 c7 e0 08 ret 40007c48: 81 e8 00 00 restore return 0; 40007c4c: b0 10 20 16 mov 0x16, %i0 case OBJECTS_ERROR: break; } return ESRCH; } 40007c50: 81 c7 e0 08 ret 40007c54: 81 e8 00 00 restore 400161b0 : ssize_t read( int fd, void *buffer, size_t count ) { 400161b0: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400161b4: 03 10 00 5f sethi %hi(0x40017c00), %g1 400161b8: c2 00 62 a8 ld [ %g1 + 0x2a8 ], %g1 ! 40017ea8 ssize_t read( int fd, void *buffer, size_t count ) { 400161bc: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400161c0: 80 a6 00 01 cmp %i0, %g1 400161c4: 1a 80 00 0e bcc 400161fc 400161c8: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 400161cc: 03 10 00 62 sethi %hi(0x40018800), %g1 400161d0: c6 00 62 c8 ld [ %g1 + 0x2c8 ], %g3 ! 40018ac8 400161d4: 85 2e 20 02 sll %i0, 2, %g2 400161d8: 83 2e 20 04 sll %i0, 4, %g1 400161dc: 82 20 40 02 sub %g1, %g2, %g1 400161e0: 82 00 40 18 add %g1, %i0, %g1 400161e4: 83 28 60 02 sll %g1, 2, %g1 400161e8: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 400161ec: c2 06 20 0c ld [ %i0 + 0xc ], %g1 400161f0: 80 88 61 00 btst 0x100, %g1 400161f4: 12 80 00 06 bne 4001620c 400161f8: 80 a6 60 00 cmp %i1, 0 400161fc: 7f ff da c7 call 4000cd18 <__errno> <== NOT EXECUTED 40016200: 01 00 00 00 nop <== NOT EXECUTED 40016204: 10 80 00 15 b 40016258 <== NOT EXECUTED 40016208: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 4001620c: 02 80 00 08 be 4001622c 40016210: 01 00 00 00 nop rtems_libio_check_count( count ); 40016214: 80 a6 a0 00 cmp %i2, 0 40016218: 02 80 00 1b be 40016284 4001621c: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 40016220: 80 88 60 02 btst 2, %g1 40016224: 32 80 00 06 bne,a 4001623c 40016228: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4001622c: 7f ff da bb call 4000cd18 <__errno> <== NOT EXECUTED 40016230: 01 00 00 00 nop <== NOT EXECUTED 40016234: 10 80 00 09 b 40016258 <== NOT EXECUTED 40016238: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 4001623c: c2 00 60 08 ld [ %g1 + 8 ], %g1 40016240: 80 a0 60 00 cmp %g1, 0 40016244: 12 80 00 08 bne 40016264 40016248: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001624c: 7f ff da b3 call 4000cd18 <__errno> <== NOT EXECUTED 40016250: 01 00 00 00 nop <== NOT EXECUTED 40016254: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40016258: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001625c: 10 80 00 0a b 40016284 <== NOT EXECUTED 40016260: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->read_h)( iop, buffer, count ); 40016264: 9f c0 40 00 call %g1 40016268: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 4001626c: 80 a2 20 00 cmp %o0, 0 40016270: 04 80 00 05 ble 40016284 40016274: 01 00 00 00 nop iop->offset += rc; 40016278: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001627c: 82 00 40 08 add %g1, %o0, %g1 40016280: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 40016284: 81 c7 e0 08 ret 40016288: 91 e8 00 08 restore %g0, %o0, %o0 400209d8 : /* * get next entry in a directory. */ struct dirent * readdir( DIR *dirp ) { 400209d8: 9d e3 bf 98 save %sp, -104, %sp register struct dirent *dp; if ( !dirp ) 400209dc: 80 a6 20 00 cmp %i0, 0 400209e0: 02 80 00 2a be 40020a88 400209e4: 88 10 20 00 clr %g4 return NULL; for (;;) { if (dirp->dd_loc == 0) { 400209e8: c2 06 20 04 ld [ %i0 + 4 ], %g1 400209ec: 80 a0 60 00 cmp %g1, 0 400209f0: 32 80 00 0a bne,a 40020a18 400209f4: c6 06 20 04 ld [ %i0 + 4 ], %g3 dirp->dd_size = getdents (dirp->dd_fd, 400209f8: d0 06 00 00 ld [ %i0 ], %o0 400209fc: d2 06 20 0c ld [ %i0 + 0xc ], %o1 40020a00: 40 00 2f 7d call 4002c7f4 40020a04: d4 06 20 10 ld [ %i0 + 0x10 ], %o2 dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 40020a08: 80 a2 20 00 cmp %o0, 0 40020a0c: 04 80 00 1e ble 40020a84 40020a10: d0 26 20 08 st %o0, [ %i0 + 8 ] return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 40020a14: c6 06 20 04 ld [ %i0 + 4 ], %g3 40020a18: c2 06 20 08 ld [ %i0 + 8 ], %g1 40020a1c: 80 a0 c0 01 cmp %g3, %g1 40020a20: 26 80 00 04 bl,a 40020a30 40020a24: d8 06 20 0c ld [ %i0 + 0xc ], %o4 dirp->dd_loc = 0; 40020a28: 10 bf ff f0 b 400209e8 40020a2c: c0 26 20 04 clr [ %i0 + 4 ] continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 40020a30: 88 03 00 03 add %o4, %g3, %g4 if ((intptr_t)dp & 03) /* bogus pointer check */ 40020a34: 80 89 20 03 btst 3, %g4 40020a38: 32 80 00 14 bne,a 40020a88 40020a3c: 88 10 20 00 clr %g4 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 40020a40: c4 11 20 08 lduh [ %g4 + 8 ], %g2 40020a44: 80 a0 a0 00 cmp %g2, 0 40020a48: 02 80 00 0f be 40020a84 40020a4c: 9a 00 80 03 add %g2, %g3, %o5 40020a50: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40020a54: 82 00 60 01 inc %g1 40020a58: 82 20 40 03 sub %g1, %g3, %g1 40020a5c: 80 a0 80 01 cmp %g2, %g1 40020a60: 34 80 00 0a bg,a 40020a88 40020a64: 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; 40020a68: da 26 20 04 st %o5, [ %i0 + 4 ] if (dp->d_ino == 0) 40020a6c: c2 03 00 03 ld [ %o4 + %g3 ], %g1 40020a70: 80 a0 60 00 cmp %g1, 0 40020a74: 22 bf ff de be,a 400209ec 40020a78: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED continue; return (dp); } } 40020a7c: 81 c7 e0 08 ret 40020a80: 91 e8 00 04 restore %g0, %g4, %o0 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) 40020a84: 88 10 20 00 clr %g4 continue; return (dp); } } 40020a88: b0 10 00 04 mov %g4, %i0 40020a8c: 81 c7 e0 08 ret 40020a90: 81 e8 00 00 restore 40020a94 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 40020a94: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40020a98: 80 a6 60 00 cmp %i1, 0 40020a9c: 12 80 00 06 bne 40020ab4 40020aa0: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 40020aa4: 40 00 38 a5 call 4002ed38 <__errno> <== NOT EXECUTED 40020aa8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020aac: 10 80 00 30 b 40020b6c <== NOT EXECUTED 40020ab0: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false ); 40020ab4: a0 07 bf e8 add %fp, -24, %l0 40020ab8: 92 10 20 00 clr %o1 40020abc: 94 10 00 10 mov %l0, %o2 40020ac0: 96 10 20 00 clr %o3 40020ac4: 7f ff 92 2c call 40005374 40020ac8: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40020acc: 80 a2 20 00 cmp %o0, 0 40020ad0: 12 80 00 28 bne 40020b70 40020ad4: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 40020ad8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40020adc: 80 a0 60 00 cmp %g1, 0 40020ae0: 12 80 00 04 bne 40020af0 40020ae4: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40020ae8: 10 80 00 19 b 40020b4c <== NOT EXECUTED 40020aec: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 40020af0: 9f c0 40 00 call %g1 40020af4: 90 10 00 10 mov %l0, %o0 40020af8: 80 a2 20 04 cmp %o0, 4 40020afc: 02 80 00 0f be 40020b38 40020b00: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 40020b04: 80 a0 60 00 cmp %g1, 0 40020b08: 02 80 00 08 be 40020b28 40020b0c: 01 00 00 00 nop 40020b10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40020b14: 80 a0 60 00 cmp %g1, 0 40020b18: 02 80 00 04 be 40020b28 40020b1c: 01 00 00 00 nop 40020b20: 9f c0 40 00 call %g1 40020b24: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40020b28: 40 00 38 84 call 4002ed38 <__errno> 40020b2c: b0 10 3f ff mov -1, %i0 40020b30: 10 80 00 0f b 40020b6c 40020b34: 82 10 20 16 mov 0x16, %g1 } if ( !loc.ops->readlink_h ){ 40020b38: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 40020b3c: 80 a0 a0 00 cmp %g2, 0 40020b40: 12 80 00 0e bne 40020b78 40020b44: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); 40020b48: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020b4c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020b50: 02 80 00 04 be 40020b60 <== NOT EXECUTED 40020b54: 01 00 00 00 nop <== NOT EXECUTED 40020b58: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020b5c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020b60: 40 00 38 76 call 4002ed38 <__errno> <== NOT EXECUTED 40020b64: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020b68: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40020b6c: c2 22 00 00 st %g1, [ %o0 ] 40020b70: 81 c7 e0 08 ret 40020b74: 81 e8 00 00 restore } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 40020b78: 94 10 00 1a mov %i2, %o2 40020b7c: 9f c0 80 00 call %g2 40020b80: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40020b84: c2 07 bf f0 ld [ %fp + -16 ], %g1 40020b88: 80 a0 60 00 cmp %g1, 0 40020b8c: 02 bf ff f9 be 40020b70 40020b90: b0 10 00 08 mov %o0, %i0 40020b94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40020b98: 80 a0 60 00 cmp %g1, 0 40020b9c: 02 80 00 04 be 40020bac 40020ba0: 01 00 00 00 nop 40020ba4: 9f c0 40 00 call %g1 40020ba8: 90 10 00 10 mov %l0, %o0 return result; } 40020bac: 81 c7 e0 08 ret 40020bb0: 81 e8 00 00 restore 40016310 : { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 40016310: 9d e3 bf 90 save %sp, -112, %sp 40016314: 07 10 00 62 sethi %hi(0x40018800), %g3 40016318: 86 10 e3 30 or %g3, 0x330, %g3 ! 40018b30 4001631c: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40016320: 05 10 00 63 sethi %hi(0x40018c00), %g2 40016324: c4 00 a2 44 ld [ %g2 + 0x244 ], %g2 ! 40018e44 <_System_state_Current> { size_t old_size; char *new_area; size_t resize; MSBUMP(realloc_calls, 1); 40016328: 82 00 60 01 inc %g1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 4001632c: 80 a0 a0 03 cmp %g2, 3 40016330: 12 80 00 0c bne 40016360 40016334: c2 20 e0 10 st %g1, [ %g3 + 0x10 ] if (_Thread_Dispatch_disable_level > 0) 40016338: 03 10 00 63 sethi %hi(0x40018c00), %g1 4001633c: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 40018ca0 <_Thread_Dispatch_disable_level> 40016340: 80 a0 60 00 cmp %g1, 0 40016344: 32 80 00 13 bne,a 40016390 40016348: b0 10 20 00 clr %i0 <== NOT EXECUTED return (void *) 0; if (_ISR_Nest_level > 0) 4001634c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40016350: c2 00 61 3c ld [ %g1 + 0x13c ], %g1 ! 40018d3c <_ISR_Nest_level> 40016354: 80 a0 60 00 cmp %g1, 0 40016358: 32 80 00 0e bne,a 40016390 4001635c: b0 10 20 00 clr %i0 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 40016360: 80 a6 20 00 cmp %i0, 0 40016364: 12 80 00 06 bne 4001637c 40016368: 80 a6 60 00 cmp %i1, 0 return malloc( size ); 4001636c: 7f ff d0 5b call 4000a4d8 <== NOT EXECUTED 40016370: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40016374: 81 c7 e0 08 ret <== NOT EXECUTED 40016378: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !size ) { 4001637c: 12 80 00 07 bne 40016398 40016380: 21 10 00 62 sethi %hi(0x40018800), %l0 free( ptr ); 40016384: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016388: 7f ff ce ec call 40009f38 <== NOT EXECUTED 4001638c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40016390: 81 c7 e0 08 ret <== NOT EXECUTED 40016394: 81 e8 00 00 restore <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 40016398: 92 10 00 18 mov %i0, %o1 4001639c: 90 14 22 d8 or %l0, 0x2d8, %o0 400163a0: 40 00 00 63 call 4001652c <_Protected_heap_Get_block_size> 400163a4: 94 07 bf f4 add %fp, -12, %o2 400163a8: 80 8a 20 ff btst 0xff, %o0 400163ac: 12 80 00 08 bne 400163cc 400163b0: 90 14 22 d8 or %l0, 0x2d8, %o0 errno = EINVAL; 400163b4: 7f ff da 59 call 4000cd18 <__errno> 400163b8: b0 10 20 00 clr %i0 400163bc: 82 10 20 16 mov 0x16, %g1 400163c0: c2 22 00 00 st %g1, [ %o0 ] 400163c4: 81 c7 e0 08 ret 400163c8: 81 e8 00 00 restore #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 ) ) { 400163cc: 92 10 00 18 mov %i0, %o1 400163d0: 40 00 00 64 call 40016560 <_Protected_heap_Resize_block> 400163d4: 94 10 00 19 mov %i1, %o2 400163d8: 80 8a 20 ff btst 0xff, %o0 400163dc: 12 80 00 1b bne 40016448 400163e0: 01 00 00 00 nop * 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 ); 400163e4: 7f ff d0 3d call 4000a4d8 400163e8: 90 10 00 19 mov %i1, %o0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 400163ec: 05 10 00 62 sethi %hi(0x40018800), %g2 400163f0: 84 10 a3 30 or %g2, 0x330, %g2 ! 40018b30 400163f4: c2 00 a0 04 ld [ %g2 + 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 ); 400163f8: a0 10 00 08 mov %o0, %l0 MSBUMP(malloc_calls, -1); /* subtract off the malloc */ 400163fc: 82 00 7f ff add %g1, -1, %g1 if ( !new_area ) { 40016400: 80 a2 20 00 cmp %o0, 0 40016404: 02 80 00 10 be 40016444 40016408: c2 20 a0 04 st %g1, [ %g2 + 4 ] return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 4001640c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40016410: 80 a6 40 01 cmp %i1, %g1 40016414: 08 80 00 03 bleu 40016420 40016418: 90 10 00 19 mov %i1, %o0 4001641c: 90 10 00 01 mov %g1, %o0 40016420: 94 10 00 08 mov %o0, %o2 40016424: 92 10 00 18 mov %i0, %o1 40016428: 7f ff dc 2e call 4000d4e0 4001642c: 90 10 00 10 mov %l0, %o0 free( ptr ); 40016430: 90 10 00 18 mov %i0, %o0 40016434: 7f ff ce c1 call 40009f38 40016438: b0 10 00 10 mov %l0, %i0 4001643c: 81 c7 e0 08 ret 40016440: 81 e8 00 00 restore return new_area; 40016444: b0 10 20 00 clr %i0 <== NOT EXECUTED } 40016448: 81 c7 e0 08 ret 4001644c: 81 e8 00 00 restore 40020cf4 : #include int rmdir( const char *pathname ) { 40020cf4: 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 ); 40020cf8: 92 10 20 00 clr %o1 40020cfc: 90 10 00 18 mov %i0, %o0 40020d00: a0 07 bf e8 add %fp, -24, %l0 40020d04: 96 10 20 00 clr %o3 40020d08: 7f ff 91 9b call 40005374 40020d0c: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 40020d10: 80 a2 20 00 cmp %o0, 0 40020d14: 32 80 00 11 bne,a 40020d58 40020d18: b0 10 3f ff mov -1, %i0 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40020d1c: 90 10 20 02 mov 2, %o0 40020d20: 7f ff 91 68 call 400052c0 40020d24: 92 10 00 10 mov %l0, %o1 if (result != 0) { 40020d28: 80 a2 20 00 cmp %o0, 0 40020d2c: 02 80 00 0d be 40020d60 40020d30: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 40020d34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020d38: 02 80 00 08 be 40020d58 <== NOT EXECUTED 40020d3c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020d40: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020d44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020d48: 02 80 00 04 be 40020d58 <== NOT EXECUTED 40020d4c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40020d50: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020d54: 01 00 00 00 nop <== NOT EXECUTED 40020d58: 81 c7 e0 08 ret 40020d5c: 81 e8 00 00 restore /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 40020d60: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40020d64: 80 a0 a0 00 cmp %g2, 0 40020d68: 22 80 00 1e be,a 40020de0 40020d6c: c2 00 60 1c ld [ %g1 + 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 ){ 40020d70: 9f c0 80 00 call %g2 40020d74: 90 10 00 10 mov %l0, %o0 40020d78: 80 a2 20 01 cmp %o0, 1 40020d7c: 02 80 00 10 be 40020dbc 40020d80: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_freenode( &loc ); 40020d84: c2 07 bf f0 ld [ %fp + -16 ], %g1 40020d88: 80 a0 60 00 cmp %g1, 0 40020d8c: 02 80 00 08 be 40020dac 40020d90: 01 00 00 00 nop 40020d94: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40020d98: 80 a0 60 00 cmp %g1, 0 40020d9c: 02 80 00 04 be 40020dac 40020da0: 01 00 00 00 nop 40020da4: 9f c0 40 00 call %g1 40020da8: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40020dac: 40 00 37 e3 call 4002ed38 <__errno> 40020db0: b0 10 3f ff mov -1, %i0 40020db4: 10 80 00 13 b 40020e00 40020db8: 82 10 20 14 mov 0x14, %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 40020dbc: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 40020dc0: 80 a0 60 00 cmp %g1, 0 40020dc4: 12 80 00 12 bne 40020e0c 40020dc8: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40020dcc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40020dd0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020dd4: 02 80 00 08 be 40020df4 <== NOT EXECUTED 40020dd8: 01 00 00 00 nop <== NOT EXECUTED 40020ddc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020de0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020de4: 02 80 00 04 be 40020df4 <== NOT EXECUTED 40020de8: 01 00 00 00 nop <== NOT EXECUTED 40020dec: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020df0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020df4: 40 00 37 d1 call 4002ed38 <__errno> <== NOT EXECUTED 40020df8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020dfc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40020e00: c2 22 00 00 st %g1, [ %o0 ] 40020e04: 81 c7 e0 08 ret 40020e08: 81 e8 00 00 restore } result = (*loc.handlers->rmnod_h)( &loc ); 40020e0c: 9f c0 40 00 call %g1 40020e10: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40020e14: c2 07 bf f0 ld [ %fp + -16 ], %g1 40020e18: 80 a0 60 00 cmp %g1, 0 40020e1c: 02 bf ff cf be 40020d58 40020e20: b0 10 00 08 mov %o0, %i0 40020e24: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40020e28: 80 a0 60 00 cmp %g1, 0 40020e2c: 02 80 00 06 be 40020e44 40020e30: 01 00 00 00 nop 40020e34: 9f c0 40 00 call %g1 40020e38: 90 10 00 10 mov %l0, %o0 40020e3c: 81 c7 e0 08 ret 40020e40: 81 e8 00 00 restore return result; } 40020e44: 81 c7 e0 08 ret <== NOT EXECUTED 40020e48: 81 e8 00 00 restore <== NOT EXECUTED 40014d54 : const char * rtems_assoc_name_bad( uint32_t bad_value ) { 40014d54: 11 10 00 9b sethi %hi(0x40026c00), %o0 <== NOT EXECUTED sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 40014d58: 81 c3 e0 08 retl <== NOT EXECUTED 40014d5c: 90 12 21 90 or %o0, 0x190, %o0 ! 40026d90 <== NOT EXECUTED 400106b8 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 400106b8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 400106bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400106c0: 40 00 00 0b call 400106ec <== NOT EXECUTED 400106c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 400106c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400106cc: 02 80 00 05 be 400106e0 <== NOT EXECUTED 400106d0: 01 00 00 00 nop <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 400106d4: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED 400106d8: 81 c7 e0 08 ret <== NOT EXECUTED 400106dc: 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); 400106e0: 40 00 11 9d call 40014d54 <== NOT EXECUTED 400106e4: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 400106e8: 01 00 00 00 nop 4000c3c0 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000c3c0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000c3c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000c3c8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000c3cc: 40 00 02 23 call 4000cc58 <== NOT EXECUTED 4000c3d0: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000c3d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000c3d8: 32 80 00 02 bne,a 4000c3e0 <== NOT EXECUTED 4000c3dc: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000c3e0: 81 c7 e0 08 ret <== NOT EXECUTED 4000c3e4: 81 e8 00 00 restore <== NOT EXECUTED 40002ac8 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40002ac8: 9d e3 bf 60 save %sp, -160, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40002acc: 80 a6 60 00 cmp %i1, 0 40002ad0: 02 80 00 66 be 40002c68 40002ad4: a0 07 bf e8 add %fp, -24, %l0 * 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 ); 40002ad8: 40 00 14 0c call 40007b08 <_TOD_Get_uptime> 40002adc: 90 10 00 10 mov %l0, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40002ae0: 92 10 00 10 mov %l0, %o1 40002ae4: 11 10 00 97 sethi %hi(0x40025c00), %o0 40002ae8: a0 07 bf e0 add %fp, -32, %l0 40002aec: 90 12 20 98 or %o0, 0x98, %o0 40002af0: 40 00 1d fa call 4000a2d8 <_Timespec_Subtract> 40002af4: 94 10 00 10 mov %l0, %o2 } } } #endif (*print)( context, "CPU Usage by thread\n" 40002af8: 90 10 00 18 mov %i0, %o0 40002afc: 13 10 00 6b sethi %hi(0x4001ac00), %o1 40002b00: 9f c6 40 00 call %i1 40002b04: 92 12 61 a8 or %o1, 0x1a8, %o1 ! 4001ada8 <__func__.4776+0x240> 40002b08: 03 10 00 95 sethi %hi(0x40025400), %g1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002b0c: ac 07 bf c0 add %fp, -64, %l6 } } } #endif (*print)( context, "CPU Usage by thread\n" 40002b10: a4 10 62 44 or %g1, 0x244, %l2 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002b14: aa 07 bf d8 add %fp, -40, %l5 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { struct timespec used; _Timespec_Subtract( 40002b18: 03 10 00 95 sethi %hi(0x40025400), %g1 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002b1c: b6 07 bf f4 add %fp, -12, %i3 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { struct timespec used; _Timespec_Subtract( 40002b20: b4 10 63 a8 or %g1, 0x3a8, %i2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002b24: b8 07 bf f0 add %fp, -16, %i4 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40002b28: ba 04 a0 10 add %l2, 0x10, %i5 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40002b2c: c2 04 80 00 ld [ %l2 ], %g1 40002b30: 80 a0 60 00 cmp %g1, 0 40002b34: 22 80 00 41 be,a 40002c38 40002b38: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40002b3c: e6 00 60 04 ld [ %g1 + 4 ], %l3 if ( information ) { 40002b40: 80 a4 e0 00 cmp %l3, 0 40002b44: 22 80 00 3d be,a 40002c38 40002b48: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED 40002b4c: a2 10 20 01 mov 1, %l1 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { struct timespec used; _Timespec_Subtract( 40002b50: ae 07 bf e8 add %fp, -24, %l7 40002b54: 10 80 00 32 b 40002c1c 40002b58: a8 07 bf d0 add %fp, -48, %l4 if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 40002b5c: c2 04 e0 1c ld [ %l3 + 0x1c ], %g1 40002b60: e0 00 40 02 ld [ %g1 + %g2 ], %l0 if ( !the_thread ) 40002b64: 80 a4 20 00 cmp %l0, 0 40002b68: 02 80 00 2d be 40002c1c 40002b6c: a2 04 60 01 inc %l1 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002b70: 40 00 0e b6 call 40006648 40002b74: d0 04 20 08 ld [ %l0 + 8 ], %o0 (*print)( 40002b78: d4 04 20 08 ld [ %l0 + 8 ], %o2 40002b7c: 90 10 00 18 mov %i0, %o0 40002b80: 13 10 00 6b sethi %hi(0x4001ac00), %o1 40002b84: 96 10 00 16 mov %l6, %o3 40002b88: 9f c6 40 00 call %i1 40002b8c: 92 12 61 f0 or %o1, 0x1f0, %o1 #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; 40002b90: c2 04 20 84 ld [ %l0 + 0x84 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002b94: 07 10 00 95 sethi %hi(0x40025400), %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; 40002b98: c2 27 bf d8 st %g1, [ %fp + -40 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002b9c: 86 10 e3 a0 or %g3, 0x3a0, %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; 40002ba0: c2 04 20 88 ld [ %l0 + 0x88 ], %g1 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002ba4: c4 00 c0 00 ld [ %g3 ], %g2 #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; 40002ba8: c2 27 bf dc st %g1, [ %fp + -36 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40002bac: c4 00 a0 08 ld [ %g2 + 8 ], %g2 40002bb0: c2 04 20 08 ld [ %l0 + 8 ], %g1 40002bb4: 80 a0 80 01 cmp %g2, %g1 40002bb8: 12 80 00 0a bne 40002be0 40002bbc: 94 10 00 1b mov %i3, %o2 struct timespec used; _Timespec_Subtract( 40002bc0: 90 10 00 1a mov %i2, %o0 40002bc4: 92 10 00 17 mov %l7, %o1 40002bc8: 40 00 1d c4 call 4000a2d8 <_Timespec_Subtract> 40002bcc: 94 10 00 14 mov %l4, %o2 &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 40002bd0: 90 10 00 15 mov %l5, %o0 40002bd4: 40 00 1d 16 call 4000a02c <_Timespec_Add_to> 40002bd8: 92 10 00 14 mov %l4, %o1 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40002bdc: 94 10 00 1b mov %i3, %o2 40002be0: 96 10 00 1c mov %i4, %o3 40002be4: 90 10 00 15 mov %l5, %o0 40002be8: 40 00 1d 29 call 4000a08c <_Timespec_Divide> 40002bec: 92 07 bf e0 add %fp, -32, %o1 /* * Print the information */ (*print)( context, 40002bf0: d0 07 bf dc ld [ %fp + -36 ], %o0 40002bf4: 40 00 52 1b call 40017460 <.udiv> 40002bf8: 92 10 23 e8 mov 0x3e8, %o1 40002bfc: d4 07 bf d8 ld [ %fp + -40 ], %o2 40002c00: d8 07 bf f4 ld [ %fp + -12 ], %o4 40002c04: da 07 bf f0 ld [ %fp + -16 ], %o5 40002c08: 96 10 00 08 mov %o0, %o3 40002c0c: 13 10 00 6b sethi %hi(0x4001ac00), %o1 40002c10: 90 10 00 18 mov %i0, %o0 40002c14: 9f c6 40 00 call %i1 40002c18: 92 12 62 08 or %o1, 0x208, %o1 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++ ) { 40002c1c: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40002c20: 94 10 00 16 mov %l6, %o2 40002c24: 92 10 20 0d mov 0xd, %o1 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++ ) { 40002c28: 80 a4 40 01 cmp %l1, %g1 40002c2c: 08 bf ff cc bleu 40002b5c 40002c30: 85 2c 60 02 sll %l1, 2, %g2 40002c34: a4 04 a0 04 add %l2, 4, %l2 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40002c38: 80 a4 80 1d cmp %l2, %i5 40002c3c: 32 bf ff bd bne,a 40002b30 40002c40: c2 04 80 00 ld [ %l2 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 40002c44: d0 07 bf e4 ld [ %fp + -28 ], %o0 40002c48: 40 00 52 06 call 40017460 <.udiv> 40002c4c: 92 10 23 e8 mov 0x3e8, %o1 40002c50: d4 07 bf e0 ld [ %fp + -32 ], %o2 40002c54: 96 10 00 08 mov %o0, %o3 40002c58: 13 10 00 6b sethi %hi(0x4001ac00), %o1 40002c5c: 90 10 00 18 mov %i0, %o0 40002c60: 9f c6 40 00 call %i1 40002c64: 92 12 62 20 or %o1, 0x220, %o1 40002c68: 81 c7 e0 08 ret 40002c6c: 81 e8 00 00 restore 4000bf2c : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 4000bf2c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code))) 4000bf30: 11 10 00 5d sethi %hi(0x40017400), %o0 <== NOT EXECUTED 4000bf34: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000bf38: 40 00 01 22 call 4000c3c0 <== NOT EXECUTED 4000bf3c: 90 12 22 84 or %o0, 0x284, %o0 <== NOT EXECUTED 4000bf40: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000bf44: 02 80 00 05 be 4000bf58 <== NOT EXECUTED 4000bf48: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000bf4c: 40 00 03 73 call 4000cd18 <__errno> <== NOT EXECUTED 4000bf50: 01 00 00 00 nop <== NOT EXECUTED 4000bf54: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000bf58: 81 c7 e0 08 ret <== NOT EXECUTED 4000bf5c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 400063fc : int rtems_error( int error_flag, const char *printf_format, ... ) { 400063fc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40006400: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED 40006404: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40006408: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 4000640c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40006410: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 40006414: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40006418: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000641c: 7f ff ff 7c call 4000620c <== NOT EXECUTED 40006420: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40006424: 81 c7 e0 08 ret <== NOT EXECUTED 40006428: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40001e98 : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 40001e98: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 40001e9c: 80 a6 60 00 cmp %i1, 0 40001ea0: 32 80 00 06 bne,a 40001eb8 40001ea4: c2 06 60 08 ld [ %i1 + 8 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40001ea8: 40 00 2b 9c call 4000cd18 <__errno> <== NOT EXECUTED 40001eac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001eb0: 10 80 00 09 b 40001ed4 <== NOT EXECUTED 40001eb4: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 40001eb8: c2 00 40 00 ld [ %g1 ], %g1 40001ebc: 80 a0 60 00 cmp %g1, 0 40001ec0: 12 80 00 08 bne 40001ee0 40001ec4: a0 07 bf e8 add %fp, -24, %l0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 40001ec8: 40 00 2b 94 call 4000cd18 <__errno> <== NOT EXECUTED 40001ecc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001ed0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001ed4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001ed8: 81 c7 e0 08 ret <== NOT EXECUTED 40001edc: 81 e8 00 00 restore <== NOT EXECUTED parent = *pathloc; 40001ee0: 92 10 00 19 mov %i1, %o1 40001ee4: 94 10 20 10 mov 0x10, %o2 40001ee8: 40 00 2d 7e call 4000d4e0 40001eec: 90 10 00 10 mov %l0, %o0 result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 40001ef0: c2 06 60 08 ld [ %i1 + 8 ], %g1 40001ef4: 92 10 00 18 mov %i0, %o1 40001ef8: c2 00 40 00 ld [ %g1 ], %g1 40001efc: 11 10 00 5b sethi %hi(0x40016c00), %o0 40001f00: 94 10 00 10 mov %l0, %o2 40001f04: 9f c0 40 00 call %g1 40001f08: 90 12 23 d8 or %o0, 0x3d8, %o0 if (result != 0){ 40001f0c: b0 92 20 00 orcc %o0, 0, %i0 40001f10: 02 80 00 04 be 40001f20 40001f14: c2 07 bf f0 ld [ %fp + -16 ], %g1 40001f18: 81 c7 e0 08 ret <== NOT EXECUTED 40001f1c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED return -1; } rtems_filesystem_freenode( &parent ); 40001f20: 80 a0 60 00 cmp %g1, 0 40001f24: 02 80 00 08 be 40001f44 40001f28: 01 00 00 00 nop 40001f2c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40001f30: 80 a0 60 00 cmp %g1, 0 40001f34: 02 80 00 04 be 40001f44 40001f38: 01 00 00 00 nop 40001f3c: 9f c0 40 00 call %g1 40001f40: 90 10 00 10 mov %l0, %o0 return result; } 40001f44: 81 c7 e0 08 ret 40001f48: 81 e8 00 00 restore 40001f4c : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 40001f4c: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 40001f50: 80 a6 20 00 cmp %i0, 0 40001f54: 12 80 00 06 bne 40001f6c 40001f58: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); 40001f5c: 40 00 2b 6f call 4000cd18 <__errno> 40001f60: b0 10 3f ff mov -1, %i0 40001f64: 10 80 00 44 b 40002074 40001f68: 82 10 20 0e mov 0xe, %g1 if ( !pathloc ) 40001f6c: 32 80 00 06 bne,a 40001f84 40001f70: c2 4e 00 00 ldsb [ %i0 ], %g1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40001f74: 40 00 2b 69 call 4000cd18 <__errno> <== NOT EXECUTED 40001f78: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001f7c: 10 80 00 3e b 40002074 <== NOT EXECUTED 40001f80: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 40001f84: 80 a0 60 2f cmp %g1, 0x2f 40001f88: 02 80 00 06 be 40001fa0 40001f8c: 80 a0 60 5c cmp %g1, 0x5c 40001f90: 02 80 00 04 be 40001fa0 40001f94: 80 a0 60 00 cmp %g1, 0 40001f98: 12 80 00 0a bne 40001fc0 40001f9c: 03 10 00 60 sethi %hi(0x40018000), %g1 40001fa0: 03 10 00 60 sethi %hi(0x40018000), %g1 40001fa4: d2 00 63 cc ld [ %g1 + 0x3cc ], %o1 ! 400183cc 40001fa8: 90 10 00 1a mov %i2, %o0 40001fac: 92 02 60 14 add %o1, 0x14, %o1 40001fb0: 40 00 2d 4c call 4000d4e0 40001fb4: 94 10 20 10 mov 0x10, %o2 40001fb8: 10 80 00 08 b 40001fd8 40001fbc: 84 10 20 01 mov 1, %g2 40001fc0: d2 00 63 cc ld [ %g1 + 0x3cc ], %o1 40001fc4: 90 10 00 1a mov %i2, %o0 40001fc8: 92 02 60 04 add %o1, 4, %o1 40001fcc: 40 00 2d 45 call 4000d4e0 40001fd0: 94 10 20 10 mov 0x10, %o2 40001fd4: 84 10 20 00 clr %g2 if ( !pathloc->ops->evalpath_h ) 40001fd8: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40001fdc: c2 00 40 00 ld [ %g1 ], %g1 40001fe0: 80 a0 60 00 cmp %g1, 0 40001fe4: 02 80 00 21 be 40002068 40001fe8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 40001fec: 90 06 00 02 add %i0, %g2, %o0 40001ff0: 92 10 00 19 mov %i1, %o1 40001ff4: 9f c0 40 00 call %g1 40001ff8: 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 ) { 40001ffc: b0 92 20 00 orcc %o0, 0, %i0 40002000: 12 80 00 1e bne 40002078 40002004: 80 a6 e0 00 cmp %i3, 0 40002008: 02 80 00 21 be 4000208c 4000200c: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40002010: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002014: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 40002018: 80 a0 a0 00 cmp %g2, 0 4000201c: 22 80 00 0e be,a 40002054 40002020: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 40002024: 9f c0 80 00 call %g2 40002028: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 4000202c: 90 02 3f fd add %o0, -3, %o0 40002030: 80 a2 20 01 cmp %o0, 1 40002034: 18 80 00 16 bgu 4000208c 40002038: 01 00 00 00 nop ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 4000203c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40002040: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40002044: 80 a0 a0 00 cmp %g2, 0 40002048: 12 80 00 0e bne 40002080 4000204c: 90 10 00 1a mov %i2, %o0 rtems_filesystem_freenode( pathloc ); 40002050: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002054: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002058: 02 80 00 04 be 40002068 <== NOT EXECUTED 4000205c: 01 00 00 00 nop <== NOT EXECUTED 40002060: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002064: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002068: 40 00 2b 2c call 4000cd18 <__errno> <== NOT EXECUTED 4000206c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002070: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002074: c2 22 00 00 st %g1, [ %o0 ] 40002078: 81 c7 e0 08 ret 4000207c: 81 e8 00 00 restore * 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 ); 40002080: 9f c0 80 00 call %g2 40002084: 92 10 00 19 mov %i1, %o1 40002088: b0 10 00 08 mov %o0, %i0 } } return result; } 4000208c: 81 c7 e0 08 ret 40002090: 81 e8 00 00 restore 40009d08 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 40009d08: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 40009d0c: 25 10 00 60 sethi %hi(0x40018000), %l2 40009d10: c4 04 a3 cc ld [ %l2 + 0x3cc ], %g2 ! 400183cc 40009d14: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 40009d18: 40 00 02 39 call 4000a5fc 40009d1c: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 40009d20: 03 10 00 5a sethi %hi(0x40016800), %g1 40009d24: c2 00 63 6c ld [ %g1 + 0x36c ], %g1 ! 40016b6c rtems_fatal_error_occurred( 0xABCD0001 ); 40009d28: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 40009d2c: 80 a0 60 00 cmp %g1, 0 40009d30: 02 80 00 0f be 40009d6c 40009d34: 90 12 20 01 or %o0, 1, %o0 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 40009d38: 03 10 00 5f sethi %hi(0x40017c00), %g1 40009d3c: c2 00 62 b0 ld [ %g1 + 0x2b0 ], %g1 ! 40017eb0 status = mount( 40009d40: 90 07 bf f4 add %fp, -12, %o0 40009d44: d8 00 60 0c ld [ %g1 + 0xc ], %o4 40009d48: d2 00 40 00 ld [ %g1 ], %o1 40009d4c: d4 00 60 04 ld [ %g1 + 4 ], %o2 40009d50: 40 00 02 33 call 4000a61c 40009d54: d6 00 60 08 ld [ %g1 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 40009d58: 80 a2 3f ff cmp %o0, -1 40009d5c: 32 80 00 06 bne,a 40009d74 40009d60: d0 04 a3 cc ld [ %l2 + 0x3cc ], %o0 rtems_fatal_error_occurred( 0xABCD0002 ); 40009d64: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 40009d68: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED 40009d6c: 7f ff ef 61 call 40005af0 <== NOT EXECUTED 40009d70: 01 00 00 00 nop <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40009d74: d2 07 bf f4 ld [ %fp + -12 ], %o1 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 40009d78: c0 32 20 26 clrh [ %o0 + 0x26 ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 40009d7c: 92 02 60 18 add %o1, 0x18, %o1 40009d80: 94 10 20 10 mov 0x10, %o2 40009d84: 40 00 0d d7 call 4000d4e0 40009d88: 90 02 20 14 add %o0, 0x14, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40009d8c: a0 07 bf e4 add %fp, -28, %l0 40009d90: 96 10 20 00 clr %o3 40009d94: 23 10 00 5c sethi %hi(0x40017000), %l1 40009d98: 92 10 20 00 clr %o1 40009d9c: 94 10 00 10 mov %l0, %o2 40009da0: 7f ff e0 6b call 40001f4c 40009da4: 90 14 63 58 or %l1, 0x358, %o0 rtems_filesystem_root = loc; 40009da8: d0 04 a3 cc ld [ %l2 + 0x3cc ], %o0 40009dac: 92 10 00 10 mov %l0, %o1 40009db0: 94 10 20 10 mov 0x10, %o2 40009db4: 40 00 0d cb call 4000d4e0 40009db8: 90 02 20 14 add %o0, 0x14, %o0 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 40009dbc: 96 10 20 00 clr %o3 40009dc0: 92 10 20 00 clr %o1 40009dc4: 94 10 00 10 mov %l0, %o2 40009dc8: 7f ff e0 61 call 40001f4c 40009dcc: 90 14 63 58 or %l1, 0x358, %o0 rtems_filesystem_current = loc; 40009dd0: d0 04 a3 cc ld [ %l2 + 0x3cc ], %o0 40009dd4: 92 10 00 10 mov %l0, %o1 40009dd8: 94 10 20 10 mov 0x10, %o2 40009ddc: 40 00 0d c1 call 4000d4e0 40009de0: 90 02 20 04 add %o0, 4, %o0 * * 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); 40009de4: 92 10 21 ff mov 0x1ff, %o1 40009de8: 11 10 00 5c sethi %hi(0x40017000), %o0 40009dec: 40 00 01 fa call 4000a5d4 40009df0: 90 12 23 60 or %o0, 0x360, %o0 ! 40017360 if ( status != 0 ) 40009df4: 80 a2 20 00 cmp %o0, 0 40009df8: 02 80 00 04 be 40009e08 40009dfc: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 40009e00: 10 bf ff db b 40009d6c <== NOT EXECUTED 40009e04: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 40009e08: 81 c7 e0 08 ret 40009e0c: 81 e8 00 00 restore 400212b4 : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 400212b4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400212b8: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED 400212bc: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED 400212c0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 400212c4: 81 c3 e0 08 retl <== NOT EXECUTED 400212c8: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED 40001cfc : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40001cfc: 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 ); 40001d00: 92 10 20 00 clr %o1 <== NOT EXECUTED 40001d04: a4 07 bf e8 add %fp, -24, %l2 <== NOT EXECUTED 40001d08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001d0c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40001d10: 40 00 00 8f call 40001f4c <== NOT EXECUTED 40001d14: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001d18: 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 ); 40001d1c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40001d20: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED 40001d24: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d28: 12 80 00 0e bne 40001d60 <== NOT EXECUTED 40001d2c: e2 07 bf e8 ld [ %fp + -24 ], %l1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001d30: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40001d34: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d38: 02 80 00 04 be 40001d48 <== NOT EXECUTED 40001d3c: 01 00 00 00 nop <== NOT EXECUTED 40001d40: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d44: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40001d48: 40 00 2b f4 call 4000cd18 <__errno> <== NOT EXECUTED 40001d4c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40001d50: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40001d54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40001d58: 81 c7 e0 08 ret <== NOT EXECUTED 40001d5c: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 40001d60: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001d64: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40001d68: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40001d6c: 12 80 00 05 bne 40001d80 <== NOT EXECUTED 40001d70: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40001d74: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40001d78: 22 80 00 0d be,a 40001dac <== NOT EXECUTED 40001d7c: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001d80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d84: 02 80 00 1c be 40001df4 <== NOT EXECUTED 40001d88: 01 00 00 00 nop <== NOT EXECUTED 40001d8c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40001d90: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001d94: 02 80 00 18 be 40001df4 <== NOT EXECUTED 40001d98: 01 00 00 00 nop <== NOT EXECUTED 40001d9c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001da0: 90 07 bf e8 add %fp, -24, %o0 <== 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 ); 40001da4: 81 c7 e0 08 ret <== NOT EXECUTED 40001da8: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; device_info->device_name_length = strlen( name ); 40001dac: 40 00 30 fd call 4000e1a0 <== NOT EXECUTED 40001db0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40001db4: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 40001db8: c2 04 60 4c ld [ %l1 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40001dbc: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== 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; 40001dc0: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40001dc4: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40001dc8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40001dcc: 02 80 00 0c be 40001dfc <== NOT EXECUTED 40001dd0: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED 40001dd4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40001dd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40001ddc: 02 80 00 08 be 40001dfc <== NOT EXECUTED 40001de0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40001de4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40001de8: b0 10 20 00 clr %i0 <== NOT EXECUTED 40001dec: 81 c7 e0 08 ret <== NOT EXECUTED 40001df0: 81 e8 00 00 restore <== NOT EXECUTED 40001df4: 81 c7 e0 08 ret <== NOT EXECUTED 40001df8: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED 40001dfc: b0 10 20 00 clr %i0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 40001e00: 81 c7 e0 08 ret <== NOT EXECUTED 40001e04: 81 e8 00 00 restore <== NOT EXECUTED 40006b50 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40006b50: 9d e3 bf 98 save %sp, -104, %sp 40006b54: 92 10 00 19 mov %i1, %o1 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40006b58: 80 a6 60 00 cmp %i1, 0 40006b5c: 02 80 00 3f be 40006c58 40006b60: a0 10 00 18 mov %i0, %l0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40006b64: 80 a6 a0 00 cmp %i2, 0 40006b68: 02 80 00 3c be 40006c58 40006b6c: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40006b70: c2 06 40 00 ld [ %i1 ], %g1 40006b74: 80 a0 60 00 cmp %g1, 0 40006b78: 32 80 00 07 bne,a 40006b94 40006b7c: c0 26 80 00 clr [ %i2 ] 40006b80: c2 06 60 04 ld [ %i1 + 4 ], %g1 40006b84: 80 a0 60 00 cmp %g1, 0 40006b88: 02 80 00 34 be 40006c58 40006b8c: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40006b90: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40006b94: 03 10 00 74 sethi %hi(0x4001d000), %g1 40006b98: c8 00 60 b0 ld [ %g1 + 0xb0 ], %g4 ! 4001d0b0 <_IO_Number_of_drivers> 40006b9c: 80 a4 00 04 cmp %l0, %g4 40006ba0: 1a 80 00 31 bcc 40006c64 40006ba4: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40006ba8: 80 a4 20 00 cmp %l0, 0 40006bac: 12 80 00 18 bne 40006c0c 40006bb0: 03 10 00 74 sethi %hi(0x4001d000), %g1 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40006bb4: c6 00 60 b4 ld [ %g1 + 0xb4 ], %g3 ! 4001d0b4 <_IO_Driver_address_table> 40006bb8: 85 29 20 03 sll %g4, 3, %g2 40006bbc: 83 29 20 05 sll %g4, 5, %g1 40006bc0: a0 01 3f ff add %g4, -1, %l0 40006bc4: 82 20 40 02 sub %g1, %g2, %g1 40006bc8: 82 00 7f e8 add %g1, -24, %g1 40006bcc: 10 80 00 0b b 40006bf8 40006bd0: 86 00 c0 01 add %g3, %g1, %g3 if ( !_IO_Driver_address_table[major].initialization_entry && 40006bd4: 80 a0 60 00 cmp %g1, 0 40006bd8: 32 80 00 07 bne,a 40006bf4 40006bdc: a0 04 3f ff add %l0, -1, %l0 40006be0: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40006be4: 80 a0 60 00 cmp %g1, 0 40006be8: 02 80 00 09 be 40006c0c 40006bec: 03 10 00 74 sethi %hi(0x4001d000), %g1 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40006bf0: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED 40006bf4: 86 00 ff e8 add %g3, -24, %g3 40006bf8: 80 a4 20 00 cmp %l0, 0 40006bfc: 32 bf ff f6 bne,a 40006bd4 40006c00: c2 00 c0 00 ld [ %g3 ], %g1 40006c04: 81 c7 e0 08 ret 40006c08: 91 e8 20 05 restore %g0, 5, %o0 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40006c0c: c6 00 60 b4 ld [ %g1 + 0xb4 ], %g3 40006c10: 85 2c 20 03 sll %l0, 3, %g2 40006c14: 83 2c 20 05 sll %l0, 5, %g1 40006c18: 82 20 40 02 sub %g1, %g2, %g1 40006c1c: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 40006c20: 80 a0 a0 00 cmp %g2, 0 40006c24: 12 80 00 0f bne 40006c60 40006c28: 90 00 c0 01 add %g3, %g1, %o0 40006c2c: c2 02 20 04 ld [ %o0 + 4 ], %g1 40006c30: 80 a0 60 00 cmp %g1, 0 40006c34: 32 80 00 0c bne,a 40006c64 40006c38: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40006c3c: 40 00 1e 12 call 4000e484 40006c40: 94 10 20 18 mov 0x18, %o2 *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 40006c44: b0 10 00 10 mov %l0, %i0 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 40006c48: e0 26 80 00 st %l0, [ %i2 ] return rtems_io_initialize( major, 0, NULL ); 40006c4c: b2 10 20 00 clr %i1 40006c50: 7f ff ff 4f call 4000698c 40006c54: 95 e8 20 00 restore %g0, 0, %o2 40006c58: 81 c7 e0 08 ret 40006c5c: 91 e8 20 09 restore %g0, 9, %o0 40006c60: b0 10 20 0c mov 0xc, %i0 } 40006c64: 81 c7 e0 08 ret 40006c68: 81 e8 00 00 restore 40007f94 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 40007f94: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 40007f98: 80 a6 20 00 cmp %i0, 0 40007f9c: 02 80 00 1d be 40008010 40007fa0: 03 10 00 95 sethi %hi(0x40025400), %g1 return; 40007fa4: a4 10 62 44 or %g1, 0x244, %l2 ! 40025644 <_Objects_Information_table+0x4> for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40007fa8: a6 04 a0 10 add %l2, 0x10, %l3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40007fac: c2 04 80 00 ld [ %l2 ], %g1 40007fb0: 80 a0 60 00 cmp %g1, 0 40007fb4: 22 80 00 14 be,a 40008004 40007fb8: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40007fbc: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 40007fc0: 80 a4 60 00 cmp %l1, 0 40007fc4: 12 80 00 0b bne 40007ff0 40007fc8: a0 10 20 01 mov 1, %l0 for ( i=1 ; i <= information->maximum ; i++ ) { 40007fcc: 10 80 00 0e b 40008004 <== NOT EXECUTED 40007fd0: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED the_thread = (Thread_Control *)information->local_table[ i ]; 40007fd4: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 40007fd8: d0 00 40 08 ld [ %g1 + %o0 ], %o0 if ( !the_thread ) 40007fdc: 80 a2 20 00 cmp %o0, 0 40007fe0: 02 80 00 04 be 40007ff0 40007fe4: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 40007fe8: 9f c6 00 00 call %i0 40007fec: 01 00 00 00 nop 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++ ) { 40007ff0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40007ff4: 80 a4 00 01 cmp %l0, %g1 40007ff8: 08 bf ff f7 bleu 40007fd4 40007ffc: 91 2c 20 02 sll %l0, 2, %o0 40008000: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40008004: 80 a4 80 13 cmp %l2, %l3 40008008: 32 bf ff ea bne,a 40007fb0 4000800c: c2 04 80 00 ld [ %l2 ], %g1 40008010: 81 c7 e0 08 ret 40008014: 81 e8 00 00 restore 4000a330 : * 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 ) { 4000a330: 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 ); 4000a334: 03 10 00 62 sethi %hi(0x40018800), %g1 4000a338: d0 00 62 d0 ld [ %g1 + 0x2d0 ], %o0 ! 40018ad0 4000a33c: 92 10 20 00 clr %o1 4000a340: 7f ff ec 2a call 400053e8 4000a344: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000a348: 23 10 00 62 sethi %hi(0x40018800), %l1 4000a34c: c4 04 62 cc ld [ %l1 + 0x2cc ], %g2 ! 40018acc 4000a350: 80 a0 a0 00 cmp %g2, 0 4000a354: 02 80 00 28 be 4000a3f4 4000a358: b0 10 20 00 clr %i0 rc = rtems_semaphore_create( 4000a35c: 03 10 00 62 sethi %hi(0x40018800), %g1 4000a360: c6 00 62 c8 ld [ %g1 + 0x2c8 ], %g3 ! 40018ac8 4000a364: 92 10 20 01 mov 1, %o1 4000a368: 86 20 80 03 sub %g2, %g3, %g3 4000a36c: 87 38 e0 02 sra %g3, 2, %g3 4000a370: 83 28 e0 02 sll %g3, 2, %g1 4000a374: 85 28 e0 06 sll %g3, 6, %g2 4000a378: 84 20 80 01 sub %g2, %g1, %g2 4000a37c: 83 28 a0 06 sll %g2, 6, %g1 4000a380: 82 20 40 02 sub %g1, %g2, %g1 4000a384: 85 28 60 0c sll %g1, 0xc, %g2 4000a388: 82 00 40 02 add %g1, %g2, %g1 4000a38c: 82 00 40 03 add %g1, %g3, %g1 4000a390: 83 28 60 04 sll %g1, 4, %g1 4000a394: 82 20 40 03 sub %g1, %g3, %g1 4000a398: 83 28 60 02 sll %g1, 2, %g1 4000a39c: 86 20 c0 01 sub %g3, %g1, %g3 4000a3a0: 94 10 20 54 mov 0x54, %o2 4000a3a4: 96 10 20 00 clr %o3 4000a3a8: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000a3ac: 98 07 bf f4 add %fp, -12, %o4 4000a3b0: 90 12 21 00 or %o0, 0x100, %o0 4000a3b4: 7f ff eb 67 call 40005150 4000a3b8: 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) 4000a3bc: 80 a2 20 00 cmp %o0, 0 4000a3c0: 32 80 00 0d bne,a 4000a3f4 4000a3c4: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000a3c8: f0 04 62 cc ld [ %l1 + 0x2cc ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000a3cc: 92 10 20 00 clr %o1 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000a3d0: e0 06 20 28 ld [ %i0 + 0x28 ], %l0 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000a3d4: 90 10 00 18 mov %i0, %o0 4000a3d8: 40 00 0c 7b call 4000d5c4 4000a3dc: 94 10 20 34 mov 0x34, %o2 iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000a3e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_libio_iop_freelist = next; 4000a3e4: e0 24 62 cc st %l0, [ %l1 + 0x2cc ] 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; 4000a3e8: c2 26 20 20 st %g1, [ %i0 + 0x20 ] 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; 4000a3ec: 82 10 21 00 mov 0x100, %g1 4000a3f0: c2 26 20 0c st %g1, [ %i0 + 0xc ] failed: iop = 0; done: rtems_semaphore_release( rtems_libio_semaphore ); 4000a3f4: 03 10 00 62 sethi %hi(0x40018800), %g1 4000a3f8: 7f ff ec 43 call 40005504 4000a3fc: d0 00 62 d0 ld [ %g1 + 0x2d0 ], %o0 ! 40018ad0 return iop; } 4000a400: 81 c7 e0 08 ret 4000a404: 81 e8 00 00 restore 40002094 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 40002094: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 40002098: 21 10 00 5f sethi %hi(0x40017c00), %l0 4000209c: d0 04 22 a8 ld [ %l0 + 0x2a8 ], %o0 ! 40017ea8 400020a0: 80 a2 20 00 cmp %o0, 0 400020a4: 22 80 00 1d be,a 40002118 400020a8: 11 13 10 92 sethi %hi(0x4c424800), %o0 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 400020ac: 40 00 1f 59 call 40009e10 400020b0: 92 10 20 34 mov 0x34, %o1 400020b4: 03 10 00 62 sethi %hi(0x40018800), %g1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 400020b8: 80 a2 20 00 cmp %o0, 0 400020bc: 12 80 00 04 bne 400020cc 400020c0: d0 20 62 c8 st %o0, [ %g1 + 0x2c8 ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 400020c4: 10 80 00 1f b 40002140 <== NOT EXECUTED 400020c8: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 400020cc: 03 10 00 62 sethi %hi(0x40018800), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 400020d0: c4 04 22 a8 ld [ %l0 + 0x2a8 ], %g2 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; 400020d4: d0 20 62 cc st %o0, [ %g1 + 0x2cc ] for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 400020d8: 86 10 20 00 clr %g3 400020dc: 10 80 00 03 b 400020e8 400020e0: 82 10 00 08 mov %o0, %g1 iop->data1 = iop + 1; 400020e4: c2 20 7f f4 st %g1, [ %g1 + -12 ] 400020e8: 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++) 400020ec: 80 a0 c0 02 cmp %g3, %g2 400020f0: 12 bf ff fd bne 400020e4 400020f4: 82 00 60 34 add %g1, 0x34, %g1 iop->data1 = iop + 1; iop->data1 = NULL; 400020f8: 85 28 e0 02 sll %g3, 2, %g2 400020fc: 83 28 e0 04 sll %g3, 4, %g1 40002100: 82 20 40 02 sub %g1, %g2, %g1 40002104: 82 00 40 03 add %g1, %g3, %g1 40002108: 83 28 60 02 sll %g1, 2, %g1 4000210c: 82 02 00 01 add %o0, %g1, %g1 40002110: c0 20 7f f4 clr [ %g1 + -12 ] /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 40002114: 11 13 10 92 sethi %hi(0x4c424800), %o0 40002118: 92 10 20 01 mov 1, %o1 4000211c: 90 12 21 4f or %o0, 0x14f, %o0 40002120: 94 10 20 54 mov 0x54, %o2 40002124: 96 10 20 00 clr %o3 40002128: 19 10 00 62 sethi %hi(0x40018800), %o4 4000212c: 40 00 0c 09 call 40005150 40002130: 98 13 22 d0 or %o4, 0x2d0, %o4 ! 40018ad0 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 40002134: 80 a2 20 00 cmp %o0, 0 40002138: 02 80 00 04 be 40002148 4000213c: 01 00 00 00 nop rtems_fatal_error_occurred( rc ); 40002140: 40 00 0e 6c call 40005af0 <== NOT EXECUTED 40002144: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 40002148: 40 00 1e f0 call 40009d08 4000214c: 81 e8 00 00 restore 40002150: 01 00 00 00 nop 400208b8 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 400208b8: 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); 400208bc: 90 10 20 00 clr %o0 400208c0: 92 10 20 00 clr %o1 400208c4: 40 00 06 9e call 4002233c 400208c8: 94 07 bf f4 add %fp, -12, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 400208cc: b0 92 20 00 orcc %o0, 0, %i0 400208d0: 12 80 00 19 bne 40020934 400208d4: 23 10 01 20 sethi %hi(0x40048000), %l1 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 400208d8: c4 04 61 24 ld [ %l1 + 0x124 ], %g2 ! 40048124 400208dc: 03 10 01 73 sethi %hi(0x4005cc00), %g1 400208e0: 82 10 63 2c or %g1, 0x32c, %g1 ! 4005cf2c 400208e4: 80 a0 80 01 cmp %g2, %g1 400208e8: 12 80 00 16 bne 40020940 400208ec: a4 14 61 24 or %l1, 0x124, %l2 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 400208f0: 7f ff 94 85 call 40005b04 400208f4: 90 10 20 40 mov 0x40, %o0 if (!tmp) 400208f8: a0 92 20 00 orcc %o0, 0, %l0 400208fc: 12 80 00 04 bne 4002090c 40020900: 92 10 00 12 mov %l2, %o1 40020904: 81 c7 e0 08 ret <== NOT EXECUTED 40020908: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED #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); 4002090c: 90 10 20 00 clr %o0 40020910: 15 10 00 81 sethi %hi(0x40020400), %o2 40020914: 40 00 07 8b call 40022740 40020918: 94 12 a3 88 or %o2, 0x388, %o2 ! 40020788 if (sc != RTEMS_SUCCESSFUL) { 4002091c: 82 92 20 00 orcc %o0, 0, %g1 40020920: 22 80 00 07 be,a 4002093c 40020924: e0 24 61 24 st %l0, [ %l1 + 0x124 ] /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 40020928: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4002092c: 7f ff 92 e4 call 400054bc <== NOT EXECUTED 40020930: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 40020934: 81 c7 e0 08 ret <== NOT EXECUTED 40020938: 81 e8 00 00 restore <== NOT EXECUTED return sc; } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 4002093c: 23 10 01 20 sethi %hi(0x40048000), %l1 40020940: d0 04 61 24 ld [ %l1 + 0x124 ], %o0 ! 40048124 40020944: 94 10 20 40 mov 0x40, %o2 40020948: 13 10 01 73 sethi %hi(0x4005cc00), %o1 4002094c: 40 00 42 e8 call 400314ec 40020950: 92 12 63 2c or %o1, 0x32c, %o1 ! 4005cf2c rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40020954: 03 10 01 71 sethi %hi(0x4005c400), %g1 } 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*/ 40020958: d0 04 61 24 ld [ %l1 + 0x124 ], %o0 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002095c: d2 00 63 30 ld [ %g1 + 0x330 ], %o1 } 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*/ 40020960: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 40020964: 92 02 60 18 add %o1, 0x18, %o1 } 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*/ 40020968: c2 22 00 00 st %g1, [ %o0 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4002096c: 94 10 20 10 mov 0x10, %o2 40020970: 40 00 42 df call 400314ec 40020974: 90 02 20 14 add %o0, 0x14, %o0 * 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); 40020978: a0 07 bf e4 add %fp, -28, %l0 4002097c: 96 10 20 00 clr %o3 40020980: 25 10 01 09 sethi %hi(0x40042400), %l2 40020984: 92 10 20 00 clr %o1 40020988: 94 10 00 10 mov %l0, %o2 4002098c: 7f ff 92 7a call 40005374 40020990: 90 14 a1 60 or %l2, 0x160, %o0 rtems_filesystem_root = loc; 40020994: d0 04 61 24 ld [ %l1 + 0x124 ], %o0 40020998: 92 10 00 10 mov %l0, %o1 4002099c: 94 10 20 10 mov 0x10, %o2 400209a0: 40 00 42 d3 call 400314ec 400209a4: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 400209a8: 92 10 20 00 clr %o1 400209ac: 94 10 00 10 mov %l0, %o2 400209b0: 90 14 a1 60 or %l2, 0x160, %o0 400209b4: 7f ff 92 70 call 40005374 400209b8: 96 10 20 00 clr %o3 rtems_filesystem_current = loc; 400209bc: d0 04 61 24 ld [ %l1 + 0x124 ], %o0 400209c0: 92 10 00 10 mov %l0, %o1 400209c4: 90 02 20 04 add %o0, 4, %o0 400209c8: 40 00 42 c9 call 400314ec 400209cc: 94 10 20 10 mov 0x10, %o2 return RTEMS_SUCCESSFUL; } 400209d0: 81 c7 e0 08 ret 400209d4: 81 e8 00 00 restore 40020800 : * 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) { 40020800: 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); 40020804: 90 10 20 00 clr %o0 <== NOT EXECUTED 40020808: 92 10 20 00 clr %o1 <== NOT EXECUTED 4002080c: 40 00 06 cc call 4002233c <== NOT EXECUTED 40020810: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40020814: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40020818: 12 80 00 26 bne 400208b0 <== NOT EXECUTED 4002081c: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 40020820: e0 00 61 24 ld [ %g1 + 0x124 ], %l0 ! 40048124 <== NOT EXECUTED 40020824: 92 10 61 24 or %g1, 0x124, %o1 <== NOT EXECUTED 40020828: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 4002082c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40020830: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40020834: 32 80 00 0a bne,a 4002085c <== NOT EXECUTED 40020838: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* 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); 4002083c: 40 00 07 ed call 400227f0 <== NOT EXECUTED 40020840: 01 00 00 00 nop <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 40020844: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40020848: 12 80 00 1a bne 400208b0 <== NOT EXECUTED 4002084c: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 40020850: 7f ff ff ce call 40020788 <== NOT EXECUTED 40020854: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 40020858: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002085c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40020860: 31 10 01 20 sethi %hi(0x40048000), %i0 <== NOT EXECUTED 40020864: a0 16 21 24 or %i0, 0x124, %l0 ! 40048124 <== NOT EXECUTED 40020868: 40 00 08 07 call 40022884 <== NOT EXECUTED 4002086c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 40020870: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40020874: 12 80 00 0c bne 400208a4 <== NOT EXECUTED 40020878: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 4002087c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40020880: 15 10 00 81 sethi %hi(0x40020400), %o2 <== NOT EXECUTED 40020884: 40 00 07 af call 40022740 <== NOT EXECUTED 40020888: 94 12 a3 88 or %o2, 0x388, %o2 ! 40020788 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4002088c: 86 92 20 00 orcc %o0, 0, %g3 <== NOT EXECUTED 40020890: 12 80 00 05 bne 400208a4 <== NOT EXECUTED 40020894: 03 10 01 73 sethi %hi(0x4005cc00), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 40020898: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4002089c: 10 80 00 05 b 400208b0 <== NOT EXECUTED 400208a0: c2 26 21 24 st %g1, [ %i0 + 0x124 ] <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 400208a4: 05 10 01 20 sethi %hi(0x40048000), %g2 <== NOT EXECUTED 400208a8: 82 10 63 2c or %g1, 0x32c, %g1 <== NOT EXECUTED 400208ac: c2 20 a1 24 st %g1, [ %g2 + 0x124 ] <== NOT EXECUTED return sc; } 400208b0: 81 c7 e0 08 ret <== NOT EXECUTED 400208b4: 91 e8 00 03 restore %g0, %g3, %o0 <== NOT EXECUTED 40005c00 : * size and thus we skip updating the statistics. */ void rtems_malloc_statistics_at_free( void *pointer ) { 40005c00: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED size_t size; if (_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, pointer, &size) ) { 40005c04: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED 40005c08: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40005c0c: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED 40005c10: 40 00 15 57 call 4000b16c <_Protected_heap_Get_block_size> <== NOT EXECUTED 40005c14: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40005c18: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED 40005c1c: 02 80 00 08 be 40005c3c <== NOT EXECUTED 40005c20: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 40005c24: 03 10 01 71 sethi %hi(0x4005c400), %g1 <== NOT EXECUTED 40005c28: 82 10 63 00 or %g1, 0x300, %g1 ! 4005c700 <== NOT EXECUTED 40005c2c: d8 18 60 28 ldd [ %g1 + 0x28 ], %o4 <== NOT EXECUTED 40005c30: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 40005c34: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 40005c38: c4 38 60 28 std %g2, [ %g1 + 0x28 ] <== NOT EXECUTED 40005c3c: 81 c7 e0 08 ret <== NOT EXECUTED 40005c40: 81 e8 00 00 restore <== NOT EXECUTED 40005c44 : } void rtems_malloc_statistics_at_malloc( void *pointer ) { 40005c44: 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 ) 40005c48: 92 96 20 00 orcc %i0, 0, %o1 <== NOT EXECUTED 40005c4c: 02 80 00 13 be 40005c98 <== NOT EXECUTED 40005c50: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED void rtems_malloc_statistics_at_malloc( void *pointer ) { size_t actual_size = 0; 40005c54: 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); 40005c58: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40005c5c: 40 00 15 44 call 4000b16c <_Protected_heap_Get_block_size> <== NOT EXECUTED 40005c60: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 40005c64: 03 10 01 71 sethi %hi(0x4005c400), %g1 <== NOT EXECUTED 40005c68: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 40005c6c: 96 10 63 00 or %g1, 0x300, %o3 <== NOT EXECUTED 40005c70: d8 1a e0 20 ldd [ %o3 + 0x20 ], %o4 <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 40005c74: c2 02 e0 2c ld [ %o3 + 0x2c ], %g1 <== NOT EXECUTED if (current_depth > s->max_depth) 40005c78: 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); 40005c7c: 86 83 40 02 addcc %o5, %g2, %g3 <== NOT EXECUTED 40005c80: 84 43 20 00 addx %o4, 0, %g2 <== NOT EXECUTED 40005c84: c4 3a e0 20 std %g2, [ %o3 + 0x20 ] <== NOT EXECUTED current_depth = s->lifetime_allocated - s->lifetime_freed; 40005c88: 86 20 c0 01 sub %g3, %g1, %g3 <== NOT EXECUTED if (current_depth > s->max_depth) 40005c8c: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 40005c90: 38 80 00 02 bgu,a 40005c98 <== NOT EXECUTED 40005c94: c6 22 e0 18 st %g3, [ %o3 + 0x18 ] <== NOT EXECUTED 40005c98: 81 c7 e0 08 ret <== NOT EXECUTED 40005c9c: 81 e8 00 00 restore <== NOT EXECUTED 40005ca0 : void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 40005ca0: 11 10 01 71 sethi %hi(0x4005c400), %o0 <== NOT EXECUTED 40005ca4: 92 10 20 00 clr %o1 <== NOT EXECUTED 40005ca8: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 40005cac: 94 10 20 30 mov 0x30, %o2 <== NOT EXECUTED 40005cb0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40005cb4: 40 00 ae 96 call 4003170c <== NOT EXECUTED 40005cb8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40005cbc: 01 00 00 00 nop 40005778 : int rtems_memalign( void **pointer, size_t alignment, size_t size ) { 40005778: 9d e3 bf 98 save %sp, -104, %sp void *return_this; /* * Parameter error checks */ if ( !pointer ) 4000577c: a0 96 20 00 orcc %i0, 0, %l0 40005780: 02 80 00 1f be 400057fc 40005784: 03 10 00 7c sethi %hi(0x4001f000), %g1 *pointer = NULL; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 40005788: c2 00 60 94 ld [ %g1 + 0x94 ], %g1 ! 4001f094 <_System_state_Current> 4000578c: 80 a0 60 03 cmp %g1, 3 40005790: 12 80 00 07 bne 400057ac 40005794: c0 24 00 00 clr [ %l0 ] 40005798: 7f ff fb cf call 400046d4 4000579c: 01 00 00 00 nop 400057a0: 80 8a 20 ff btst 0xff, %o0 400057a4: 02 80 00 17 be 40005800 400057a8: b0 10 20 16 mov 0x16, %i0 /* * * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 400057ac: 7f ff fb e4 call 4000473c 400057b0: b0 10 20 0c mov 0xc, %i0 /* * Perform the aligned allocation requested */ return_this = _Protected_heap_Allocate_aligned( 400057b4: 92 10 00 1a mov %i2, %o1 400057b8: 94 10 00 19 mov %i1, %o2 400057bc: 11 10 00 7b sethi %hi(0x4001ec00), %o0 400057c0: 40 00 13 37 call 4000a49c <_Protected_heap_Allocate_aligned> 400057c4: 90 12 21 20 or %o0, 0x120, %o0 ! 4001ed20 &RTEMS_Malloc_Heap, size, alignment ); if ( !return_this ) 400057c8: b4 92 20 00 orcc %o0, 0, %i2 400057cc: 02 80 00 0d be 40005800 400057d0: 03 10 00 79 sethi %hi(0x4001e400), %g1 return ENOMEM; /* * If configured, update the more involved statistics */ if ( rtems_malloc_statistics_helpers ) 400057d4: c2 00 62 c4 ld [ %g1 + 0x2c4 ], %g1 ! 4001e6c4 400057d8: 80 a0 60 00 cmp %g1, 0 400057dc: 22 80 00 06 be,a 400057f4 400057e0: f4 24 00 00 st %i2, [ %l0 ] (*rtems_malloc_statistics_helpers->at_malloc)(pointer); 400057e4: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400057e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400057ec: 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; 400057f0: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED 400057f4: 81 c7 e0 08 ret 400057f8: 91 e8 20 00 restore %g0, 0, %o0 return 0; 400057fc: b0 10 20 16 mov 0x16, %i0 } 40005800: 81 c7 e0 08 ret 40005804: 81 e8 00 00 restore 400063c8 : void rtems_panic( const char *printf_format, ... ) { 400063c8: 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); 400063cc: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 400063d0: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED 400063d4: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 400063d8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 400063dc: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 400063e0: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 400063e4: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 400063e8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400063ec: 7f ff ff 88 call 4000620c <== NOT EXECUTED 400063f0: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 400063f4: 81 c7 e0 08 ret <== NOT EXECUTED 400063f8: 81 e8 00 00 restore <== NOT EXECUTED 4000e9d0 : void *internal_start, void *external_start, uint32_t length, Objects_Id *id ) { 4000e9d0: 9d e3 bf 98 save %sp, -104, %sp register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name) ) 4000e9d4: a2 96 20 00 orcc %i0, 0, %l1 4000e9d8: 02 80 00 14 be 4000ea28 4000e9dc: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 4000e9e0: 80 a7 20 00 cmp %i4, 0 4000e9e4: 02 80 00 24 be 4000ea74 4000e9e8: 82 16 80 19 or %i2, %i1, %g1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || 4000e9ec: 80 88 60 07 btst 7, %g1 4000e9f0: 12 80 00 0e bne 4000ea28 4000e9f4: b0 10 20 09 mov 9, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000e9f8: 05 10 00 cb sethi %hi(0x40032c00), %g2 4000e9fc: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 ! 40032d60 <_Thread_Dispatch_disable_level> 4000ea00: 82 00 60 01 inc %g1 4000ea04: c2 20 a1 60 st %g1, [ %g2 + 0x160 ] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) 4000ea08: 21 10 00 ca sethi %hi(0x40032800), %l0 4000ea0c: 40 00 13 e0 call 4001398c <_Objects_Allocate> 4000ea10: 90 14 22 dc or %l0, 0x2dc, %o0 ! 40032adc <_Dual_ported_memory_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { 4000ea14: 80 a2 20 00 cmp %o0, 0 4000ea18: 32 80 00 06 bne,a 4000ea30 4000ea1c: c4 02 20 08 ld [ %o0 + 8 ], %g2 _Thread_Enable_dispatch(); 4000ea20: 40 00 17 9a call 40014888 <_Thread_Enable_dispatch> 4000ea24: b0 10 20 05 mov 5, %i0 4000ea28: 81 c7 e0 08 ret 4000ea2c: 81 e8 00 00 restore #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000ea30: 82 14 22 dc or %l0, 0x2dc, %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4000ea34: e2 22 20 0c st %l1, [ %o0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4000ea38: c6 00 60 1c ld [ %g1 + 0x1c ], %g3 return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; 4000ea3c: 82 06 ff ff add %i3, -1, %g1 4000ea40: c2 22 20 18 st %g1, [ %o0 + 0x18 ] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; 4000ea44: c4 27 00 00 st %g2, [ %i4 ] 4000ea48: 03 00 00 3f sethi %hi(0xfc00), %g1 4000ea4c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000ea50: 84 08 80 01 and %g2, %g1, %g2 4000ea54: 85 28 a0 02 sll %g2, 2, %g2 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; 4000ea58: f2 22 20 10 st %i1, [ %o0 + 0x10 ] the_port->external_base = external_start; 4000ea5c: f4 22 20 14 st %i2, [ %o0 + 0x14 ] 4000ea60: d0 20 c0 02 st %o0, [ %g3 + %g2 ] &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; _Thread_Enable_dispatch(); 4000ea64: 40 00 17 89 call 40014888 <_Thread_Enable_dispatch> 4000ea68: b0 10 20 00 clr %i0 4000ea6c: 81 c7 e0 08 ret 4000ea70: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 4000ea74: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED } 4000ea78: 81 c7 e0 08 ret <== NOT EXECUTED 4000ea7c: 81 e8 00 00 restore <== NOT EXECUTED 400065e0 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 400065e0: 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 *) 400065e4: 11 10 00 76 sethi %hi(0x4001d800), %o0 400065e8: 92 10 00 18 mov %i0, %o1 400065ec: 90 12 23 4c or %o0, 0x34c, %o0 400065f0: 40 00 08 e4 call 40008980 <_Objects_Get> 400065f4: 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 ) { 400065f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400065fc: 80 a0 60 00 cmp %g1, 0 40006600: 12 80 00 64 bne 40006790 40006604: a2 10 00 08 mov %o0, %l1 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40006608: 27 10 00 77 sethi %hi(0x4001dc00), %l3 4000660c: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40006610: c2 04 e1 80 ld [ %l3 + 0x180 ], %g1 40006614: 80 a0 80 01 cmp %g2, %g1 40006618: 02 80 00 06 be 40006630 4000661c: 80 a6 60 00 cmp %i1, 0 _Thread_Enable_dispatch(); 40006620: 40 00 0b 2b call 400092cc <_Thread_Enable_dispatch> 40006624: b0 10 20 17 mov 0x17, %i0 40006628: 81 c7 e0 08 ret 4000662c: 81 e8 00 00 restore return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40006630: 12 80 00 0c bne 40006660 40006634: 01 00 00 00 nop switch ( the_period->state ) { 40006638: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 4000663c: 80 a0 60 00 cmp %g1, 0 40006640: 02 80 00 50 be 40006780 40006644: b0 10 20 0b mov 0xb, %i0 40006648: 82 00 7f fd add %g1, -3, %g1 4000664c: 80 a0 60 01 cmp %g1, 1 40006650: 18 80 00 4c bgu 40006780 40006654: b0 10 20 00 clr %i0 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 40006658: 10 80 00 4a b 40006780 4000665c: b0 10 20 06 mov 6, %i0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40006660: 7f ff f1 59 call 40002bc4 40006664: 01 00 00 00 nop 40006668: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 4000666c: e4 04 60 38 ld [ %l1 + 0x38 ], %l2 40006670: 80 a4 a0 02 cmp %l2, 2 40006674: 02 80 00 1a be 400066dc 40006678: 80 a4 a0 04 cmp %l2, 4 4000667c: 02 80 00 34 be 4000674c 40006680: 80 a4 a0 00 cmp %l2, 0 40006684: 12 80 00 43 bne 40006790 40006688: 01 00 00 00 nop case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 4000668c: 7f ff f1 52 call 40002bd4 40006690: 01 00 00 00 nop /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 40006694: 7f ff ff 5e call 4000640c <_Rate_monotonic_Initiate_statistics> 40006698: 90 10 00 11 mov %l1, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000669c: 82 10 20 02 mov 2, %g1 400066a0: c2 24 60 38 st %g1, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400066a4: 03 10 00 1a sethi %hi(0x40006800), %g1 400066a8: 82 10 62 64 or %g1, 0x264, %g1 ! 40006a64 <_Rate_monotonic_Timeout> the_watchdog->id = id; 400066ac: f0 24 60 30 st %i0, [ %l1 + 0x30 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400066b0: 92 04 60 10 add %l1, 0x10, %o1 400066b4: 11 10 00 77 sethi %hi(0x4001dc00), %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400066b8: f2 24 60 1c st %i1, [ %l1 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400066bc: 90 12 21 a0 or %o0, 0x1a0, %o0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400066c0: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400066c4: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 400066c8: f2 24 60 4c st %i1, [ %l1 + 0x4c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400066cc: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400066d0: 40 00 10 3b call 4000a7bc <_Watchdog_Insert> 400066d4: b0 10 20 00 clr %i0 400066d8: 30 80 00 2a b,a 40006780 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 400066dc: 7f ff ff 68 call 4000647c <_Rate_monotonic_Update_statistics> 400066e0: 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; 400066e4: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 400066e8: 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; 400066ec: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 400066f0: 7f ff f1 39 call 40002bd4 400066f4: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 400066f8: c2 04 e1 80 ld [ %l3 + 0x180 ], %g1 400066fc: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006700: 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; 40006704: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006708: 40 00 0d 64 call 40009c98 <_Thread_Set_state> 4000670c: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40006710: 7f ff f1 2d call 40002bc4 40006714: 01 00 00 00 nop local_state = the_period->state; 40006718: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000671c: e4 24 60 38 st %l2, [ %l1 + 0x38 ] _ISR_Enable( level ); 40006720: 7f ff f1 2d call 40002bd4 40006724: 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 ) 40006728: 80 a4 20 03 cmp %l0, 3 4000672c: 12 80 00 04 bne 4000673c 40006730: d0 04 e1 80 ld [ %l3 + 0x180 ], %o0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40006734: 40 00 09 eb call 40008ee0 <_Thread_Clear_state> <== NOT EXECUTED 40006738: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED _Thread_Enable_dispatch(); 4000673c: 40 00 0a e4 call 400092cc <_Thread_Enable_dispatch> 40006740: b0 10 20 00 clr %i0 40006744: 81 c7 e0 08 ret 40006748: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 4000674c: 7f ff ff 4c call 4000647c <_Rate_monotonic_Update_statistics> 40006750: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40006754: 7f ff f1 20 call 40002bd4 40006758: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 4000675c: 82 10 20 02 mov 2, %g1 40006760: 11 10 00 77 sethi %hi(0x4001dc00), %o0 40006764: 92 04 60 10 add %l1, 0x10, %o1 40006768: 90 12 21 a0 or %o0, 0x1a0, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000676c: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40006770: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006774: 40 00 10 12 call 4000a7bc <_Watchdog_Insert> 40006778: c2 24 60 38 st %g1, [ %l1 + 0x38 ] _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 4000677c: b0 10 20 06 mov 6, %i0 40006780: 40 00 0a d3 call 400092cc <_Thread_Enable_dispatch> 40006784: 01 00 00 00 nop 40006788: 81 c7 e0 08 ret 4000678c: 81 e8 00 00 restore case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40006790: 81 c7 e0 08 ret 40006794: 91 e8 20 04 restore %g0, 4, %o0 4000ff78 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 4000ff78: 9d e3 bf 90 save %sp, -112, %sp 4000ff7c: 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 ) 4000ff80: 80 a6 60 00 cmp %i1, 0 4000ff84: 02 80 00 2c be 40010034 4000ff88: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 4000ff8c: 03 10 00 cb sethi %hi(0x40032c00), %g1 4000ff90: 40 00 09 1b call 400123fc <_API_Mutex_Lock> 4000ff94: d0 00 62 18 ld [ %g1 + 0x218 ], %o0 ! 40032e18 <_RTEMS_Allocator_Mutex> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 4000ff98: 92 10 00 10 mov %l0, %o1 4000ff9c: 11 10 00 ca sethi %hi(0x40032800), %o0 4000ffa0: 94 07 bf f0 add %fp, -16, %o2 4000ffa4: 40 00 0f d4 call 40013ef4 <_Objects_Get_no_protection> 4000ffa8: 90 12 23 9c or %o0, 0x39c, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4000ffac: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000ffb0: 80 a0 60 00 cmp %g1, 0 4000ffb4: 02 80 00 05 be 4000ffc8 4000ffb8: a0 10 00 08 mov %o0, %l0 4000ffbc: 80 a0 60 01 cmp %g1, 1 4000ffc0: 10 80 00 0f b 4000fffc 4000ffc4: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 4000ffc8: 92 10 00 19 mov %i1, %o1 4000ffcc: 94 10 00 1a mov %i2, %o2 4000ffd0: 90 02 20 68 add %o0, 0x68, %o0 4000ffd4: 96 07 bf f4 add %fp, -12, %o3 4000ffd8: 40 00 0c 0a call 40013000 <_Heap_Extend> 4000ffdc: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4000ffe0: 80 a2 20 01 cmp %o0, 1 4000ffe4: 02 80 00 12 be 4001002c 4000ffe8: 03 10 00 cb sethi %hi(0x40032c00), %g1 4000ffec: 0a 80 00 08 bcs 4001000c 4000fff0: c6 07 bf f4 ld [ %fp + -12 ], %g3 4000fff4: 80 a2 20 02 cmp %o0, 2 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 4000fff8: b0 10 20 18 mov 0x18, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 4000fffc: 32 80 00 0b bne,a 40010028 40010000: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010004: 10 80 00 0a b 4001002c 40010008: 03 10 00 cb sethi %hi(0x40032c00), %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 4001000c: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 40010010: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40010014: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 40010018: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 4001001c: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 40010020: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 40010024: b0 10 20 00 clr %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010028: 03 10 00 cb sethi %hi(0x40032c00), %g1 4001002c: 40 00 09 0a call 40012454 <_API_Mutex_Unlock> 40010030: d0 00 62 18 ld [ %g1 + 0x218 ], %o0 ! 40032e18 <_RTEMS_Allocator_Mutex> return return_status; } 40010034: 81 c7 e0 08 ret 40010038: 81 e8 00 00 restore 40010340 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 40010340: 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 ) 40010344: 80 a6 e0 00 cmp %i3, 0 40010348: 02 80 00 32 be 40010410 4001034c: 21 10 00 cb sethi %hi(0x40032c00), %l0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 40010350: 40 00 08 2b call 400123fc <_API_Mutex_Lock> 40010354: d0 04 22 18 ld [ %l0 + 0x218 ], %o0 ! 40032e18 <_RTEMS_Allocator_Mutex> 40010358: 92 10 00 18 mov %i0, %o1 4001035c: 11 10 00 ca sethi %hi(0x40032800), %o0 40010360: 94 07 bf f0 add %fp, -16, %o2 40010364: 40 00 0e e4 call 40013ef4 <_Objects_Get_no_protection> 40010368: 90 12 23 9c or %o0, 0x39c, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4001036c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40010370: 80 a0 60 00 cmp %g1, 0 40010374: 02 80 00 0b be 400103a0 40010378: b0 10 00 08 mov %o0, %i0 4001037c: 82 18 60 01 xor %g1, 1, %g1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010380: d0 04 22 18 ld [ %l0 + 0x218 ], %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40010384: 80 a0 00 01 cmp %g0, %g1 40010388: 82 40 3f ff addx %g0, -1, %g1 4001038c: b0 08 7f eb and %g1, -21, %i0 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 40010390: 40 00 08 31 call 40012454 <_API_Mutex_Unlock> 40010394: b0 06 20 19 add %i0, 0x19, %i0 40010398: 81 c7 e0 08 ret 4001039c: 81 e8 00 00 restore case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 400103a0: 94 10 00 1a mov %i2, %o2 400103a4: 92 10 00 19 mov %i1, %o1 400103a8: 90 02 20 68 add %o0, 0x68, %o0 400103ac: 96 07 bf ec add %fp, -20, %o3 400103b0: 40 00 0c 94 call 40013600 <_Heap_Resize_block> 400103b4: 98 07 bf f4 add %fp, -12, %o4 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 400103b8: c2 07 bf ec ld [ %fp + -20 ], %g1 _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 400103bc: b4 92 20 00 orcc %o0, 0, %i2 400103c0: 12 80 00 0b bne 400103ec 400103c4: c2 26 c0 00 st %g1, [ %i3 ] 400103c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400103cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400103d0: 02 80 00 08 be 400103f0 <== NOT EXECUTED 400103d4: 03 10 00 cb sethi %hi(0x40032c00), %g1 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 400103d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400103dc: 40 00 21 59 call 40018940 <_Region_Process_queue> <== NOT EXECUTED 400103e0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400103e4: 81 c7 e0 08 ret <== NOT EXECUTED 400103e8: 81 e8 00 00 restore <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 400103ec: 03 10 00 cb sethi %hi(0x40032c00), %g1 400103f0: d0 00 62 18 ld [ %g1 + 0x218 ], %o0 ! 40032e18 <_RTEMS_Allocator_Mutex> 400103f4: 40 00 08 18 call 40012454 <_API_Mutex_Unlock> 400103f8: b0 10 20 00 clr %i0 return 400103fc: 80 a6 a0 00 cmp %i2, 0 40010400: 02 bf ff e6 be 40010398 40010404: 80 a6 a0 01 cmp %i2, 1 40010408: 02 bf ff e4 be 40010398 4001040c: b0 10 20 0d mov 0xd, %i0 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 40010410: b0 10 20 09 mov 9, %i0 } 40010414: 81 c7 e0 08 ret 40010418: 81 e8 00 00 restore 40005150 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40005150: 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 ) ) 40005154: a4 96 20 00 orcc %i0, 0, %l2 40005158: 02 80 00 23 be 400051e4 4000515c: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40005160: 80 a7 20 00 cmp %i4, 0 40005164: 02 80 00 20 be 400051e4 40005168: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 4000516c: 84 8e a0 c0 andcc %i2, 0xc0, %g2 40005170: 02 80 00 0d be 400051a4 40005174: a2 8e a0 30 andcc %i2, 0x30, %l1 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 40005178: 82 0e a0 30 and %i2, 0x30, %g1 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4000517c: 80 a0 60 10 cmp %g1, 0x10 40005180: 02 80 00 04 be 40005190 40005184: 80 a0 60 20 cmp %g1, 0x20 40005188: 32 80 00 17 bne,a 400051e4 4000518c: b0 10 20 0b mov 0xb, %i0 40005190: 80 8e a0 04 btst 4, %i2 40005194: 02 80 00 64 be 40005324 40005198: 80 a0 a0 c0 cmp %g2, 0xc0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4000519c: 02 80 00 62 be 40005324 400051a0: a2 8e a0 30 andcc %i2, 0x30, %l1 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 400051a4: 02 80 00 04 be 400051b4 400051a8: 80 a6 60 01 cmp %i1, 1 400051ac: 18 80 00 0e bgu 400051e4 400051b0: b0 10 20 0a mov 0xa, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400051b4: 03 10 00 63 sethi %hi(0x40018c00), %g1 400051b8: c4 00 60 a0 ld [ %g1 + 0xa0 ], %g2 ! 40018ca0 <_Thread_Dispatch_disable_level> 400051bc: 84 00 a0 01 inc %g2 400051c0: c4 20 60 a0 st %g2, [ %g1 + 0xa0 ] * 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 ); 400051c4: 11 10 00 62 sethi %hi(0x40018800), %o0 400051c8: 40 00 05 57 call 40006724 <_Objects_Allocate> 400051cc: 90 12 23 6c or %o0, 0x36c, %o0 ! 40018b6c <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 400051d0: a0 92 20 00 orcc %o0, 0, %l0 400051d4: 12 80 00 06 bne 400051ec 400051d8: 80 a4 60 00 cmp %l1, 0 _Thread_Enable_dispatch(); 400051dc: 40 00 08 ff call 400075d8 <_Thread_Enable_dispatch> 400051e0: b0 10 20 05 mov 5, %i0 400051e4: 81 c7 e0 08 ret 400051e8: 81 e8 00 00 restore * 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 ) ) { 400051ec: 02 80 00 33 be 400052b8 400051f0: f4 24 20 10 st %i2, [ %l0 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 400051f4: 80 8e a0 40 btst 0x40, %i2 400051f8: 12 80 00 06 bne 40005210 400051fc: 82 10 20 02 mov 2, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 40005200: 80 8e a0 80 btst 0x80, %i2 40005204: 02 80 00 05 be 40005218 40005208: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 4000520c: 82 10 20 03 mov 3, %g1 40005210: 10 80 00 05 b 40005224 40005214: c2 27 bf e8 st %g1, [ %fp + -24 ] else if ( _Attributes_Is_priority( attribute_set ) ) 40005218: 12 bf ff fe bne 40005210 4000521c: 82 10 20 01 mov 1, %g1 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 40005220: c0 27 bf e8 clr [ %fp + -24 ] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 40005224: 80 a4 60 10 cmp %l1, 0x10 40005228: 12 80 00 0f bne 40005264 4000522c: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40005230: c2 07 bf e8 ld [ %fp + -24 ], %g1 40005234: 80 a0 60 01 cmp %g1, 1 40005238: 08 80 00 07 bleu 40005254 4000523c: c0 27 bf e0 clr [ %fp + -32 ] 40005240: 80 a0 60 03 cmp %g1, 3 40005244: 38 80 00 0b bgu,a 40005270 40005248: 82 1e 60 01 xor %i1, 1, %g1 <== NOT EXECUTED 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; 4000524c: 10 80 00 04 b 4000525c 40005250: 82 10 20 01 mov 1, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40005254: 10 80 00 06 b 4000526c 40005258: c0 2f bf e4 clrb [ %fp + -28 ] break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 4000525c: 10 80 00 04 b 4000526c 40005260: c2 2f bf e4 stb %g1, [ %fp + -28 ] break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 40005264: 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; 40005268: 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( 4000526c: 82 1e 60 01 xor %i1, 1, %g1 40005270: 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; 40005274: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 40005278: 94 60 3f ff subx %g0, -1, %o2 4000527c: 90 04 20 14 add %l0, 0x14, %o0 40005280: 40 00 03 2a call 40005f28 <_CORE_mutex_Initialize> 40005284: 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 ) { 40005288: 80 a2 20 06 cmp %o0, 6 4000528c: 32 80 00 19 bne,a 400052f0 40005290: c4 04 20 08 ld [ %l0 + 8 ], %g2 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40005294: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40005298: 11 10 00 62 sethi %hi(0x40018800), %o0 <== NOT EXECUTED 4000529c: 90 12 23 6c or %o0, 0x36c, %o0 ! 40018b6c <_Semaphore_Information> <== NOT EXECUTED 400052a0: 40 00 06 0e call 40006ad8 <_Objects_Free> <== NOT EXECUTED 400052a4: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 400052a8: 40 00 08 cc call 400075d8 <_Thread_Enable_dispatch> <== NOT EXECUTED 400052ac: 01 00 00 00 nop <== NOT EXECUTED 400052b0: 81 c7 e0 08 ret <== NOT EXECUTED 400052b4: 81 e8 00 00 restore <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 400052b8: 80 8e a0 04 btst 4, %i2 400052bc: 22 80 00 04 be,a 400052cc 400052c0: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 400052c4: 82 10 20 01 mov 1, %g1 400052c8: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400052cc: 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; 400052d0: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 400052d4: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 400052d8: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 400052dc: 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( 400052e0: 90 04 20 14 add %l0, 0x14, %o0 400052e4: 40 00 03 e8 call 40006284 <_CORE_semaphore_Initialize> 400052e8: 92 07 bf f0 add %fp, -16, %o1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400052ec: c4 04 20 08 ld [ %l0 + 8 ], %g2 400052f0: 03 10 00 62 sethi %hi(0x40018800), %g1 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 400052f4: e4 24 20 0c st %l2, [ %l0 + 0xc ] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 400052f8: c6 00 63 88 ld [ %g1 + 0x388 ], %g3 &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 400052fc: c4 27 00 00 st %g2, [ %i4 ] 40005300: 03 00 00 3f sethi %hi(0xfc00), %g1 40005304: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40005308: 84 08 80 01 and %g2, %g1, %g2 4000530c: 85 28 a0 02 sll %g2, 2, %g2 the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 40005310: b0 10 20 00 clr %i0 40005314: 40 00 08 b1 call 400075d8 <_Thread_Enable_dispatch> 40005318: e0 20 c0 02 st %l0, [ %g3 + %g2 ] 4000531c: 81 c7 e0 08 ret 40005320: 81 e8 00 00 restore return RTEMS_SUCCESSFUL; 40005324: b0 10 20 0b mov 0xb, %i0 } 40005328: 81 c7 e0 08 ret 4000532c: 81 e8 00 00 restore 4002229c : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 4002229c: 9d e3 bf 90 save %sp, -112, %sp 400222a0: 11 10 01 71 sethi %hi(0x4005c400), %o0 400222a4: 92 10 00 18 mov %i0, %o1 400222a8: 90 12 23 48 or %o0, 0x348, %o0 400222ac: 7f ff a2 fa call 4000ae94 <_Objects_Get> 400222b0: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 400222b4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400222b8: 80 a0 60 00 cmp %g1, 0 400222bc: 12 80 00 0f bne 400222f8 400222c0: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 400222c4: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 400222c8: 80 88 60 30 btst 0x30, %g1 400222cc: 02 80 00 06 be 400222e4 400222d0: 90 02 20 14 add %o0, 0x14, %o0 _CORE_mutex_Flush( 400222d4: 92 10 20 00 clr %o1 400222d8: 7f ff 9f 2b call 40009f84 <_CORE_mutex_Flush> 400222dc: 94 10 20 01 mov 1, %o2 400222e0: 30 80 00 04 b,a 400222f0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 400222e4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400222e8: 7f ff 9f fe call 4000a2e0 <_CORE_semaphore_Flush> <== NOT EXECUTED 400222ec: 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(); 400222f0: 7f ff a5 40 call 4000b7f0 <_Thread_Enable_dispatch> 400222f4: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 400222f8: 81 c7 e0 08 ret 400222fc: 81 e8 00 00 restore 400162dc : */ void rtems_shutdown_executive( uint32_t result ) { 400162dc: 9d e3 bf 10 save %sp, -240, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 400162e0: 05 10 00 63 sethi %hi(0x40018c00), %g2 400162e4: c2 00 a2 44 ld [ %g2 + 0x244 ], %g1 ! 40018e44 <_System_state_Current> 400162e8: 80 a0 60 04 cmp %g1, 4 400162ec: 02 80 00 07 be 40016308 400162f0: 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 ); 400162f4: 13 10 00 63 sethi %hi(0x40018c00), %o1 400162f8: c2 20 a2 44 st %g1, [ %g2 + 0x244 ] 400162fc: 92 12 60 18 or %o1, 0x18, %o1 40016300: 7f ff c9 f8 call 40008ae0 <_CPU_Context_switch> 40016304: 90 07 bf 70 add %fp, -144, %o0 40016308: 81 c7 e0 08 ret <== NOT EXECUTED 4001630c: 81 e8 00 00 restore <== NOT EXECUTED 40003f44 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 40003f44: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 40003f48: 03 10 01 72 sethi %hi(0x4005c800), %g1 <== NOT EXECUTED 40003f4c: c2 00 61 40 ld [ %g1 + 0x140 ], %g1 ! 4005c940 <_Thread_Executing> <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40003f50: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 <== NOT EXECUTED 40003f54: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED 40003f58: 0a 80 00 07 bcs 40003f74 <== NOT EXECUTED 40003f5c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003f60: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED 40003f64: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 40003f68: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED 40003f6c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40003f70: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 40003f74: 03 10 01 25 sethi %hi(0x40049400), %g1 <== NOT EXECUTED 40003f78: c2 00 62 34 ld [ %g1 + 0x234 ], %g1 ! 40049634 <== NOT EXECUTED 40003f7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003f80: 02 80 00 0a be 40003fa8 <== NOT EXECUTED 40003f84: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED pattern_ok = (!memcmp( 40003f88: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 40003f8c: 13 10 01 71 sethi %hi(0x4005c400), %o1 <== NOT EXECUTED 40003f90: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40003f94: 40 00 b5 28 call 40031434 <== NOT EXECUTED 40003f98: 92 12 62 74 or %o1, 0x274, %o1 <== NOT EXECUTED 40003f9c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40003fa0: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40003fa4: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 40003fa8: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED 40003fac: 02 80 00 04 be 40003fbc <== NOT EXECUTED 40003fb0: 80 8a 60 ff btst 0xff, %o1 <== NOT EXECUTED 40003fb4: 12 80 00 07 bne 40003fd0 <== NOT EXECUTED 40003fb8: 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 ); 40003fbc: 03 10 01 72 sethi %hi(0x4005c800), %g1 <== NOT EXECUTED 40003fc0: d0 00 61 40 ld [ %g1 + 0x140 ], %o0 ! 4005c940 <_Thread_Executing> <== NOT EXECUTED 40003fc4: 92 0a 60 01 and %o1, 1, %o1 <== NOT EXECUTED 40003fc8: 7f ff ff c6 call 40003ee0 <== NOT EXECUTED 40003fcc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return true; } 40003fd0: 81 c7 e0 08 ret <== NOT EXECUTED 40003fd4: 81 e8 00 00 restore <== NOT EXECUTED 40003ec4 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 40003ec4: 13 10 00 1a sethi %hi(0x40006800), %o1 <== NOT EXECUTED 40003ec8: 90 10 20 00 clr %o0 <== NOT EXECUTED 40003ecc: 92 12 62 34 or %o1, 0x234, %o1 <== NOT EXECUTED 40003ed0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003ed4: 7f ff ff e6 call 40003e6c <== NOT EXECUTED 40003ed8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003edc: 01 00 00 00 nop 40003e6c : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003e6c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED print_context = context; 40003e70: 23 10 01 25 sethi %hi(0x40049400), %l1 <== NOT EXECUTED print_handler = print; 40003e74: 21 10 01 25 sethi %hi(0x40049400), %l0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { print_context = context; 40003e78: f0 24 62 38 st %i0, [ %l1 + 0x238 ] <== NOT EXECUTED print_handler = print; 40003e7c: f2 24 22 3c st %i1, [ %l0 + 0x23c ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 40003e80: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003e84: 13 10 01 07 sethi %hi(0x40041c00), %o1 <== NOT EXECUTED 40003e88: 9f c6 40 00 call %i1 <== NOT EXECUTED 40003e8c: 92 12 62 80 or %o1, 0x280, %o1 ! 40041e80 <__func__.4776+0x298> <== NOT EXECUTED (*print)( context, 40003e90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003e94: 13 10 01 07 sethi %hi(0x40041c00), %o1 <== NOT EXECUTED 40003e98: 9f c6 40 00 call %i1 <== NOT EXECUTED 40003e9c: 92 12 62 98 or %o1, 0x298, %o1 ! 40041e98 <__func__.4776+0x2b0> <== 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 ); 40003ea0: 11 10 00 0f sethi %hi(0x40003c00), %o0 <== NOT EXECUTED 40003ea4: 40 00 1a 3b call 4000a790 <== NOT EXECUTED 40003ea8: 90 12 21 18 or %o0, 0x118, %o0 ! 40003d18 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 40003eac: 7f ff ff 9b call 40003d18 <== NOT EXECUTED 40003eb0: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 40003eb4: c0 24 62 38 clr [ %l1 + 0x238 ] <== NOT EXECUTED print_handler = NULL; 40003eb8: c0 24 22 3c clr [ %l0 + 0x23c ] <== NOT EXECUTED } 40003ebc: 81 c7 e0 08 ret <== NOT EXECUTED 40003ec0: 81 e8 00 00 restore <== NOT EXECUTED 40003fd8 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 40003fd8: 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; 40003fdc: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40003fe0: 80 a7 80 08 cmp %fp, %o0 40003fe4: 0a 80 00 07 bcs 40004000 40003fe8: b2 10 20 00 clr %i1 40003fec: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 40003ff0: 82 02 00 01 add %o0, %g1, %g1 40003ff4: 80 a0 40 1e cmp %g1, %fp 40003ff8: 82 60 3f ff subx %g0, -1, %g1 40003ffc: b2 10 00 01 mov %g1, %i1 /* * 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, 40004000: 90 02 20 08 add %o0, 8, %o0 40004004: 13 10 01 71 sethi %hi(0x4005c400), %o1 40004008: 94 10 20 10 mov 0x10, %o2 4000400c: 40 00 b5 0a call 40031434 40004010: 92 12 62 74 or %o1, 0x274, %o1 40004014: 80 a0 00 08 cmp %g0, %o0 40004018: 82 60 3f ff subx %g0, -1, %g1 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 4000401c: 80 8e 60 ff btst 0xff, %i1 40004020: 02 80 00 04 be 40004030 40004024: 80 a0 60 00 cmp %g1, 0 40004028: 12 80 00 05 bne 4000403c 4000402c: 01 00 00 00 nop Stack_check_report_blown_task( running, pattern_ok ); 40004030: b2 08 60 01 and %g1, 1, %i1 <== NOT EXECUTED 40004034: 7f ff ff ab call 40003ee0 <== NOT EXECUTED 40004038: 81 e8 00 00 restore <== NOT EXECUTED 4000403c: 81 c7 e0 08 ret 40004040: 81 e8 00 00 restore 400061f0 : const char * rtems_status_text( rtems_status_code status ) { 400061f0: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 400061f4: 11 10 00 8c sethi %hi(0x40023000), %o0 <== NOT EXECUTED 400061f8: 90 12 22 00 or %o0, 0x200, %o0 ! 40023200 <== NOT EXECUTED 400061fc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40006200: 40 00 29 2e call 400106b8 <== NOT EXECUTED 40006204: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006208: 01 00 00 00 nop 40002d04 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40002d04: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED 40002d08: d0 20 63 bc st %o0, [ %g1 + 0x3bc ] ! 400183bc <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40002d0c: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 40002d10: 90 10 20 00 clr %o0 <== NOT EXECUTED int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; rtems_termios_raw_input_size = raw_input; 40002d14: d2 20 63 c0 st %o1, [ %g1 + 0x3c0 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40002d18: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40002d1c: 81 c3 e0 08 retl <== NOT EXECUTED 40002d20: d4 20 63 c4 st %o2, [ %g1 + 0x3c4 ] ! 400183c4 <== NOT EXECUTED 40004398 : } } rtems_status_code rtems_termios_close (void *arg) { 40004398: 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); 4000439c: 03 10 00 62 sethi %hi(0x40018800), %g1 400043a0: d0 00 63 60 ld [ %g1 + 0x360 ], %o0 ! 40018b60 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400043a4: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400043a8: 92 10 20 00 clr %o1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400043ac: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400043b0: 40 00 04 0e call 400053e8 400043b4: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 400043b8: 80 a2 20 00 cmp %o0, 0 400043bc: 12 80 00 26 bne 40004454 400043c0: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 400043c4: c2 04 20 08 ld [ %l0 + 8 ], %g1 400043c8: 82 00 7f ff add %g1, -1, %g1 400043cc: 80 a0 60 00 cmp %g1, 0 400043d0: 12 80 00 58 bne 40004530 400043d4: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400043d8: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 400043dc: 03 10 00 62 sethi %hi(0x40018800), %g1 400043e0: 85 28 a0 05 sll %g2, 5, %g2 400043e4: 82 10 61 58 or %g1, 0x158, %g1 400043e8: 82 00 40 02 add %g1, %g2, %g1 400043ec: c2 00 60 04 ld [ %g1 + 4 ], %g1 400043f0: 80 a0 60 00 cmp %g1, 0 400043f4: 02 80 00 06 be 4000440c 400043f8: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400043fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004400: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 40004404: 10 80 00 05 b 40004418 <== NOT EXECUTED 40004408: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 4000440c: 7f ff fd c2 call 40003b14 40004410: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40004414: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004418: 80 a0 60 02 cmp %g1, 2 4000441c: 32 80 00 10 bne,a 4000445c 40004420: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 40004424: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 40004428: 40 00 02 a2 call 40004eb0 <== NOT EXECUTED 4000442c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40004430: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004434: 12 80 00 08 bne 40004454 <== NOT EXECUTED 40004438: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 4000443c: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40004440: 40 00 02 9c call 40004eb0 <== NOT EXECUTED 40004444: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40004448: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000444c: 22 80 00 04 be,a 4000445c <== NOT EXECUTED 40004450: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004454: 40 00 05 a7 call 40005af0 <== NOT EXECUTED 40004458: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 4000445c: 80 a0 60 00 cmp %g1, 0 40004460: 22 80 00 07 be,a 4000447c 40004464: c2 04 00 00 ld [ %l0 ], %g1 (*tty->device.lastClose)(tty->major, tty->minor, arg); 40004468: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 4000446c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40004470: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004474: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40004478: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 4000447c: 80 a0 60 00 cmp %g1, 0 40004480: 12 80 00 08 bne 400044a0 40004484: c4 04 20 04 ld [ %l0 + 4 ], %g2 rtems_termios_ttyTail = tty->back; 40004488: 03 10 00 62 sethi %hi(0x40018800), %g1 if ( rtems_termios_ttyTail != NULL ) { 4000448c: 80 a0 a0 00 cmp %g2, 0 40004490: 02 80 00 05 be 400044a4 40004494: c4 20 63 64 st %g2, [ %g1 + 0x364 ] rtems_termios_ttyTail->forw = NULL; 40004498: 10 80 00 03 b 400044a4 <== NOT EXECUTED 4000449c: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED } } else { tty->forw->back = tty->back; 400044a0: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 400044a4: c2 04 20 04 ld [ %l0 + 4 ], %g1 400044a8: 80 a0 60 00 cmp %g1, 0 400044ac: 12 80 00 08 bne 400044cc 400044b0: c4 04 00 00 ld [ %l0 ], %g2 rtems_termios_ttyHead = tty->forw; 400044b4: 03 10 00 62 sethi %hi(0x40018800), %g1 if ( rtems_termios_ttyHead != NULL ) { 400044b8: 80 a0 a0 00 cmp %g2, 0 400044bc: 02 80 00 05 be 400044d0 400044c0: c4 20 63 68 st %g2, [ %g1 + 0x368 ] rtems_termios_ttyHead->back = NULL; 400044c4: 10 80 00 03 b 400044d0 <== NOT EXECUTED 400044c8: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED } } else { tty->back->forw = tty->forw; 400044cc: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 400044d0: 40 00 03 98 call 40005330 400044d4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 400044d8: 40 00 03 96 call 40005330 400044dc: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 400044e0: 40 00 03 94 call 40005330 400044e4: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 400044e8: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 400044ec: 80 a0 60 00 cmp %g1, 0 400044f0: 02 80 00 06 be 40004508 400044f4: 01 00 00 00 nop 400044f8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 400044fc: 80 a0 60 02 cmp %g1, 2 40004500: 12 80 00 04 bne 40004510 40004504: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 40004508: 40 00 03 8a call 40005330 <== NOT EXECUTED 4000450c: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 40004510: 40 00 16 8a call 40009f38 40004514: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40004518: 40 00 16 88 call 40009f38 4000451c: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40004520: 40 00 16 86 call 40009f38 40004524: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40004528: 40 00 16 84 call 40009f38 4000452c: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 40004530: 03 10 00 62 sethi %hi(0x40018800), %g1 40004534: d0 00 63 60 ld [ %g1 + 0x360 ], %o0 ! 40018b60 40004538: 40 00 03 f3 call 40005504 4000453c: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40004540: 81 c7 e0 08 ret 40004544: 81 e8 00 00 restore 40002f30 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40002f30: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40002f34: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40002f38: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40002f3c: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 40002f40: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40002f44: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40002f48: 12 80 00 0a bne 40002f70 <== NOT EXECUTED 40002f4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 40002f50: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 40002f54: 40 00 07 d7 call 40004eb0 <== NOT EXECUTED 40002f58: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 40002f5c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40002f60: 02 80 00 11 be 40002fa4 <== NOT EXECUTED 40002f64: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40002f68: 40 00 0a e2 call 40005af0 <== NOT EXECUTED 40002f6c: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 40002f70: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40002f74: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 40002f78: 12 80 00 09 bne 40002f9c <== NOT EXECUTED 40002f7c: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 40002f80: c2 00 62 0c ld [ %g1 + 0x20c ], %g1 ! 40018a0c <== NOT EXECUTED 40002f84: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002f88: 02 80 00 07 be 40002fa4 <== NOT EXECUTED 40002f8c: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40002f90: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002f94: 01 00 00 00 nop <== NOT EXECUTED 40002f98: 30 80 00 03 b,a 40002fa4 <== NOT EXECUTED } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 40002f9c: 7f ff ff 68 call 40002d3c <== NOT EXECUTED 40002fa0: 81 e8 00 00 restore <== NOT EXECUTED } } 40002fa4: 81 c7 e0 08 ret <== NOT EXECUTED 40002fa8: 81 e8 00 00 restore <== NOT EXECUTED 40002fac : * 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) { 40002fac: 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) { 40002fb0: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40002fb4: 05 10 00 62 sethi %hi(0x40018800), %g2 <== NOT EXECUTED 40002fb8: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40002fbc: 84 10 a1 58 or %g2, 0x158, %g2 <== NOT EXECUTED 40002fc0: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40002fc4: c2 00 80 01 ld [ %g2 + %g1 ], %g1 <== NOT EXECUTED 40002fc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002fcc: 12 80 00 10 bne 4000300c <== NOT EXECUTED 40002fd0: a0 10 00 02 mov %g2, %l0 <== 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, 40002fd4: 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); 40002fd8: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED 40002fdc: a2 10 20 00 clr %l1 <== NOT EXECUTED 40002fe0: 10 80 00 ac b 40003290 <== NOT EXECUTED 40002fe4: a4 10 20 00 clr %l2 <== NOT EXECUTED 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--) { c = *buf++; 40002fe8: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40002fec: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40002ff0: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED 40002ff4: c2 04 00 01 ld [ %l0 + %g1 ], %g1 <== NOT EXECUTED 40002ff8: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 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--) { c = *buf++; 40002ffc: b2 06 60 01 inc %i1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40003000: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED 40003004: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003008: 92 10 00 18 mov %i0, %o1 <== 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--) { 4000300c: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 40003010: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40003014: 32 bf ff f5 bne,a 40002fe8 <== NOT EXECUTED 40003018: 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 )) { 4000301c: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 40003020: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003024: 12 80 00 a6 bne 400032bc <== NOT EXECUTED 40003028: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000302c: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40003030: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003034: 22 80 00 a3 be,a 400032c0 <== NOT EXECUTED 40003038: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4000303c: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40003040: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003044: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003048: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000304c: a2 10 20 00 clr %l1 <== NOT EXECUTED 40003050: 10 80 00 9b b 400032bc <== NOT EXECUTED 40003054: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 40003058: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000305c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40003060: 02 80 00 1a be 400030c8 <== NOT EXECUTED 40003064: e8 0e 40 00 ldub [ %i1 ], %l4 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 40003068: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 4000306c: 83 2d 20 18 sll %l4, 0x18, %g1 <== NOT EXECUTED 40003070: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 40003074: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 40003078: 12 80 00 0c bne 400030a8 <== NOT EXECUTED 4000307c: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 40003080: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 40003084: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40003088: 12 80 00 05 bne 4000309c <== NOT EXECUTED 4000308c: 01 00 00 00 nop <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 40003090: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003094: 10 80 00 0b b 400030c0 <== NOT EXECUTED 40003098: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4000309c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400030a0: 10 80 00 08 b 400030c0 <== NOT EXECUTED 400030a4: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 400030a8: 82 08 60 ff and %g1, 0xff, %g1 <== NOT EXECUTED 400030ac: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400030b0: 12 80 00 07 bne 400030cc <== NOT EXECUTED 400030b4: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 400030b8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400030bc: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 400030c0: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 400030c4: 30 80 00 04 b,a 400030d4 <== NOT EXECUTED flow_rcv = true; } } if (flow_rcv) { 400030c8: 80 8c a0 ff btst 0xff, %l2 <== NOT EXECUTED 400030cc: 02 80 00 1d be 40003140 <== NOT EXECUTED 400030d0: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 400030d4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400030d8: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 400030dc: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 400030e0: 12 80 00 6b bne 4000328c <== NOT EXECUTED 400030e4: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 400030e8: 7f ff fa fd call 40001cdc <== NOT EXECUTED 400030ec: 01 00 00 00 nop <== NOT EXECUTED 400030f0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400030f4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400030f8: 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; 400030fc: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40003100: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40003104: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003108: 02 80 00 09 be 4000312c <== NOT EXECUTED 4000310c: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 40003110: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 40003114: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 40003118: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 4000311c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40003120: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 40003124: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003128: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level); 4000312c: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED 40003130: 7f ff fa ef call 40001cec <== NOT EXECUTED 40003134: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40003138: 10 80 00 56 b 40003290 <== NOT EXECUTED 4000313c: b2 06 60 01 inc %i1 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40003140: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 40003144: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40003148: 40 00 43 70 call 40013f08 <.urem> <== NOT EXECUTED 4000314c: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40003150: 7f ff fa e3 call 40001cdc <== NOT EXECUTED 40003154: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40003158: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4000315c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 40003160: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 40003164: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 40003168: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 4000316c: 40 00 43 67 call 40013f08 <.urem> <== NOT EXECUTED 40003170: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 40003174: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 40003178: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 4000317c: 08 80 00 2d bleu 40003230 <== NOT EXECUTED 40003180: 01 00 00 00 nop <== NOT EXECUTED 40003184: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003188: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000318c: 12 80 00 29 bne 40003230 <== NOT EXECUTED 40003190: 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; 40003194: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40003198: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 4000319c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400031a0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400031a4: 82 08 64 02 and %g1, 0x402, %g1 <== NOT EXECUTED 400031a8: 80 a0 64 00 cmp %g1, 0x400 <== NOT EXECUTED 400031ac: 12 80 00 13 bne 400031f8 <== NOT EXECUTED 400031b0: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 400031b4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400031b8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400031bc: 12 80 00 06 bne 400031d4 <== NOT EXECUTED 400031c0: 01 00 00 00 nop <== NOT EXECUTED 400031c4: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 400031c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400031cc: 12 80 00 19 bne 40003230 <== NOT EXECUTED 400031d0: 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; 400031d4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400031d8: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400031dc: 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; 400031e0: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 400031e4: 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; 400031e8: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 400031ec: 9f c0 80 00 call %g2 <== NOT EXECUTED 400031f0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400031f4: 30 80 00 0f b,a 40003230 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 400031f8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400031fc: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 40003200: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 40003204: 12 80 00 0b bne 40003230 <== NOT EXECUTED 40003208: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 4000320c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 40003210: 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; 40003214: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 40003218: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 4000321c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003220: 02 80 00 04 be 40003230 <== NOT EXECUTED 40003224: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 40003228: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000322c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* reenable interrupts */ rtems_interrupt_enable(level); 40003230: 7f ff fa af call 40001cec <== NOT EXECUTED 40003234: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40003238: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 4000323c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003240: 32 80 00 04 bne,a 40003250 <== NOT EXECUTED 40003244: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED dropped++; 40003248: 10 80 00 11 b 4000328c <== NOT EXECUTED 4000324c: a2 04 60 01 inc %l1 <== NOT EXECUTED } else { tty->rawInBuf.theBuf[newTail] = c; 40003250: e8 28 40 10 stb %l4, [ %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 )) { 40003254: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 40003258: 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 )) { 4000325c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003260: 32 80 00 0c bne,a 40003290 <== NOT EXECUTED 40003264: b2 06 60 01 inc %i1 <== NOT EXECUTED 40003268: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 4000326c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003270: 22 80 00 08 be,a 40003290 <== NOT EXECUTED 40003274: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40003278: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 4000327c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003280: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40003284: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40003288: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 4000328c: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40003290: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 40003294: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40003298: 12 bf ff 70 bne 40003058 <== NOT EXECUTED 4000329c: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 400032a0: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 400032a4: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 400032a8: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 400032ac: 40 00 08 96 call 40005504 <== NOT EXECUTED 400032b0: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED return dropped; } 400032b4: 81 c7 e0 08 ret <== NOT EXECUTED 400032b8: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED 400032bc: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 400032c0: 81 c7 e0 08 ret <== NOT EXECUTED 400032c4: 81 e8 00 00 restore <== NOT EXECUTED 40002cb8 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 40002cb8: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 40002cbc: 03 10 00 62 sethi %hi(0x40018800), %g1 40002cc0: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 40018b60 40002cc4: 80 a0 a0 00 cmp %g2, 0 40002cc8: 12 80 00 0d bne 40002cfc 40002ccc: 98 10 63 60 or %g1, 0x360, %o4 sc = rtems_semaphore_create ( 40002cd0: 11 15 14 9b sethi %hi(0x54526c00), %o0 40002cd4: 92 10 20 01 mov 1, %o1 40002cd8: 90 12 21 69 or %o0, 0x169, %o0 40002cdc: 94 10 20 54 mov 0x54, %o2 40002ce0: 40 00 09 1c call 40005150 40002ce4: 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) 40002ce8: 80 a2 20 00 cmp %o0, 0 40002cec: 02 80 00 04 be 40002cfc 40002cf0: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40002cf4: 40 00 0b 7f call 40005af0 <== NOT EXECUTED 40002cf8: 01 00 00 00 nop <== NOT EXECUTED 40002cfc: 81 c7 e0 08 ret 40002d00: 81 e8 00 00 restore 40003f8c : } } rtems_status_code rtems_termios_ioctl (void *arg) { 40003f8c: 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; 40003f90: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 40003f94: 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; 40003f98: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 40003f9c: 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); 40003fa0: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 40003fa4: 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); 40003fa8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003fac: 40 00 05 0f call 400053e8 <== NOT EXECUTED 40003fb0: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 40003fb4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40003fb8: 22 80 00 05 be,a 40003fcc <== NOT EXECUTED 40003fbc: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED args->ioctl_return = sc; 40003fc0: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED 40003fc4: 81 c7 e0 08 ret <== NOT EXECUTED 40003fc8: 81 e8 00 00 restore <== NOT EXECUTED return sc; } switch (args->command) { 40003fcc: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 40003fd0: 22 80 00 bf be,a 400042cc <== NOT EXECUTED 40003fd4: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40003fd8: 18 80 00 0b bgu 40004004 <== NOT EXECUTED 40003fdc: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 40003fe0: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40003fe4: 22 80 00 2c be,a 40004094 <== NOT EXECUTED 40003fe8: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 40003fec: 18 80 00 b1 bgu 400042b0 <== NOT EXECUTED 40003ff0: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40003ff4: 32 80 00 17 bne,a 40004050 <== NOT EXECUTED 40003ff8: 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; 40003ffc: 10 80 00 22 b 40004084 <== NOT EXECUTED 40004000: d0 04 a0 08 ld [ %l2 + 8 ], %o0 <== 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) { 40004004: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 40004008: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000400c: 02 80 00 d1 be 40004350 <== NOT EXECUTED 40004010: 01 00 00 00 nop <== NOT EXECUTED 40004014: 38 80 00 07 bgu,a 40004030 <== NOT EXECUTED 40004018: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 4000401c: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 40004020: 32 80 00 0c bne,a 40004050 <== NOT EXECUTED 40004024: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 40004028: 10 80 00 a5 b 400042bc <== NOT EXECUTED 4000402c: c2 04 00 00 ld [ %l0 ], %g1 <== 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) { 40004030: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 40004034: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004038: 02 80 00 c2 be 40004340 <== NOT EXECUTED 4000403c: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 40004040: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 40004044: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40004048: 02 80 00 a5 be 400042dc <== NOT EXECUTED 4000404c: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40004050: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 40004054: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40004058: 82 10 61 58 or %g1, 0x158, %g1 <== NOT EXECUTED 4000405c: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40004060: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED 40004064: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004068: 02 80 00 c7 be 40004384 <== NOT EXECUTED 4000406c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 40004070: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004074: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004078: 92 10 00 12 mov %l2, %o1 <== 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) { sc = rtems_termios_linesw[tty->t_line].l_open(tty); 4000407c: 10 80 00 c2 b 40004384 <== NOT EXECUTED 40004080: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 40004084: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 40004088: 40 00 25 16 call 4000d4e0 <== NOT EXECUTED 4000408c: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40004090: 30 80 00 bd b,a 40004384 <== NOT EXECUTED break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 40004094: 90 04 60 30 add %l1, 0x30, %o0 <== NOT EXECUTED 40004098: 40 00 25 12 call 4000d4e0 <== NOT EXECUTED 4000409c: 94 10 20 24 mov 0x24, %o2 <== 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) && 400040a0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400040a4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400040a8: 02 80 00 20 be 40004128 <== NOT EXECUTED 400040ac: 01 00 00 00 nop <== NOT EXECUTED 400040b0: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 400040b4: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 400040b8: 12 80 00 1c bne 40004128 <== NOT EXECUTED 400040bc: 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); 400040c0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400040c4: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 400040c8: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 400040cc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400040d0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400040d4: 02 80 00 15 be 40004128 <== NOT EXECUTED 400040d8: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 400040dc: 7f ff f7 00 call 40001cdc <== NOT EXECUTED 400040e0: 01 00 00 00 nop <== NOT EXECUTED 400040e4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 400040e8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400040ec: 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; 400040f0: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 400040f4: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 400040f8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400040fc: 02 80 00 09 be 40004120 <== NOT EXECUTED 40004100: 01 00 00 00 nop <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, 40004104: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 40004108: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 4000410c: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 40004110: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40004114: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 40004118: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000411c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } /* reenable interrupts */ rtems_interrupt_enable(level); 40004120: 7f ff f6 f3 call 40001cec <== NOT EXECUTED 40004124: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 40004128: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000412c: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40004130: 02 80 00 0c be 40004160 <== NOT EXECUTED 40004134: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 40004138: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 4000413c: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40004140: 12 80 00 08 bne 40004160 <== NOT EXECUTED 40004144: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 40004148: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000414c: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 40004150: 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); 40004154: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004158: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED 4000415c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 40004160: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004164: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40004168: 02 80 00 16 be 400041c0 <== NOT EXECUTED 4000416c: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED 40004170: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004174: 06 80 00 14 bl 400041c4 <== NOT EXECUTED 40004178: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 4000417c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40004180: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 40004184: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 40004188: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000418c: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 40004190: 02 80 00 08 be 400041b0 <== NOT EXECUTED 40004194: 01 00 00 00 nop <== NOT EXECUTED 40004198: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 4000419c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400041a0: 02 80 00 04 be 400041b0 <== NOT EXECUTED 400041a4: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 400041a8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400041ac: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 400041b0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400041b4: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400041b8: 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) { 400041bc: c2 04 60 38 ld [ %l1 + 0x38 ], %g1 <== NOT EXECUTED 400041c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400041c4: 36 80 00 06 bge,a 400041dc <== NOT EXECUTED 400041c8: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; 400041cc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400041d0: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 400041d4: 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) { 400041d8: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 400041dc: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 400041e0: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 400041e4: 22 80 00 06 be,a 400041fc <== NOT EXECUTED 400041e8: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 400041ec: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400041f0: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 400041f4: 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) { 400041f8: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 400041fc: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40004200: 22 80 00 06 be,a 40004218 <== NOT EXECUTED 40004204: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40004208: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 4000420c: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 40004210: 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) { 40004214: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 40004218: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 4000421c: 32 80 00 19 bne,a 40004280 <== NOT EXECUTED 40004220: c0 24 60 6c clr [ %l1 + 0x6c ] <== 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); 40004224: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40004228: 40 00 02 22 call 40004ab0 <== NOT EXECUTED 4000422c: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 40004230: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 40004234: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 40004238: 40 00 3e 4e call 40013b70 <.umul> <== NOT EXECUTED 4000423c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004240: 40 00 3e 86 call 40013c58 <.udiv> <== NOT EXECUTED 40004244: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40004248: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 4000424c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40004250: 02 80 00 08 be 40004270 <== NOT EXECUTED 40004254: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40004258: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 4000425c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004260: 12 80 00 09 bne 40004284 <== NOT EXECUTED 40004264: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40004268: 10 80 00 0a b 40004290 <== NOT EXECUTED 4000426c: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED } else { if (tty->termios.c_cc[VMIN]) { 40004270: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004274: 02 80 00 06 be 4000428c <== NOT EXECUTED 40004278: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 4000427c: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40004280: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40004284: 10 80 00 03 b 40004290 <== NOT EXECUTED 40004288: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 4000428c: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== NOT EXECUTED } } } if (tty->device.setAttributes) 40004290: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 40004294: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004298: 02 80 00 3b be 40004384 <== NOT EXECUTED 4000429c: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 400042a0: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 400042a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400042a8: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 400042ac: 30 80 00 36 b,a 40004384 <== NOT EXECUTED break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 400042b0: 7f ff fe 19 call 40003b14 <== NOT EXECUTED 400042b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400042b8: 30 80 00 33 b,a 40004384 <== NOT EXECUTED break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 400042bc: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 400042c0: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 400042c4: 10 80 00 30 b 40004384 <== NOT EXECUTED 400042c8: c2 24 60 d8 st %g1, [ %l1 + 0xd8 ] <== NOT EXECUTED break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 400042cc: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 400042d0: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 400042d4: 10 80 00 2c b 40004384 <== NOT EXECUTED 400042d8: c2 24 60 e0 st %g1, [ %l1 + 0xe0 ] <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400042dc: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 400042e0: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 400042e4: 82 10 61 58 or %g1, 0x158, %g1 <== NOT EXECUTED 400042e8: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 400042ec: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 400042f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400042f4: 22 80 00 06 be,a 4000430c <== NOT EXECUTED 400042f8: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 400042fc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004300: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004304: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 40004308: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 4000430c: 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); 40004310: 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) { 40004314: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 40004318: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED 4000431c: 82 10 61 58 or %g1, 0x158, %g1 <== NOT EXECUTED 40004320: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40004324: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004328: 02 80 00 17 be 40004384 <== NOT EXECUTED 4000432c: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 40004330: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004334: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004338: 10 80 00 13 b 40004384 <== NOT EXECUTED 4000433c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 40004340: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 40004344: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 40004348: 10 80 00 0f b 40004384 <== NOT EXECUTED 4000434c: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40004350: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 40004354: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40004358: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 4000435c: 3c 80 00 05 bpos,a 40004370 <== NOT EXECUTED 40004360: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 40004364: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 40004368: 88 01 00 01 add %g4, %g1, %g4 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 4000436c: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 40004370: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 40004374: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 40004378: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000437c: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 40004380: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 40004384: 40 00 04 60 call 40005504 <== NOT EXECUTED 40004388: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 4000438c: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 40004390: 81 c7 e0 08 ret <== NOT EXECUTED 40004394: 81 e8 00 00 restore <== NOT EXECUTED 40004548 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 40004548: 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, 4000454c: 03 10 00 62 sethi %hi(0x40018800), %g1 40004550: d0 00 63 60 ld [ %g1 + 0x360 ], %o0 ! 40018b60 40004554: 92 10 20 00 clr %o1 40004558: 40 00 03 a4 call 400053e8 4000455c: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004560: a6 92 20 00 orcc %o0, 0, %l3 40004564: 12 80 01 0a bne 4000498c 40004568: 03 10 00 62 sethi %hi(0x40018800), %g1 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 4000456c: 10 80 00 0a b 40004594 40004570: e2 00 63 68 ld [ %g1 + 0x368 ], %l1 ! 40018b68 if ((tty->major == major) && (tty->minor == minor)) 40004574: 80 a0 40 18 cmp %g1, %i0 40004578: 32 80 00 07 bne,a 40004594 4000457c: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED 40004580: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40004584: 80 a0 40 19 cmp %g1, %i1 40004588: 22 80 00 da be,a 400048f0 4000458c: c2 04 60 08 ld [ %l1 + 8 ], %g1 */ 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) { 40004590: e2 04 40 00 ld [ %l1 ], %l1 <== NOT EXECUTED 40004594: 80 a4 60 00 cmp %l1, 0 40004598: 32 bf ff f7 bne,a 40004574 4000459c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 400045a0: 10 80 00 fd b 40004994 400045a4: 90 10 20 01 mov 1, %o0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 400045a8: 03 10 00 60 sethi %hi(0x40018000), %g1 400045ac: c2 00 63 c0 ld [ %g1 + 0x3c0 ], %g1 ! 400183c0 400045b0: c2 24 60 64 st %g1, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 400045b4: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 400045b8: 40 00 17 c8 call 4000a4d8 400045bc: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 400045c0: 80 a2 20 00 cmp %o0, 0 400045c4: 12 80 00 08 bne 400045e4 400045c8: d0 24 60 58 st %o0, [ %l1 + 0x58 ] free(tty); 400045cc: 40 00 16 5b call 40009f38 <== NOT EXECUTED 400045d0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 400045d4: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 400045d8: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED 400045dc: 10 80 00 ea b 40004984 <== NOT EXECUTED 400045e0: d0 00 63 60 ld [ %g1 + 0x360 ], %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 400045e4: 03 10 00 60 sethi %hi(0x40018000), %g1 400045e8: c2 00 63 c4 ld [ %g1 + 0x3c4 ], %g1 ! 400183c4 400045ec: c2 24 60 88 st %g1, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 400045f0: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 400045f4: 40 00 17 b9 call 4000a4d8 400045f8: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 400045fc: 80 a2 20 00 cmp %o0, 0 40004600: 12 80 00 05 bne 40004614 40004604: d0 24 60 7c st %o0, [ %l1 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 40004608: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 4000460c: 10 80 00 0c b 4000463c <== NOT EXECUTED 40004610: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40004614: 03 10 00 60 sethi %hi(0x40018000), %g1 40004618: 40 00 17 b0 call 4000a4d8 4000461c: d0 00 63 bc ld [ %g1 + 0x3bc ], %o0 ! 400183bc if (tty->cbuf == NULL) { 40004620: 80 a2 20 00 cmp %o0, 0 40004624: 12 80 00 0c bne 40004654 40004628: d0 24 60 1c st %o0, [ %l1 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 4000462c: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 40004630: 40 00 16 42 call 40009f38 <== NOT EXECUTED 40004634: a6 10 20 1a mov 0x1a, %l3 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40004638: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED 4000463c: 40 00 16 3f call 40009f38 <== NOT EXECUTED 40004640: 01 00 00 00 nop <== NOT EXECUTED free(tty); 40004644: 40 00 16 3d call 40009f38 <== NOT EXECUTED 40004648: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 4000464c: 10 80 00 cd b 40004980 <== NOT EXECUTED 40004650: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40004654: 03 10 00 62 sethi %hi(0x40018800), %g1 40004658: c2 00 63 68 ld [ %g1 + 0x368 ], %g1 ! 40018b68 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 4000465c: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40004660: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40004664: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40004668: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 4000466c: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40004670: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40004674: 80 a0 60 00 cmp %g1, 0 40004678: 02 80 00 03 be 40004684 4000467c: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 40004680: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40004684: 07 10 00 62 sethi %hi(0x40018800), %g3 40004688: c4 00 e3 64 ld [ %g3 + 0x364 ], %g2 ! 40018b64 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 4000468c: 03 10 00 62 sethi %hi(0x40018800), %g1 if (rtems_termios_ttyTail == NULL) 40004690: 80 a0 a0 00 cmp %g2, 0 40004694: 12 80 00 03 bne 400046a0 40004698: e0 20 63 68 st %l0, [ %g1 + 0x368 ] rtems_termios_ttyTail = tty; 4000469c: e0 20 e3 64 st %l0, [ %g3 + 0x364 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400046a0: 25 10 00 60 sethi %hi(0x40018000), %l2 400046a4: c2 4c a3 c8 ldsb [ %l2 + 0x3c8 ], %g1 ! 400183c8 400046a8: 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; 400046ac: f2 24 20 10 st %i1, [ %l0 + 0x10 ] tty->major = major; 400046b0: f0 24 20 0c st %i0, [ %l0 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 400046b4: 90 12 21 00 or %o0, 0x100, %o0 400046b8: 92 10 20 01 mov 1, %o1 400046bc: 90 10 40 08 or %g1, %o0, %o0 400046c0: 94 10 20 54 mov 0x54, %o2 400046c4: 96 10 20 00 clr %o3 400046c8: 40 00 02 a2 call 40005150 400046cc: 98 04 20 14 add %l0, 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) 400046d0: 80 a2 20 00 cmp %o0, 0 400046d4: 12 80 00 a8 bne 40004974 400046d8: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 400046dc: c2 4c a3 c8 ldsb [ %l2 + 0x3c8 ], %g1 400046e0: 11 15 14 9b sethi %hi(0x54526c00), %o0 400046e4: 92 10 20 01 mov 1, %o1 400046e8: 90 12 23 00 or %o0, 0x300, %o0 400046ec: 94 10 20 54 mov 0x54, %o2 400046f0: 90 10 40 08 or %g1, %o0, %o0 400046f4: 96 10 20 00 clr %o3 400046f8: 40 00 02 96 call 40005150 400046fc: 98 04 20 18 add %l0, 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) 40004700: 80 a2 20 00 cmp %o0, 0 40004704: 12 80 00 9c bne 40004974 40004708: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 4000470c: c2 4c a3 c8 ldsb [ %l2 + 0x3c8 ], %g1 40004710: 11 15 14 9e sethi %hi(0x54527800), %o0 40004714: 92 10 20 00 clr %o1 40004718: 90 10 40 08 or %g1, %o0, %o0 4000471c: 94 10 20 20 mov 0x20, %o2 40004720: 96 10 20 00 clr %o3 40004724: 40 00 02 8b call 40005150 40004728: 98 04 20 8c add %l0, 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) 4000472c: 80 a2 20 00 cmp %o0, 0 40004730: 12 80 00 91 bne 40004974 40004734: 01 00 00 00 nop rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40004738: c0 24 20 94 clr [ %l0 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 4000473c: 92 10 00 1b mov %i3, %o1 40004740: 90 04 20 98 add %l0, 0x98, %o0 40004744: 40 00 23 67 call 4000d4e0 40004748: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4000474c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40004750: 80 a0 60 02 cmp %g1, 2 40004754: 32 80 00 1b bne,a 400047c0 40004758: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 sc = rtems_task_create ( 4000475c: c2 4c a3 c8 ldsb [ %l2 + 0x3c8 ], %g1 <== NOT EXECUTED 40004760: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 40004764: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40004768: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 4000476c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40004770: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40004774: 98 10 20 00 clr %o4 <== NOT EXECUTED 40004778: 40 00 03 8f call 400055b4 <== NOT EXECUTED 4000477c: 9a 04 20 c8 add %l0, 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) 40004780: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004784: 12 80 00 7c bne 40004974 <== NOT EXECUTED 40004788: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 4000478c: c2 4c a3 c8 ldsb [ %l2 + 0x3c8 ], %g1 <== NOT EXECUTED 40004790: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 40004794: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40004798: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 4000479c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 400047a0: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 400047a4: 98 10 20 00 clr %o4 <== NOT EXECUTED 400047a8: 40 00 03 83 call 400055b4 <== NOT EXECUTED 400047ac: 9a 04 20 c4 add %l0, 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) 400047b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400047b4: 12 80 00 70 bne 40004974 <== NOT EXECUTED 400047b8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 400047bc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 400047c0: 80 a0 60 00 cmp %g1, 0 400047c4: 02 80 00 07 be 400047e0 400047c8: 03 10 00 60 sethi %hi(0x40018000), %g1 400047cc: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 400047d0: 80 a0 60 02 cmp %g1, 2 400047d4: 12 80 00 0f bne 40004810 400047d8: 82 10 20 03 mov 3, %g1 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 400047dc: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED 400047e0: c2 48 63 c8 ldsb [ %g1 + 0x3c8 ], %g1 ! 400183c8 <== NOT EXECUTED 400047e4: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 400047e8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400047ec: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 400047f0: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 400047f4: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 400047f8: 96 10 20 00 clr %o3 <== NOT EXECUTED 400047fc: 40 00 02 55 call 40005150 <== NOT EXECUTED 40004800: 98 04 20 68 add %l0, 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) 40004804: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004808: 12 80 00 5b bne 40004974 <== NOT EXECUTED 4000480c: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 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'; 40004810: c2 2c 20 41 stb %g1, [ %l0 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 40004814: 82 10 20 1c mov 0x1c, %g1 40004818: c2 2c 20 42 stb %g1, [ %l0 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 4000481c: 82 10 20 7f mov 0x7f, %g1 40004820: c2 2c 20 43 stb %g1, [ %l0 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 40004824: 82 10 20 15 mov 0x15, %g1 40004828: c2 2c 20 44 stb %g1, [ %l0 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 4000482c: 82 10 20 04 mov 4, %g1 40004830: c2 2c 20 45 stb %g1, [ %l0 + 0x45 ] tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40004834: 82 10 20 11 mov 0x11, %g1 40004838: c2 2c 20 49 stb %g1, [ %l0 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 4000483c: 82 10 20 13 mov 0x13, %g1 40004840: c2 2c 20 4a stb %g1, [ %l0 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40004844: 82 10 20 1a mov 0x1a, %g1 40004848: c2 2c 20 4b stb %g1, [ %l0 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 4000484c: 82 10 20 12 mov 0x12, %g1 40004850: c2 2c 20 4d stb %g1, [ %l0 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40004854: 82 10 20 0f mov 0xf, %g1 40004858: c2 2c 20 4e stb %g1, [ %l0 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 4000485c: 82 10 20 17 mov 0x17, %g1 40004860: c2 2c 20 4f stb %g1, [ %l0 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40004864: 82 10 20 16 mov 0x16, %g1 40004868: c2 2c 20 50 stb %g1, [ %l0 + 0x50 ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 4000486c: 03 00 00 09 sethi %hi(0x2400), %g1 40004870: 82 10 61 02 or %g1, 0x102, %g1 ! 2502 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'; 40004874: c0 2c 20 4c clrb [ %l0 + 0x4c ] tty->termios.c_cc[VEOL2] = '\000'; 40004878: c0 2c 20 51 clrb [ %l0 + 0x51 ] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 4000487c: 1b 10 00 60 sethi %hi(0x40018000), %o5 40004880: c4 0b 63 c8 ldub [ %o5 + 0x3c8 ], %g2 ! 400183c8 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40004884: c2 24 20 30 st %g1, [ %l0 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004888: 03 00 00 06 sethi %hi(0x1800), %g1 4000488c: 82 10 60 05 or %g1, 5, %g1 ! 1805 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; 40004890: c0 24 20 b8 clr [ %l0 + 0xb8 ] /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40004894: c2 24 20 34 st %g1, [ %l0 + 0x34 ] /* 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; 40004898: c6 04 20 64 ld [ %l0 + 0x64 ], %g3 /* * 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; 4000489c: 82 10 28 bd mov 0x8bd, %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; 400048a0: c8 04 20 64 ld [ %l0 + 0x64 ], %g4 /* * 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; 400048a4: c2 24 20 38 st %g1, [ %l0 + 0x38 ] tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 400048a8: 03 00 00 20 sethi %hi(0x8000), %g1 400048ac: 82 10 62 3b or %g1, 0x23b, %g1 ! 823b /* 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; 400048b0: 87 30 e0 01 srl %g3, 1, %g3 * 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; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 400048b4: c2 24 20 3c st %g1, [ %l0 + 0x3c ] /* 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; 400048b8: c6 24 20 bc st %g3, [ %l0 + 0xbc ] tty->highwater = tty->rawInBuf.Size * 3/4; 400048bc: 83 29 20 01 sll %g4, 1, %g1 400048c0: 82 00 40 04 add %g1, %g4, %g1 400048c4: 83 30 60 02 srl %g1, 2, %g1 400048c8: c2 24 20 c0 st %g1, [ %l0 + 0xc0 ] /* * Bump name characer */ if (c++ == 'z') 400048cc: 82 00 a0 01 add %g2, 1, %g1 400048d0: 85 28 a0 18 sll %g2, 0x18, %g2 400048d4: 85 38 a0 18 sra %g2, 0x18, %g2 400048d8: 80 a0 a0 7a cmp %g2, 0x7a 400048dc: 12 80 00 04 bne 400048ec 400048e0: c2 2b 63 c8 stb %g1, [ %o5 + 0x3c8 ] c = 'a'; 400048e4: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED 400048e8: c2 2b 63 c8 stb %g1, [ %o5 + 0x3c8 ] <== NOT EXECUTED } args->iop->data1 = tty; if (!tty->refcount++) { 400048ec: c2 04 60 08 ld [ %l1 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400048f0: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 400048f4: 86 00 60 01 add %g1, 1, %g3 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 400048f8: e2 20 a0 28 st %l1, [ %g2 + 0x28 ] if (!tty->refcount++) { 400048fc: 80 a0 60 00 cmp %g1, 0 40004900: 12 80 00 1f bne 4000497c 40004904: c6 24 60 08 st %g3, [ %l1 + 8 ] if (tty->device.firstOpen) 40004908: c2 04 60 98 ld [ %l1 + 0x98 ], %g1 4000490c: 80 a0 60 00 cmp %g1, 0 40004910: 02 80 00 05 be 40004924 40004914: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 40004918: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000491c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004920: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004924: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 40004928: 80 a0 60 02 cmp %g1, 2 4000492c: 12 80 00 15 bne 40004980 40004930: 03 10 00 62 sethi %hi(0x40018800), %g1 sc = rtems_task_start(tty->rxTaskId, 40004934: d0 04 60 c4 ld [ %l1 + 0xc4 ], %o0 <== NOT EXECUTED 40004938: 13 10 00 12 sethi %hi(0x40004800), %o1 <== NOT EXECUTED 4000493c: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40004940: 40 00 03 c9 call 40005864 <== NOT EXECUTED 40004944: 92 12 62 2c or %o1, 0x22c, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004948: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000494c: 12 80 00 0a bne 40004974 <== NOT EXECUTED 40004950: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 40004954: d0 04 60 c8 ld [ %l1 + 0xc8 ], %o0 <== NOT EXECUTED 40004958: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 4000495c: 13 10 00 12 sethi %hi(0x40004800), %o1 <== NOT EXECUTED 40004960: 40 00 03 c1 call 40005864 <== NOT EXECUTED 40004964: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 400049b0 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40004968: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000496c: 02 80 00 05 be 40004980 <== NOT EXECUTED 40004970: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004974: 40 00 04 5f call 40005af0 <== NOT EXECUTED 40004978: 01 00 00 00 nop <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 4000497c: 03 10 00 62 sethi %hi(0x40018800), %g1 40004980: d0 00 63 60 ld [ %g1 + 0x360 ], %o0 ! 40018b60 40004984: 40 00 02 e0 call 40005504 40004988: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } 4000498c: 81 c7 e0 08 ret 40004990: 91 e8 00 13 restore %g0, %l3, %o0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40004994: 40 00 15 1f call 40009e10 40004998: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 4000499c: a2 92 20 00 orcc %o0, 0, %l1 400049a0: 12 bf ff 02 bne 400045a8 400049a4: a0 10 00 11 mov %l1, %l0 */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 400049a8: 10 bf ff 0c b 400045d8 <== NOT EXECUTED 400049ac: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED 400032c8 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 400032c8: 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) { 400032cc: 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) { 400032d0: 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) { 400032d4: 80 a0 60 00 cmp %g1, 0 400032d8: 12 80 00 08 bne 400032f8 400032dc: a2 10 00 18 mov %i0, %l1 (*tty->device.write)(tty->minor, (void *)buf, len); 400032e0: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 400032e4: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 400032e8: 9f c0 40 00 call %g1 400032ec: 94 10 00 19 mov %i1, %o2 400032f0: 81 c7 e0 08 ret 400032f4: 81 e8 00 00 restore return; } newHead = tty->rawOutBuf.Head; 400032f8: e0 06 a0 80 ld [ %i2 + 0x80 ], %l0 <== NOT EXECUTED * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; 400032fc: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 40003300: 10 80 00 39 b 400033e4 <== NOT EXECUTED 40003304: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 40003308: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 4000330c: 40 00 42 ff call 40013f08 <.urem> <== NOT EXECUTED 40003310: 90 04 20 01 add %l0, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40003314: 7f ff fa 72 call 40001cdc <== NOT EXECUTED 40003318: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4000331c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40003320: 30 80 00 0f b,a 4000335c <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; rtems_interrupt_enable (level); 40003324: 7f ff fa 72 call 40001cec <== NOT EXECUTED 40003328: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 4000332c: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 40003330: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003334: 40 00 08 2d call 400053e8 <== NOT EXECUTED 40003338: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 4000333c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003340: 02 80 00 04 be 40003350 <== NOT EXECUTED 40003344: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40003348: 40 00 09 ea call 40005af0 <== NOT EXECUTED 4000334c: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40003350: 7f ff fa 63 call 40001cdc <== NOT EXECUTED 40003354: 01 00 00 00 nop <== NOT EXECUTED 40003358: 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) { 4000335c: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 40003360: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40003364: 22 bf ff f0 be,a 40003324 <== NOT EXECUTED 40003368: e6 26 a0 94 st %l3, [ %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++; 4000336c: c6 06 a0 80 ld [ %i2 + 0x80 ], %g3 <== NOT EXECUTED 40003370: c4 0c 40 00 ldub [ %l1 ], %g2 <== NOT EXECUTED 40003374: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40003378: c4 28 40 03 stb %g2, [ %g1 + %g3 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 4000337c: c2 06 a0 94 ld [ %i2 + 0x94 ], %g1 <== 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; 40003380: e0 26 a0 80 st %l0, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 40003384: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003388: 32 80 00 14 bne,a 400033d8 <== NOT EXECUTED 4000338c: a2 04 60 01 inc %l1 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 40003390: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40003394: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40003398: 12 80 00 0b bne 400033c4 <== NOT EXECUTED 4000339c: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, 400033a0: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 400033a4: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 400033a8: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 400033ac: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 400033b0: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED 400033b4: 9f c0 80 00 call %g2 <== NOT EXECUTED 400033b8: 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; 400033bc: 10 80 00 06 b 400033d4 <== NOT EXECUTED 400033c0: e4 26 a0 94 st %l2, [ %i2 + 0x94 ] <== 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; 400033c4: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 400033c8: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 400033cc: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 400033d0: e4 26 a0 94 st %l2, [ %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++; 400033d4: a2 04 60 01 inc %l1 <== NOT EXECUTED /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); 400033d8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400033dc: 7f ff fa 44 call 40001cec <== NOT EXECUTED 400033e0: b2 06 7f ff add %i1, -1, %i1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 400033e4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 400033e8: 12 bf ff c8 bne 40003308 <== NOT EXECUTED 400033ec: 01 00 00 00 nop <== NOT EXECUTED 400033f0: 81 c7 e0 08 ret <== NOT EXECUTED 400033f4: 81 e8 00 00 restore <== NOT EXECUTED 40003b90 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003b90: 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; 40003b94: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 40003b98: e6 06 20 0c ld [ %i0 + 0xc ], %l3 <== 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; 40003b9c: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 40003ba0: ea 06 20 08 ld [ %i0 + 8 ], %l5 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003ba4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 40003ba8: 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); 40003bac: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003bb0: 40 00 06 0e call 400053e8 <== NOT EXECUTED 40003bb4: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40003bb8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40003bbc: 12 80 00 10 bne 40003bfc <== NOT EXECUTED 40003bc0: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 40003bc4: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 40003bc8: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40003bcc: 82 10 61 58 or %g1, 0x158, %g1 <== NOT EXECUTED 40003bd0: 84 00 a0 08 add %g2, 8, %g2 <== NOT EXECUTED 40003bd4: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40003bd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003bdc: 02 80 00 0a be 40003c04 <== NOT EXECUTED 40003be0: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40003be4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003be8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40003bec: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40003bf0: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 40003bf4: 40 00 06 44 call 40005504 <== NOT EXECUTED 40003bf8: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 40003bfc: 81 c7 e0 08 ret <== NOT EXECUTED 40003c00: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 40003c04: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40003c08: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003c0c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003c10: 12 80 00 d0 bne 40003f50 <== NOT EXECUTED 40003c14: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 40003c18: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED if (tty->device.pollRead != NULL 40003c1c: 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; 40003c20: 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; 40003c24: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 40003c28: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003c2c: 02 80 00 5b be 40003d98 <== NOT EXECUTED 40003c30: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED 40003c34: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40003c38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003c3c: 12 80 00 58 bne 40003d9c <== NOT EXECUTED 40003c40: 03 10 00 60 sethi %hi(0x40018000), %g1 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40003c44: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40003c48: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003c4c: 22 80 00 13 be,a 40003c98 <== NOT EXECUTED 40003c50: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 40003c54: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003c58: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003c5c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40003c60: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003c64: 16 80 00 06 bge 40003c7c <== NOT EXECUTED 40003c68: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 40003c6c: 40 00 07 19 call 400058d0 <== NOT EXECUTED 40003c70: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 40003c74: 10 bf ff f9 b 40003c58 <== NOT EXECUTED 40003c78: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 40003c7c: 7f ff ff 63 call 40003a08 <== NOT EXECUTED 40003c80: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40003c84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003c88: 22 bf ff f4 be,a 40003c58 <== NOT EXECUTED 40003c8c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40003c90: 10 80 00 b0 b 40003f50 <== NOT EXECUTED 40003c94: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 40003c98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003c9c: 12 80 00 0a bne 40003cc4 <== NOT EXECUTED 40003ca0: a4 07 bf f4 add %fp, -12, %l2 <== NOT EXECUTED 40003ca4: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40003ca8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003cac: 02 80 00 07 be 40003cc8 <== NOT EXECUTED 40003cb0: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40003cb4: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40003cb8: 40 00 03 7e call 40004ab0 <== NOT EXECUTED 40003cbc: 92 07 bf f4 add %fp, -12, %o1 <== 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); 40003cc0: a4 07 bf f4 add %fp, -12, %l2 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40003cc4: 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); 40003cc8: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003ccc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003cd0: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40003cd4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003cd8: 36 80 00 1e bge,a 40003d50 <== NOT EXECUTED 40003cdc: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 40003ce0: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40003ce4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003ce8: 02 80 00 0a be 40003d10 <== NOT EXECUTED 40003cec: c4 0c 20 46 ldub [ %l0 + 0x46 ], %g2 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 40003cf0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003cf4: 02 80 00 13 be 40003d40 <== NOT EXECUTED 40003cf8: 01 00 00 00 nop <== NOT EXECUTED 40003cfc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003d00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003d04: 02 80 00 0f be 40003d40 <== NOT EXECUTED 40003d08: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 40003d0c: 30 80 00 04 b,a 40003d1c <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40003d10: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003d14: 02 80 00 8e be 40003f4c <== NOT EXECUTED 40003d18: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40003d1c: 40 00 03 65 call 40004ab0 <== NOT EXECUTED 40003d20: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40003d24: c6 04 20 54 ld [ %l0 + 0x54 ], %g3 <== NOT EXECUTED 40003d28: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED 40003d2c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40003d30: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40003d34: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40003d38: 18 80 00 86 bgu 40003f50 <== NOT EXECUTED 40003d3c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 40003d40: 40 00 06 e4 call 400058d0 <== NOT EXECUTED 40003d44: 90 10 20 01 mov 1, %o0 <== 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); 40003d48: 10 bf ff e1 b 40003ccc <== NOT EXECUTED 40003d4c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 40003d50: 7f ff ff 2e call 40003a08 <== NOT EXECUTED 40003d54: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40003d58: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 40003d5c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003d60: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003d64: 16 80 00 7a bge 40003f4c <== NOT EXECUTED 40003d68: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 40003d6c: 22 bf ff d8 be,a 40003ccc <== NOT EXECUTED 40003d70: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED 40003d74: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40003d78: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003d7c: 22 bf ff d4 be,a 40003ccc <== NOT EXECUTED 40003d80: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40003d84: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40003d88: 40 00 03 4a call 40004ab0 <== NOT EXECUTED 40003d8c: 90 10 20 02 mov 2, %o0 <== 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); 40003d90: 10 bf ff cf b 40003ccc <== NOT EXECUTED 40003d94: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40003d98: 03 10 00 60 sethi %hi(0x40018000), %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; 40003d9c: e4 04 20 74 ld [ %l0 + 0x74 ], %l2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40003da0: ba 10 63 bc or %g1, 0x3bc, %i5 <== 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, 40003da4: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED 40003da8: 10 80 00 60 b 40003f28 <== NOT EXECUTED 40003dac: a2 10 20 01 mov 1, %l1 <== 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; 40003db0: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40003db4: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40003db8: 40 00 40 54 call 40013f08 <.urem> <== NOT EXECUTED 40003dbc: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40003dc0: 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; 40003dc4: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40003dc8: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40003dcc: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 40003dd0: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40003dd4: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 40003dd8: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40003ddc: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 40003de0: 40 00 40 4a call 40013f08 <.urem> <== NOT EXECUTED 40003de4: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40003de8: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40003dec: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40003df0: 3a 80 00 27 bcc,a 40003e8c <== NOT EXECUTED 40003df4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 40003df8: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003dfc: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40003e00: 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)) 40003e04: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003e08: 82 08 62 02 and %g1, 0x202, %g1 <== NOT EXECUTED 40003e0c: 80 a0 62 02 cmp %g1, 0x202 <== NOT EXECUTED 40003e10: 12 80 00 11 bne 40003e54 <== NOT EXECUTED 40003e14: 01 00 00 00 nop <== NOT EXECUTED 40003e18: c2 04 20 94 ld [ %l0 + 0x94 ], %g1 <== NOT EXECUTED 40003e1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003e20: 22 80 00 07 be,a 40003e3c <== NOT EXECUTED 40003e24: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40003e28: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003e2c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40003e30: 02 80 00 09 be 40003e54 <== NOT EXECUTED 40003e34: 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, 40003e38: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 40003e3c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 40003e40: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40003e44: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003e48: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40003e4c: 10 80 00 10 b 40003e8c <== NOT EXECUTED 40003e50: c2 04 20 3c ld [ %l0 + 0x3c ], %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) { 40003e54: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40003e58: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40003e5c: 22 80 00 0c be,a 40003e8c <== NOT EXECUTED 40003e60: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 40003e64: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40003e68: 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; 40003e6c: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40003e70: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 40003e74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003e78: 22 80 00 05 be,a 40003e8c <== NOT EXECUTED 40003e7c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 40003e80: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003e84: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 40003e88: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 40003e8c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40003e90: 02 80 00 09 be 40003eb4 <== NOT EXECUTED 40003e94: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 40003e98: 7f ff fe dc call 40003a08 <== NOT EXECUTED 40003e9c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40003ea0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003ea4: 32 80 00 0c bne,a 40003ed4 <== NOT EXECUTED 40003ea8: a8 10 20 00 clr %l4 <== NOT EXECUTED else { siproc (c, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 40003eac: 10 80 00 0b b 40003ed8 <== NOT EXECUTED 40003eb0: d4 04 20 70 ld [ %l0 + 0x70 ], %o2 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 40003eb4: 7f ff fe d5 call 40003a08 <== NOT EXECUTED 40003eb8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40003ebc: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 40003ec0: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003ec4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40003ec8: 26 80 00 04 bl,a 40003ed8 <== NOT EXECUTED 40003ecc: d4 04 20 70 ld [ %l0 + 0x70 ], %o2 <== NOT EXECUTED 40003ed0: a8 10 20 00 clr %l4 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 40003ed4: d4 04 20 70 ld [ %l0 + 0x70 ], %o2 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 40003ed8: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 40003edc: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40003ee0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003ee4: 02 80 00 08 be 40003f04 <== NOT EXECUTED 40003ee8: a2 10 00 14 mov %l4, %l1 <== NOT EXECUTED 40003eec: c2 07 40 00 ld [ %i5 ], %g1 <== NOT EXECUTED 40003ef0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40003ef4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40003ef8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003efc: 06 bf ff ad bl 40003db0 <== NOT EXECUTED 40003f00: 01 00 00 00 nop <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 40003f04: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED 40003f08: 02 80 00 11 be 40003f4c <== NOT EXECUTED 40003f0c: a4 10 00 0a mov %o2, %l2 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40003f10: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40003f14: 40 00 05 35 call 400053e8 <== NOT EXECUTED 40003f18: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 40003f1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003f20: 12 80 00 0c bne 40003f50 <== NOT EXECUTED 40003f24: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 40003f28: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 40003f2c: 10 bf ff eb b 40003ed8 <== NOT EXECUTED 40003f30: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 40003f34: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED count--; 40003f38: a6 04 ff ff add %l3, -1, %l3 <== NOT EXECUTED sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 40003f3c: c2 08 40 02 ldub [ %g1 + %g2 ], %g1 <== NOT EXECUTED 40003f40: c2 2d 40 00 stb %g1, [ %l5 ] <== NOT EXECUTED 40003f44: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED 40003f48: aa 05 60 01 inc %l5 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40003f4c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40003f50: 22 80 00 08 be,a 40003f70 <== NOT EXECUTED 40003f54: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED 40003f58: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40003f5c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40003f60: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40003f64: 06 bf ff f4 bl 40003f34 <== NOT EXECUTED 40003f68: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40003f6c: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 40003f70: 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; 40003f74: 82 20 40 13 sub %g1, %l3, %g1 <== NOT EXECUTED 40003f78: c2 25 a0 14 st %g1, [ %l6 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40003f7c: 40 00 05 62 call 40005504 <== NOT EXECUTED 40003f80: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 40003f84: 81 c7 e0 08 ret <== NOT EXECUTED 40003f88: 81 e8 00 00 restore <== NOT EXECUTED 40002d3c : * 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) { 40002d3c: 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)) 40002d40: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40002d44: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40002d48: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 40002d4c: 12 80 00 10 bne 40002d8c <== NOT EXECUTED 40002d50: a2 10 00 18 mov %i0, %l1 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 40002d54: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40002d58: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40002d5c: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 40002d60: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002d64: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 40002d68: 7f ff fb dd call 40001cdc <== NOT EXECUTED 40002d6c: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40002d70: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40002d74: 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--; 40002d78: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40002d7c: 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--; 40002d80: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 40002d84: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40002d88: 30 80 00 12 b,a 40002dd0 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 40002d8c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40002d90: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 40002d94: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002d98: 12 80 00 12 bne 40002de0 <== NOT EXECUTED 40002d9c: 92 06 20 49 add %i0, 0x49, %o1 <== 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, 40002da0: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED 40002da4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40002da8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002dac: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 40002db0: 7f ff fb cb call 40001cdc <== NOT EXECUTED 40002db4: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 40002db8: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40002dbc: 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--; 40002dc0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40002dc4: 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--; 40002dc8: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 40002dcc: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40002dd0: 7f ff fb c7 call 40001cec <== NOT EXECUTED 40002dd4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40002dd8: 81 c7 e0 08 ret <== NOT EXECUTED 40002ddc: 81 e8 00 00 restore <== NOT EXECUTED nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 40002de0: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 40002de4: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 40002de8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40002dec: 12 80 00 0a bne 40002e14 <== NOT EXECUTED 40002df0: 01 00 00 00 nop <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40002df4: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40002df8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002dfc: 12 bf ff f7 bne 40002dd8 <== NOT EXECUTED 40002e00: b0 10 20 00 clr %i0 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40002e04: 40 00 09 c0 call 40005504 <== NOT EXECUTED 40002e08: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 <== NOT EXECUTED 40002e0c: 81 c7 e0 08 ret <== NOT EXECUTED 40002e10: 81 e8 00 00 restore <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 40002e14: 7f ff fb b2 call 40001cdc <== NOT EXECUTED 40002e18: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 40002e1c: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 40002e20: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40002e24: 7f ff fb b2 call 40001cec <== NOT EXECUTED 40002e28: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 40002e2c: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 40002e30: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 40002e34: 40 00 44 35 call 40013f08 <.urem> <== NOT EXECUTED 40002e38: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 40002e3c: 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; 40002e40: d0 24 60 84 st %o0, [ %l1 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 40002e44: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40002e48: 12 80 00 04 bne 40002e58 <== NOT EXECUTED 40002e4c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40002e50: 40 00 09 ad call 40005504 <== NOT EXECUTED 40002e54: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 40002e58: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40002e5c: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40002e60: 12 80 00 0c bne 40002e90 <== NOT EXECUTED 40002e64: 01 00 00 00 nop <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 40002e68: c2 04 60 d4 ld [ %l1 + 0xd4 ], %g1 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40002e6c: c0 24 60 94 clr [ %l1 + 0x94 ] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 40002e70: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002e74: 02 80 00 2c be 40002f24 <== NOT EXECUTED 40002e78: b0 10 20 00 clr %i0 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40002e7c: d2 04 60 d8 ld [ %l1 + 0xd8 ], %o1 <== NOT EXECUTED 40002e80: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002e84: 90 04 60 30 add %l1, 0x30, %o0 <== NOT EXECUTED /* 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; tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40002e88: 10 80 00 27 b 40002f24 <== NOT EXECUTED 40002e8c: b0 10 20 00 clr %i0 <== 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)) 40002e90: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40002e94: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40002e98: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 40002e9c: 12 80 00 0d bne 40002ed0 <== NOT EXECUTED 40002ea0: 01 00 00 00 nop <== NOT EXECUTED == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 40002ea4: 7f ff fb 8e call 40001cdc <== NOT EXECUTED 40002ea8: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 40002eac: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40002eb0: 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; 40002eb4: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40002eb8: c4 24 60 94 st %g2, [ %l1 + 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; 40002ebc: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40002ec0: 7f ff fb 8b call 40001cec <== NOT EXECUTED 40002ec4: 01 00 00 00 nop <== NOT EXECUTED 40002ec8: 10 80 00 17 b 40002f24 <== NOT EXECUTED 40002ecc: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 40002ed0: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40002ed4: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40002ed8: 08 80 00 05 bleu 40002eec <== NOT EXECUTED 40002edc: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 40002ee0: c2 04 60 88 ld [ %l1 + 0x88 ], %g1 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 40002ee4: 10 80 00 04 b 40002ef4 <== NOT EXECUTED 40002ee8: b0 20 40 10 sub %g1, %l0, %i0 <== NOT EXECUTED 40002eec: c2 04 60 80 ld [ %l1 + 0x80 ], %g1 <== NOT EXECUTED 40002ef0: b0 20 40 10 sub %g1, %l0, %i0 <== NOT EXECUTED /* 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)) { 40002ef4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40002ef8: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 40002efc: 32 80 00 02 bne,a 40002f04 <== NOT EXECUTED 40002f00: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40002f04: d2 04 60 7c ld [ %l1 + 0x7c ], %o1 <== NOT EXECUTED 40002f08: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 40002f0c: d0 04 60 10 ld [ %l1 + 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*/ 40002f10: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40002f14: 92 02 40 10 add %o1, %l0, %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*/ 40002f18: c2 24 60 94 st %g1, [ %l1 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40002f1c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40002f20: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40002f24: e0 24 60 84 st %l0, [ %l1 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40002f28: 81 c7 e0 08 ret <== NOT EXECUTED 40002f2c: 81 e8 00 00 restore <== NOT EXECUTED 40004a2c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 40004a2c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004a30: a2 07 bf f0 add %fp, -16, %l1 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 40004a34: a0 07 bf f7 add %fp, -9, %l0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004a38: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40004a3c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004a40: 94 10 20 00 clr %o2 <== NOT EXECUTED 40004a44: 40 00 00 b9 call 40004d28 <== NOT EXECUTED 40004a48: 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) { 40004a4c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40004a50: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40004a54: 22 80 00 07 be,a 40004a70 <== NOT EXECUTED 40004a58: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40004a5c: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40004a60: 40 00 03 22 call 400056e8 <== NOT EXECUTED 40004a64: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004a68: 10 bf ff f5 b 40004a3c <== NOT EXECUTED 40004a6c: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 40004a70: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004a74: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 40004a78: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40004a7c: 02 bf ff ef be 40004a38 <== NOT EXECUTED 40004a80: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 40004a84: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 40004a88: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40004a8c: 7f ff f9 48 call 40002fac <== NOT EXECUTED 40004a90: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40004a94: 10 bf ff ea b 40004a3c <== NOT EXECUTED 40004a98: 96 10 00 11 mov %l1, %o3 <== NOT EXECUTED 40002d24 : 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); 40002d24: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40002d28: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40002d2c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40002d30: 40 00 08 60 call 40004eb0 <== NOT EXECUTED 40002d34: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40002d38: 01 00 00 00 nop 400049b0 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 400049b0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400049b4: 03 10 00 62 sethi %hi(0x40018800), %g1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400049b8: a0 07 bf f4 add %fp, -12, %l0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400049bc: a2 10 61 58 or %g1, 0x158, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400049c0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400049c4: 94 10 20 00 clr %o2 <== NOT EXECUTED 400049c8: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 400049cc: 40 00 00 d7 call 40004d28 <== NOT EXECUTED 400049d0: 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) { 400049d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400049d8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400049dc: 02 80 00 07 be 400049f8 <== NOT EXECUTED 400049e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 400049e4: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 400049e8: 40 00 03 40 call 400056e8 <== NOT EXECUTED 400049ec: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400049f0: 10 bf ff f5 b 400049c4 <== NOT EXECUTED 400049f4: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400049f8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400049fc: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004a00: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED 40004a04: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 40004a08: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004a0c: 02 80 00 04 be 40004a1c <== NOT EXECUTED 40004a10: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40004a14: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004a18: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40004a1c: 7f ff f8 c8 call 40002d3c <== NOT EXECUTED 40004a20: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40004a24: 10 bf ff e8 b 400049c4 <== NOT EXECUTED 40004a28: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40003a58 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40003a58: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003a5c: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003a60: 92 10 20 00 clr %o1 rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40003a64: e4 00 60 28 ld [ %g1 + 0x28 ], %l2 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003a68: 94 10 20 00 clr %o2 40003a6c: 40 00 06 5f call 400053e8 40003a70: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0 if (sc != RTEMS_SUCCESSFUL) 40003a74: a6 92 20 00 orcc %o0, 0, %l3 40003a78: 12 80 00 25 bne 40003b0c 40003a7c: 03 10 00 62 sethi %hi(0x40018800), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40003a80: c4 04 a0 cc ld [ %l2 + 0xcc ], %g2 40003a84: 85 28 a0 05 sll %g2, 5, %g2 40003a88: 82 10 61 58 or %g1, 0x158, %g1 40003a8c: 82 00 40 02 add %g1, %g2, %g1 40003a90: c2 00 60 0c ld [ %g1 + 0xc ], %g1 40003a94: 80 a0 60 00 cmp %g1, 0 40003a98: 02 80 00 06 be 40003ab0 40003a9c: 92 10 00 18 mov %i0, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40003aa0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003aa4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40003aa8: 10 80 00 17 b 40003b04 <== NOT EXECUTED 40003aac: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 40003ab0: c2 04 a0 34 ld [ %l2 + 0x34 ], %g1 40003ab4: d2 06 20 0c ld [ %i0 + 0xc ], %o1 40003ab8: 80 88 60 01 btst 1, %g1 40003abc: 02 80 00 0e be 40003af4 40003ac0: d0 06 20 08 ld [ %i0 + 8 ], %o0 uint32_t count = args->count; 40003ac4: a2 10 00 09 mov %o1, %l1 char *buffer = args->buffer; 40003ac8: 10 80 00 06 b 40003ae0 40003acc: a0 10 00 08 mov %o0, %l0 while (count--) oproc (*buffer++, tty); 40003ad0: a2 04 7f ff add %l1, -1, %l1 40003ad4: a0 04 20 01 inc %l0 40003ad8: 7f ff fe 48 call 400033f8 40003adc: 92 10 00 12 mov %l2, %o1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 40003ae0: 80 a4 60 00 cmp %l1, 0 40003ae4: 32 bf ff fb bne,a 40003ad0 40003ae8: d0 0c 00 00 ldub [ %l0 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 40003aec: 10 80 00 05 b 40003b00 40003af0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 40003af4: 7f ff fd f5 call 400032c8 <== NOT EXECUTED 40003af8: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 40003afc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 40003b00: c2 26 20 14 st %g1, [ %i0 + 0x14 ] } rtems_semaphore_release (tty->osem); 40003b04: 40 00 06 80 call 40005504 40003b08: d0 04 a0 18 ld [ %l2 + 0x18 ], %o0 return sc; } 40003b0c: 81 c7 e0 08 ret 40003b10: 91 e8 00 13 restore %g0, %l3, %o0 4000658c : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 4000658c: 9d e3 bf 90 save %sp, -112, %sp 40006590: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40006594: 80 a6 60 00 cmp %i1, 0 40006598: 02 80 00 1c be 40006608 4000659c: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 400065a0: 80 a6 a0 00 cmp %i2, 0 400065a4: 02 80 00 19 be 40006608 400065a8: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 400065ac: 11 10 00 59 sethi %hi(0x40016400), %o0 400065b0: 92 10 00 12 mov %l2, %o1 400065b4: 90 12 21 c4 or %o0, 0x1c4, %o0 400065b8: 40 00 05 23 call 40007a44 <_Objects_Get> 400065bc: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400065c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400065c4: a0 10 00 08 mov %o0, %l0 400065c8: 80 a0 60 00 cmp %g1, 0 400065cc: 12 80 00 0f bne 40006608 400065d0: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 400065d4: a2 02 20 10 add %o0, 0x10, %l1 400065d8: 40 00 0c 1b call 40009644 <_Watchdog_Remove> 400065dc: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 400065e0: 7f ff ef 7e call 400023d8 400065e4: 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 ) { 400065e8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 400065ec: 80 a0 60 00 cmp %g1, 0 400065f0: 22 80 00 08 be,a 40006610 400065f4: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 400065f8: 7f ff ef 7c call 400023e8 <== NOT EXECUTED 400065fc: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 40006600: 40 00 07 37 call 400082dc <_Thread_Enable_dispatch> <== NOT EXECUTED 40006604: 01 00 00 00 nop <== NOT EXECUTED 40006608: 81 c7 e0 08 ret 4000660c: 81 e8 00 00 restore void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 40006610: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40006614: 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; 40006618: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000661c: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 40006620: 7f ff ef 72 call 400023e8 40006624: b0 10 20 00 clr %i0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40006628: 92 10 00 11 mov %l1, %o1 4000662c: 11 10 00 58 sethi %hi(0x40016000), %o0 40006630: 90 12 20 d0 or %o0, 0xd0, %o0 ! 400160d0 <_Watchdog_Ticks_chain> 40006634: 40 00 0b aa call 400094dc <_Watchdog_Insert> 40006638: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 4000663c: 40 00 07 28 call 400082dc <_Thread_Enable_dispatch> 40006640: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40006644: 81 c7 e0 08 ret 40006648: 81 e8 00 00 restore 40011818 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 40011818: 9d e3 bf 90 save %sp, -112, %sp */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4001181c: 80 a6 20 00 cmp %i0, 0 40011820: 02 80 00 06 be 40011838 40011824: 82 10 20 00 clr %g1 40011828: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 4001182c: c2 08 60 84 ldub [ %g1 + 0x84 ], %g1 ! 4002dc84 40011830: 80 a0 40 18 cmp %g1, %i0 40011834: 82 60 3f ff subx %g0, -1, %g1 * Make sure the requested priority is valid. The if is * 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 ) ) { 40011838: 80 a0 60 00 cmp %g1, 0 4001183c: 12 80 00 06 bne 40011854 40011840: a2 10 00 18 mov %i0, %l1 if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 40011844: 80 a6 3f ff cmp %i0, -1 40011848: 12 80 00 56 bne 400119a0 4001184c: 90 10 20 13 mov 0x13, %o0 40011850: a2 10 20 00 clr %l1 40011854: 05 10 00 cb sethi %hi(0x40032c00), %g2 40011858: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 ! 40032d60 <_Thread_Dispatch_disable_level> 4001185c: 82 00 60 01 inc %g1 40011860: c2 20 a1 60 st %g1, [ %g2 + 0x160 ] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 40011864: 31 10 00 b9 sethi %hi(0x4002e400), %i0 initialized = true; 40011868: 82 10 20 01 mov 1, %g1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 4001186c: e0 0e 23 c8 ldub [ %i0 + 0x3c8 ], %l0 initialized = true; _Thread_Enable_dispatch(); 40011870: 40 00 0c 06 call 40014888 <_Thread_Enable_dispatch> 40011874: c2 2e 23 c8 stb %g1, [ %i0 + 0x3c8 ] if ( tmpInitialized ) 40011878: 80 a4 20 00 cmp %l0, 0 4001187c: 12 80 00 49 bne 400119a0 40011880: 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); 40011884: 05 10 00 cb sethi %hi(0x40032c00), %g2 40011888: 82 10 a0 7c or %g2, 0x7c, %g1 ! 40032c7c <_Timer_To_be_inserted> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001188c: 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; 40011890: 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); 40011894: 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( 40011898: 92 10 00 11 mov %l1, %o1 4001189c: 94 10 00 19 mov %i1, %o2 400118a0: 19 00 00 20 sethi %hi(0x8000), %o4 400118a4: c2 20 a0 7c st %g1, [ %g2 + 0x7c ] 400118a8: 98 16 80 0c or %i2, %o4, %o4 400118ac: 11 15 12 53 sethi %hi(0x54494c00), %o0 400118b0: 96 10 21 00 mov 0x100, %o3 400118b4: 90 12 21 45 or %o0, 0x145, %o0 400118b8: 7f ff fc 77 call 40010a94 400118bc: 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) { 400118c0: 80 a2 20 00 cmp %o0, 0 400118c4: 02 80 00 04 be 400118d4 400118c8: 03 10 00 cb sethi %hi(0x40032c00), %g1 initialized = false; 400118cc: 10 80 00 35 b 400119a0 400118d0: c0 2e 23 c8 clrb [ %i0 + 0x3c8 ] * 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( 400118d4: 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 ) 400118d8: 86 10 60 1c or %g1, 0x1c, %g3 400118dc: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2 400118e0: 03 00 00 3f sethi %hi(0xfc00), %g1 400118e4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400118e8: 82 0a c0 01 and %o3, %g1, %g1 400118ec: 80 a0 40 02 cmp %g1, %g2 400118f0: 18 80 00 05 bgu 40011904 400118f4: 98 10 20 00 clr %o4 return NULL; return information->local_table[ index ]; 400118f8: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 400118fc: 83 28 60 02 sll %g1, 2, %g1 40011900: d8 00 80 01 ld [ %g2 + %g1 ], %o4 40011904: 1b 10 00 cb sethi %hi(0x40032c00), %o5 40011908: 82 13 60 70 or %o5, 0x70, %g1 ! 40032c70 <_Timer_Seconds_chain> the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4001190c: 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; 40011910: 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); 40011914: 82 00 60 04 add %g1, 4, %g1 40011918: c2 23 60 70 st %g1, [ %o5 + 0x70 ] 4001191c: 03 10 00 cd sethi %hi(0x40033400), %g1 40011920: 09 10 00 cb sethi %hi(0x40032c00), %g4 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40011924: c0 23 20 6c clr [ %o4 + 0x6c ] 40011928: 84 11 20 5c or %g4, 0x5c, %g2 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4001192c: c0 23 20 50 clr [ %o4 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 40011930: d6 23 20 68 st %o3, [ %o4 + 0x68 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40011934: 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; 40011938: c0 20 a0 04 clr [ %g2 + 4 ] 4001193c: d8 20 63 10 st %o4, [ %g1 + 0x310 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40011940: 84 00 a0 04 add %g2, 4, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40011944: 07 10 00 51 sethi %hi(0x40014400), %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011948: 03 10 00 cb sethi %hi(0x40032c00), %g1 the_watchdog->routine = routine; 4001194c: 86 10 e3 04 or %g3, 0x304, %g3 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011950: 82 10 60 88 or %g1, 0x88, %g1 the_watchdog->routine = routine; 40011954: c6 23 20 64 st %g3, [ %o4 + 0x64 ] 40011958: c4 21 20 5c st %g2, [ %g4 + 0x5c ] 4001195c: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; the_watchdog->user_data = user_data; 40011960: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40011964: c0 20 60 08 clr [ %g1 + 8 ] the_watchdog->routine = routine; the_watchdog->id = id; 40011968: 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; 4001196c: 05 10 00 cd sethi %hi(0x40033400), %g2 40011970: 03 10 00 46 sethi %hi(0x40011800), %g1 40011974: 82 10 61 a8 or %g1, 0x1a8, %g1 ! 400119a8 <_Timer_Server_schedule_operation_method> /* * Start the timer server */ status = rtems_task_start( 40011978: 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; 4001197c: c2 20 a3 0c st %g1, [ %g2 + 0x30c ] /* * Start the timer server */ status = rtems_task_start( 40011980: 13 10 00 46 sethi %hi(0x40011800), %o1 40011984: 94 10 20 00 clr %o2 40011988: 7f ff fd 99 call 40010fec 4001198c: 92 12 62 58 or %o1, 0x258, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40011990: 80 a2 20 00 cmp %o0, 0 40011994: 02 80 00 03 be 400119a0 40011998: 03 10 00 b9 sethi %hi(0x4002e400), %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; 4001199c: c0 28 63 c8 clrb [ %g1 + 0x3c8 ] ! 4002e7c8 <== NOT EXECUTED } return status; } 400119a0: 81 c7 e0 08 ret 400119a4: 91 e8 00 08 restore %g0, %o0, %o0 4001158c : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 4001158c: 9d e3 bf 90 save %sp, -112, %sp 40011590: 11 10 00 cd sethi %hi(0x40033400), %o0 40011594: 92 10 00 18 mov %i0, %o1 40011598: 90 12 22 cc or %o0, 0x2cc, %o0 4001159c: 40 00 0a 68 call 40013f3c <_Objects_Get> 400115a0: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400115a4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400115a8: a0 10 00 08 mov %o0, %l0 400115ac: 80 a0 60 00 cmp %g1, 0 400115b0: 12 80 00 19 bne 40011614 400115b4: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400115b8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 400115bc: 80 a0 60 01 cmp %g1, 1 400115c0: 22 80 00 0f be,a 400115fc 400115c4: 31 10 00 cd sethi %hi(0x40033400), %i0 400115c8: 2a 80 00 06 bcs,a 400115e0 400115cc: a0 02 20 10 add %o0, 0x10, %l0 400115d0: 80 a0 60 04 cmp %g1, 4 400115d4: 18 80 00 1c bgu 40011644 400115d8: 01 00 00 00 nop 400115dc: 30 80 00 16 b,a 40011634 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 400115e0: 40 00 12 af call 4001609c <_Watchdog_Remove> 400115e4: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 400115e8: 92 10 00 10 mov %l0, %o1 400115ec: 11 10 00 cb sethi %hi(0x40032c00), %o0 400115f0: 40 00 12 51 call 40015f34 <_Watchdog_Insert> 400115f4: 90 12 22 40 or %o0, 0x240, %o0 ! 40032e40 <_Watchdog_Ticks_chain> 400115f8: 30 80 00 13 b,a 40011644 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 400115fc: c2 06 23 0c ld [ %i0 + 0x30c ], %g1 40011600: 80 a0 60 00 cmp %g1, 0 40011604: 12 80 00 06 bne 4001161c 40011608: 01 00 00 00 nop _Thread_Enable_dispatch(); 4001160c: 40 00 0c 9f call 40014888 <_Thread_Enable_dispatch> <== NOT EXECUTED 40011610: b0 10 20 0e mov 0xe, %i0 ! e <== NOT EXECUTED 40011614: 81 c7 e0 08 ret 40011618: 81 e8 00 00 restore return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 4001161c: 40 00 12 a0 call 4001609c <_Watchdog_Remove> 40011620: 90 02 20 10 add %o0, 0x10, %o0 (*_Timer_Server_schedule_operation)( the_timer ); 40011624: c2 06 23 0c ld [ %i0 + 0x30c ], %g1 40011628: 9f c0 40 00 call %g1 4001162c: 90 10 00 10 mov %l0, %o0 40011630: 30 80 00 05 b,a 40011644 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 40011634: 40 00 0c 95 call 40014888 <_Thread_Enable_dispatch> 40011638: b0 10 20 0b mov 0xb, %i0 4001163c: 81 c7 e0 08 ret 40011640: 81 e8 00 00 restore return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 40011644: 40 00 0c 91 call 40014888 <_Thread_Enable_dispatch> 40011648: b0 10 20 00 clr %i0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4001164c: 81 c7 e0 08 ret 40011650: 81 e8 00 00 restore 40011654 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011654: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011658: 03 10 00 cd sethi %hi(0x40033400), %g1 4001165c: c2 00 63 10 ld [ %g1 + 0x310 ], %g1 ! 40033710 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40011660: a2 10 00 18 mov %i0, %l1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40011664: 80 a0 60 00 cmp %g1, 0 40011668: 02 80 00 1e be 400116e0 4001166c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40011670: 80 a6 a0 00 cmp %i2, 0 40011674: 02 80 00 1b be 400116e0 40011678: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001167c: 80 a6 60 00 cmp %i1, 0 40011680: 02 80 00 18 be 400116e0 40011684: b0 10 20 0a mov 0xa, %i0 40011688: 11 10 00 cd sethi %hi(0x40033400), %o0 4001168c: 92 10 00 11 mov %l1, %o1 40011690: 90 12 22 cc or %o0, 0x2cc, %o0 40011694: 40 00 0a 2a call 40013f3c <_Objects_Get> 40011698: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001169c: c2 07 bf f4 ld [ %fp + -12 ], %g1 400116a0: a0 10 00 08 mov %o0, %l0 400116a4: 80 a0 60 00 cmp %g1, 0 400116a8: 12 80 00 0e bne 400116e0 400116ac: b0 10 20 04 mov 4, %i0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 400116b0: 40 00 12 7b call 4001609c <_Watchdog_Remove> 400116b4: 90 02 20 10 add %o0, 0x10, %o0 _ISR_Disable( level ); 400116b8: 7f ff e7 77 call 4000b494 400116bc: 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 ) { 400116c0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 400116c4: 80 a0 60 00 cmp %g1, 0 400116c8: 02 80 00 08 be 400116e8 400116cc: 82 10 20 01 mov 1, %g1 _ISR_Enable( level ); 400116d0: 7f ff e7 75 call 4000b4a4 <== NOT EXECUTED 400116d4: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); 400116d8: 40 00 0c 6c call 40014888 <_Thread_Enable_dispatch> <== NOT EXECUTED 400116dc: 01 00 00 00 nop <== NOT EXECUTED 400116e0: 81 c7 e0 08 ret 400116e4: 81 e8 00 00 restore Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400116e8: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 400116ec: e2 24 20 30 st %l1, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 400116f0: 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; 400116f4: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400116f8: 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; 400116fc: 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 ); 40011700: 7f ff e7 69 call 4000b4a4 40011704: 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 ); 40011708: 03 10 00 cd sethi %hi(0x40033400), %g1 4001170c: c2 00 63 0c ld [ %g1 + 0x30c ], %g1 ! 4003370c <_Timer_Server_schedule_operation> 40011710: 9f c0 40 00 call %g1 40011714: 90 10 00 10 mov %l0, %o0 _Thread_Enable_dispatch(); 40011718: 40 00 0c 5c call 40014888 <_Thread_Enable_dispatch> 4001171c: 01 00 00 00 nop case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 40011720: 81 c7 e0 08 ret 40011724: 81 e8 00 00 restore 4000620c : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 4000620c: 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) 40006210: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 40006214: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 40006218: 02 80 00 11 be 4000625c <== NOT EXECUTED 4000621c: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40006220: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED 40006224: c6 00 63 28 ld [ %g1 + 0x328 ], %g3 ! 40027b28 <== NOT EXECUTED 40006228: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED 4000622c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40006230: 02 80 00 07 be 4000624c <== NOT EXECUTED 40006234: c4 20 63 28 st %g2, [ %g1 + 0x328 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006238: 05 10 00 9f sethi %hi(0x40027c00), %g2 <== NOT EXECUTED 4000623c: c2 00 a1 10 ld [ %g2 + 0x110 ], %g1 ! 40027d10 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006240: 82 00 60 01 inc %g1 <== NOT EXECUTED 40006244: c2 20 a1 10 st %g1, [ %g2 + 0x110 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40006248: 03 10 00 9e sethi %hi(0x40027800), %g1 <== NOT EXECUTED 4000624c: c2 00 63 28 ld [ %g1 + 0x328 ], %g1 ! 40027b28 <== NOT EXECUTED 40006250: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006254: 34 80 00 5b bg,a 400063c0 <== NOT EXECUTED 40006258: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 4000625c: 03 10 00 9b sethi %hi(0x40026c00), %g1 <== NOT EXECUTED 40006260: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 40026dc0 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40006264: a4 10 20 00 clr %l2 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40006268: 40 00 3e c6 call 40015d80 <== NOT EXECUTED 4000626c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 40006270: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED 40006274: a0 2c c0 01 andn %l3, %g1, %l0 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40006278: 03 10 00 00 sethi %hi(0x40000000), %g1 <== NOT EXECUTED 4000627c: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 40006280: 02 80 00 05 be 40006294 <== NOT EXECUTED 40006284: 23 10 00 9b sethi %hi(0x40026c00), %l1 <== NOT EXECUTED local_errno = errno; 40006288: 40 00 3d ed call 40015a3c <__errno> <== NOT EXECUTED 4000628c: 01 00 00 00 nop <== NOT EXECUTED 40006290: e4 02 00 00 ld [ %o0 ], %l2 <== 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); 40006294: c2 04 61 c0 ld [ %l1 + 0x1c0 ], %g1 <== NOT EXECUTED 40006298: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000629c: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 400062a0: 40 00 57 9e call 4001c118 <== NOT EXECUTED 400062a4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED if (status) 400062a8: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 400062ac: 02 80 00 0e be 400062e4 <== NOT EXECUTED 400062b0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 400062b4: c2 04 61 c0 ld [ %l1 + 0x1c0 ], %g1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 400062b8: 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)); 400062bc: 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); 400062c0: 11 10 00 8c sethi %hi(0x40023000), %o0 <== NOT EXECUTED 400062c4: 40 00 28 fd call 400106b8 <== NOT EXECUTED 400062c8: 90 12 22 00 or %o0, 0x200, %o0 ! 40023200 <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 400062cc: 13 10 00 8b sethi %hi(0x40022c00), %o1 <== NOT EXECUTED const char * rtems_status_text( rtems_status_code status ) { return rtems_assoc_name_by_local(rtems_status_assoc, status); 400062d0: 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)); 400062d4: 92 12 62 80 or %o1, 0x280, %o1 <== NOT EXECUTED 400062d8: 40 00 40 15 call 4001632c <== NOT EXECUTED 400062dc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400062e0: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED if (local_errno) 400062e4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 400062e8: 02 80 00 1c be 40006358 <== NOT EXECUTED 400062ec: 23 10 00 9b sethi %hi(0x40026c00), %l1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 400062f0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 400062f4: 04 80 00 11 ble 40006338 <== NOT EXECUTED 400062f8: 03 10 00 9b sethi %hi(0x40026c00), %g1 <== NOT EXECUTED 400062fc: 40 00 4c 08 call 4001931c <== NOT EXECUTED 40006300: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40006304: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40006308: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000630c: 02 80 00 0b be 40006338 <== NOT EXECUTED 40006310: 03 10 00 9b sethi %hi(0x40026c00), %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 40006314: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 ! 40026dc0 <_impure_ptr> <== NOT EXECUTED 40006318: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000631c: 40 00 4c 00 call 4001931c <== NOT EXECUTED 40006320: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 40006324: 13 10 00 8b sethi %hi(0x40022c00), %o1 <== NOT EXECUTED 40006328: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 4000632c: 92 12 62 90 or %o1, 0x290, %o1 <== NOT EXECUTED 40006330: 10 80 00 07 b 4000634c <== NOT EXECUTED 40006334: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40006338: c2 00 61 c0 ld [ %g1 + 0x1c0 ], %g1 <== NOT EXECUTED 4000633c: 13 10 00 8b sethi %hi(0x40022c00), %o1 <== NOT EXECUTED 40006340: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40006344: 92 12 62 a0 or %o1, 0x2a0, %o1 <== NOT EXECUTED 40006348: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 4000634c: 40 00 3f f8 call 4001632c <== NOT EXECUTED 40006350: 23 10 00 9b sethi %hi(0x40026c00), %l1 <== NOT EXECUTED 40006354: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40006358: c2 04 61 c0 ld [ %l1 + 0x1c0 ], %g1 <== NOT EXECUTED 4000635c: 13 10 00 8d sethi %hi(0x40023400), %o1 <== NOT EXECUTED 40006360: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40006364: 40 00 3f f2 call 4001632c <== NOT EXECUTED 40006368: 92 12 63 38 or %o1, 0x338, %o1 <== NOT EXECUTED (void) fflush(stderr); 4000636c: c2 04 61 c0 ld [ %l1 + 0x1c0 ], %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"); 40006370: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 40006374: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40006378: 40 00 3e 82 call 40015d80 <== NOT EXECUTED 4000637c: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40006380: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40006384: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 40006388: 02 80 00 0e be 400063c0 <== NOT EXECUTED 4000638c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40006390: 02 80 00 07 be 400063ac <== NOT EXECUTED 40006394: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40006398: 13 10 00 8b sethi %hi(0x40022c00), %o1 <== NOT EXECUTED 4000639c: 40 00 00 18 call 400063fc <== NOT EXECUTED 400063a0: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 40022eb8 <== NOT EXECUTED _exit(local_errno); 400063a4: 40 00 01 fe call 40006b9c <_exit> <== NOT EXECUTED 400063a8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 400063ac: 13 10 00 8b sethi %hi(0x40022c00), %o1 <== NOT EXECUTED 400063b0: 40 00 00 13 call 400063fc <== NOT EXECUTED 400063b4: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 40022ed0 <== NOT EXECUTED abort(); 400063b8: 40 00 3d 93 call 40015a04 <== NOT EXECUTED 400063bc: 01 00 00 00 nop <== NOT EXECUTED } } return chars_written; } 400063c0: 81 c7 e0 08 ret <== NOT EXECUTED 400063c4: 81 e8 00 00 restore <== NOT EXECUTED 40006228 : */ bool rtems_workspace_allocate( uintptr_t bytes, void **pointer ) { 40006228: 9d e3 bf 98 save %sp, -104, %sp void *ptr; /* * check the arguments */ if ( !pointer ) 4000622c: 80 a6 60 00 cmp %i1, 0 40006230: 02 80 00 0d be 40006264 40006234: 92 10 00 18 mov %i0, %o1 return false; if ( !bytes ) 40006238: 80 a6 20 00 cmp %i0, 0 4000623c: 02 80 00 0a be 40006264 40006240: 11 10 00 75 sethi %hi(0x4001d400), %o0 return false; /* * Allocate the memory */ ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes ); 40006244: 40 00 05 b0 call 40007904 <_Protected_heap_Allocate> 40006248: 90 12 22 f4 or %o0, 0x2f4, %o0 ! 4001d6f4 <_Workspace_Area> if (!ptr) 4000624c: 80 a2 20 00 cmp %o0, 0 40006250: 02 80 00 05 be 40006264 40006254: 01 00 00 00 nop return false; *pointer = ptr; 40006258: d0 26 40 00 st %o0, [ %i1 ] 4000625c: 81 c7 e0 08 ret 40006260: 91 e8 20 01 restore %g0, 1, %o0 return true; } 40006264: 81 c7 e0 08 ret <== NOT EXECUTED 40006268: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000620c : * _Workspace_Allocate */ bool rtems_workspace_free( void *pointer ) { 4000620c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return _Protected_heap_Free( &_Workspace_Area, pointer ); 40006210: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 40006214: 90 12 22 f4 or %o0, 0x2f4, %o0 ! 4001d6f4 <_Workspace_Area> <== NOT EXECUTED 40006218: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000621c: 40 00 05 c6 call 40007934 <_Protected_heap_Free> <== NOT EXECUTED 40006220: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006224: 01 00 00 00 nop 4000626c : bool rtems_workspace_get_information( Heap_Information_block *the_info ) { if ( !the_info ) 4000626c: 80 a2 20 00 cmp %o0, 0 40006270: 12 80 00 04 bne 40006280 40006274: 92 10 00 08 mov %o0, %o1 return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); } 40006278: 81 c3 e0 08 retl <== NOT EXECUTED 4000627c: 01 00 00 00 nop <== NOT EXECUTED ) { if ( !the_info ) return false; return _Protected_heap_Get_information( &_Workspace_Area, the_info ); 40006280: 11 10 00 75 sethi %hi(0x4001d400), %o0 40006284: 90 12 22 f4 or %o0, 0x2f4, %o0 ! 4001d6f4 <_Workspace_Area> 40006288: 82 13 c0 00 mov %o7, %g1 4000628c: 40 00 05 b6 call 40007964 <_Protected_heap_Get_information> 40006290: 9e 10 40 00 mov %g1, %o7 40006294: 01 00 00 00 nop 4001f610 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4001f610: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 4001f614: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED 4001f618: a6 10 63 ff or %g1, 0x3ff, %l3 ! 7fffffff <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4001f61c: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4001f620: a2 10 20 00 clr %l1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4001f624: aa 10 60 70 or %g1, 0x70, %l5 <== NOT EXECUTED /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 4001f628: a4 10 20 00 clr %l2 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 4001f62c: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4001f630: a8 10 60 60 or %g1, 0x60, %l4 ! 40049060 <__ctype_ptr> <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 4001f634: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 4001f638: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001f63c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f640: 16 80 00 07 bge 4001f65c <== NOT EXECUTED 4001f644: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 4001f648: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 4001f64c: 40 00 50 15 call 400336a0 <__srget_r> <== NOT EXECUTED 4001f650: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4001f654: 10 80 00 06 b 4001f66c <== NOT EXECUTED 4001f658: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4001f65c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 4001f660: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4001f664: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 4001f668: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (c == ':') 4001f66c: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 4001f670: 02 80 00 21 be 4001f6f4 <== NOT EXECUTED 4001f674: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED break; if (sign == 0) { 4001f678: 32 80 00 09 bne,a 4001f69c <== NOT EXECUTED 4001f67c: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED if (c == '-') { 4001f680: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 4001f684: 12 80 00 05 bne 4001f698 <== NOT EXECUTED 4001f688: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED sign = -1; limit++; 4001f68c: a6 04 e0 01 inc %l3 <== NOT EXECUTED 4001f690: 10 bf ff e9 b 4001f634 <== NOT EXECUTED 4001f694: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED continue; } sign = 1; } if (!isdigit(c)) 4001f698: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED 4001f69c: c2 08 40 10 ldub [ %g1 + %l0 ], %g1 <== NOT EXECUTED 4001f6a0: 80 88 60 04 btst 4, %g1 <== NOT EXECUTED 4001f6a4: 02 80 00 1c be 4001f714 <== NOT EXECUTED 4001f6a8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 4001f6ac: 40 00 7f 13 call 4003f2f8 <.udiv> <== NOT EXECUTED 4001f6b0: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4001f6b4: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 4001f6b8: 18 80 00 17 bgu 4001f714 <== NOT EXECUTED 4001f6bc: 01 00 00 00 nop <== NOT EXECUTED 4001f6c0: 12 80 00 08 bne 4001f6e0 <== NOT EXECUTED 4001f6c4: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED 4001f6c8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 4001f6cc: 40 00 7f b7 call 4003f5a8 <.urem> <== NOT EXECUTED 4001f6d0: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4001f6d4: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 4001f6d8: 18 80 00 0f bgu 4001f714 <== NOT EXECUTED 4001f6dc: 01 00 00 00 nop <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 4001f6e0: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 4001f6e4: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 4001f6e8: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 4001f6ec: 10 bf ff d2 b 4001f634 <== NOT EXECUTED 4001f6f0: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED } if (sign == 0) 4001f6f4: 02 80 00 08 be 4001f714 <== NOT EXECUTED 4001f6f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 4001f6fc: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001f700: 7f ff 8e 96 call 40003158 <.umul> <== NOT EXECUTED 4001f704: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 4001f708: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 4001f70c: 81 c7 e0 08 ret <== NOT EXECUTED 4001f710: 81 e8 00 00 restore <== NOT EXECUTED return 1; } 4001f714: 81 c7 e0 08 ret <== NOT EXECUTED 4001f718: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4001f71c : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 4001f71c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 4001f720: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4001f724: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 4001f728: 03 10 01 24 sethi %hi(0x40049000), %g1 <== NOT EXECUTED 4001f72c: b2 10 60 70 or %g1, 0x70, %i1 ! 40049070 <_impure_ptr> <== NOT EXECUTED 4001f730: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 4001f734: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001f738: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f73c: 16 80 00 07 bge 4001f758 <== NOT EXECUTED 4001f740: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 4001f744: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED 4001f748: 40 00 4f d6 call 400336a0 <__srget_r> <== NOT EXECUTED 4001f74c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 4001f750: 10 80 00 07 b 4001f76c <== NOT EXECUTED 4001f754: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 4001f758: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 4001f75c: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED 4001f760: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 4001f764: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (c == ':') { 4001f768: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 4001f76c: 12 80 00 07 bne 4001f788 <== NOT EXECUTED 4001f770: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 4001f774: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4001f778: 22 80 00 1a be,a 4001f7e0 <== NOT EXECUTED 4001f77c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 4001f780: 81 c7 e0 08 ret <== NOT EXECUTED 4001f784: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') { if (nlFlag) return 0; break; } if (c == '\n') { 4001f788: 12 80 00 07 bne 4001f7a4 <== NOT EXECUTED 4001f78c: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) 4001f790: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 4001f794: 32 80 00 13 bne,a 4001f7e0 <== NOT EXECUTED 4001f798: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; 4001f79c: 81 c7 e0 08 ret <== NOT EXECUTED 4001f7a0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == '\n') { if (!nlFlag) return 0; break; } if (c == EOF) 4001f7a4: 22 80 00 17 be,a 4001f800 <== NOT EXECUTED 4001f7a8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; if (*nleft < 2) 4001f7ac: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 4001f7b0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001f7b4: 28 80 00 13 bleu,a 4001f800 <== NOT EXECUTED 4001f7b8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; **bufp = c; 4001f7bc: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4001f7c0: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 4001f7c4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); 4001f7c8: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4001f7cc: 82 00 60 01 inc %g1 <== NOT EXECUTED --(*nleft); 4001f7d0: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 4001f7d4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED --(*nleft); 4001f7d8: 10 bf ff d6 b 4001f730 <== NOT EXECUTED 4001f7dc: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED } **bufp = '\0'; 4001f7e0: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 4001f7e4: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED --(*nleft); 4001f7e8: c4 06 c0 00 ld [ %i3 ], %g2 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4001f7ec: 82 00 60 01 inc %g1 <== NOT EXECUTED --(*nleft); 4001f7f0: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 4001f7f4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED --(*nleft); 4001f7f8: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED 4001f7fc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } 4001f800: 81 c7 e0 08 ret <== NOT EXECUTED 4001f804: 81 e8 00 00 restore <== NOT EXECUTED 400052b4 : scandir( const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*dcomp)(const struct dirent **, const struct dirent **)) { 400052b4: 9d e3 bf 48 save %sp, -184, %sp struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 400052b8: 7f ff fd 9f call 40004934 400052bc: 90 10 00 18 mov %i0, %o0 400052c0: a8 92 20 00 orcc %o0, 0, %l4 400052c4: 02 80 00 6a be 4000546c 400052c8: a0 07 bf a8 add %fp, -88, %l0 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 400052cc: d0 05 00 00 ld [ %l4 ], %o0 400052d0: 40 00 1c e5 call 4000c664 400052d4: 92 10 00 10 mov %l0, %o1 400052d8: 80 a2 20 00 cmp %o0, 0 400052dc: 06 80 00 53 bl 40005428 400052e0: 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); 400052e4: 40 00 3a 90 call 40013d24 <.div> 400052e8: 92 10 20 18 mov 0x18, %o1 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { if (fstat(dirp->dd_fd, &stb) < 0) 400052ec: aa 10 00 10 mov %l0, %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); 400052f0: a6 10 00 08 mov %o0, %l3 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) 400052f4: 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); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 400052f8: 91 2a 20 02 sll %o0, 2, %o0 400052fc: 7f ff fb 95 call 40004150 40005300: ac 10 20 01 mov 1, %l6 if (names == NULL) 40005304: 80 a2 20 00 cmp %o0, 0 40005308: 12 80 00 34 bne 400053d8 4000530c: a2 10 00 08 mov %o0, %l1 40005310: 10 80 00 48 b 40005430 40005314: b0 10 00 08 mov %o0, %i0 goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { if (select != NULL && !(*select)(d)) 40005318: 22 80 00 08 be,a 40005338 4000531c: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED 40005320: 9f c6 80 00 call %i2 40005324: 01 00 00 00 nop 40005328: 80 a2 20 00 cmp %o0, 0 4000532c: 02 80 00 2b be 400053d8 40005330: 01 00 00 00 nop continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 40005334: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 40005338: 90 02 20 04 add %o0, 4, %o0 4000533c: 90 0a 3f fc and %o0, -4, %o0 40005340: 7f ff fb 84 call 40004150 40005344: 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); 40005348: 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)); 4000534c: a4 10 00 08 mov %o0, %l2 if (p == NULL) 40005350: 80 a4 a0 00 cmp %l2, 0 40005354: 02 80 00 37 be 40005430 40005358: 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; 4000535c: 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; 40005360: c2 04 00 00 ld [ %l0 ], %g1 p->d_reclen = d->d_reclen; 40005364: 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); 40005368: 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; 4000536c: c2 24 80 00 st %g1, [ %l2 ] p->d_reclen = d->d_reclen; 40005370: c4 34 a0 08 sth %g2, [ %l2 + 8 ] p->d_namlen = d->d_namlen; 40005374: c6 34 a0 0a sth %g3, [ %l2 + 0xa ] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 40005378: 95 32 a0 10 srl %o2, 0x10, %o2 4000537c: 40 00 32 9a call 40011de4 40005380: 94 02 a0 01 inc %o2 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 40005384: b0 06 20 01 inc %i0 40005388: 80 a6 00 13 cmp %i0, %l3 4000538c: 0a 80 00 11 bcs 400053d0 40005390: 82 26 00 16 sub %i0, %l6, %g1 if (fstat(dirp->dd_fd, &stb) < 0) 40005394: d0 05 00 00 ld [ %l4 ], %o0 <== NOT EXECUTED 40005398: 40 00 1c b3 call 4000c664 <== NOT EXECUTED 4000539c: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 400053a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400053a4: 06 80 00 23 bl 40005430 <== NOT EXECUTED 400053a8: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 400053ac: 40 00 3a 5e call 40013d24 <.div> <== NOT EXECUTED 400053b0: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED 400053b4: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 400053b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400053bc: 40 00 1d 59 call 4000c920 <== NOT EXECUTED 400053c0: 93 2c e0 02 sll %l3, 2, %o1 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 400053c4: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 400053c8: 02 80 00 1a be 40005430 <== NOT EXECUTED 400053cc: 82 26 00 16 sub %i0, %l6, %g1 <== NOT EXECUTED goto cleanup_and_bail; } names[nitems-1] = p; 400053d0: 83 28 60 02 sll %g1, 2, %g1 400053d4: e4 24 40 01 st %l2, [ %l1 + %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) { 400053d8: 7f ff ff 1e call 40005050 400053dc: 90 10 00 14 mov %l4, %o0 400053e0: a0 92 20 00 orcc %o0, 0, %l0 400053e4: 12 bf ff cd bne 40005318 400053e8: 80 a6 a0 00 cmp %i2, 0 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 400053ec: 7f ff f8 3a call 400034d4 400053f0: 90 10 00 14 mov %l4, %o0 if (nitems && dcomp != NULL){ 400053f4: 80 a6 20 00 cmp %i0, 0 400053f8: 22 80 00 0a be,a 40005420 400053fc: e2 26 40 00 st %l1, [ %i1 ] <== NOT EXECUTED 40005400: 80 a6 e0 00 cmp %i3, 0 40005404: 02 80 00 06 be 4000541c 40005408: 96 10 00 1b mov %i3, %o3 qsort(names, nitems, sizeof(struct dirent *), 4000540c: 90 10 00 11 mov %l1, %o0 40005410: 92 10 00 18 mov %i0, %o1 40005414: 40 00 2f 6c call 400111c4 40005418: 94 10 20 04 mov 4, %o2 (int (*)(const void *, const void *)) dcomp); } *namelist = names; 4000541c: e2 26 40 00 st %l1, [ %i1 ] return(nitems); 40005420: 10 80 00 14 b 40005470 40005424: 92 10 00 18 mov %i0, %o1 40005428: a2 10 20 00 clr %l1 <== NOT EXECUTED 4000542c: b0 10 20 00 clr %i0 <== NOT EXECUTED cleanup_and_bail: if ( dirp ) closedir( dirp ); 40005430: 7f ff f8 29 call 400034d4 40005434: 90 10 00 14 mov %l4, %o0 if ( names ) { 40005438: 80 a4 60 00 cmp %l1, 0 4000543c: 02 80 00 0c be 4000546c 40005440: b6 10 20 00 clr %i3 for (i=0; i < nitems; i++ ) free( names[i] ); 40005444: 10 80 00 05 b 40005458 <== NOT EXECUTED 40005448: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED 4000544c: 7f ff f9 7c call 40003a3c <== NOT EXECUTED 40005450: b6 06 e0 01 inc %i3 <== NOT EXECUTED 40005454: 83 2e e0 02 sll %i3, 2, %g1 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 40005458: 80 a6 c0 18 cmp %i3, %i0 <== NOT EXECUTED 4000545c: 2a bf ff fc bcs,a 4000544c <== NOT EXECUTED 40005460: d0 04 40 01 ld [ %l1 + %g1 ], %o0 <== NOT EXECUTED free( names[i] ); free( names ); 40005464: 7f ff f9 76 call 40003a3c <== NOT EXECUTED 40005468: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000546c: 92 10 3f ff mov -1, %o1 } return(-1); } 40005470: 81 c7 e0 08 ret 40005474: 91 e8 00 09 restore %g0, %o1, %o0 4001f808 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4001f808: 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) 4001f80c: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 4001f810: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 4001f814: 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) 4001f818: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 4001f81c: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 4001f820: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001f824: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001f828: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001f82c: 7f ff ff bc call 4001f71c <== NOT EXECUTED 4001f830: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001f834: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f838: 02 80 00 42 be 4001f940 <== NOT EXECUTED 4001f83c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001f840: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 4001f844: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001f848: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001f84c: 7f ff ff b4 call 4001f71c <== NOT EXECUTED 4001f850: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001f854: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f858: 02 80 00 3a be 4001f940 <== NOT EXECUTED 4001f85c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001f860: 7f ff ff 6c call 4001f610 <== NOT EXECUTED 4001f864: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 4001f868: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f86c: 02 80 00 35 be 4001f940 <== NOT EXECUTED 4001f870: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001f874: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001f878: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001f87c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 4001f880: 7f ff ff a7 call 4001f71c <== NOT EXECUTED 4001f884: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4001f888: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f88c: 02 80 00 2d be 4001f940 <== NOT EXECUTED 4001f890: 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; 4001f894: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001f898: 84 10 00 0d mov %o5, %g2 <== 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; 4001f89c: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001f8a0: 10 80 00 05 b 4001f8b4 <== NOT EXECUTED 4001f8a4: 86 10 20 01 mov 1, %g3 <== NOT EXECUTED if(*cp == ',') memcount++; 4001f8a8: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 4001f8ac: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4001f8b0: 86 60 ff ff subx %g3, -1, %g3 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001f8b4: c2 48 80 00 ldsb [ %g2 ], %g1 <== NOT EXECUTED 4001f8b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f8bc: 12 bf ff fb bne 4001f8a8 <== NOT EXECUTED 4001f8c0: 84 00 a0 01 inc %g2 <== NOT EXECUTED } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 4001f8c4: c4 07 a0 50 ld [ %fp + 0x50 ], %g2 <== NOT EXECUTED 4001f8c8: 83 28 e0 02 sll %g3, 2, %g1 <== NOT EXECUTED 4001f8cc: 82 00 60 13 add %g1, 0x13, %g1 <== NOT EXECUTED 4001f8d0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001f8d4: 0a 80 00 1b bcs 4001f940 <== NOT EXECUTED 4001f8d8: c2 07 a0 4c ld [ %fp + 0x4c ], %g1 <== NOT EXECUTED grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4001f8dc: 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); 4001f8e0: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 4001f8e4: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4001f8e8: da 20 40 00 st %o5, [ %g1 ] <== 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); 4001f8ec: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4001f8f0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4001f8f4: 10 80 00 0a b 4001f91c <== NOT EXECUTED 4001f8f8: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { 4001f8fc: 32 80 00 08 bne,a 4001f91c <== NOT EXECUTED 4001f900: 86 00 e0 01 inc %g3 <== NOT EXECUTED *cp = '\0'; 4001f904: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 4001f908: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 4001f90c: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 4001f910: 88 01 20 01 inc %g4 <== NOT EXECUTED 4001f914: c6 20 80 01 st %g3, [ %g2 + %g1 ] <== NOT EXECUTED 4001f918: 86 00 e0 01 inc %g3 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001f91c: c2 48 ff ff ldsb [ %g3 + -1 ], %g1 <== NOT EXECUTED 4001f920: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001f924: 32 bf ff f6 bne,a 4001f8fc <== NOT EXECUTED 4001f928: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4001f92c: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 4001f930: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 4001f934: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED 4001f938: 81 c7 e0 08 ret <== NOT EXECUTED 4001f93c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } 4001f940: 81 c7 e0 08 ret <== NOT EXECUTED 4001f944: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4001f990 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4001f990: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4001f994: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4001f998: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 4001f99c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4001f9a0: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 4001f9a4: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 4001f9a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001f9ac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001f9b0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001f9b4: 7f ff ff 5a call 4001f71c <== NOT EXECUTED 4001f9b8: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001f9bc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f9c0: 02 80 00 39 be 4001faa4 <== NOT EXECUTED 4001f9c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001f9c8: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 4001f9cc: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001f9d0: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001f9d4: 7f ff ff 52 call 4001f71c <== NOT EXECUTED 4001f9d8: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001f9dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f9e0: 02 80 00 31 be 4001faa4 <== NOT EXECUTED 4001f9e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001f9e8: 7f ff ff 0a call 4001f610 <== NOT EXECUTED 4001f9ec: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 4001f9f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001f9f4: 02 80 00 2c be 4001faa4 <== NOT EXECUTED 4001f9f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001f9fc: 7f ff ff 05 call 4001f610 <== NOT EXECUTED 4001fa00: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 4001fa04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fa08: 02 80 00 27 be 4001faa4 <== NOT EXECUTED 4001fa0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001fa10: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 4001fa14: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001fa18: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001fa1c: 7f ff ff 40 call 4001f71c <== NOT EXECUTED 4001fa20: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001fa24: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fa28: 02 80 00 1f be 4001faa4 <== NOT EXECUTED 4001fa2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001fa30: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 4001fa34: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001fa38: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001fa3c: 7f ff ff 38 call 4001f71c <== NOT EXECUTED 4001fa40: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001fa44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fa48: 02 80 00 17 be 4001faa4 <== NOT EXECUTED 4001fa4c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001fa50: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 4001fa54: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001fa58: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001fa5c: 7f ff ff 30 call 4001f71c <== NOT EXECUTED 4001fa60: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001fa64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fa68: 02 80 00 0f be 4001faa4 <== NOT EXECUTED 4001fa6c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001fa70: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001fa74: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001fa78: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 4001fa7c: 7f ff ff 28 call 4001f71c <== NOT EXECUTED 4001fa80: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4001fa84: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fa88: 02 80 00 07 be 4001faa4 <== NOT EXECUTED 4001fa8c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== 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; 4001fa90: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 4001fa94: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4001fa98: c2 36 60 0a sth %g1, [ %i1 + 0xa ] <== NOT EXECUTED 4001fa9c: 81 c7 e0 08 ret <== NOT EXECUTED 4001faa0: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } 4001faa4: 81 c7 e0 08 ret <== NOT EXECUTED 4001faa8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40007ba0 : */ int sem_destroy( sem_t *sem ) { 40007ba0: 9d e3 bf 90 save %sp, -112, %sp 40007ba4: d2 06 00 00 ld [ %i0 ], %o1 40007ba8: 11 10 00 7d sethi %hi(0x4001f400), %o0 40007bac: 94 07 bf f4 add %fp, -12, %o2 40007bb0: 40 00 09 27 call 4000a04c <_Objects_Get> 40007bb4: 90 12 23 c0 or %o0, 0x3c0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40007bb8: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007bbc: 80 a0 60 00 cmp %g1, 0 40007bc0: 12 80 00 14 bne 40007c10 40007bc4: 01 00 00 00 nop case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40007bc8: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1 40007bcc: 80 a0 60 00 cmp %g1, 0 40007bd0: 02 80 00 0a be 40007bf8 40007bd4: 01 00 00 00 nop _Thread_Enable_dispatch(); 40007bd8: 40 00 0b 43 call 4000a8e4 <_Thread_Enable_dispatch> <== NOT EXECUTED 40007bdc: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 40007be0: 40 00 23 0c call 40010810 <__errno> <== NOT EXECUTED 40007be4: 01 00 00 00 nop <== NOT EXECUTED 40007be8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40007bec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007bf0: 81 c7 e0 08 ret <== NOT EXECUTED 40007bf4: 81 e8 00 00 restore <== NOT EXECUTED } _POSIX_Semaphore_Delete( the_semaphore ); 40007bf8: 40 00 1a c3 call 4000e704 <_POSIX_Semaphore_Delete> 40007bfc: b0 10 20 00 clr %i0 _Thread_Enable_dispatch(); 40007c00: 40 00 0b 39 call 4000a8e4 <_Thread_Enable_dispatch> 40007c04: 01 00 00 00 nop 40007c08: 81 c7 e0 08 ret 40007c0c: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40007c10: 40 00 23 00 call 40010810 <__errno> 40007c14: b0 10 3f ff mov -1, %i0 40007c18: 82 10 20 16 mov 0x16, %g1 40007c1c: c2 22 00 00 st %g1, [ %o0 ] } 40007c20: 81 c7 e0 08 ret 40007c24: 81 e8 00 00 restore 40007c80 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 40007c80: 9d e3 bf 90 save %sp, -112, %sp 40007c84: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 40007c88: 80 a6 20 00 cmp %i0, 0 40007c8c: 12 80 00 08 bne 40007cac 40007c90: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); 40007c94: 40 00 22 df call 40010810 <__errno> <== NOT EXECUTED 40007c98: 01 00 00 00 nop <== NOT EXECUTED 40007c9c: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40007ca0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007ca4: 10 80 00 0a b 40007ccc <== NOT EXECUTED 40007ca8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED status = _POSIX_Semaphore_Create_support( 40007cac: 90 10 20 00 clr %o0 40007cb0: 40 00 1a 4e call 4000e5e8 <_POSIX_Semaphore_Create_support> 40007cb4: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 40007cb8: 80 a2 3f ff cmp %o0, -1 40007cbc: 02 80 00 04 be 40007ccc 40007cc0: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 40007cc4: c2 00 60 08 ld [ %g1 + 8 ], %g1 40007cc8: c2 26 00 00 st %g1, [ %i0 ] return status; } 40007ccc: 81 c7 e0 08 ret 40007cd0: 91 e8 00 08 restore %g0, %o0, %o0 40007e4c : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 40007e4c: 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 ); 40007e50: 92 07 bf f4 add %fp, -12, %o1 40007e54: 40 00 17 9f call 4000dcd0 <_POSIX_Absolute_timeout_to_ticks> 40007e58: 90 10 00 19 mov %i1, %o0 switch ( status ) { 40007e5c: 80 a2 20 02 cmp %o0, 2 40007e60: 18 80 00 03 bgu 40007e6c 40007e64: 92 10 20 01 mov 1, %o1 40007e68: 92 10 20 00 clr %o1 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = true; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 40007e6c: d4 07 bf f4 ld [ %fp + -12 ], %o2 40007e70: 90 10 00 18 mov %i0, %o0 40007e74: 40 00 1a 57 call 4000e7d0 <_POSIX_Semaphore_Wait_support> 40007e78: 92 0a 60 01 and %o1, 1, %o1 break; } } return lock_status; } 40007e7c: 81 c7 e0 08 ret 40007e80: 91 e8 00 08 restore %g0, %o0, %o0 40007f44 : int sem_wait( sem_t *sem ) { return _POSIX_Semaphore_Wait_support( sem, TRUE, THREAD_QUEUE_WAIT_FOREVER ); 40007f44: 92 10 20 01 mov 1, %o1 40007f48: 94 10 20 00 clr %o2 40007f4c: 82 13 c0 00 mov %o7, %g1 40007f50: 40 00 1a 20 call 4000e7d0 <_POSIX_Semaphore_Wait_support> 40007f54: 9e 10 40 00 mov %g1, %o7 40007f58: 01 00 00 00 nop <== NOT EXECUTED 4001f5ac : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 4001f5ac: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 4001f5b0: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 40048124 <== NOT EXECUTED 4001f5b4: d0 30 60 2a sth %o0, [ %g1 + 0x2a ] <== NOT EXECUTED return 0; } 4001f5b8: 81 c3 e0 08 retl <== NOT EXECUTED 4001f5bc: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001fbd0 : return NULL; return &grent; } void setgrent(void) { 4001fbd0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 4001fbd4: 7f ff ff c8 call 4001faf4 <== NOT EXECUTED 4001fbd8: 01 00 00 00 nop <== NOT EXECUTED if (group_fp != NULL) 4001fbdc: 03 10 01 6f sethi %hi(0x4005bc00), %g1 <== NOT EXECUTED 4001fbe0: d0 00 62 94 ld [ %g1 + 0x294 ], %o0 ! 4005be94 <== NOT EXECUTED 4001fbe4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fbe8: 22 80 00 05 be,a 4001fbfc <== NOT EXECUTED 4001fbec: 11 10 01 12 sethi %hi(0x40044800), %o0 <== NOT EXECUTED fclose(group_fp); 4001fbf0: 40 00 3c aa call 4002ee98 <== NOT EXECUTED 4001fbf4: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 4001fbf8: 11 10 01 12 sethi %hi(0x40044800), %o0 <== NOT EXECUTED 4001fbfc: 13 10 01 1c sethi %hi(0x40047000), %o1 <== NOT EXECUTED 4001fc00: 90 12 20 28 or %o0, 0x28, %o0 <== NOT EXECUTED 4001fc04: 40 00 3e bf call 4002f700 <== NOT EXECUTED 4001fc08: 92 12 62 58 or %o1, 0x258, %o1 <== NOT EXECUTED 4001fc0c: 03 10 01 6f sethi %hi(0x4005bc00), %g1 <== NOT EXECUTED 4001fc10: d0 20 62 94 st %o0, [ %g1 + 0x294 ] ! 4005be94 <== NOT EXECUTED } 4001fc14: 81 c7 e0 08 ret <== NOT EXECUTED 4001fc18: 81 e8 00 00 restore <== NOT EXECUTED 4001fdc8 : return NULL; return &pwent; } void setpwent(void) { 4001fdc8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 4001fdcc: 7f ff ff 4a call 4001faf4 <== NOT EXECUTED 4001fdd0: 01 00 00 00 nop <== NOT EXECUTED if (passwd_fp != NULL) 4001fdd4: 03 10 01 6f sethi %hi(0x4005bc00), %g1 <== NOT EXECUTED 4001fdd8: d0 00 61 ac ld [ %g1 + 0x1ac ], %o0 ! 4005bdac <== NOT EXECUTED 4001fddc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001fde0: 22 80 00 05 be,a 4001fdf4 <== NOT EXECUTED 4001fde4: 11 10 01 11 sethi %hi(0x40044400), %o0 <== NOT EXECUTED fclose(passwd_fp); 4001fde8: 40 00 3c 2c call 4002ee98 <== NOT EXECUTED 4001fdec: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4001fdf0: 11 10 01 11 sethi %hi(0x40044400), %o0 <== NOT EXECUTED 4001fdf4: 13 10 01 1c sethi %hi(0x40047000), %o1 <== NOT EXECUTED 4001fdf8: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED 4001fdfc: 40 00 3e 41 call 4002f700 <== NOT EXECUTED 4001fe00: 92 12 62 58 or %o1, 0x258, %o1 <== NOT EXECUTED 4001fe04: 03 10 01 6f sethi %hi(0x4005bc00), %g1 <== NOT EXECUTED 4001fe08: d0 20 61 ac st %o0, [ %g1 + 0x1ac ] ! 4005bdac <== NOT EXECUTED } 4001fe0c: 81 c7 e0 08 ret <== NOT EXECUTED 4001fe10: 81 e8 00 00 restore <== NOT EXECUTED 40005600 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 40005600: 03 10 01 20 sethi %hi(0x40048000), %g1 <== NOT EXECUTED 40005604: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 40048124 <== NOT EXECUTED 40005608: d0 30 60 28 sth %o0, [ %g1 + 0x28 ] <== NOT EXECUTED return 0; } 4000560c: 81 c3 e0 08 retl <== NOT EXECUTED 40005610: 90 10 20 00 clr %o0 <== NOT EXECUTED 40007f6c : int sigwait( const sigset_t *set, int *sig ) { 40007f6c: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 40007f70: 92 10 20 00 clr %o1 40007f74: 90 10 00 18 mov %i0, %o0 40007f78: 7f ff ff 8d call 40007dac 40007f7c: 94 10 20 00 clr %o2 if ( status != -1 ) { 40007f80: 80 a2 3f ff cmp %o0, -1 40007f84: 02 80 00 07 be 40007fa0 40007f88: 80 a6 60 00 cmp %i1, 0 if ( sig ) 40007f8c: 02 80 00 03 be 40007f98 40007f90: b0 10 20 00 clr %i0 *sig = status; 40007f94: d0 26 40 00 st %o0, [ %i1 ] 40007f98: 81 c7 e0 08 ret 40007f9c: 81 e8 00 00 restore return 0; } return errno; 40007fa0: 40 00 21 66 call 40010538 <__errno> <== NOT EXECUTED 40007fa4: 01 00 00 00 nop <== NOT EXECUTED 40007fa8: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 40007fac: 81 c7 e0 08 ret <== NOT EXECUTED 40007fb0: 81 e8 00 00 restore <== NOT EXECUTED 40003a08 : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 40003a08: 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)) { 40003a0c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40003a10: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 40003a14: 02 80 00 0e be 40003a4c <== NOT EXECUTED 40003a18: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40003a1c: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED 40003a20: 94 10 20 00 clr %o2 <== NOT EXECUTED 40003a24: 40 00 06 71 call 400053e8 <== NOT EXECUTED 40003a28: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40003a2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003a30: 7f ff ff 80 call 40003830 <== NOT EXECUTED 40003a34: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40003a38: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40003a3c: 40 00 06 b2 call 40005504 <== NOT EXECUTED 40003a40: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40003a44: 81 c7 e0 08 ret <== NOT EXECUTED 40003a48: 81 e8 00 00 restore <== 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); 40003a4c: 7f ff ff 79 call 40003830 <== NOT EXECUTED 40003a50: 81 e8 00 00 restore <== NOT EXECUTED 40003a54: 01 00 00 00 nop 40006b5c : int _STAT_NAME( const char *path, struct stat *buf ) { 40006b5c: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40006b60: 80 a6 60 00 cmp %i1, 0 40006b64: 12 80 00 06 bne 40006b7c 40006b68: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); 40006b6c: 40 00 a0 73 call 4002ed38 <__errno> 40006b70: b0 10 3f ff mov -1, %i0 40006b74: 10 80 00 1c b 40006be4 40006b78: 82 10 20 0e mov 0xe, %g1 status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 40006b7c: a0 07 bf e8 add %fp, -24, %l0 40006b80: 92 10 20 00 clr %o1 40006b84: 94 10 00 10 mov %l0, %o2 40006b88: 96 10 20 01 mov 1, %o3 40006b8c: 7f ff f9 fa call 40005374 40006b90: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40006b94: 80 a2 20 00 cmp %o0, 0 40006b98: 12 80 00 14 bne 40006be8 40006b9c: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers->fstat_h ){ 40006ba0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40006ba4: 80 a0 60 00 cmp %g1, 0 40006ba8: 12 80 00 12 bne 40006bf0 40006bac: 92 10 20 00 clr %o1 rtems_filesystem_freenode( &loc ); 40006bb0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40006bb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006bb8: 02 80 00 08 be 40006bd8 <== NOT EXECUTED 40006bbc: 01 00 00 00 nop <== NOT EXECUTED 40006bc0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40006bc4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006bc8: 02 80 00 04 be 40006bd8 <== NOT EXECUTED 40006bcc: 01 00 00 00 nop <== NOT EXECUTED 40006bd0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006bd4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006bd8: 40 00 a0 58 call 4002ed38 <__errno> <== NOT EXECUTED 40006bdc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006be0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006be4: c2 22 00 00 st %g1, [ %o0 ] 40006be8: 81 c7 e0 08 ret 40006bec: 81 e8 00 00 restore /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40006bf0: 94 10 20 50 mov 0x50, %o2 40006bf4: 40 00 aa c6 call 4003170c 40006bf8: 90 10 00 19 mov %i1, %o0 status = (*loc.handlers->fstat_h)( &loc, buf ); 40006bfc: c2 07 bf ec ld [ %fp + -20 ], %g1 40006c00: 92 10 00 19 mov %i1, %o1 40006c04: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40006c08: 9f c0 40 00 call %g1 40006c0c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40006c10: c2 07 bf f0 ld [ %fp + -16 ], %g1 40006c14: 80 a0 60 00 cmp %g1, 0 40006c18: 02 bf ff f4 be 40006be8 40006c1c: b0 10 00 08 mov %o0, %i0 40006c20: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40006c24: 80 a0 60 00 cmp %g1, 0 40006c28: 02 80 00 04 be 40006c38 40006c2c: 01 00 00 00 nop 40006c30: 9f c0 40 00 call %g1 40006c34: 90 10 00 10 mov %l0, %o0 return status; } 40006c38: 81 c7 e0 08 ret 40006c3c: 81 e8 00 00 restore 40020e4c : int symlink( const char *actualpath, const char *sympath ) { 40020e4c: 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 ); 40020e50: c2 4e 40 00 ldsb [ %i1 ], %g1 40020e54: 80 a0 60 2f cmp %g1, 0x2f 40020e58: 02 80 00 07 be 40020e74 40020e5c: a0 10 00 18 mov %i0, %l0 40020e60: 80 a0 60 5c cmp %g1, 0x5c 40020e64: 02 80 00 04 be 40020e74 40020e68: 80 a0 60 00 cmp %g1, 0 40020e6c: 32 80 00 0a bne,a 40020e94 40020e70: 03 10 01 20 sethi %hi(0x40048000), %g1 40020e74: 03 10 01 20 sethi %hi(0x40048000), %g1 40020e78: d2 00 61 24 ld [ %g1 + 0x124 ], %o1 ! 40048124 40020e7c: 90 07 bf e4 add %fp, -28, %o0 40020e80: 92 02 60 14 add %o1, 0x14, %o1 40020e84: 40 00 41 9a call 400314ec 40020e88: 94 10 20 10 mov 0x10, %o2 40020e8c: 10 80 00 08 b 40020eac 40020e90: 82 10 20 01 mov 1, %g1 40020e94: d2 00 61 24 ld [ %g1 + 0x124 ], %o1 40020e98: 90 07 bf e4 add %fp, -28, %o0 40020e9c: 92 02 60 04 add %o1, 4, %o1 40020ea0: 40 00 41 93 call 400314ec 40020ea4: 94 10 20 10 mov 0x10, %o2 40020ea8: 82 10 20 00 clr %g1 result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 40020eac: 90 06 40 01 add %i1, %g1, %o0 40020eb0: c2 07 bf ec ld [ %fp + -20 ], %g1 40020eb4: b2 07 bf e4 add %fp, -28, %i1 40020eb8: c2 00 60 04 ld [ %g1 + 4 ], %g1 40020ebc: 94 07 bf f4 add %fp, -12, %o2 40020ec0: 92 10 00 19 mov %i1, %o1 40020ec4: 9f c0 40 00 call %g1 40020ec8: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40020ecc: 80 a2 20 00 cmp %o0, 0 40020ed0: 12 80 00 10 bne 40020f10 40020ed4: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.ops->symlink_h ) { 40020ed8: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 40020edc: 80 a0 a0 00 cmp %g2, 0 40020ee0: 12 80 00 0e bne 40020f18 40020ee4: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &loc ); 40020ee8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40020eec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40020ef0: 02 80 00 04 be 40020f00 <== NOT EXECUTED 40020ef4: 01 00 00 00 nop <== NOT EXECUTED 40020ef8: 9f c0 40 00 call %g1 <== NOT EXECUTED 40020efc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40020f00: 40 00 37 8e call 4002ed38 <__errno> <== NOT EXECUTED 40020f04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40020f08: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40020f0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40020f10: 81 c7 e0 08 ret 40020f14: 81 e8 00 00 restore } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40020f18: 92 10 00 10 mov %l0, %o1 40020f1c: 9f c0 80 00 call %g2 40020f20: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 40020f24: c2 07 bf ec ld [ %fp + -20 ], %g1 40020f28: 80 a0 60 00 cmp %g1, 0 40020f2c: 02 bf ff f9 be 40020f10 40020f30: b0 10 00 08 mov %o0, %i0 40020f34: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40020f38: 80 a0 60 00 cmp %g1, 0 40020f3c: 02 80 00 04 be 40020f4c 40020f40: 01 00 00 00 nop 40020f44: 9f c0 40 00 call %g1 40020f48: 90 10 00 19 mov %i1, %o0 return result; } 40020f4c: 81 c7 e0 08 ret 40020f50: 81 e8 00 00 restore 40004d1c : */ long sysconf( int name ) { 40004d1c: 9d e3 bf 98 save %sp, -104, %sp switch (name) { 40004d20: 80 a6 20 08 cmp %i0, 8 40004d24: 02 80 00 1f be 40004da0 40004d28: 11 00 00 04 sethi %hi(0x1000), %o0 40004d2c: 80 a6 20 08 cmp %i0, 8 40004d30: 14 80 00 09 bg 40004d54 40004d34: 80 a6 20 33 cmp %i0, 0x33 40004d38: 80 a6 20 02 cmp %i0, 2 40004d3c: 02 80 00 0d be 40004d70 40004d40: 80 a6 20 04 cmp %i0, 4 40004d44: 12 80 00 12 bne 40004d8c 40004d48: 03 10 00 50 sethi %hi(0x40014000), %g1 40004d4c: 10 80 00 15 b 40004da0 40004d50: d0 00 61 38 ld [ %g1 + 0x138 ], %o0 ! 40014138 40004d54: 02 80 00 13 be 40004da0 40004d58: 90 10 24 00 mov 0x400, %o0 40004d5c: 80 a6 22 03 cmp %i0, 0x203 40004d60: 12 80 00 0b bne 40004d8c 40004d64: 90 10 20 00 clr %o0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 40004d68: 81 c7 e0 08 ret <== NOT EXECUTED 40004d6c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ) { switch (name) { case _SC_CLK_TCK: return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick); 40004d70: 03 10 00 54 sethi %hi(0x40015000), %g1 40004d74: d2 00 60 90 ld [ %g1 + 0x90 ], %o1 ! 40015090 <_TOD_Microseconds_per_tick> 40004d78: 11 00 03 d0 sethi %hi(0xf4000), %o0 40004d7c: 40 00 2f e3 call 40010d08 <.udiv> 40004d80: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); } 40004d84: 81 c7 e0 08 ret 40004d88: 91 e8 00 08 restore %g0, %o0, %o0 default: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 40004d8c: 40 00 21 19 call 4000d1f0 <__errno> 40004d90: 01 00 00 00 nop 40004d94: 82 10 20 16 mov 0x16, %g1 ! 16 40004d98: c2 22 00 00 st %g1, [ %o0 ] 40004d9c: 90 10 3f ff mov -1, %o0 } 40004da0: b0 10 00 08 mov %o0, %i0 40004da4: 81 c7 e0 08 ret 40004da8: 81 e8 00 00 restore 400111e0 : int tcgetattr( int fd, struct termios *tp ) { 400111e0: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 400111e4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 400111e8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 400111ec: 40 00 0e ff call 40014de8 <== NOT EXECUTED 400111f0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 400111f4: 01 00 00 00 nop 400111f8 : int tcsetattr( int fd, int opt, struct termios *tp ) { 400111f8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 400111fc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40011200: 02 80 00 10 be 40011240 <== NOT EXECUTED 40011204: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 40011208: 02 80 00 08 be 40011228 <== NOT EXECUTED 4001120c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40011210: 40 00 12 0b call 40015a3c <__errno> <== NOT EXECUTED 40011214: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40011218: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001121c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40011220: 81 c7 e0 08 ret <== NOT EXECUTED 40011224: 81 e8 00 00 restore <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 40011228: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 4001122c: 40 00 0e ef call 40014de8 <== NOT EXECUTED 40011230: 94 10 20 00 clr %o2 <== NOT EXECUTED 40011234: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40011238: 26 80 00 04 bl,a 40011248 <== NOT EXECUTED 4001123c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40011240: 40 00 0e ea call 40014de8 <== NOT EXECUTED 40011244: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED } } 40011248: 81 c7 e0 08 ret <== NOT EXECUTED 4001124c: 81 e8 00 00 restore <== NOT EXECUTED 400055a4 : #include long telldir( DIR *dirp ) { 400055a4: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; if ( !dirp ) 400055a8: 80 a6 20 00 cmp %i0, 0 400055ac: 32 80 00 08 bne,a 400055cc 400055b0: f0 06 00 00 ld [ %i0 ], %i0 rtems_set_errno_and_return_minus_one( EBADF ); 400055b4: 40 00 2a 97 call 40010010 <__errno> <== NOT EXECUTED 400055b8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400055bc: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 400055c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400055c4: 81 c7 e0 08 ret 400055c8: 81 e8 00 00 restore /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 400055cc: 03 10 00 5c sethi %hi(0x40017000), %g1 400055d0: c2 00 60 b8 ld [ %g1 + 0xb8 ], %g1 ! 400170b8 400055d4: 80 a6 00 01 cmp %i0, %g1 400055d8: 1a 80 00 0d bcc 4000560c 400055dc: 11 10 00 58 sethi %hi(0x40016000), %o0 400055e0: 03 10 00 5f sethi %hi(0x40017c00), %g1 400055e4: c6 00 61 3c ld [ %g1 + 0x13c ], %g3 ! 40017d3c 400055e8: 85 2e 20 02 sll %i0, 2, %g2 400055ec: 83 2e 20 04 sll %i0, 4, %g1 400055f0: 82 20 40 02 sub %g1, %g2, %g1 400055f4: 82 00 40 18 add %g1, %i0, %g1 400055f8: 83 28 60 02 sll %g1, 2, %g1 if (iop == NULL) 400055fc: 86 80 c0 01 addcc %g3, %g1, %g3 40005600: 32 bf ff f1 bne,a 400055c4 40005604: f0 00 e0 08 ld [ %g3 + 8 ], %i0 assert(0); 40005608: 11 10 00 58 sethi %hi(0x40016000), %o0 <== NOT EXECUTED 4000560c: 15 10 00 58 sethi %hi(0x40016000), %o2 <== NOT EXECUTED 40005610: 17 10 00 57 sethi %hi(0x40015c00), %o3 <== NOT EXECUTED 40005614: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED 40005618: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 4000561c: 96 12 e2 f0 or %o3, 0x2f0, %o3 <== NOT EXECUTED 40005620: 7f ff f7 3c call 40003310 <__assert_func> <== NOT EXECUTED 40005624: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED 40005628: 01 00 00 00 nop 40006844 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 40006844: 9d e3 bf 80 save %sp, -128, %sp Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) 40006848: 80 a6 a0 00 cmp %i2, 0 4000684c: 02 80 00 22 be 400068d4 40006850: 01 00 00 00 nop 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 ) || 40006854: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 40006858: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 4000685c: 82 10 61 ff or %g1, 0x1ff, %g1 ! 3b9ac9ff 40006860: 80 a0 80 01 cmp %g2, %g1 40006864: 18 80 00 1c bgu 400068d4 40006868: 01 00 00 00 nop 4000686c: c4 06 a0 04 ld [ %i2 + 4 ], %g2 40006870: 80 a0 80 01 cmp %g2, %g1 40006874: 18 80 00 18 bgu 400068d4 40006878: 80 a0 a0 00 cmp %g2, 0 4000687c: 06 80 00 16 bl 400068d4 40006880: 01 00 00 00 nop ( 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 ) { 40006884: 80 a6 60 04 cmp %i1, 4 40006888: 02 80 00 04 be 40006898 4000688c: 80 a6 60 00 cmp %i1, 0 40006890: 12 80 00 11 bne 400068d4 40006894: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; 40006898: 90 07 bf e4 add %fp, -28, %o0 4000689c: 92 10 00 1a mov %i2, %o1 400068a0: 40 00 23 c0 call 4000f7a0 400068a4: 94 10 20 10 mov 0x10, %o2 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { 400068a8: 80 a6 60 04 cmp %i1, 4 400068ac: 12 80 00 14 bne 400068fc 400068b0: 92 10 00 18 mov %i0, %o1 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) ) 400068b4: b2 07 bf ec add %fp, -20, %i1 400068b8: 21 10 00 75 sethi %hi(0x4001d400), %l0 400068bc: 92 10 00 19 mov %i1, %o1 400068c0: 40 00 0e 85 call 4000a2d4 <_Timespec_Greater_than> 400068c4: 90 14 23 b0 or %l0, 0x3b0, %o0 400068c8: 80 8a 20 ff btst 0xff, %o0 400068cc: 02 80 00 08 be 400068ec 400068d0: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); 400068d4: 40 00 21 9b call 4000ef40 <__errno> 400068d8: b0 10 3f ff mov -1, %i0 400068dc: 82 10 20 16 mov 0x16, %g1 400068e0: c2 22 00 00 st %g1, [ %o0 ] 400068e4: 81 c7 e0 08 ret 400068e8: 81 e8 00 00 restore _Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value ); 400068ec: 90 14 23 b0 or %l0, 0x3b0, %o0 400068f0: 40 00 0e 8a call 4000a318 <_Timespec_Subtract> 400068f4: 94 10 00 19 mov %i1, %o2 400068f8: 92 10 00 18 mov %i0, %o1 400068fc: 11 10 00 76 sethi %hi(0x4001d800), %o0 40006900: 94 07 bf f4 add %fp, -12, %o2 40006904: 40 00 08 9e call 40008b7c <_Objects_Get> 40006908: 90 12 22 70 or %o0, 0x270, %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 ) { 4000690c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006910: 80 a0 60 00 cmp %g1, 0 40006914: 12 80 00 39 bne 400069f8 40006918: 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 ) { 4000691c: c2 07 bf ec ld [ %fp + -20 ], %g1 40006920: 80 a0 60 00 cmp %g1, 0 40006924: 12 80 00 14 bne 40006974 40006928: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000692c: 80 a0 60 00 cmp %g1, 0 40006930: 12 80 00 11 bne 40006974 40006934: 01 00 00 00 nop /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 40006938: 40 00 0f bb call 4000a824 <_Watchdog_Remove> 4000693c: 90 02 20 10 add %o0, 0x10, %o0 /* The old data of the timer are returned */ if ( ovalue ) 40006940: 80 a6 e0 00 cmp %i3, 0 40006944: 02 80 00 05 be 40006958 40006948: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 4000694c: 92 06 60 54 add %i1, 0x54, %o1 <== NOT EXECUTED 40006950: 40 00 23 94 call 4000f7a0 <== NOT EXECUTED 40006954: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = normalize; 40006958: 92 07 bf e4 add %fp, -28, %o1 4000695c: 94 10 20 10 mov 0x10, %o2 40006960: 40 00 23 90 call 4000f7a0 40006964: 90 06 60 54 add %i1, 0x54, %o0 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 40006968: 82 10 20 04 mov 4, %g1 4000696c: 10 80 00 1f b 400069e8 40006970: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); 40006974: 40 00 0e 7d call 4000a368 <_Timespec_To_ticks> 40006978: 90 10 00 1a mov %i2, %o0 4000697c: d0 26 60 64 st %o0, [ %i1 + 0x64 ] initial_period = _Timespec_To_ticks( &normalize.it_value ); 40006980: 40 00 0e 7a call 4000a368 <_Timespec_To_ticks> 40006984: 90 07 bf ec add %fp, -20, %o0 activated = _POSIX_Timer_Insert_helper( 40006988: 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 ); 4000698c: 92 10 00 08 mov %o0, %o1 activated = _POSIX_Timer_Insert_helper( 40006990: 17 10 00 1a sethi %hi(0x40006800), %o3 40006994: 90 06 60 10 add %i1, 0x10, %o0 40006998: 96 12 e2 10 or %o3, 0x210, %o3 4000699c: 40 00 1a 10 call 4000d1dc <_POSIX_Timer_Insert_helper> 400069a0: 98 10 00 19 mov %i1, %o4 initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 400069a4: 80 8a 20 ff btst 0xff, %o0 400069a8: 02 80 00 10 be 400069e8 400069ac: 01 00 00 00 nop /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) 400069b0: 80 a6 e0 00 cmp %i3, 0 400069b4: 02 80 00 05 be 400069c8 400069b8: 90 10 00 1b mov %i3, %o0 *ovalue = ptimer->timer_data; 400069bc: 92 06 60 54 add %i1, 0x54, %o1 400069c0: 40 00 23 78 call 4000f7a0 400069c4: 94 10 20 10 mov 0x10, %o2 ptimer->timer_data = normalize; 400069c8: 92 07 bf e4 add %fp, -28, %o1 400069cc: 94 10 20 10 mov 0x10, %o2 400069d0: 40 00 23 74 call 4000f7a0 400069d4: 90 06 60 54 add %i1, 0x54, %o0 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 400069d8: 82 10 20 03 mov 3, %g1 _TOD_Get( &ptimer->time ); 400069dc: 90 06 60 6c add %i1, 0x6c, %o0 400069e0: 40 00 06 0a call 40008208 <_TOD_Get> 400069e4: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] _Thread_Enable_dispatch(); 400069e8: 40 00 0a 8b call 40009414 <_Thread_Enable_dispatch> 400069ec: b0 10 20 00 clr %i0 400069f0: 81 c7 e0 08 ret 400069f4: 81 e8 00 00 restore #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); 400069f8: 40 00 21 52 call 4000ef40 <__errno> <== NOT EXECUTED 400069fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006a00: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40006a04: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40006a08: 81 c7 e0 08 ret <== NOT EXECUTED 40006a0c: 81 e8 00 00 restore <== NOT EXECUTED 400210e8 : */ char *ttyname( int fd ) { 400210e8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 400210ec: 21 10 01 20 sethi %hi(0x40048000), %l0 <== NOT EXECUTED 400210f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400210f4: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 400210f8: 92 14 21 28 or %l0, 0x128, %o1 <== NOT EXECUTED 400210fc: 7f ff ff b8 call 40020fdc <== NOT EXECUTED 40021100: b0 14 21 28 or %l0, 0x128, %i0 <== NOT EXECUTED 40021104: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021108: 32 80 00 02 bne,a 40021110 <== NOT EXECUTED 4002110c: b0 10 20 00 clr %i0 <== NOT EXECUTED return ttyname_buf; return NULL; } 40021110: 81 c7 e0 08 ret <== NOT EXECUTED 40021114: 81 e8 00 00 restore <== NOT EXECUTED 40020fdc : int ttyname_r( int fd, char *name, size_t namesize ) { 40020fdc: 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) 40020fe0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020fe4: 7f ff ff e2 call 40020f6c <== NOT EXECUTED 40020fe8: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 40020fec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40020ff0: 06 80 00 16 bl 40021048 <== NOT EXECUTED 40020ff4: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 40020ff8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40020ffc: 7f ff f7 be call 4001eef4 <== NOT EXECUTED 40021000: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 40021004: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021008: 12 80 00 10 bne 40021048 <== NOT EXECUTED 4002100c: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 40021010: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 40021014: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40021018: 05 00 00 08 sethi %hi(0x2000), %g2 <== NOT EXECUTED 4002101c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40021020: 12 80 00 0a bne 40021048 <== NOT EXECUTED 40021024: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 40021028: 11 10 01 12 sethi %hi(0x40044800), %o0 <== 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); 4002102c: 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) 40021030: 90 12 21 18 or %o0, 0x118, %o0 <== NOT EXECUTED 40021034: 7f ff fd b1 call 400206f8 <== NOT EXECUTED 40021038: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 4002103c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40021040: 12 80 00 20 bne 400210c0 <== NOT EXECUTED 40021044: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); 40021048: 40 00 37 3c call 4002ed38 <__errno> <== NOT EXECUTED 4002104c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40021050: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40021054: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40021058: 81 c7 e0 08 ret <== NOT EXECUTED 4002105c: 81 e8 00 00 restore <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) 40021060: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 40021064: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40021068: 12 80 00 16 bne 400210c0 <== NOT EXECUTED 4002106c: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 40021070: 40 00 4b e6 call 40034008 <== NOT EXECUTED 40021074: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 40021078: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4002107c: 7f ff 96 b8 call 40006b5c <== NOT EXECUTED 40021080: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40021084: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021088: 12 80 00 0e bne 400210c0 <== NOT EXECUTED 4002108c: c4 07 bf 30 ld [ %fp + -208 ], %g2 <== NOT EXECUTED 40021090: c2 07 bf 80 ld [ %fp + -128 ], %g1 <== NOT EXECUTED 40021094: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40021098: 12 80 00 0a bne 400210c0 <== NOT EXECUTED 4002109c: c4 07 bf 34 ld [ %fp + -204 ], %g2 <== NOT EXECUTED 400210a0: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 400210a4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400210a8: 12 80 00 06 bne 400210c0 <== NOT EXECUTED 400210ac: c4 07 bf 38 ld [ %fp + -200 ], %g2 <== NOT EXECUTED 400210b0: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED 400210b4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400210b8: 02 80 00 08 be 400210d8 <== NOT EXECUTED 400210bc: 90 10 00 18 mov %i0, %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); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 400210c0: 7f ff fe 46 call 400209d8 <== NOT EXECUTED 400210c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400210c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400210cc: 32 bf ff e5 bne,a 40021060 <== NOT EXECUTED 400210d0: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 400210d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400210d8: 40 00 2c c1 call 4002c3dc <== NOT EXECUTED 400210dc: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 400210e0: 81 c7 e0 08 ret <== NOT EXECUTED 400210e4: 81 e8 00 00 restore <== NOT EXECUTED 40021130 : #include int unlink( const char *path ) { 40021130: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, false ); 40021134: 92 10 20 00 clr %o1 40021138: 90 10 00 18 mov %i0, %o0 4002113c: a0 07 bf e8 add %fp, -24, %l0 40021140: 96 10 20 00 clr %o3 40021144: 7f ff 90 8c call 40005374 40021148: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 4002114c: 80 a2 20 00 cmp %o0, 0 40021150: 32 80 00 17 bne,a 400211ac 40021154: b0 10 3f ff mov -1, %i0 return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 40021158: 90 10 20 02 mov 2, %o0 4002115c: 7f ff 90 59 call 400052c0 40021160: 92 10 00 10 mov %l0, %o1 if (result != 0 && errno != ENOTSUP) { 40021164: 80 a2 20 00 cmp %o0, 0 40021168: 02 80 00 13 be 400211b4 4002116c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40021170: 40 00 36 f2 call 4002ed38 <__errno> <== NOT EXECUTED 40021174: 01 00 00 00 nop <== NOT EXECUTED 40021178: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4002117c: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 40021180: 02 80 00 0d be 400211b4 <== NOT EXECUTED 40021184: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40021188: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002118c: 02 80 00 08 be 400211ac <== NOT EXECUTED 40021190: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021194: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021198: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4002119c: 02 80 00 04 be 400211ac <== NOT EXECUTED 400211a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400211a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400211a8: 01 00 00 00 nop <== NOT EXECUTED 400211ac: 81 c7 e0 08 ret 400211b0: 81 e8 00 00 restore return -1; } if ( !loc.ops->node_type_h ) { 400211b4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 400211b8: 80 a0 a0 00 cmp %g2, 0 400211bc: 12 80 00 07 bne 400211d8 400211c0: a0 07 bf e8 add %fp, -24, %l0 rtems_filesystem_freenode( &loc ); 400211c4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400211c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400211cc: 12 80 00 1d bne 40021240 <== NOT EXECUTED 400211d0: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED 400211d4: 30 80 00 1d b,a 40021248 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 400211d8: 9f c0 80 00 call %g2 400211dc: 90 10 00 10 mov %l0, %o0 400211e0: 80 a2 20 01 cmp %o0, 1 400211e4: 12 80 00 0f bne 40021220 400211e8: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); 400211ec: 80 a0 60 00 cmp %g1, 0 400211f0: 02 80 00 08 be 40021210 400211f4: 01 00 00 00 nop 400211f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400211fc: 80 a0 60 00 cmp %g1, 0 40021200: 02 80 00 04 be 40021210 40021204: 01 00 00 00 nop 40021208: 9f c0 40 00 call %g1 4002120c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EISDIR ); 40021210: 40 00 36 ca call 4002ed38 <__errno> 40021214: b0 10 3f ff mov -1, %i0 40021218: 10 80 00 0f b 40021254 4002121c: 82 10 20 15 mov 0x15, %g1 } if ( !loc.ops->unlink_h ) { 40021220: c4 00 60 0c ld [ %g1 + 0xc ], %g2 40021224: 80 a0 a0 00 cmp %g2, 0 40021228: 12 80 00 0e bne 40021260 4002122c: 01 00 00 00 nop rtems_filesystem_freenode( &loc ); 40021230: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021234: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021238: 02 80 00 04 be 40021248 <== NOT EXECUTED 4002123c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40021240: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021244: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40021248: 40 00 36 bc call 4002ed38 <__errno> <== NOT EXECUTED 4002124c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40021250: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40021254: c2 22 00 00 st %g1, [ %o0 ] 40021258: 81 c7 e0 08 ret 4002125c: 81 e8 00 00 restore } result = (*loc.ops->unlink_h)( &loc ); 40021260: 9f c0 80 00 call %g2 40021264: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40021268: c2 07 bf f0 ld [ %fp + -16 ], %g1 4002126c: 80 a0 60 00 cmp %g1, 0 40021270: 02 bf ff cf be 400211ac 40021274: b0 10 00 08 mov %o0, %i0 40021278: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4002127c: 80 a0 60 00 cmp %g1, 0 40021280: 02 80 00 06 be 40021298 40021284: 01 00 00 00 nop 40021288: 9f c0 40 00 call %g1 4002128c: 90 10 00 10 mov %l0, %o0 40021290: 81 c7 e0 08 ret 40021294: 81 e8 00 00 restore return result; } 40021298: 81 c7 e0 08 ret <== NOT EXECUTED 4002129c: 81 e8 00 00 restore <== NOT EXECUTED 4002130c : */ int unmount( const char *path ) { 4002130c: 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 ) ) 40021310: 92 10 20 00 clr %o1 40021314: 90 10 00 18 mov %i0, %o0 40021318: a0 07 bf e8 add %fp, -24, %l0 4002131c: 96 10 20 01 mov 1, %o3 40021320: 7f ff 90 15 call 40005374 40021324: 94 10 00 10 mov %l0, %o2 40021328: 80 a2 20 00 cmp %o0, 0 4002132c: 12 80 00 6a bne 400214d4 40021330: c2 07 bf e8 ld [ %fp + -24 ], %g1 return -1; mt_entry = loc.mt_entry; 40021334: 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) ){ 40021338: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 4002133c: 80 a0 80 01 cmp %g2, %g1 40021340: 02 80 00 0f be 4002137c 40021344: c6 07 bf f0 ld [ %fp + -16 ], %g3 rtems_filesystem_freenode( &loc ); 40021348: 80 a0 e0 00 cmp %g3, 0 4002134c: 02 80 00 08 be 4002136c 40021350: 01 00 00 00 nop 40021354: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40021358: 80 a0 60 00 cmp %g1, 0 4002135c: 02 80 00 04 be 4002136c 40021360: 01 00 00 00 nop 40021364: 9f c0 40 00 call %g1 40021368: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 4002136c: 40 00 36 73 call 4002ed38 <__errno> 40021370: 01 00 00 00 nop 40021374: 10 80 00 21 b 400213f8 40021378: 82 10 20 0d mov 0xd, %g1 ! d /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 4002137c: 80 a0 e0 00 cmp %g3, 0 40021380: 22 80 00 09 be,a 400213a4 40021384: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40021388: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4002138c: 80 a0 60 00 cmp %g1, 0 40021390: 22 80 00 05 be,a 400213a4 40021394: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40021398: 9f c0 40 00 call %g1 4002139c: 90 10 00 10 mov %l0, %o0 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 400213a0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400213a4: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 400213a8: 80 a0 60 00 cmp %g1, 0 400213ac: 02 80 00 07 be 400213c8 400213b0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 400213b4: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 400213b8: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 400213bc: 80 a0 60 00 cmp %g1, 0 400213c0: 32 80 00 06 bne,a 400213d8 400213c4: 03 10 01 20 sethi %hi(0x40048000), %g1 rtems_set_errno_and_return_minus_one( ENOTSUP ); 400213c8: 40 00 36 5c call 4002ed38 <__errno> <== NOT EXECUTED 400213cc: 01 00 00 00 nop <== NOT EXECUTED 400213d0: 10 80 00 0a b 400213f8 <== NOT EXECUTED 400213d4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED * 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 ) 400213d8: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 400213dc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 400213e0: 80 a0 40 18 cmp %g1, %i0 400213e4: 12 80 00 08 bne 40021404 400213e8: 03 10 01 71 sethi %hi(0x4005c400), %g1 rtems_set_errno_and_return_minus_one( EBUSY ); 400213ec: 40 00 36 53 call 4002ed38 <__errno> 400213f0: 01 00 00 00 nop 400213f4: 82 10 20 10 mov 0x10, %g1 ! 10 400213f8: c2 22 00 00 st %g1, [ %o0 ] 400213fc: 81 c7 e0 08 ret 40021400: 91 e8 3f ff restore %g0, -1, %o0 /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 40021404: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 40021408: 82 10 63 30 or %g1, 0x330, %g1 !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); 4002140c: 10 80 00 07 b 40021428 40021410: 88 00 60 04 add %g1, 4, %g4 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 ) { 40021414: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40021418: 80 a0 80 01 cmp %g2, %g1 4002141c: 02 bf ff f4 be 400213ec 40021420: 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 ) { 40021424: c6 00 c0 00 ld [ %g3 ], %g3 * 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 ); 40021428: 80 a0 c0 04 cmp %g3, %g4 4002142c: 32 bf ff fa bne,a 40021414 40021430: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 40021434: 30 80 00 2a b,a 400214dc * 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 ) 40021438: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 4002143c: 9f c0 40 00 call %g1 40021440: 90 10 00 18 mov %i0, %o0 40021444: 80 a2 20 00 cmp %o0, 0 40021448: 12 80 00 23 bne 400214d4 4002144c: 01 00 00 00 nop * 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){ 40021450: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40021454: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 40021458: 9f c0 40 00 call %g1 4002145c: 90 10 00 18 mov %i0, %o0 40021460: 80 a2 20 00 cmp %o0, 0 40021464: 02 80 00 0b be 40021490 40021468: 01 00 00 00 nop if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 4002146c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED 40021470: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 <== NOT EXECUTED 40021474: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021478: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002147c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40021480: 02 80 00 15 be 400214d4 <== NOT EXECUTED 40021484: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 40021488: 7f ff a1 a5 call 40009b1c <== NOT EXECUTED 4002148c: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 40021490: 40 00 05 68 call 40022a30 <_Chain_Extract> 40021494: 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 ); 40021498: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4002149c: 80 a0 60 00 cmp %g1, 0 400214a0: 02 80 00 09 be 400214c4 400214a4: 90 10 00 18 mov %i0, %o0 400214a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400214ac: 80 a0 60 00 cmp %g1, 0 400214b0: 02 80 00 05 be 400214c4 400214b4: 01 00 00 00 nop 400214b8: 9f c0 40 00 call %g1 400214bc: 90 06 20 08 add %i0, 8, %o0 free( mt_entry ); 400214c0: 90 10 00 18 mov %i0, %o0 400214c4: 7f ff 8f fe call 400054bc 400214c8: b0 10 20 00 clr %i0 400214cc: 81 c7 e0 08 ret 400214d0: 81 e8 00 00 restore return 0; } 400214d4: 81 c7 e0 08 ret 400214d8: 91 e8 3f ff restore %g0, -1, %o0 * 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 ) 400214dc: 7f ff 90 b3 call 400057a8 400214e0: 90 10 00 18 mov %i0, %o0 400214e4: 80 a2 20 01 cmp %o0, 1 400214e8: 32 bf ff d4 bne,a 40021438 400214ec: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 400214f0: 30 bf ff bf b,a 400213ec 400214f4 : int utime( const char *path, const struct utimbuf *times ) { 400214f4: 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 ) ) 400214f8: 92 10 20 00 clr %o1 400214fc: 90 10 00 18 mov %i0, %o0 40021500: a0 07 bf e8 add %fp, -24, %l0 40021504: 96 10 20 01 mov 1, %o3 40021508: 94 10 00 10 mov %l0, %o2 4002150c: 7f ff 8f 9a call 40005374 40021510: b0 10 3f ff mov -1, %i0 40021514: 80 a2 20 00 cmp %o0, 0 40021518: 12 80 00 10 bne 40021558 4002151c: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !temp_loc.ops->utime_h ){ 40021520: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 40021524: 80 a0 a0 00 cmp %g2, 0 40021528: 32 80 00 0e bne,a 40021560 4002152c: d4 06 60 04 ld [ %i1 + 4 ], %o2 rtems_filesystem_freenode( &temp_loc ); 40021530: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40021534: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40021538: 02 80 00 04 be 40021548 <== NOT EXECUTED 4002153c: 01 00 00 00 nop <== NOT EXECUTED 40021540: 9f c0 40 00 call %g1 <== NOT EXECUTED 40021544: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40021548: 40 00 35 fc call 4002ed38 <__errno> <== NOT EXECUTED 4002154c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40021550: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40021554: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40021558: 81 c7 e0 08 ret 4002155c: 81 e8 00 00 restore } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40021560: d2 06 40 00 ld [ %i1 ], %o1 40021564: 9f c0 80 00 call %g2 40021568: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 4002156c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40021570: 80 a0 60 00 cmp %g1, 0 40021574: 02 bf ff f9 be 40021558 40021578: b0 10 00 08 mov %o0, %i0 4002157c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40021580: 80 a0 60 00 cmp %g1, 0 40021584: 02 80 00 04 be 40021594 40021588: 01 00 00 00 nop 4002158c: 9f c0 40 00 call %g1 40021590: 90 10 00 10 mov %l0, %o0 return result; } 40021594: 81 c7 e0 08 ret 40021598: 81 e8 00 00 restore 40002938 : */ void vprintk( const char *fmt, va_list ap ) { 40002938: 9d e3 bf 80 save %sp, -128, %sp if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 4000293c: 03 10 00 5f sethi %hi(0x40017c00), %g1 if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 40002940: b8 07 bf e0 add %fp, -32, %i4 if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 40002944: ac 10 63 ac or %g1, 0x3ac, %l6 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40002948: ba 07 bf f8 add %fp, -8, %i5 for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4000294c: 03 10 00 5b sethi %hi(0x40016c00), %g1 40002950: 10 80 00 c8 b 40002c70 40002954: b6 10 63 e8 or %g1, 0x3e8, %i3 ! 40016fe8 <__func__.4776+0x290> base = 0; sign = 0; width = 0; minus = 0; lead = ' '; if (*fmt == '%') { 40002958: 32 80 00 c4 bne,a 40002c68 4000295c: c2 05 80 00 ld [ %l6 ], %g1 fmt++; 40002960: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40002964: c2 4e 00 00 ldsb [ %i0 ], %g1 40002968: 80 a0 60 30 cmp %g1, 0x30 4000296c: 12 80 00 05 bne 40002980 40002970: ae 10 20 20 mov 0x20, %l7 lead = '0'; fmt++; 40002974: b0 06 20 01 inc %i0 40002978: ae 10 20 30 mov 0x30, %l7 } if (*fmt == '-' ) { 4000297c: c2 4e 00 00 ldsb [ %i0 ], %g1 40002980: 80 a0 60 2d cmp %g1, 0x2d 40002984: 12 80 00 04 bne 40002994 40002988: a6 10 20 00 clr %l3 minus = 1; fmt++; 4000298c: b0 06 20 01 inc %i0 40002990: a6 10 20 01 mov 1, %l3 40002994: 10 80 00 08 b 400029b4 40002998: a8 10 20 00 clr %l4 } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); 4000299c: 85 38 60 18 sra %g1, 0x18, %g2 fmt++; 400029a0: b0 06 20 01 inc %i0 if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 400029a4: 83 2d 20 01 sll %l4, 1, %g1 width += (*fmt - '0'); 400029a8: 84 00 bf d0 add %g2, -48, %g2 if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; 400029ac: 82 00 40 03 add %g1, %g3, %g1 width += (*fmt - '0'); 400029b0: a8 00 80 01 add %g2, %g1, %l4 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 400029b4: d0 0e 00 00 ldub [ %i0 ], %o0 width *= 10; 400029b8: 87 2d 20 03 sll %l4, 3, %g3 } if (*fmt == '-' ) { minus = 1; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 400029bc: 82 02 3f d0 add %o0, -48, %g1 400029c0: 82 08 60 ff and %g1, 0xff, %g1 400029c4: 80 a0 60 09 cmp %g1, 9 400029c8: 08 bf ff f5 bleu 4000299c 400029cc: 83 2a 20 18 sll %o0, 0x18, %g1 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') { 400029d0: 83 38 60 18 sra %g1, 0x18, %g1 400029d4: 80 a0 60 6c cmp %g1, 0x6c 400029d8: 12 80 00 05 bne 400029ec 400029dc: 83 2a 20 18 sll %o0, 0x18, %g1 lflag = 1; c = *++fmt; 400029e0: b0 06 20 01 inc %i0 400029e4: d0 0e 00 00 ldub [ %i0 ], %o0 } switch (c) { 400029e8: 83 2a 20 18 sll %o0, 0x18, %g1 400029ec: 83 38 60 18 sra %g1, 0x18, %g1 400029f0: 80 a0 60 64 cmp %g1, 0x64 400029f4: 02 80 00 2c be 40002aa4 400029f8: aa 10 20 0a mov 0xa, %l5 400029fc: 14 80 00 16 bg 40002a54 40002a00: 80 a0 60 70 cmp %g1, 0x70 40002a04: 80 a0 60 4f cmp %g1, 0x4f 40002a08: 02 80 00 60 be 40002b88 40002a0c: aa 10 20 08 mov 8, %l5 40002a10: 14 80 00 09 bg 40002a34 40002a14: 80 a0 60 58 cmp %g1, 0x58 40002a18: 80 a0 60 44 cmp %g1, 0x44 40002a1c: 02 80 00 21 be 40002aa0 40002a20: 80 a0 60 49 cmp %g1, 0x49 40002a24: 32 80 00 55 bne,a 40002b78 40002a28: 91 2a 20 18 sll %o0, 0x18, %o0 40002a2c: 10 80 00 1e b 40002aa4 <== NOT EXECUTED 40002a30: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 40002a34: 02 80 00 54 be 40002b84 <== NOT EXECUTED 40002a38: 80 a0 60 63 cmp %g1, 0x63 <== NOT EXECUTED 40002a3c: 02 80 00 4b be 40002b68 <== NOT EXECUTED 40002a40: 80 a0 60 55 cmp %g1, 0x55 <== NOT EXECUTED 40002a44: 32 80 00 4d bne,a 40002b78 <== NOT EXECUTED 40002a48: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 40002a4c: 10 80 00 4f b 40002b88 <== NOT EXECUTED 40002a50: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 40002a54: 02 80 00 4c be 40002b84 40002a58: 80 a0 60 70 cmp %g1, 0x70 40002a5c: 14 80 00 09 bg 40002a80 40002a60: 80 a0 60 75 cmp %g1, 0x75 40002a64: 80 a0 60 69 cmp %g1, 0x69 <== NOT EXECUTED 40002a68: 02 80 00 0e be 40002aa0 <== NOT EXECUTED 40002a6c: 80 a0 60 6f cmp %g1, 0x6f <== NOT EXECUTED 40002a70: 32 80 00 42 bne,a 40002b78 <== NOT EXECUTED 40002a74: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40002a78: 10 80 00 44 b 40002b88 <== NOT EXECUTED 40002a7c: aa 10 20 08 mov 8, %l5 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40002a80: 02 80 00 0b be 40002aac 40002a84: 80 a0 60 78 cmp %g1, 0x78 40002a88: 02 80 00 3f be 40002b84 40002a8c: 80 a0 60 73 cmp %g1, 0x73 40002a90: 32 80 00 3a bne,a 40002b78 40002a94: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 40002a98: 10 80 00 07 b 40002ab4 40002a9c: e4 06 40 00 ld [ %i1 ], %l2 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) { 40002aa0: aa 10 20 0a mov 0xa, %l5 <== NOT EXECUTED 40002aa4: 10 80 00 3a b 40002b8c 40002aa8: 82 10 20 01 mov 1, %g1 40002aac: 10 80 00 37 b 40002b88 40002ab0: aa 10 20 0a mov 0xa, %l5 case 'p': base = 16; sign = 0; break; case 's': { int i, len; char *s; str = va_arg(ap, char *); 40002ab4: a2 10 20 00 clr %l1 40002ab8: b2 06 60 04 add %i1, 4, %i1 /* calculate length of string */ for ( len=0, s=str ; *s ; len++, s++ ) 40002abc: c2 4c 80 11 ldsb [ %l2 + %l1 ], %g1 40002ac0: 80 a0 60 00 cmp %g1, 0 40002ac4: 32 bf ff fe bne,a 40002abc 40002ac8: a2 04 60 01 inc %l1 ; /* leading spaces */ if ( !minus ) 40002acc: 80 a4 e0 00 cmp %l3, 0 40002ad0: 02 80 00 07 be 40002aec 40002ad4: a0 10 00 11 mov %l1, %l0 for ( i=len ; i 40002adc: 80 a5 20 00 cmp %l4, 0 for ( len=0, s=str ; *s ; len++, s++ ) ; /* leading spaces */ if ( !minus ) for ( i=len ; i 40002af4: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED BSP_output_char(' '); /* no width option */ if (width == 0) { 40002af8: 80 a5 20 00 cmp %l4, 0 40002afc: 22 80 00 02 be,a 40002b04 40002b00: a8 10 00 11 mov %l1, %l4 width = len; } /* output the string */ for ( i=0 ; i 40002b0c: 80 a4 e0 00 cmp %l3, 0 40002b10: 10 80 00 06 b 40002b28 40002b14: d0 4c 80 00 ldsb [ %l2 ], %o0 BSP_output_char(*str); 40002b18: c2 05 80 00 ld [ %l6 ], %g1 40002b1c: 9f c0 40 00 call %g1 40002b20: 01 00 00 00 nop if (width == 0) { width = len; } /* output the string */ for ( i=0 ; i 40002b30: a4 04 a0 01 inc %l2 BSP_output_char(*str); /* trailing spaces */ if ( minus ) 40002b34: 80 a4 e0 00 cmp %l3, 0 40002b38: 12 80 00 07 bne 40002b54 40002b3c: a0 10 00 11 mov %l1, %l0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002b40: 10 80 00 4c b 40002c70 40002b44: b0 06 20 01 inc %i0 for ( i=0 ; i 40002b5c: c2 05 80 00 ld [ %l6 ], %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002b60: 10 80 00 44 b 40002c70 40002b64: b0 06 20 01 inc %i0 for ( i=len ; i <== NOT EXECUTED 40002b74: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED break; default: BSP_output_char(c); 40002b78: c2 05 80 00 ld [ %l6 ], %g1 40002b7c: 10 80 00 3b b 40002c68 40002b80: 91 3a 20 18 sra %o0, 0x18, %o0 40002b84: aa 10 20 10 mov 0x10, %l5 40002b88: 82 10 20 00 clr %g1 40002b8c: 84 06 60 04 add %i1, 4, %g2 break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 40002b90: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40002b94: 80 a0 60 01 cmp %g1, 1 40002b98: 12 80 00 0d bne 40002bcc 40002b9c: b2 10 00 02 mov %g2, %i1 40002ba0: 80 a4 60 00 cmp %l1, 0 40002ba4: 36 80 00 12 bge,a 40002bec 40002ba8: a4 10 20 00 clr %l2 BSP_output_char('-'); 40002bac: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED 40002bb0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002bb4: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 40002bb8: 82 1d 20 00 xor %l4, 0, %g1 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 40002bbc: a2 20 00 11 neg %l1 <== NOT EXECUTED if (maxwidth) maxwidth--; 40002bc0: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40002bc4: 82 40 20 00 addx %g0, 0, %g1 <== NOT EXECUTED 40002bc8: a8 25 00 01 sub %l4, %g1, %l4 <== NOT EXECUTED 40002bcc: 10 80 00 08 b 40002bec 40002bd0: a4 10 20 00 clr %l2 } count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); 40002bd4: 40 00 43 e7 call 40013b70 <.umul> 40002bd8: 92 10 00 15 mov %l5, %o1 40002bdc: 90 24 40 08 sub %l1, %o0, %o0 40002be0: a2 10 00 10 mov %l0, %l1 40002be4: d0 2f 00 12 stb %o0, [ %i4 + %l2 ] 40002be8: a4 10 00 13 mov %l3, %l2 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 40002bec: 90 10 00 11 mov %l1, %o0 40002bf0: 92 10 00 15 mov %l5, %o1 40002bf4: 40 00 44 19 call 40013c58 <.udiv> 40002bf8: a6 04 a0 01 add %l2, 1, %l3 40002bfc: a0 92 20 00 orcc %o0, 0, %l0 40002c00: 32 bf ff f5 bne,a 40002bd4 40002c04: 90 10 00 10 mov %l0, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40002c08: 82 07 40 12 add %i5, %l2, %g1 for (n=maxwidth ; n > count; n-- ) 40002c0c: a0 10 00 14 mov %l4, %l0 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; 40002c10: e2 28 7f e8 stb %l1, [ %g1 + -24 ] for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); 40002c14: 10 80 00 05 b 40002c28 40002c18: a2 10 00 17 mov %l7, %l1 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40002c1c: a0 04 3f ff add %l0, -1, %l0 BSP_output_char(lead); 40002c20: 9f c0 40 00 call %g1 40002c24: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40002c28: 80 a4 00 13 cmp %l0, %l3 40002c2c: 38 bf ff fc bgu,a 40002c1c 40002c30: c2 05 80 00 ld [ %l6 ], %g1 40002c34: a0 10 20 00 clr %l0 BSP_output_char(lead); for (n = 0; n < count; n++) { BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 40002c38: 10 80 00 07 b 40002c54 40002c3c: a2 07 40 13 add %i5, %l3, %l1 40002c40: c2 48 7f e7 ldsb [ %g1 + -25 ], %g1 40002c44: c4 05 80 00 ld [ %l6 ], %g2 40002c48: d0 4e c0 01 ldsb [ %i3 + %g1 ], %o0 40002c4c: 9f c0 80 00 call %g2 40002c50: 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++) { 40002c54: 80 a4 00 13 cmp %l0, %l3 40002c58: 0a bf ff fa bcs 40002c40 40002c5c: 82 24 40 10 sub %l1, %l0, %g1 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002c60: 10 80 00 04 b 40002c70 40002c64: b0 06 20 01 inc %i0 if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 40002c68: 9f c0 40 00 call %g1 40002c6c: b0 06 20 01 inc %i0 ) { char c, *str; int lflag, base, sign, width, lead, minus; for (; *fmt != '\0'; fmt++) { 40002c70: d0 4e 00 00 ldsb [ %i0 ], %o0 40002c74: 80 a2 20 00 cmp %o0, 0 40002c78: 12 bf ff 38 bne 40002958 40002c7c: 80 a2 20 25 cmp %o0, 0x25 base, sign, width, lead); } else { BSP_output_char(*fmt); } } } 40002c80: 81 c7 e0 08 ret 40002c84: 81 e8 00 00 restore 40016450 : ssize_t write( int fd, const void *buffer, size_t count ) { 40016450: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40016454: 03 10 00 5f sethi %hi(0x40017c00), %g1 40016458: c2 00 62 a8 ld [ %g1 + 0x2a8 ], %g1 ! 40017ea8 ssize_t write( int fd, const void *buffer, size_t count ) { 4001645c: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40016460: 80 a6 00 01 cmp %i0, %g1 40016464: 1a 80 00 0e bcc 4001649c 40016468: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001646c: 03 10 00 62 sethi %hi(0x40018800), %g1 40016470: c6 00 62 c8 ld [ %g1 + 0x2c8 ], %g3 ! 40018ac8 40016474: 85 2e 20 02 sll %i0, 2, %g2 40016478: 83 2e 20 04 sll %i0, 4, %g1 4001647c: 82 20 40 02 sub %g1, %g2, %g1 40016480: 82 00 40 18 add %g1, %i0, %g1 40016484: 83 28 60 02 sll %g1, 2, %g1 40016488: b0 00 c0 01 add %g3, %g1, %i0 rtems_libio_check_is_open( iop ); 4001648c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40016490: 80 88 61 00 btst 0x100, %g1 40016494: 12 80 00 06 bne 400164ac 40016498: 80 a6 60 00 cmp %i1, 0 4001649c: 7f ff da 1f call 4000cd18 <__errno> <== NOT EXECUTED 400164a0: 01 00 00 00 nop <== NOT EXECUTED 400164a4: 10 80 00 15 b 400164f8 <== NOT EXECUTED 400164a8: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 400164ac: 02 80 00 08 be 400164cc 400164b0: 01 00 00 00 nop rtems_libio_check_count( count ); 400164b4: 80 a6 a0 00 cmp %i2, 0 400164b8: 02 80 00 1b be 40016524 400164bc: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400164c0: 80 88 60 04 btst 4, %g1 400164c4: 32 80 00 06 bne,a 400164dc 400164c8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400164cc: 7f ff da 13 call 4000cd18 <__errno> <== NOT EXECUTED 400164d0: 01 00 00 00 nop <== NOT EXECUTED 400164d4: 10 80 00 09 b 400164f8 <== NOT EXECUTED 400164d8: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 400164dc: c2 00 60 0c ld [ %g1 + 0xc ], %g1 400164e0: 80 a0 60 00 cmp %g1, 0 400164e4: 12 80 00 08 bne 40016504 400164e8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 400164ec: 7f ff da 0b call 4000cd18 <__errno> <== NOT EXECUTED 400164f0: 01 00 00 00 nop <== NOT EXECUTED 400164f4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400164f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400164fc: 10 80 00 0a b 40016524 <== NOT EXECUTED 40016500: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 40016504: 9f c0 40 00 call %g1 40016508: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 4001650c: 80 a2 20 00 cmp %o0, 0 40016510: 04 80 00 05 ble 40016524 40016514: 01 00 00 00 nop iop->offset += rc; 40016518: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001651c: 82 00 40 08 add %g1, %o0, %g1 40016520: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 40016524: 81 c7 e0 08 ret 40016528: 91 e8 00 08 restore %g0, %o0, %o0